/* ==========================================================================
   Wedding site — base styles + the default "Romantic florals" theme.
   Other themes live in assets/css/themes/ and only override the variables below
   (plus a few theme-specific touches). Pick the theme in Admin → Themes.
   ========================================================================== */
:root {
  --paper: #fbf7f3;
  --paper-2: #f5ece6;
  --card: #fffdfb;
  --ink: #3d3233;
  --muted: #86777a;
  --rose: #c48f8d;
  --rose-deep: #9c6264;
  --blush: #ecd3cf;
  --sage: #8b9a84;
  --sage-light: #dfe5d8;
  --gold: #c8a96e;
  --line: rgba(61, 50, 51, .12);

  --serif: "EB Garamond", "Times New Roman", serif;
  --sans: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 6px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow: 0 1px 2px rgba(61, 50, 51, .04), 0 8px 30px rgba(61, 50, 51, .06);

  /* Roles: --rose-deep = main accent (buttons, links), --rose = light accent, --blush = soft accent,
     --sage / --sage-light = ornament lines / leaves, --gold = small highlights */
  --on-accent: #fff;                         /* text on accent-coloured buttons */
  --bar-bg: rgba(251, 247, 243, .92);        /* top bar after scrolling */
  --glow-1: rgba(236, 211, 207, .55);        /* hero background glows */
  --glow-2: rgba(223, 229, 216, .7);
  --field-line: rgba(61, 50, 51, .25);       /* form field borders */
  --soft-fill: rgba(61, 50, 51, .18);        /* switches off, watched stories */
  --glass: rgba(255, 255, 255, .5);          /* countdown boxes */
  --italic: italic;                          /* display text style: italic | normal */
  --h-weight: 400;
  --h-transform: none;
  --h-spacing: normal;
  --names-size: clamp(54px, 13vw, 128px);
  --btn-radius: 999px;
  --btn-spacing: .14em;
  --sprig: block;                            /* floral ornaments: block | none */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 300 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--rose-deep); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: var(--h-weight); line-height: 1.15; margin: 0; }
h2 { font-size: clamp(34px, 6vw, 52px); font-style: var(--italic); text-transform: var(--h-transform); letter-spacing: var(--h-spacing); text-align: center; margin-bottom: .5em; }
h3 { font-size: 26px; }
p { margin: 0 0 1em; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 720px; }
.center { text-align: center; }
.lead { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 32px; }
.prose { font-size: 18px; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Floral line art ---------- */
.sprig { display: var(--sprig); width: 92px; height: 92px; margin: 0 auto 18px; color: var(--sage); overflow: visible; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; border: 1px solid var(--rose-deep); border-radius: var(--btn-radius);
  background: var(--rose-deep); color: var(--on-accent); font: 500 13px/1 var(--sans);
  letter-spacing: var(--btn-spacing); text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--rose-deep); }
.btn.ghost:hover { background: var(--rose-deep); color: var(--on-accent); border-color: var(--rose-deep); }
.btn.small { padding: 10px 20px; font-size: 12px; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 64px;
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gutter);
  transition: background .3s, box-shadow .3s, color .3s;
}
.topbar.scrolled { background: var(--bar-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.brand { font: var(--italic) 400 22px/1 var(--serif); color: var(--ink); text-decoration: none; margin-right: auto; opacity: 0; transition: opacity .3s; }
.topbar.scrolled .brand { opacity: 1; }
.nav { display: flex; gap: 26px; }
.nav a, .lang { color: var(--ink); text-decoration: none; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; }
.nav a:hover { color: var(--rose-deep); }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 500; }
.lang:hover { border-color: var(--rose-deep); color: var(--rose-deep); }
.menu-btn { display: none; width: 40px; height: 40px; border: 0; background: none; padding: 10px 8px; cursor: pointer; }
.menu-btn span { display: block; height: 1.5px; background: var(--ink); margin: 6px 0; transition: transform .25s; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

body:has(.hero.has-photo) .topbar:not(.scrolled) .nav a,
body:has(.hero.has-photo) .topbar:not(.scrolled) .lang { color: #fff; border-color: rgba(255,255,255,.4); }
body:has(.hero.has-photo) .topbar:not(.scrolled) .menu-btn span { background: #fff; }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .brand { opacity: 1; font-size: 20px; }
  body:has(.hero.has-photo) .topbar:not(.scrolled) .brand { color: #fff; }
  .nav {
    position: fixed; inset: 64px 0 auto; flex-direction: column; gap: 0;
    background: var(--paper); box-shadow: 0 12px 30px rgba(0,0,0,.08);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .nav.open { max-height: 420px; }
  .nav a, body:has(.hero.has-photo) .topbar:not(.scrolled) .nav a { color: var(--ink); padding: 16px var(--gutter); border-top: 1px solid var(--line); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center;
  padding: 110px var(--gutter) 70px; text-align: center; overflow: hidden;
  background:
    radial-gradient(60% 50% at 15% 10%, var(--glow-1), transparent 70%),
    radial-gradient(50% 45% at 90% 95%, var(--glow-2), transparent 70%),
    var(--paper);
}
.hero-photo { position: absolute; inset: 0; background-size: cover; background-position: center 30%; transform: scale(1.04); animation: heroZoom 18s ease-out forwards; }
.hero.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40,28,29,.35) 0%, rgba(40,28,29,.25) 45%, rgba(40,28,29,.6) 100%); }
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero.has-photo .hero-inner { color: #fff; }
.hero-flowers { position: absolute; inset: 0; pointer-events: none; }
.hero-flowers .sprig { position: absolute; width: clamp(170px, 30vw, 380px); height: auto; aspect-ratio: 1; margin: 0; opacity: .95; }
.hero-flowers .sprig:first-child { left: clamp(-60px, -3vw, -10px); top: clamp(40px, 6vw, 70px); transform: rotate(-12deg); }
.hero-flowers .sprig:last-child { right: clamp(-60px, -3vw, -10px); bottom: clamp(-20px, 1vw, 20px); transform: rotate(168deg); }
@media (max-width: 700px) {
  .hero-flowers .sprig { width: 150px; opacity: .7; }
  .hero-flowers .sprig:first-child { left: -50px; top: 50px; }
  .hero-flowers .sprig:last-child { right: -50px; bottom: -10px; }
}
.hero.has-photo .hero-flowers { display: none; }
.eyebrow { font-size: 13px; letter-spacing: .32em; text-transform: uppercase; margin-bottom: 18px; color: var(--muted); }
.hero.has-photo .eyebrow { color: rgba(255,255,255,.85); }
.names { font-size: var(--names-size); font-style: var(--italic); letter-spacing: -.01em; line-height: 1; }
.names .amp { display: block; font-size: .42em; color: var(--rose); margin: .12em 0 .08em; font-style: var(--italic); }
.hero.has-photo .names .amp { color: var(--blush); }
.hero-date { font-family: var(--serif); font-size: clamp(22px, 3.4vw, 28px); margin: 22px 0 26px; letter-spacing: .04em; }
.hero-date::before, .hero-date::after { content: ""; display: inline-block; width: 36px; height: 1px; background: currentColor; opacity: .4; vertical-align: middle; margin: 0 16px; }
.hero-intro { max-width: 520px; margin: 26px auto 30px; color: var(--muted); }
.hero.has-photo .hero-intro { color: rgba(255,255,255,.9); }
.hero.has-photo .btn { background: #fff; color: #2b2526; border-color: #fff; }
.hero.has-photo .btn:hover { background: var(--blush); border-color: var(--blush); }

.countdown { display: inline-grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.countdown div { min-width: 74px; padding: 12px 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass); }
.hero.has-photo .countdown div { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.1); backdrop-filter: blur(4px); }
.countdown b { display: block; font: 400 32px/1 var(--serif); font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.countdown.done { display: block; font: var(--italic) 30px/1.2 var(--serif); }
@keyframes heroZoom { to { transform: scale(1); } }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 130px) 0; }
.story { background: var(--card); text-align: center; }
.story .prose { text-align: left; }
@media (min-width: 700px) { .story .prose { text-align: center; } }

.details { background: var(--paper-2); text-align: center; }
.big-date { display: flex; justify-content: center; align-items: center; gap: 18px; font: 400 clamp(44px, 9vw, 76px)/1 var(--serif); color: var(--rose-deep); margin: 10px 0 46px; }
.big-date i { width: 1px; height: .8em; background: var(--rose); opacity: .5; transform: rotate(20deg); }
.events { display: grid; gap: 24px; margin: 0 auto 36px; max-width: 860px; }
.events.n2, .events.n4 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.events.n3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 1000px; }
.events.n4 { max-width: 860px; }
.event { position: relative; }
.event { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 28px 34px; box-shadow: var(--shadow); }
.event .sprig { width: 64px; height: 64px; margin-bottom: 10px; }
.event h3 { font-style: var(--italic); font-size: 32px; margin-bottom: 8px; }
.event-time { font: 500 14px/1 var(--sans); letter-spacing: .2em; color: var(--rose-deep); margin-bottom: 18px; }
.event-venue { font-family: var(--serif); font-size: 22px; margin-bottom: 4px; }
.event-address { color: var(--muted); font-size: 15px; }
.event-note { font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.details-note { max-width: 620px; margin: 0 auto 30px; color: var(--muted); font-size: 17px; }

/* ---------- Photos / Instagram ---------- */
.photos { text-align: center; }
.hashtag {
  display: inline-flex; align-items: center; gap: 14px; margin: 0 auto 40px; padding: 12px 14px 12px 26px;
  border: 1px dashed var(--rose); border-radius: 999px; background: var(--card); cursor: pointer;
  font: var(--italic) 400 clamp(22px, 4vw, 30px)/1 var(--serif); color: var(--rose-deep);
}
.hashtag small { font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--on-accent); background: var(--rose-deep); padding: 9px 14px; border-radius: 999px; font-style: normal; }
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 45%), 1fr)); gap: 10px; margin: 0 0 36px; }
.ig-grid a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--paper-2); cursor: zoom-in; }
.ig-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.ig-grid a:hover img { transform: scale(1.05); }
.ig-more { margin: -12px 0 36px; }
.ig-empty { color: var(--muted); font: var(--italic) 20px/1.4 var(--serif); margin: 0 0 30px; }
.ig-grid .vid::after { content: "▶"; position: absolute; top: 8px; right: 10px; color: #fff; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }

/* ---------- Guestbook ---------- */
.guestbook { background: var(--card); }
.guestbook > .wrap > .sprig { margin-bottom: 18px; }
.gb-form {
  max-width: 640px; margin: 0 auto 70px; padding: clamp(24px, 5vw, 44px);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.field { display: block; margin-bottom: 22px; }
.field > span { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.field input[type=text], .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--field-line); background: transparent; padding: 10px 2px;
  font: 400 18px/1.5 var(--serif); color: var(--ink); border-radius: 0; resize: vertical; transition: border-color .2s;
}
.field textarea { border: 1px solid var(--field-line); border-radius: 4px; padding: 12px 14px; background: var(--card); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--rose-deep); }
.field.invalid input, .field.invalid textarea { border-color: #b04a4a; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.photo-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.previews { display: contents; }
.preview, .add-photo { width: 92px; height: 92px; border-radius: 6px; position: relative; overflow: hidden; }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview button {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: rgba(40,28,29,.7); color: #fff; font-size: 16px; line-height: 1; cursor: pointer;
}
.add-photo {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  border: 1px dashed var(--field-line); color: var(--muted); cursor: pointer; font-size: 11px; line-height: 1.2; padding: 6px; background: var(--card);
}
.add-photo:hover { border-color: var(--rose-deep); color: var(--rose-deep); }
.add-photo svg { width: 22px; height: 22px; }
.add-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.add-photo[hidden] { display: none; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.form-foot small { color: var(--muted); font-size: 13px; }
.private-toggle { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 22px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; }
.private-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.private-toggle .switch { flex: none; width: 42px; height: 24px; margin-top: 2px; border-radius: 12px; background: var(--soft-fill); position: relative; transition: background .2s; }
.private-toggle .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.private-toggle input:checked + .switch { background: var(--rose-deep); }
.private-toggle input:checked + .switch::after { transform: translateX(18px); }
.private-toggle input:focus-visible + .switch { outline: 2px solid var(--rose); outline-offset: 2px; }
.private-toggle strong { display: block; font-weight: 500; font-size: 15px; }
.private-toggle small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 2px; }
.form-error { color: #a03c3c; background: #fbeceb; border-radius: 4px; padding: 10px 14px; font-size: 15px; }
.form-success { max-width: 640px; margin: 0 auto 60px; padding: 28px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; font: var(--italic) 24px/1.4 var(--serif); color: var(--rose-deep); }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--blush); }
.progress i { display: block; height: 100%; width: 0; background: var(--rose-deep); transition: width .2s; }

.wall { columns: 3 300px; column-gap: 22px; margin: 0 auto; }
.wall.c1 { columns: 1; max-width: 440px; }
.wall.c2 { columns: 2 300px; max-width: 760px; }
.wish {
  break-inside: avoid; margin: 0 0 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); animation: wishIn .5s ease both;
}
.wish.new { box-shadow: 0 0 0 2px var(--blush), var(--shadow); }
.wish-photos { display: grid; gap: 2px; }
.wish-photos.n2 { grid-template-columns: 1fr 1fr; }
.wish-photos.n3 { grid-template-columns: 1fr 1fr; }
.wish-photos.n3 .wish-photo:first-child { grid-column: span 2; }
.wish-photos.n2 img, .wish-photos.n3 img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.wish-photos.n3 .wish-photo:first-child img { aspect-ratio: 3 / 2; }
.wish-photo { display: block; cursor: zoom-in; }
.wish-text { padding: 22px 24px 4px; font: 400 19px/1.55 var(--serif); white-space: normal; overflow-wrap: anywhere; }
.wish-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 24px 20px; }
.wish-photos + .wish-meta { padding-top: 16px; }
.wish-name { font: var(--italic) 500 18px/1.2 var(--serif); color: var(--rose-deep); }
.wish-name::before { content: "— "; }
.wish-date { font-size: 12px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.wall-empty { text-align: center; color: var(--muted); font: var(--italic) 22px var(--serif); }
@keyframes wishIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Contact ---------- */
.contact { background: var(--paper-2); text-align: center; }
.people { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.person { min-width: 240px; padding: 28px 30px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.person h3 { font-style: var(--italic); margin-bottom: 10px; }
.person a { display: block; text-decoration: none; margin-top: 4px; }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 70px var(--gutter) 60px; color: var(--muted); font-size: 15px; }
.footer .sprig { width: 70px; height: 70px; }
.footer-names { font: var(--italic) 34px/1.2 var(--serif); color: var(--ink); margin-bottom: 6px; }
.footer-tag { color: var(--rose-deep); margin-top: 6px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(26,18,19,.94); display: grid; place-items: center; padding: 50px 60px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 100px); object-fit: contain; border-radius: 2px; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 44px; line-height: 1; cursor: pointer; padding: 10px 16px; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 8px; right: 10px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
@media (max-width: 600px) { .lightbox { padding: 50px 8px; } }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-photo, .wish { animation: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .countdown { gap: 6px; }
  .countdown div { min-width: 0; padding: 10px 4px 8px; }
  .countdown b { font-size: 26px; }
  .countdown span { font-size: 9.5px; letter-spacing: .08em; }
  .hero-date::before, .hero-date::after { width: 20px; margin: 0 10px; }
  .form-foot .btn { width: 100%; }
}

/* ---------- Sub-pages (all wishes, all shorts) ---------- */
.page-head { padding: 110px 0 10px; text-align: center; background: var(--paper-2); }
.page-head h1 { font-size: clamp(40px, 8vw, 64px); font-style: var(--italic); margin-bottom: 12px; }
.page-head .lead { margin-bottom: 24px; }
.page-head .back { display: inline-block; margin-bottom: 18px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.page-head .back:hover { color: var(--rose-deep); }
.page-head .btn { margin-bottom: 40px; }
.count-pill { display: inline-block; padding: 6px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--muted); margin-bottom: 40px; }
.page-body { padding-top: 50px; }
.write-wish { max-width: 640px; margin: 0 auto 50px; text-align: center; }
.write-wish > summary { list-style: none; }
.write-wish > summary::-webkit-details-marker { display: none; }
.write-wish[open] > summary { display: none; }
.write-wish .gb-form { text-align: left; }
.form-success p { margin: 0 0 14px; }
.btn.wide { width: 100%; }

/* ---------- Shorts row (story bubbles) ---------- */
.shorts { text-align: center; background: var(--card); }
.short-row { display: flex; gap: 16px; overflow-x: auto; padding: 6px 4px 18px; margin: 0 calc(-1 * var(--gutter)) 18px; padding-left: var(--gutter); padding-right: var(--gutter); scroll-snap-type: x proximity; scrollbar-width: none; justify-content: safe center; }
.short-row::-webkit-scrollbar { display: none; }
.short-bubble { flex: none; width: 82px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; color: var(--ink); scroll-snap-align: start; font: inherit; }
.short-bubble .ring { width: 78px; height: 78px; border-radius: 50%; padding: 3px; background: conic-gradient(from 200deg, var(--gold), var(--rose), var(--rose-deep), var(--gold)); transition: transform .2s; }
.short-bubble:hover .ring { transform: scale(1.05); }
.short-bubble.seen .ring { background: var(--soft-fill); }
.short-bubble .thumb { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 3px solid var(--card); background: var(--paper-2); color: var(--rose-deep); font: var(--italic) 28px/1 var(--serif); }
.short-bubble .thumb img { width: 100%; height: 100%; object-fit: cover; }
.short-bubble.add .ring { background: none; border: 1.5px dashed var(--rose); padding: 2px; }
.short-bubble.add .thumb { border: 0; background: var(--paper); }
.short-bubble.add svg { width: 28px; height: 28px; }
.short-name { font-size: 12.5px; line-height: 1.25; max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.small-empty { font-size: 18px; margin-bottom: 26px; }

/* ---------- Shorts grid (all shorts page) ---------- */
.short-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 46%), 1fr)); gap: 12px; }
.short-tile { position: relative; aspect-ratio: 9 / 16; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--ink); color: #fff; text-align: left; font: inherit; box-shadow: var(--shadow); }
.short-tile img, .tile-blank { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-blank { background: linear-gradient(160deg, var(--rose), var(--rose-deep)); }
.short-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.65)); }
.tile-play { position: absolute; top: 10px; right: 10px; z-index: 1; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.85); }
.tile-play::after { content: ""; position: absolute; left: 10px; top: 7px; border: 6px solid transparent; border-left: 9px solid var(--ink); }
.tile-meta { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; }
.tile-meta b { display: block; font: var(--italic) 500 18px/1.2 var(--serif); }
.tile-meta small { display: block; font-size: 12px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.short-tile.seen { opacity: .82; }

/* ---------- Upload sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 90; background: rgba(26,18,19,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-panel { position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; background: var(--paper); border-radius: 18px 18px 0 0; padding: 30px 24px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.2); animation: sheetUp .3s ease; }
@media (min-width: 600px) { .sheet { align-items: center; } .sheet-panel { border-radius: 16px; } }
.sheet-panel h3 { font-style: var(--italic); text-align: center; margin-bottom: 22px; font-size: 30px; }
.sheet-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--muted); cursor: pointer; }
.short-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.pick-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 22px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; cursor: pointer; text-align: center; }
.pick-btn.primary { background: var(--rose-deep); border-color: var(--rose-deep); color: var(--on-accent); }
.pick-btn svg { width: 30px; height: 30px; }
.pick-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.muted-note { grid-column: 1 / -1; margin: 0; text-align: center; color: var(--muted); font-size: 13px; }
.short-preview { text-align: center; margin-bottom: 18px; }
.short-preview video { display: block; width: auto; max-width: 100%; max-height: 42vh; margin: 0 auto 8px; border-radius: 12px; background: #000; }
.link-btn { background: none; border: 0; color: var(--rose-deep); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sheet .form-success { margin: 10px 0 0; }
.sheet .progress { position: static; margin-top: 12px; border-radius: 3px; overflow: hidden; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }

/* ---------- Story viewer ---------- */
.sv { position: fixed; inset: 0; z-index: 110; background: #000; display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.sv[hidden] { display: none; }
.sv-video { width: 100%; height: 100%; max-width: 560px; object-fit: contain; background: #000; }
.sv-bar { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 12px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; z-index: 3; max-width: 536px; margin: 0 auto; }
.sv-bar i { display: block; height: 100%; width: 0; background: #fff; }
.sv-head { position: absolute; top: calc(20px + env(safe-area-inset-top)); left: 16px; right: 10px; z-index: 3; display: flex; justify-content: space-between; align-items: center; color: #fff; max-width: 540px; margin: 0 auto; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.sv-name { display: block; font: var(--italic) 500 20px/1.2 var(--serif); }
.sv-count { font-size: 12px; opacity: .8; }
.sv-actions { display: flex; gap: 4px; }
.sv-actions button { width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; }
.sv-mute::before { content: "🔊"; font-size: 20px; }
.sv-mute.off::before { content: "🔇"; }
.sv-caption { position: absolute; left: 0; right: 0; bottom: calc(30px + env(safe-area-inset-bottom)); z-index: 3; max-width: 520px; margin: 0 auto; padding: 0 20px; color: #fff; text-align: center; font: 400 19px/1.45 var(--serif); text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.sv-nav { position: absolute; top: 80px; bottom: 90px; width: 35%; z-index: 2; border: 0; background: none; cursor: pointer; }
.sv-nav.prev { left: 0; }
.sv-nav.next { right: 0; width: 65%; }

/* ---------- Admin theme preview banner ---------- */
.theme-preview-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 200; background: #222; color: #fff; font: 400 13px/1.4 system-ui, sans-serif; padding: 9px 16px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.25); width: max-content; max-width: calc(100% - 24px); text-align: center; }
@media (max-width: 600px) { .theme-preview-bar { border-radius: 14px; font-size: 12px; } }
.theme-preview-bar a { color: #ffd88a; margin-left: 10px; }
