/* SnapJar — shared design system */
:root {
  --accent: #8a6b40;      --accent-ink: #ffffff;   --accent-text: #806239;
  --film:   #f2a93b;      --danger: #b5382c;   --ok: #2e7d52;
  --paper:  #f7f3ec;      --card: #fffdf9;
  --ink:    #241f1a;      --ink-soft: #6d6459;
  --line:   #e6ded0;      --chip-bg: #f0e9dc;  --input-bg: #fffdf9;
  --bar-bg: rgba(255,253,249,.94);
  --radius: 16px;         --shadow: 0 2px 10px rgba(36,31,26,.07);
  --font-ui:      "Karla", system-ui, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, monospace;
  --font-display: "Instrument Serif", Georgia, serif;
}
body[data-theme="confetti"] {
  --accent: #cc4060;   --accent-text: #b83552;
  --paper: #fffcf5;  --card: #ffffff;
  --ink: #2a1d1a;    --ink-soft: #7d685f;
  --line: #f0e2d2;   --chip-bg: #ffeadb;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
}
body[data-theme="neon"] {
  --accent: #b06bff;  --accent-ink: #17071f;  --accent-text: #b06bff;
  --paper: #0d0a14;   --card: #191327;
  --ink: #f2eefc;     --ink-soft: #a79dc4;
  --line: #2e2647;    --chip-bg: #271f3d;   --input-bg: #120e1f;
  --bar-bg: rgba(13,10,20,.94);
  --shadow: 0 4px 18px rgba(0,0,0,.5);
  --font-display: "Space Grotesk", system-ui, sans-serif;
}
body[data-theme="minimal"] {
  --accent: #3f6f9f;   --accent-text: #3f6f9f;
  --paper: #f4f6f8;  --card: #ffffff;
  --ink: #16202b;    --ink-soft: #5a6875;
  --line: #dfe5eb;   --chip-bg: #e9eef3;
  --shadow: 0 1px 4px rgba(22,32,43,.09);
  --font-display: "Karla", system-ui, sans-serif;
}
body[data-theme="minimal"] .display { font-weight: 800; letter-spacing: -.9px; }

body[data-theme="garden"] {
  --accent: #5b7a49;   --accent-text: #4c6a3c;
  --paper: #f6f7f0;  --card: #fffefa;
  --ink: #22291f;    --ink-soft: #626b58;
  --line: #e2e6d6;   --chip-bg: #ecefdf;
  --font-display: "Newsreader", Georgia, serif;
}
body[data-theme="garden"] .display { font-style: italic; font-weight: 400; }

body[data-theme="blacktie"] {
  --accent: #c8a960;  --accent-ink: #1a1509;  --accent-text: #c8a960;
  --paper: #12100e;   --card: #1c1916;
  --ink: #f4efe6;     --ink-soft: #a89e8f;
  --line: #322c26;    --chip-bg: #2a2520;   --input-bg: #17140f;
  --bar-bg: rgba(18,16,14,.94);
  --shadow: 0 4px 18px rgba(0,0,0,.5);
  --font-display: "Instrument Serif", Georgia, serif;
}
body[data-theme="blacktie"] .display { text-transform: uppercase; letter-spacing: 3px; }

body[data-theme="gameday"] {
  --accent: #c8323f;  --accent-ink: #ffffff;  --accent-text: #f0707c;
  --trim:   #c9962f;
  --paper: #0e1114;   --card: #171c21;
  --ink: #eef2f5;     --ink-soft: #9fadb8;
  --line: #28313a;    --chip-bg: #202931;  --input-bg: #12171b;
  --bar-bg: rgba(14,17,20,.94);
  --shadow: 0 4px 18px rgba(0,0,0,.5);
  --font-display: "Archivo", system-ui, sans-serif;
}
body[data-theme="gameday"] .display {
  font-weight: 900; text-transform: uppercase; letter-spacing: -.8px;
}
body[data-theme="gameday"] .evhead h1::after {
  content: ""; display: block; width: 96px; height: 3px;
  margin: 14px auto 0; background: var(--trim);
}
body[data-theme="gameday"][data-team="crimson"] { --accent:#c8323f; --accent-ink:#fff;    --accent-text:#f0707c; }
body[data-theme="gameday"][data-team="navy"]    { --accent:#1e3f7a; --accent-ink:#fff;    --accent-text:#6f9be0; }
body[data-theme="gameday"][data-team="forest"]  { --accent:#1f6b46; --accent-ink:#fff;    --accent-text:#5cc48c; }
body[data-theme="gameday"][data-team="royal"]   { --accent:#2f6fd0; --accent-ink:#fff;    --accent-text:#7aa9ee; }
body[data-theme="gameday"][data-team="kelly"]   { --accent:#197a42; --accent-ink:#fff;    --accent-text:#5cc48c; }
body[data-theme="gameday"][data-team="orange"]  { --accent:#b34e19; --accent-ink:#fff;    --accent-text:#f0876b; }
body[data-theme="gameday"][data-team="teal"]    { --accent:#044c53; --accent-ink:#fff;    --accent-text:#4fb8a5; }
body[data-theme="gameday"][data-team="steel"]   { --accent:#2f6a8c; --accent-ink:#fff;    --accent-text:#79b6d6; }
body[data-theme="gameday"][data-team="burgundy"]{ --accent:#b03848; --accent-ink:#fff;    --accent-text:#e8808c; }
body[data-theme="gameday"][data-team="silver"]  { --accent:#8b98a3; --accent-ink:#0e1114; --accent-text:#8b98a3; }
body[data-theme="gameday"][data-team="gold"]    { --accent:#c9962f; --accent-ink:#17100d; --accent-text:#c9962f; }
body[data-theme="gameday"][data-trim="gold"]    { --trim: #c9962f; }
body[data-theme="gameday"][data-trim="silver"]  { --trim: #8b98a3; }
body[data-theme="gameday"][data-trim="chalk"]   { --trim: #eef2f5; }
body[data-theme="gameday"][data-trim="crimson"] { --trim: #d33a4e; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-family: var(--font-ui);
  min-height: 100dvh;
}
body.dark { background: #14110e; color: #f2ede6; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: .2px; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 96px; }
.wrap.wide { max-width: 980px; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px;
}
body.dark .card { background: #201b16; box-shadow: none; border: 1px solid #322a22; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 12px 20px; font-weight: 600; font-size: 15px;
  transition: transform .06s ease, opacity .2s;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-soft); }
.btn-danger { color: var(--danger); border-color: #eecbc5; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; letter-spacing: .3px; text-transform: uppercase; }
.field input[type=text], .field input[type=date], .field input[type=number],
.field input[type=password], .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); background: var(--input-bg);
  border-radius: 12px; padding: 12px 14px; font-size: 16px; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.hint { font-size: 13px; color: var(--ink-soft); margin-top: 5px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--chip-bg); color: var(--ink); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; font-weight: 600; border: 1.5px solid transparent;
}
.chip.on { background: var(--accent); color: #fff; }
.chip-btn { cursor: pointer; user-select: none; }

.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(20px);
  background: #2b2620; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 300; max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* bottom tab bar (guest app) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; background: var(--bar-bg); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; background: none; border: none; padding: 9px 4px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--ink-soft); font-size: 11px; font-weight: 700;
}
.tabbar button .ico { font-size: 22px; line-height: 1; }
.tabbar button.on { color: var(--accent); }

/* gallery grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid a.ph { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #eee4d6; }
.grid a.ph img { width: 100%; height: 100%; object-fit: cover; display: block;
  object-position: calc(var(--fx, 50) * 1%) calc(var(--fy, 50) * 1%); }
.grid .badge { position: absolute; right: 6px; top: 6px; font-size: 13px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.grid .who { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(12,10,8,.96);
  display: none; flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox .lb-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; color: #fff; gap: 8px; }
.lightbox .lb-top .meta { min-width: 0; }
.lightbox .lb-top .nm { font-weight: 700; }
.lightbox .lb-top .sub { font-size: 12.5px; opacity: .75; }
.lightbox .lb-media { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; position: relative; }
.lightbox .lb-media img, .lightbox .lb-media video { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .lb-actions { display: flex; gap: 10px; padding: 14px; justify-content: center; align-items: center; }
.lightbox .lb-actions .btn { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.lightbox .nav { position: absolute; top: 0; bottom: 0; width: 34%; opacity: 0; }
.lightbox .nav.prev { left: 0; } .lightbox .nav.next { right: 0; }
.x-btn { background: none; border: none; color: inherit; font-size: 26px; line-height: 1; padding: 4px 8px; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 13px 8px; text-align: center; }
.stat b { display: block; font-size: 24px; font-family: var(--font-mono); }
.stat span { font-size: 12px; color: var(--ink-soft); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }

.row { display: flex; gap: 10px; align-items: center; }
.row.wrapz { flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 14px; } .mb0 { margin-bottom: 0; }

/* toggle switch */
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 2; }
.switch .knob { position: absolute; inset: 0; border-radius: 999px; background: #ddd3c4; transition: .18s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .knob { background: var(--accent); }
.switch input:checked + .knob::after { left: 21px; }

.setting-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: none; }
.setting-row .lbl b { display: block; font-size: 15px; }
.setting-row .lbl span { font-size: 12.5px; color: var(--ink-soft); }
.setting-row .lbl { flex: 1; }

/* film strip of my shots */
.filmstrip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px; scrollbar-width: none; }
.filmstrip::-webkit-scrollbar { display: none; }
.filmstrip .shot { position: relative; flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #3a332b; border: 2px solid #4d4238; }
.filmstrip .shot img { width: 100%; height: 100%; object-fit: cover; }
.filmstrip .shot .st { position: absolute; right: 3px; bottom: 3px; font-size: 12px; }
.filmstrip .shot.fail { border-color: var(--danger); }

@keyframes develop { from { filter: sepia(1) brightness(.5) contrast(.7); } to { filter: none; } }
.developing img { animation: develop 1.6s ease forwards; }

@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.pop { animation: pop .25s ease; }

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(127,127,127,.35); border-top-color: var(--accent); border-radius: 50%; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.empty { text-align: center; color: var(--ink-soft); padding: 34px 12px; }
.empty .big { font-size: 44px; margin-bottom: 8px; }

/* header banner for guest app */
.evhead { text-align: center; padding: 22px 14px 10px; }
.evhead .kicker { font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; }
.evhead h1 { font-size: 30px; margin: 6px 0 2px; }
.evhead .date { color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.evhead .welcome { font-size: 14.5px; color: var(--ink-soft); max-width: 420px; margin: 8px auto 0; }

/* challenge cards */
.task { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: none; }
.task .em { font-size: 26px; width: 38px; text-align: center; flex: none; }
.task .t { flex: 1; min-width: 0; }
.task .t b { display: block; font-size: 15.5px; }
.task .t span { font-size: 12.5px; color: var(--ink-soft); }
.task.done .t b { text-decoration: line-through; opacity: .6; }

/* guestbook */
.gb-msg { padding: 13px 0; border-bottom: 1px solid var(--line); }
.gb-msg:last-child { border-bottom: none; }
.gb-msg .who { font-weight: 700; font-size: 13.5px; }
.gb-msg .when { color: var(--ink-soft); font-weight: 400; font-size: 12px; margin-left: 6px; }
.gb-msg p { margin: 4px 0 0; font-size: 15px; }

.tag-accent { color: var(--accent); }
.pill-count { background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 800; }

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
}

/* ============================================================
   Redesign Part 2 — overrides + accent picker.
   Must stay at the END of this file: these re-declare selectors
   that exist above at the same specificity and win on source order.
   ============================================================ */

::placeholder { color: var(--ink-soft); opacity: 1; }

a, .tabbar button.on, .tag-accent { color: var(--accent-text); }
.chip.on { color: var(--accent-ink); }

.task.done .t b { opacity: 1; color: var(--ink-soft); text-decoration: line-through; }
.modgrid .m.hidden-ph img    { opacity: .4; }
.modgrid .m.hidden-ph::after { opacity: 1; }

body[data-theme="confetti"] .evhead h1::after {
  content: ""; display: block; width: 78px; height: 4px; border-radius: 999px;
  margin: 8px auto 0; background: linear-gradient(96deg, #cc4060, #f0a93b 52%, #3aa0c4);
}

body:has(#tab-camera.on) .tabbar           { background: #191512; border-top-color: #2c251d; }
body:has(#tab-camera.on) .tabbar button    { color: #a89e8f; }
body:has(#tab-camera.on) .tabbar button.on { color: var(--film); }

:root {
  --look-none:   none;
  --look-golden: sepia(.28) saturate(1.18) contrast(1.05) brightness(1.03);
  --look-faded:  contrast(.86) saturate(.8) brightness(1.08) sepia(.12);
  --look-mono:   grayscale(1) contrast(1.12) brightness(1.02);
  --look-night:  contrast(1.28) saturate(1.12) brightness(.93);
}
img[data-look="golden"], video[data-look="golden"] { filter: var(--look-golden); }
img[data-look="faded"],  video[data-look="faded"]  { filter: var(--look-faded);  }
img[data-look="mono"],   video[data-look="mono"]   { filter: var(--look-mono);   }
img[data-look="night"],  video[data-look="night"]  { filter: var(--look-night);  }

.ico { fill: none; stroke: currentColor; stroke-width: 1.75;
       stroke-linecap: round; stroke-linejoin: round; }

body[data-accent="bronze"]     { --accent: #8a6b40; --accent-ink: #ffffff; --accent-text: #806239; }
body[data-accent="raspberry"]  { --accent: #cc4060; --accent-ink: #ffffff; --accent-text: #b83552; }
body[data-accent="terracotta"] { --accent: #ba5532; --accent-ink: #ffffff; --accent-text: #a34526; }
body[data-accent="fern"]       { --accent: #4f7f5e; --accent-ink: #ffffff; --accent-text: #456f52; }
body[data-accent="steel"]      { --accent: #3f6f9f; --accent-ink: #ffffff; --accent-text: #3f6f9f; }
body[data-accent="iris"]       { --accent: #7a5fc4; --accent-ink: #ffffff; --accent-text: #6a4fb0; }
body[data-accent="violet"]     { --accent: #b06bff; --accent-ink: #17071f; --accent-text: #7b3fd4; }
body[data-accent="ink"]        { --accent: #2f2a33; --accent-ink: #ffffff; --accent-text: #2f2a33; }
