:root {
  --ink: #3b291f;
  --muted: #766b61;
  --ivory: #fffaf3;
  --paper: rgba(255, 250, 243, .94);
  --gold: #c7a661;
  --gold-deep: #a77d38;
  --red: #d94a38;
  --green: #6e8f80;
  --line: rgba(164, 123, 59, .46);
  --shadow: 0 14px 34px rgba(75, 49, 36, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #f0ede8; }
body { min-width: 320px; margin: 0; color: var(--ink); background: var(--ivory); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft Yahei", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }

#app { position: relative; min-height: 100dvh; overflow: clip; }
.lace-layer { position: fixed; z-index: 0; inset: 0; background: #f8f7f3 url('./assets/lace-paper-hires.png') center top / 740px auto repeat-y; opacity: .78; pointer-events: none; }

.hero { position: relative; z-index: 1; display: grid; min-height: min(680px, 92dvh); padding-top: 57px; place-items: end center; overflow: hidden; background: url('./assets/venue/wedding-field-cover.jpg') center/cover; color: white; }
.hero::after { position: absolute; inset: 0; content: ''; background: linear-gradient(180deg, rgba(10, 34, 25, .1) 0%, rgba(7, 28, 21, .05) 36%, rgba(8, 25, 19, .9) 100%); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13, 46, 32, .22), transparent 60%); }
.hero-content { position: relative; z-index: 2; width: min(100%, 720px); padding: max(42px, env(safe-area-inset-top)) 28px max(36px, calc(24px + env(safe-area-inset-bottom))); text-align: center; }
.eyebrow, .section-kicker { margin: 0; color: var(--gold-deep); font-size: 11px; font-weight: 800; letter-spacing: .22em; line-height: 1.4; }
.hero .eyebrow { color: rgba(255, 244, 218, .92); }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { margin: 12px 0 15px; font-family: Georgia, "Songti SC", serif; font-size: clamp(48px, 12vw, 74px); letter-spacing: .13em; line-height: 1; text-indent: .13em; }
.hero-rule, .red-stroke { display: block; width: 68px; height: 4px; border-radius: 10px; background: var(--red); }
.hero-rule { margin: 0 auto 20px; }
.hero-copy { margin-bottom: 27px; color: rgba(255, 255, 255, .94); font-size: 16px; font-weight: 600; line-height: 1.75; }
.hero-enter { display: inline-flex; min-width: 210px; align-items: center; justify-content: space-between; padding: 8px 10px 8px 24px; border: 1px solid rgba(255,255,255,.65); border-radius: 999px; color: #fff; background: rgba(7, 34, 24, .64); box-shadow: 0 10px 24px rgba(0,0,0,.15); }
.hero-enter b { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; color: #173528; background: #b4f668; font-size: 20px; }

.quick-nav { position: fixed; z-index: 10; top: 0; right: 0; left: 0; display: flex; gap: 8px; overflow-x: auto; padding: calc(9px + env(safe-area-inset-top)) 16px 9px; border-bottom: 1px solid rgba(199,166,97,.35); background: rgba(255,250,243,.94); box-shadow: 0 6px 15px rgba(68,44,32,.08); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); scrollbar-width: none; }
.quick-nav::-webkit-scrollbar { display: none; }
.quick-nav button { flex: 0 0 auto; padding: 8px 12px; border: 1px solid rgba(173,132,63,.36); border-radius: 999px; color: #6c5141; background: rgba(255,255,255,.58); font-size: 12px; font-weight: 700; }
.quick-nav button.is-active { border-color: #68402d; color: #fffaf3; background: #68402d; box-shadow: 0 4px 10px rgba(76,49,35,.2); }
.quick-nav button:active, .back-to-top:active { transform: scale(.96); }

.content-shell { position: relative; z-index: 1; width: min(100%, 720px); margin: 0 auto; padding: calc(74px + env(safe-area-inset-top)) 16px 50px; }
#app[data-active="home"] .content-shell { padding-top: 24px; }
.is-panel-hidden { display: none !important; }
.paper-card { border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.welcome-card { padding: 27px 24px 20px; }
.welcome-card h2, .section-heading h2 { margin: 4px 0 10px; font-family: Georgia, "Songti SC", serif; font-size: 28px; line-height: 1.2; letter-spacing: .04em; }
.welcome-card > p:not(.section-kicker) { margin-bottom: 22px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.date-strip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding-top: 15px; border-top: 1px solid rgba(167,125,56,.22); color: #90733f; font-size: 12px; }
.date-strip b { color: var(--ink); text-align: center; font-size: 13px; }

.section-block { margin-top: 46px; scroll-margin-top: 68px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 8px 16px; }
.section-heading h2 { margin-bottom: 0; }
.red-stroke { width: 62px; margin-bottom: 7px; }
.current-flow { display: grid; grid-template-columns: auto 1fr; gap: 16px; margin-bottom: 15px; padding: 18px; }
.current-flow-time { display: grid; min-width: 67px; height: 67px; place-items: center; border-radius: 18px; color: #fffaf3; background: #68402d; font-family: Georgia, serif; font-size: 20px; font-weight: 800; }
.current-flow h3 { margin: 2px 0 6px; font-size: 18px; }
.current-flow p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.current-flow .flow-status { display: inline-block; margin-bottom: 7px; color: var(--red); font-size: 11px; font-weight: 800; }
.schedule-list { position: relative; padding-left: 19px; }
.schedule-list::before { position: absolute; top: 6px; bottom: 6px; left: 6px; width: 1px; content: ''; background: rgba(168,127,64,.45); }
.schedule-item { position: relative; display: grid; grid-template-columns: 84px 1fr; gap: 9px; margin: 13px 0; padding: 16px 16px 16px 18px; border: 1px solid rgba(167,125,56,.34); border-radius: 18px; background: rgba(255,250,243,.9); box-shadow: 0 8px 22px rgba(77,51,37,.08); }
.schedule-item::before { position: absolute; top: 23px; left: -19px; width: 11px; height: 11px; border: 3px solid #f8f6ef; border-radius: 50%; content: ''; background: var(--gold); box-shadow: 0 0 0 1px rgba(167,125,56,.6); }
.schedule-item.is-current { border-color: rgba(217,74,56,.65); box-shadow: 0 10px 26px rgba(181,72,51,.14); }
.schedule-item.is-current::before { background: var(--red); }
.schedule-time { color: #a77d38; font-size: 12px; font-weight: 800; line-height: 1.45; }
.schedule-copy h3 { margin: 0 0 4px; font-size: 17px; }
.schedule-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.58; }
.schedule-copy .venue { margin-top: 7px; color: #90733f; font-size: 12px; font-weight: 700; }

.arrival-card { overflow: hidden; }
.arrival-card > img { display: block; width: 100%; height: 174px; object-fit: cover; }
.arrival-card-copy { padding: 21px; }
.arrival-card h3, .dress-lead h3, .dress-card h3, .identity-card h3, .task-card h3 { margin: 5px 0 8px; font-size: 21px; }
.arrival-card-copy > p:not(.section-kicker) { color: var(--muted); font-size: 14px; line-height: 1.75; }
.arrival-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.outline-button, .solid-button, .save-identity-button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; border: 1px solid var(--gold-deep); border-radius: 12px; padding: 10px 12px; text-decoration: none; font-size: 13px; font-weight: 800; }
.outline-button { color: #805b22; background: transparent; }
.solid-button, .save-identity-button { color: #fffaf3; background: #633a29; }
.note-grid { display: grid; gap: 9px; margin-top: 12px; }
.note-card { position: relative; min-height: 98px; padding: 16px 18px 15px 64px; border: 1px solid rgba(167,125,56,.3); border-radius: 16px; background: rgba(255,250,243,.87); }
.note-index { position: absolute; top: 18px; left: 18px; color: var(--red); font-family: Georgia, serif; font-size: 17px; font-weight: 900; }
.note-card h3 { margin: 0 0 5px; font-size: 15px; }
.note-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.dress-lead { padding: 23px 20px 19px; text-align: center; }
.dress-lead h3 { font-size: 23px; }
.colour-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; overflow: hidden; border: 1px solid rgba(167,125,56,.45); border-radius: 999px; }
.colour-row span { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 11px 2px; border-right: 1px solid rgba(167,125,56,.25); color: #6d594a; font-size: 12px; font-weight: 700; }
.colour-row span:last-child { border: 0; }
.swatch { width: 12px; height: 12px; border: 1px solid rgba(0,0,0,.15); border-radius: 50%; }
.swatch.white { background: #fff; }.swatch.black { background: #2a2421; }.swatch.green { background: #6e8f80; }.swatch.red { background: #c6493d; }
.dress-card { display: grid; grid-template-columns: 94px 1fr; gap: 8px; align-items: stretch; margin-top: 13px; padding: 17px; }
.dress-card img { align-self: center; justify-self: center; width: 66px; max-height: 116px; object-fit: contain; }
.dress-card > div { padding-left: 17px; border-left: 1px solid rgba(167,125,56,.47); }
.dress-card h3 { font-size: 19px; }
.dress-card p:not(.section-kicker) { margin-bottom: 0; color: #6e6258; font-size: 13px; line-height: 1.72; }
.soft-note { margin: 13px 4px 0; color: #766a5d; text-align: center; font-size: 12px; line-height: 1.7; }

.identity-card, .task-card { padding: 22px; }
.identity-topline { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.identity-medallion { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border: 2px solid #d5b25f; border-radius: 50%; color: #8d681e; background: radial-gradient(circle at 35% 28%, #fff0ad 0 9%, #e3bd4f 43%, #a97919 100%); box-shadow: inset 0 0 0 2px rgba(255,246,180,.58); font-family: Georgia, serif; font-size: 12px; font-weight: 900; }
.identity-card > p { margin: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.65; }
label { display: block; margin-top: 12px; }
label span { display: block; margin: 0 0 6px; color: #856837; font-size: 12px; font-weight: 800; }
input { width: 100%; min-height: 43px; border: 1px solid rgba(167,125,56,.35); border-radius: 11px; outline: none; padding: 10px 12px; color: var(--ink); background: rgba(255,255,255,.65); font-size: 14px; }
input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,74,56,.1); }
.save-identity-button { width: 100%; margin-top: 16px; }
.identity-saved { margin: 12px 0 0 !important; color: #597b6c !important; font-size: 12px !important; font-weight: 700; }
.task-card { margin-top: 13px; background: linear-gradient(135deg, rgba(255,250,243,.98), rgba(252,244,228,.94)); }
.task-card > p:not(.section-kicker):not(.task-note) { min-height: 47px; margin-bottom: 15px; color: #6e6258; font-size: 14px; line-height: 1.72; }
.task-actions { display: flex; align-items: center; gap: 14px; }
.task-actions .solid-button { border: 0; }
.text-button { border: 0; color: #9b6b2f; background: transparent; font-size: 13px; font-weight: 800; text-decoration: underline; }
.task-note { margin: 13px 0 0; color: #947d63; font-size: 11px; line-height: 1.55; }

footer { margin-top: 44px; padding: 20px 12px calc(18px + env(safe-area-inset-bottom)); text-align: center; }
.footer-mark { margin-bottom: 10px; color: #906f38; font-family: Georgia, serif; font-size: 28px; font-weight: 900; letter-spacing: .12em; }
footer p { margin: 0 0 15px; color: #786b5d; font-size: 12px; }
.back-to-top { border: 0; color: #8e6d37; background: transparent; font-size: 12px; font-weight: 800; }
.toast { position: fixed; z-index: 20; right: 50%; bottom: max(24px, calc(16px + env(safe-area-inset-bottom))); width: max-content; max-width: calc(100vw - 44px); transform: translate(50%, 140%); padding: 10px 15px; border-radius: 999px; color: white; background: rgba(51,39,31,.92); box-shadow: 0 10px 26px rgba(0,0,0,.2); font-size: 13px; opacity: 0; transition: transform .23s ease, opacity .23s ease; }
.toast.show { transform: translate(50%, 0); opacity: 1; }

@media (min-width: 640px) {
  .content-shell { padding-left: 25px; padding-right: 25px; }
  .hero { min-height: 730px; border-radius: 0 0 32px 32px; }
  .note-grid { grid-template-columns: repeat(3, 1fr); }
  .note-card { padding-left: 18px; padding-top: 53px; }
  .note-index { top: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }.toast { transition: none; } }
