/* Host dashboard, unlock, admin and info pages: calm, light, mobile-first. */

:root {
  --bg: #F6F2EA;
  --surface: #FFFFFF;
  --ink: #1F2420;
  --muted: #5E665F;
  --line: #E4DED2;
  --accent: #0F2A1D;
  --accent-ink: #FFFFFF;
  --gold: #A9822E;
  --danger: #A3202E;
  --ok: #2F6B3A;
  --warn: #9A6A00;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.05);
  --f-ui: 'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --f-display: 'Cormorant Garamond', Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111613; --surface: #1A201C; --ink: #ECE9E2; --muted: #A4ABA5; --line: #2C342F;
    --accent: #C9A24B; --accent-ink: #1A1408; --gold: #D8B565; --danger: #E2707B; --ok: #7FC48C; --warn: #E3B04B;
    --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-ui); font-size: 16px; line-height: 1.5; }
a { color: var(--gold); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 460px; }
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.brand { font-family: var(--f-display); font-size: 22px; font-weight: 600; text-decoration: none; color: var(--ink); letter-spacing: .01em; }
.brand small { font-family: var(--f-ui); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin-left: 6px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; }
h1 { font-family: var(--f-display); font-size: 34px; font-weight: 600; }
h2 { font-family: var(--f-display); font-size: 26px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.kicker { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin: 0 0 6px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin: 0 0 16px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.stack > * + * { margin-top: 12px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; padding: 9px 14px; border-radius: 999px; border: 1px solid transparent; color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
.tab[aria-current="page"] { background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 500; box-shadow: var(--shadow); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 500; font-size: 15px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.spread { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.field { display: grid; gap: 6px; margin: 0 0 14px; }
.field > span { font-size: 14px; font-weight: 500; }
.field .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], input[type="search"], input[type="time"], input[type="url"], input[type="tel"], input[type="password"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 16px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.grid2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
.grid3 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 420px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.section-title { margin: 22px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }

.notice { padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--gold) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); font-size: 15px; margin: 0 0 16px; }
.notice.error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); color: var(--danger); }
.notice.ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.yes { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.chip.no { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.chip.wait { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.guest-name { font-weight: 600; font-size: 17px; }
.meta { font-size: 13px; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 16px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-family: var(--f-display); font-size: 34px; line-height: 1; font-weight: 600; }
.stat span { font-size: 13px; color: var(--muted); }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 6px 0 2px; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; }
.table-scroll { overflow-x: auto; }

.looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.look { border: 2px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; background: var(--surface); text-align: left; }
.look[aria-pressed="true"] { border-color: var(--gold); }
.look .sw { height: 64px; border-radius: 8px; margin-bottom: 8px; background: linear-gradient(90deg, #0F2A1D 0 50%, #7A0F1A 50% 75%, #C9A24B 75%); }
.seal-preview { width: 96px; height: 96px; flex: 0 0 auto; border-radius: 50%; background: #0F2A1D; padding: 8px; --metal: #C9A24B; --metal-light: #EBD293; --metal-dark: #8A6A22; --f-script: 'Pinyon Script', cursive; }
.photo-thumb { width: 96px; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--line); }

.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.album-grid figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.album-grid img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.album-grid figure.hidden img { opacity: .35; }
.album-grid figcaption { padding: 6px 8px; font-size: 13px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; z-index: 70; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: all .25s; max-width: calc(100% - 32px); text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }

.hero-band { background: #0F2A1D; color: #F4EBDD; padding: 56px 0 48px; }
.hero-band h1 { font-family: 'Pinyon Script', cursive; font-weight: 400; font-size: clamp(44px, 11vw, 72px); color: #EBD293; margin: 0 0 10px; }
.hero-band p { color: rgba(244,235,221,.8); font-size: 18px; max-width: 34em; }
.hero-band .btn { border-color: rgba(201,162,75,.6); background: transparent; color: #EBD293; }
.hero-band .btn.primary { background: #C9A24B; color: #1F160A; border-color: #C9A24B; }
footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.prose { max-width: 680px; }
.prose h2 { margin-top: 28px; }
.prose p, .prose li { color: var(--ink); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }

@media (max-width: 520px) { #who { display: none; } .brand small { display: none; } }
.field input { min-width: 0; }
