/* OakDrop — Starbucks-inspired design system.
   Warm cream canvas, four-tier green brand system, gold reserved for premium
   "membership" moments only, universal 50px full-pill buttons, whisper-soft
   layered shadows, color-block surfaces (no gradients). Class hooks are kept
   stable so the vanilla JS keeps rendering — only the skin changed. */
:root {
  /* OakDrop brand palette (from the brand sheet) mapped to surface roles */
  --sb-green: #1F3F32;      /* deep forest — headings + wordmark */
  --accent:   #2E6B4E;      /* primary CTA fill / focus */
  --accent-hi:#285f45;      /* CTA hover */
  --house:    #1F3F32;      /* deep feature bands + footer */
  --uplift:   #2b5148;      /* decorative mid green */
  --sage:     #A9B9A7;      /* soft sage — borders, quiet accents */
  --green-light: #e2ebe4;   /* pale sage-mint utility tint */

  /* gold — premium / membership ceremony ONLY, never a general accent */
  --gold:      #C8A15A;
  --gold-soft: #dcc08a;
  --gold-wash: #f7f0e2;

  /* warm-neutral surfaces (references the artwork's cream canvas) */
  --canvas:  #F2EDE4;       /* primary page canvas */
  --ceramic: #e9e3d6;       /* zone separators / tile backs */
  --white:   #ffffff;       /* card + modal surface */
  --cool:    #f7f4ec;       /* quiet utility surface */

  /* ink — never pure black on the warm canvas */
  --ink:        rgba(0, 0, 0, .87);
  --ink-soft:   rgba(0, 0, 0, .58);
  --white-soft: rgba(255, 255, 255, .70);
  --line:       #e7e7e7;    /* hairlines */
  --field:      #d6dbde;    /* input borders */
  --danger:     #c82014;

  /* geometry + elevation */
  --radius: 12px;           /* cards, modals, tiles */
  --pill: 50px;             /* every button */
  --shadow-card: 0 0 .5px rgba(0, 0, 0, .14), 0 1px 1px rgba(0, 0, 0, .24);
  --shadow-lift: 0 2px 8px rgba(0, 0, 0, .12);
  --shadow-nav:  0 1px 3px rgba(0, 0, 0, .1), 0 2px 2px rgba(0, 0, 0, .06), 0 0 2px rgba(0, 0, 0, .07);

  /* SoDoSans is proprietary — use its documented Helvetica fallback stack,
     honoring the no-CDN rule. Tight negative tracking is the brand voice. */
  --sans:  'Helvetica Neue', Helvetica, Arial, system-ui, -apple-system, sans-serif;
  --serif: 'Iowan Old Style', Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh;
  background: var(--canvas); color: var(--ink);
  font: 16px/1.5 var(--sans); letter-spacing: -.01em;
  overflow-x: clip;
}
h1, h2, h3 {
  font-family: var(--sans); font-weight: 600; line-height: 1.2;
  letter-spacing: -.016em; color: var(--sb-green); margin: 0 0 .5rem;
}
a { color: var(--accent); }
img, video, canvas, svg { max-width: 100%; }
.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 1000;
  padding: 10px 14px; border-radius: 0 0 8px 8px;
  background: var(--white); color: var(--house); font-weight: 700;
  box-shadow: var(--shadow-nav);
}
.skip-link:focus { top: 0; }
.btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [role="button"]:focus-visible {
  outline: 3px solid rgba(200, 161, 90, .9); outline-offset: 3px;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* top bar — fixed café signage with a quiet triple-layer lift */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  background: var(--white); box-shadow: var(--shadow-nav);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--house); }
.brand svg { width: 30px; height: 30px; }
.brand img { height: 30px; width: auto; display: block; }
.brand b { font-family: var(--sans); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; color: var(--house); }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--ink-soft); font-size: .85rem; }

/* account dropdown (landing page when signed in) — <details> based, no JS needed
   to open/close; the page script only closes it on outside clicks. */
.acct { position: relative; }
.acct summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; font-size: .85rem;
  border: 1.5px solid var(--accent); color: var(--accent); background: transparent;
}
.acct summary::-webkit-details-marker { display: none; }
.acct summary:hover { background: rgba(46, 107, 78, .08); }
.acct .acct-email { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-av {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: inline-flex;
  align-items: center; justify-content: center; flex: none;
}
.acct-av-fallback { background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; }
.topbar .who { display: inline-flex; align-items: center; gap: 8px; }
.topbar .who img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--ceramic); }
.acct .menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40;
  min-width: 210px; padding: 6px; display: grid; gap: 2px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
}
.acct .menu a, .acct .menu button {
  padding: 9px 12px; border-radius: 8px; text-align: left; font: inherit; font-size: .9rem;
  color: var(--ink); background: none; border: none; cursor: pointer; text-decoration: none;
}
.acct .menu a:hover, .acct .menu button:hover { background: var(--ceramic); }
.acct .menu .danger-item { color: var(--danger); }
.acct .menu .menu-admin { color: var(--accent); font-weight: 600; }
.acct .menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
@media (max-width: 480px) { .acct .acct-email { max-width: 110px; } }

/* buttons — universal full-pill, scale(0.95) active is the signature press */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  padding: 11px 22px; border-radius: var(--pill);
  font: 600 15px/1.2 var(--sans); letter-spacing: -.01em; white-space: nowrap;
  cursor: pointer; text-decoration: none; transition: all .2s ease;
}
.btn:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn:active { transform: scale(.95); }
.btn.acorn { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.acorn:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #3a2c10; }
.btn.gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn.ghost { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn.ghost:hover { background: rgba(46, 107, 78, .08); border-color: var(--accent); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: rgba(200, 32, 20, .06); }
.btn.small { padding: 7px 16px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

/* inputs — outlined rectangles, 4px radius, green focus ring */
input, textarea, select {
  width: 100%; background: var(--white); color: var(--ink);
  border: 1px solid var(--field); border-radius: 4px; padding: 11px 12px;
  min-height: 44px; font: 16px var(--sans); letter-spacing: -.01em;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent);
}
/* iOS date controls report a large intrinsic width, which blows a grid/flex track
   past its container (grid items default to min-width:auto) — zero it so
   width:100% actually clamps, and left-align the value like every other input.
   iOS Safari additionally sizes the NATIVE control itself intrinsically, ignoring
   width/min-width entirely, unless appearance is reset (seen on a real iPhone in
   the Album details card even after the min-width fix). */
input[type="date"] {
  min-width: 0; max-width: 100%;
  -webkit-appearance: none; appearance: none;
}
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 12px 0 4px; letter-spacing: -.01em; }

/* content card — white on cream, whisper-soft dual shadow, no border */
.card {
  background: var(--white); border: none; border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-card);
}
.muted { color: var(--ink-soft); }
.icon-copy { display:flex; align-items:flex-start; gap:8px; }
.inline-art {
  width:18px; height:18px; flex:0 0 18px; margin-top:1px;
  fill:none; stroke:var(--accent); stroke-width:1.7;
  stroke-linecap:round; stroke-linejoin:round;
}
.inline-art .art-accent { stroke:var(--gold); }
.small { font-size: 13px; }
.err { color: var(--danger); font-size: 13px; min-height: 1.2em; margin: 8px 0 0; }
.pill {
  display: inline-block; padding: 4px 12px; border-radius: var(--pill); font-size: 12px;
  font-weight: 600; letter-spacing: -.01em; background: var(--ceramic);
  border: 1px solid transparent; color: var(--ink-soft);
}
.pill.on { background: var(--green-light); color: var(--house); }
.pill.off { background: transparent; border-color: var(--field); color: var(--ink-soft); }
[hidden] { display: none !important; }

/* landing — cream hero → white cards → espresso-dark price band → dark footer */
.hero { text-align: center; padding: 76px 20px 44px; max-width: 820px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); color: var(--sb-green); line-height: 1.14; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p.lead { color: var(--ink-soft); max-width: 560px; margin: 16px auto 30px; font-size: 1.15rem; line-height: 1.6; }
.hero .btn { margin: 6px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; padding: 24px 0 12px; }
.features .card h3 { color: var(--sb-green); font-size: 1.1rem; }
.features .card p { color: var(--ink-soft); font-size: .95rem; margin: 0; line-height: 1.6; }
/* price — House Green feature band, gold reserved for the membership figure */
.price {
  text-align: center; background: var(--house); color: #fff;
  border-radius: var(--radius); padding: 52px 24px; margin: 44px 0 64px; box-shadow: var(--shadow-card);
}
.price h2 { color: #fff; }
.price .amount { font-size: 3.2rem; font-weight: 700; color: var(--gold); letter-spacing: -.02em; }
.price .amount span { font-size: 1rem; color: var(--white-soft); font-weight: 400; }
.price .muted { color: var(--white-soft); }
.price .btn { background: #fff; color: var(--accent); border-color: #fff; margin-top: 10px; }
.price .btn:hover { background: var(--canvas); border-color: var(--canvas); }
footer { background: var(--house); color: var(--white-soft); font-size: .85rem; text-align: center; padding: 28px 20px; }
footer a { color: var(--gold); }

/* dashboard */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2 > * { min-width: 0; } /* don't let a wide intrinsic child (iOS date input) stretch a track */
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.eventrow {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-card);
  margin-bottom: 12px; cursor: pointer; transition: box-shadow .15s;
}
.eventrow:hover { box-shadow: var(--shadow-lift); }
.eventrow .t { flex: 1; min-width: 0; }
.eventrow .t b { display: block; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.eventrow .t span { color: var(--ink-soft); font-size: .82rem; }
/* storage-provider rows (settings): the action buttons don't shrink, so on narrow
   screens let the row wrap and give the name/blurb the full width instead of
   squeezing it into a one-word-per-line sliver under the buttons. */
.provrow { flex-wrap: wrap; }
@media (max-width: 560px) {
  .provrow .t { flex: 1 1 100%; }
}
.tabs { display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap; }
.tabs .btn[aria-current="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.album-activation { margin-top: 12px; }
.activation-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.activation-header h2 { margin: 0; font-size: 1.4rem; }
.activation-status { background: var(--gold-wash); border-color: var(--gold-soft); color: #6b4c14; }
.activation-intro { margin: 8px 0 0; font-size: .9rem; }
.activation-plans {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 14px; margin-top: 18px;
}
.activation-plan {
  display: flex; flex-direction: column; gap: 13px; padding: 18px;
  border: 1px solid var(--field); border-radius: var(--radius); background: var(--white);
  min-width: 0; font-size: .9rem;
}
.activation-plan h3 { margin: 0 0 3px; font-size: 1.12rem; }
.activation-plan p { margin: 0; }
.activation-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; color: var(--ink-soft); }
.activation-price strong { font-size: 1.65rem; line-height: 1.3; color: var(--house); }
.activation-plan ul { margin: 0; padding-inline-start: 19px; }
.activation-plan li + li { margin-top: 3px; }
.activation-intervals { min-inline-size: 0; margin: 0; border: 0; padding: 0; }
.activation-intervals legend { padding: 0; margin-bottom: 5px; font-weight: 600; font-size: .81rem; color: var(--house); }
.activation-intervals > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)); gap: 8px; }
.activation-interval {
  display: flex; align-items: center; gap: 8px; min-height: 48px; margin: 0; padding: 6px 9px;
  border: 1px solid var(--field); border-radius: 8px; cursor: pointer; color: var(--house);
}
.activation-interval:has(input:checked) { background: var(--green-light); border-color: var(--accent); }
.activation-interval:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.activation-interval input {
  flex: 0 0 16px; width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--accent);
}
.activation-interval span { display: block; }
.activation-interval strong { display: block; font-size: 1.05rem; font-weight: 700; line-height: 1.2; }
.activation-interval small { font-size: .72rem; font-weight: 400; }
.activation-action { display: grid; gap: 6px; margin-top: auto; padding-top: 2px; }
.activation-action .btn { min-height: 44px; white-space: normal; }
.activation-error { min-height: 0; margin: 0; }
.activation-error:not(:empty) { margin-top: 10px; }
.activation-foot { margin: 14px 0 0; }
.activation-foot a { display: inline-block; }
.sharebox { display: flex; gap: 8px; align-items: center; }
.sharebox input { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .9rem; }
.qrimg { width: 200px; border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 6px; }
.eyebrow { color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.rowchev { font-size: 1.25rem; line-height: 1; color: var(--ink-soft); opacity: .55; margin-left: 2px; }
.qr-card h3 { margin: 3px 0 7px; }
.qr-card-body { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 16px; }
.qr-actions { display: grid; gap: 9px; align-items: center; }
.print-studio { width: min(1040px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 18px; background: var(--canvas); color: var(--ink); box-shadow: 0 24px 80px rgba(22,35,27,.32); }
.print-studio::backdrop { background: rgba(18,30,24,.66); backdrop-filter: blur(4px); }
.print-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:22px 26px 16px; border-bottom:1px solid var(--line); }
.print-head h2 { margin:3px 0 0; }
.iconbtn { border:0; background:transparent; color:var(--ink-soft); font-size:2rem; cursor:pointer; padding:2px 8px; }
.print-grid { display:grid; grid-template-columns:minmax(300px,.8fr) minmax(320px,1.2fr); }
.print-controls { padding:24px 26px 28px; overflow:auto; }
.print-controls label { margin-top:14px; }
.print-controls label.ps-check { display:flex; align-items:center; gap:8px; font-size:.9rem; cursor:pointer; }
.print-controls label.ps-check input { width:auto; margin:0; }
.grid2.compact { gap:10px; }
.choice-row { display:flex; flex-wrap:wrap; gap:7px; }
.choice { border:1px solid var(--field); background:#fff; color:var(--ink); border-radius:999px; padding:8px 12px; cursor:pointer; }
.choice.active { background:var(--house); border-color:var(--house); color:#fff; }
.print-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:20px; }
.print-preview { display:grid; place-items:center; align-content:center; min-height:600px; padding:26px; background:#dfe2dc; }
.print-preview canvas { display:block; max-width:100%; max-height:68vh; background:#fff; box-shadow:0 8px 30px rgba(26,35,29,.22); }
@media (max-width:760px) { .qr-card-body { flex-direction:column; } .print-grid { grid-template-columns:1fr; } .print-preview { min-height:400px; } }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.gallery-pager { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; margin-top:20px; }
.gallery-pager[hidden] { display:none; }
.gallery-pager span { color:var(--ink-soft); font-size:.9rem; }
.gallery .ph { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--ceramic); cursor: pointer; box-shadow: var(--shadow-card); }
.gallery .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .ph .vid {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .6); pointer-events: none;
}
.gallery .ph .noimg {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background: var(--ceramic); color: var(--ink-soft);
}
.gallery .ph .del {
  position: absolute; top: 6px; right: 6px; background: rgba(255, 255, 255, .9);
  border: 1px solid var(--danger); color: var(--danger); border-radius: 8px;
  width: 36px; height: 36px; cursor: pointer; font-size: 1rem; line-height: 1;
}
.gallery .ph .cover {
  position: absolute; top: 6px; left: 6px; background: rgba(255, 255, 255, .9);
  border: 1px solid var(--gold); color: var(--gold); border-radius: 8px;
  width: 36px; height: 36px; cursor: pointer; font-size: 1.05rem; line-height: 1; padding: 0;
}
.gallery .ph .who {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 8px; font-size: .7rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6)); color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* storage-health banner — warm gold wash, a membership-toned warning */
.banner {
  border: 1px solid var(--gold); background: var(--gold-wash);
  color: var(--ink); border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 16px; font-size: .9rem; display: flex; gap: 12px; align-items: center;
}
.banner b { color: #9a7223; }
.banner .spacer { flex: 1; }

/* Google sign-in button + "or" divider */
.gbtn { width: 100%; margin-top: 10px; gap: 10px; background: #fff; color: var(--ink); border: 1px solid var(--field); }
.gbtn:hover { background: var(--cool); border-color: var(--ink-soft); }
.gbtn .gicon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 3px; background: #fff;
  color: #4285f4; font: 900 14px Georgia, serif; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
}
.or-divider { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; color: var(--ink-soft); font-size: .8rem; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* lightbox — dark overlay so photos read; controls stay on-brand pills */
.lightbox {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .9); z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.lightbox img, .lightbox video { max-width: 94vw; max-height: 78vh; border-radius: 8px; }
.lightbox .lbbar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lightbox .muted { color: var(--white-soft); }

/* guest page */
.guest-hero { text-align: center; padding: 48px 20px 12px; }
.guest-hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); color: var(--sb-green); }
.guest-hero .date { color: var(--sb-green); font-weight: 600; font-size: .95rem; }
.guest-hero .welcome { color: var(--ink-soft); max-width: 520px; margin: 12px auto; }
.guest-hero .guest-note { color: var(--ink-soft); max-width: 540px; margin: 4px auto 0; font-size: .9rem; font-style: italic; }
.dropzone {
  border: 2px dashed var(--field); border-radius: var(--radius); padding: 36px 20px;
  text-align: center; color: var(--ink-soft); cursor: pointer; background: var(--cool);
  transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone.drag { border-color: var(--accent); background: var(--green-light); }
.dropzone .big { font-size: 2.4rem; line-height: 1; }
.dropzone .occasion-icon { display: block; width: 3rem; height: 3rem; margin: 0 auto 5px; }
.empty-icon { width: 1.25rem; height: 1.25rem; vertical-align: -.28rem; }
.dropzone b { color: var(--ink); }
.progress { margin-top: 12px; }
.progress .bar { height: 8px; border-radius: 6px; background: var(--ceramic); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* toast — House Green pill */
#toast {
  position: fixed; left: 50%; bottom: max(28px, calc(env(safe-area-inset-bottom) + 12px)); transform: translateX(-50%);
  background: var(--house); border: none; color: #fff;
  padding: 11px 18px; border-radius: var(--pill); font-size: .9rem; z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .25s; box-shadow: var(--shadow-lift);
}
#toast.show { opacity: 1; }

/* per-album storage-tier picker (create form) */
.tierpick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
@media (max-width: 620px) { .tierpick { grid-template-columns: 1fr; } }
.tieropt {
  display: block; margin: 0; padding: 14px 16px; border: 1px solid var(--field);
  border-radius: var(--radius); cursor: pointer; background: var(--white);
  font-weight: 400; transition: border-color .15s, box-shadow .15s, background .15s;
}
.tieropt:hover { border-color: var(--accent); }
.tieropt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--green-light); }
.tieropt input { width: auto; margin-right: 8px; }
.tieropt .tier-b { font-weight: 600; color: var(--ink); }
.tieropt .tier-b b { color: var(--accent); }
.tieropt .tier-s { display: block; margin-top: 4px; font-size: .82rem; color: var(--ink-soft); }

/* checkbox rows (album options, guest caption opt-in) */
.checkrow { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; font-size: .9rem;
  color: var(--ink); font-weight: 400; cursor: pointer; }
.checkrow input { width: auto; margin-top: 2px; flex: none; }
.checkrow b { color: var(--ink); }
h4 { color: var(--sb-green); font-size: .95rem; margin: 0; }

/* Collapsible option sections (host album settings) — collapsed by default so the
   panel stays simple; power users open what they need. */
.optsec { border-top: 1px solid rgba(0, 0, 0, .08); margin-top: 4px; }
.optsec > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 14px 2px 12px; color: var(--sb-green); font-size: .95rem; font-weight: 700;
  user-select: none;
}
.optsec > summary::-webkit-details-marker { display: none; }
.optsec > summary .hint { font-weight: 400; font-size: .78rem; opacity: .6; }
.optsec > summary .chev { margin-left: auto; opacity: .5; font-weight: 400; transition: transform .18s ease; }
.optsec[open] > summary .chev { transform: rotate(180deg); }
.optsec > summary:hover { opacity: .82; }
.create-mark {
  width: 24px; height: 24px; flex: 0 0 24px; display: inline-grid; place-items: center;
  margin-right: 7px; border-radius: 50%; color: var(--sb-green);
  background: linear-gradient(150deg, rgba(46, 107, 78, .1), rgba(200, 161, 90, .14));
  border: 1px solid rgba(31, 63, 50, .1);
}
.create-mark svg {
  width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.optsec-body { padding-bottom: 6px; }

/* caption line on a gallery tile (sits above the uploader gradient) */
.gallery .ph .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 8px 4px; font-size: .68rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72)); color: #fff; font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}

/* guest single-photo caption prompt */
.cap-prompt { margin-top: 14px; }
.cap-prompt textarea { min-height: 64px; resize: vertical; }
.cap-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.lightbox .cap-text { color: #fff; max-width: 70ch; text-align: center; font-size: 1rem; }

/* ---------- dashboard "app shell": cinematic hero bg + liquid glass ---------- */
/* Carries the home page's frosted-glass look onto the album/settings dashboard.
   A fixed hero image sits behind a soft cream wash; cards/rows/topbar frost over
   it (backdrop-filter) while inputs stay solid white so forms read clearly. */
body.appshell { background: var(--canvas); }
body.appshell::before {
  content: ''; position: fixed; inset: 0; z-index: -2;
  background: #eae3d4 url('/img/hero.webp?v=64') no-repeat center right / cover;
}
body.appshell::after {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(242, 237, 228, .60) 0%, rgba(242, 237, 228, .74) 60%, rgba(242, 237, 228, .82) 100%);
}
body.appshell .topbar {
  background: rgba(242, 237, 228, .72);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 rgba(31, 63, 50, .07), 0 8px 24px rgba(31, 63, 50, .06);
}
body.appshell .card {
  background: linear-gradient(135deg, rgba(255, 255, 255, .80), rgba(255, 255, 255, .60));
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .62);
  box-shadow: 0 14px 44px rgba(31, 63, 50, .16), inset 0 1px 0 rgba(255, 255, 255, .75);
  border-radius: 20px;
}
body.appshell .eventrow {
  background: linear-gradient(135deg, rgba(255, 255, 255, .70), rgba(255, 255, 255, .50));
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 10px 30px rgba(31, 63, 50, .12), inset 0 1px 0 rgba(255, 255, 255, .6);
  border-radius: 16px;
}
body.appshell .banner {
  -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
}
/* the storage-tile rows inside a glass card shouldn't double-frost — keep them flat */
body.appshell .card .eventrow {
  background: rgba(255, 255, 255, .42); -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: none; border: 1px solid rgba(255, 255, 255, .5);
}
/* guest upload dropzone: translucent so the frosted card shows through */
body.appshell .dropzone { background: rgba(255, 255, 255, .34); border-color: rgba(31, 63, 50, .28); }
body.appshell .dropzone.drag { background: var(--green-light); border-color: var(--accent); }
/* progressive enhancement: if backdrop-filter is unsupported, fall back to solid */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.appshell .card { background: rgba(255, 255, 255, .96); }
  body.appshell .eventrow { background: rgba(255, 255, 255, .96); }
  body.appshell .topbar { background: var(--canvas); }
}

@media (max-width: 768px) {
  .btn, .acct summary, .topbar .brand { min-height: 44px; }
  .gallery .ph .del, .gallery .ph .cover { width: 44px; height: 44px; }
}

/* ---------- small screens ---------- */
/* Keep the brand + "Sign in" + "Start an album" on ONE row (they were wrapping
   to two lines): buttons never wrap their own text, and the bar tightens up. */
@media (max-width: 480px) {
  .wrap { padding-inline: 16px; }
  .topbar { gap: 7px; padding: max(7px, env(safe-area-inset-top)) 14px 7px; min-height: 58px; }
  .topbar .brand { gap: 7px; }
  .brand b { font-size: 1.08rem; }
  .topbar .btn.small { min-height: 44px; padding: 9px 13px; font-size: 12.5px; }
  .acct summary { min-height: 44px; padding-block: 8px; }
  .acct .menu { position: fixed; left: 12px; right: 12px; top: calc(58px + env(safe-area-inset-top)); min-width: 0; }
  .acct .menu a, .acct .menu button { min-height: 44px; display: flex; align-items: center; }
  .card { padding: 18px 16px; border-radius: 16px; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .tabs .btn { width: 100%; min-height: 44px; white-space: normal; }
  .eventrow { padding: 14px; gap: 10px; }
  .sharebox { flex-wrap: wrap; }
  .sharebox input { flex: 1 1 100%; min-width: 0; }
  .sharebox .btn { flex: 1; }
  .banner { align-items: flex-start; flex-wrap: wrap; padding: 12px; }
  .banner .spacer { display: none; }
  .qrimg { width: min(220px, 76vw); }
  .qr-actions, .qr-actions .btn { width: 100%; }
  .print-studio { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .print-head { padding: max(14px, env(safe-area-inset-top)) 16px 12px; }
  .print-controls { padding: 16px; }
  .print-preview { min-height: 300px; padding: 16px; }
  .iconbtn { min-width: 44px; min-height: 44px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gallery .ph .del, .gallery .ph .cover { width: 44px; height: 44px; top: 4px; }
  .gallery .ph .del { right: 4px; }
  .gallery .ph .cover { left: 4px; }
  .guest-hero { padding: 28px 4px 10px; }
  .guest-hero h1 { overflow-wrap: break-word; }
  .dropzone { padding: 26px 14px; min-height: 136px; display: grid; place-content: center; }
  .dropzone .big { font-size: 2rem; }
  .cap-actions { display: grid; grid-template-columns: 1fr; }
  .cap-actions .btn { width: 100%; min-height: 44px; }
  .lightbox { justify-content: space-between; gap: 10px; }
  .lightbox img, .lightbox video { max-width: 100%; max-height: 68dvh; margin: auto 0; }
  .lightbox .lbbar { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .lightbox .lbbar .btn { min-height: 44px; }
  .lightbox .lbbar [data-a="close"] { grid-column: 1 / -1; }
  #toast { width: calc(100% - 32px); text-align: center; white-space: normal; }
  footer { padding: 24px 16px max(24px, env(safe-area-inset-bottom)); line-height: 1.8; }
  footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
}
@media (max-width: 360px) {
  .topbar { padding-inline: 10px; }
  .brand b { display: none; }        /* logo mark alone frees room for both CTAs */
  .topbar .btn.small { padding: 9px 10px; }
  .gallery { gap: 6px; }
}

@media (max-width: 768px) and (orientation: landscape) {
  .guest-hero { padding-top: 20px; }
  .lightbox img, .lightbox video { max-height: 58dvh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
