/* =====================================================================
   The Crowned EKCellence App — Brand System
   Colors/type: Rebuild Spec + DST Brand Style Guide.
   Layout/feel: airy white canvas, soft floating cards, avatar rows,
   floating pill tab bar (design-reference screenshots).
   Gold is reserved for 20th Anniversary content (The Crown).
   ===================================================================== */
:root {
  --delta-red: #b12028;   /* primary accents, active tab, links */
  --crimson: #910811;     /* headers, primary buttons, headings */
  --cream: #fff7e1;       /* cards, inputs (glass) */
  --cream-deep: #f2dab2;
  --white: #ffffff;       /* app background */
  --charcoal: #2b2b2b;    /* body text */
  --muted: #77706a;
  --faint: #6f675f;       /* secondary labels — 5.5:1 on white, AA */
  --line: #f0e6d2;
  --canvas: #faf8f5;      /* secondary surface */
  --gold: #c69c55;        /* 20th Anniversary only */
  --gold-light: #d6bc92;  /* gold text on crimson (5.1:1) */
  --gold-ink: #85601e;    /* gold text/icons on white or cream (5.7:1) — gold #c69c55 itself is for fills and borders */
  --success: #23663f;
  --error: #b3261e;
  --glass: rgba(255, 247, 225, 0.72);
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --shadow: 0 6px 24px rgba(43, 43, 43, 0.06), 0 1px 3px rgba(43, 43, 43, 0.04);
  --shadow-lift: 0 18px 40px rgba(145, 8, 17, 0.14);
  --shadow-float: 0 12px 34px rgba(43, 43, 43, 0.12);
  --tap: 44px;
  --tabbar-h: 70px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --grad-crimson: linear-gradient(150deg, var(--delta-red) 0%, var(--crimson) 100%);
  --grad-gold: linear-gradient(135deg, var(--gold) 0%, var(--cream) 50%, var(--gold) 100%);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--charcoal); background: #efeae3; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--delta-red); }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); color: var(--crimson); margin: 0; line-height: 1.2; font-weight: 700; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

/* ---------- App frame ---------- */
#app { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: var(--white); position: relative; box-shadow: 0 0 60px rgba(0,0,0,.06); }

/* ---------- Header: crest left · title center · bell right ---------- */
.app-header {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.app-header .title { text-align: center; min-width: 0; }
.app-header .title h1 { font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-header .title small { display: block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.app-header .crest { width: 44px; height: 44px; border-radius: 14px; background: var(--white); padding: 4px; object-fit: contain; box-shadow: var(--shadow); }
.app-header.crown-header { background: rgba(255,250,240,.9); }
.app-header.crown-header .title small { color: var(--gold-ink); }
.circle-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--white); box-shadow: var(--shadow);
  display: grid; place-items: center; cursor: pointer; color: var(--charcoal); position: relative; text-decoration: none; flex: none;
}
.circle-btn svg { width: 22px; height: 22px; }
.circle-btn:active { transform: scale(.95); }
.circle-btn .dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--delta-red); border: 2px solid var(--white); }
.icon-btn { min-width: var(--tap); min-height: var(--tap); display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 50%; cursor: pointer; position: relative; color: inherit; }
.icon-btn svg { width: 22px; height: 22px; }

/* Full-bleed banner (Login + Home only) */
.hero-banner { position: relative; margin: -4px -16px 0; height: 210px; overflow: hidden; border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.hero-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(145,8,17,0) 20%, rgba(145,8,17,.72) 58%, rgba(145,8,17,.94) 100%); }
.hero-banner .hero-text { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; color: var(--cream); text-shadow: 0 1px 3px rgba(60,0,4,.55); }
.hero-banner .hero-text small { letter-spacing: .14em; text-transform: uppercase; font-size: .7rem; font-weight: 700; }
.hero-banner .hero-text b { display: block; font-family: var(--serif); font-size: 1.15rem; }

/* ---------- Main ---------- */
main.screen { padding: 8px 16px calc(var(--tabbar-h) + var(--safe-b) + 110px); display: flex; flex-direction: column; gap: 22px; }
main.screen.no-tabs { padding-bottom: 32px; }
.section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head h2 { font-size: 1.15rem; }
.see-more { font-size: .85rem; font-weight: 500; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer; min-height: var(--tap); display: inline-flex; align-items: center; gap: 2px; }
.see-more svg { width: 16px; height: 16px; }
.link-btn { font-size: .9rem; font-weight: 600; color: var(--delta-red); text-decoration: none; background: none; border: 0; cursor: pointer; min-height: var(--tap); display: inline-flex; align-items: center; padding: 0; }

/* Greeting: "Hello, **Name**" */
.greeting h1 { font-size: 2.1rem; font-weight: 400; color: var(--charcoal); letter-spacing: -.01em; }
.greeting h1 b { font-weight: 700; color: var(--crimson); }
.greeting p { color: var(--muted); margin: 6px 0 0; }

/* ---------- Cards: one style everywhere — white, 16px radius, soft shadow ---------- */
.card {
  background: var(--white); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
}
.card.white { background: var(--white); }
.card.tap { cursor: pointer; transition: transform .12s ease; text-decoration: none; color: inherit; }
:where(a.card) { display: block; }
.card.tap:active { transform: scale(.985); }
.card-row { display: flex; gap: 14px; align-items: center; }
.card .meta, .meta { font-size: .85rem; color: var(--muted); }
.eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--delta-red); }
.label { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--charcoal); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.list-card { padding: 4px 0; }
.list-item {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 18px;
  text-decoration: none; color: inherit; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; cursor: pointer;
}
.list-item:last-child { border-bottom: 0; }
.li-icon { width: var(--tap); height: var(--tap); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 1.15rem; flex: none; color: var(--crimson); }
.li-icon svg { width: 21px; height: 21px; }
.li-body { flex: 1; min-width: 0; }
.li-title { font-weight: 600; }
.li-sub { font-size: .84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: #c9bfb2; width: 20px; height: 20px; flex: none; }
.info-tile { background: var(--white); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.info-tile .label { color: var(--faint); font-size: .66rem; }
.info-tile b { display: block; margin-top: 2px; font-weight: 600; font-size: .95rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform .1s ease, background .15s ease; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--crimson); color: var(--cream); box-shadow: 0 8px 20px rgba(145,8,17,.22); }
.btn-primary:hover { background: #7c060e; }
/* Buttons: primary (crimson) · secondary (white) · ghost (text) · gold (The Crown only) */
.btn-secondary, .btn-white { background: var(--white); color: var(--crimson); box-shadow: var(--shadow); border-color: var(--line); }
.btn-ghost { background: transparent; color: var(--crimson); }
.btn-gold { background: var(--grad-gold); color: var(--crimson); border-color: var(--gold); }
.btn-block { width: 100%; }
.btn-sm { min-height: var(--tap); padding: 0 18px; font-size: .9rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn svg { width: 20px; height: 20px; }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 4px; margin: 0 -16px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: var(--tap); padding: 0 16px; border-radius: 999px; border: 0; background: var(--canvas); color: var(--charcoal); font-weight: 500; font-size: .86rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip.active { background: var(--crimson); color: var(--cream); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--cream); color: var(--crimson); font-size: .74rem; font-weight: 600; }
.tag.gold { background: var(--cream); color: var(--crimson); box-shadow: inset 0 0 0 1px var(--gold); }
.tag.green { background: #e6f2ea; color: var(--success); }
.tag.dark { background: rgba(43,43,43,.78); color: #fff; backdrop-filter: blur(6px); }
.tag.new { background: var(--delta-red); color: #fff; }

/* Segmented pill tabs */
.segmented { display: flex; background: var(--canvas); border-radius: 999px; padding: 4px; gap: 2px; }
.segmented button { flex: 1 1 auto; min-height: var(--tap); min-width: var(--tap); border: 0; border-radius: 999px; background: transparent; font-weight: 500; font-size: .82rem; color: var(--muted); cursor: pointer; white-space: nowrap; padding: 0 8px; }
.segmented button.active { background: var(--white); color: var(--crimson); font-weight: 600; box-shadow: var(--shadow); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .88rem; }
.field .hint { font-size: .8rem; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 52px; padding: 12px 16px; border: 1.5px solid transparent; border-radius: var(--radius); background: var(--cream); font: inherit; color: var(--charcoal); }
textarea.input { min-height: 110px; resize: vertical; }
.input::placeholder { color: #857b70; }
.input:focus { outline: none; border-color: var(--delta-red); background: var(--white); box-shadow: 0 0 0 4px rgba(177,32,40,.1); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 56px; }
.pw-wrap button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.check-line { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-size: .92rem; cursor: pointer; }
.check-line input { width: 20px; height: 20px; accent-color: var(--crimson); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 6px 18px; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #ddd3c4; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 26px; height: 26px; left: 3px; top: 3px; background: var(--white); border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--crimson); }
.switch input:checked + span::before { transform: translateX(20px); }
.form-error { background: #fbe9e8; color: var(--error); border-radius: var(--radius); padding: 12px 14px; font-size: .9rem; }
.form-ok { background: #e6f2ea; color: var(--success); border-radius: var(--radius); padding: 12px 14px; font-size: .9rem; }

/* ---------- Avatars & avatar rows ---------- */
.avatar { width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--grad-crimson); color: var(--cream); font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 36px; height: 36px; font-size: .82rem; }
.avatar.md { width: 60px; height: 60px; font-size: 1.2rem; }
.avatar.lg { width: 104px; height: 104px; font-size: 2rem; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { width: 30px; height: 30px; font-size: .7rem; border: 2px solid var(--white); margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.people-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 16px 6px; margin: 0 -16px; scrollbar-width: none; }
.people-row::-webkit-scrollbar { display: none; }
.person { flex: none; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--charcoal); background: none; border: 0; cursor: pointer; padding: 0; }
.person .avatar { width: 62px; height: 62px; box-shadow: 0 0 0 3px var(--white), var(--shadow); }
.person span { font-size: .78rem; font-weight: 500; text-align: center; line-height: 1.2; max-width: 68px; overflow: hidden; text-overflow: ellipsis; }
.person small { font-size: .68rem; color: var(--muted); margin-top: -4px; text-align: center; line-height: 1.2; }

/* ---------- Floating pill tab bar ---------- */
.tabbar {
  position: fixed; bottom: calc(10px + var(--safe-b)); left: 50%; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 456px; z-index: 40; height: var(--tabbar-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 999px; box-shadow: var(--shadow-float);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .66rem; font-weight: 600; position: relative; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.active { color: var(--crimson); background: var(--cream); }
.tabbar .badge { position: absolute; top: 6px; left: calc(50% + 5px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--delta-red); color: #fff; font-size: .66rem; display: grid; place-items: center; }

/* Gold Crown button (Home only) */
.crown-fab {
  position: fixed; z-index: 45; bottom: calc(var(--tabbar-h) + var(--safe-b) + 22px); right: max(18px, calc(50% - 240px + 18px));
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
  background: var(--white); border: 2.5px solid var(--gold); padding: 7px;
  box-shadow: 0 10px 26px rgba(198,156,85,.55); animation: glow 3s ease-in-out infinite;
}
.crown-fab img { width: 100%; height: 100%; object-fit: contain; }
.crown-fab:active { transform: scale(.95); }
@keyframes glow { 0%, 100% { box-shadow: 0 10px 26px rgba(198,156,85,.45); } 50% { box-shadow: 0 10px 34px rgba(198,156,85,.85); } }

/* ---------- Home ---------- */
.progress-card { display: flex; align-items: center; gap: 14px; background: var(--white); border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: var(--shadow); text-decoration: none; color: inherit; cursor: pointer; border: 0; width: 100%; text-align: left; }
.progress-card .pc-icon { width: 46px; height: 46px; border-radius: 14px; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--crimson); flex: none; }
.progress-card .pc-icon svg { width: 22px; height: 22px; }
.progress-card .pc-pill { display: flex; align-items: center; gap: 8px; background: var(--canvas); border-radius: 999px; padding: 6px 12px; font-size: .8rem; font-weight: 600; }
.progress-card .pc-pill .progress { width: 48px; }
.progress { height: 6px; border-radius: 999px; background: var(--cream-deep); overflow: hidden; }
.progress div { height: 100%; background: var(--crimson); border-radius: 999px; transition: width .3s; }
.progress.gold div { background: var(--gold); }
.checklist .ck { display: flex; align-items: center; gap: 12px; min-height: 52px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; cursor: pointer; padding: 0; font: inherit; }
.checklist .ck:last-child { border-bottom: 0; }
.checklist .ck .box { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--cream-deep); display: grid; place-items: center; flex: none; }
.checklist .ck.done .box { background: var(--crimson); border-color: var(--crimson); color: var(--cream); }
.checklist .ck.done .txt { color: var(--faint); text-decoration: line-through; }
.checklist .ck .box svg { width: 15px; height: 15px; }
.badge-earned { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--white); box-shadow: inset 0 0 0 1.5px var(--gold), var(--shadow); }
.badge-earned .bi { width: 42px; height: 42px; border-radius: 50%; background: var(--grad-gold); display: grid; place-items: center; }
.badge-earned .bi svg { width: 22px; height: 22px; color: var(--crimson); }

/* Event carousel ("For you" style) */
.carousel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.event-card { flex: 0 0 74%; scroll-snap-align: center; position: relative; height: 230px; border-radius: var(--radius-xl); overflow: hidden; text-decoration: none; color: #fff; box-shadow: var(--shadow-lift); background: var(--grad-crimson); }
.event-card.t-service { background: linear-gradient(150deg, #b12028, #7a0a10); }
.event-card.t-eboard { background: linear-gradient(150deg, #5d4a43, #2b2b2b); }
.event-card.t-national { background: linear-gradient(150deg, #910811, #3c225e); }
.event-card.t-anniversary { background: var(--crimson); box-shadow: inset 0 0 0 2px var(--gold), var(--shadow-lift); }
.event-card .ec-art { position: absolute; right: -24px; top: -18px; font-size: 7rem; opacity: .16; transform: rotate(-12deg); }
.event-card .tag.dark { position: absolute; top: 14px; left: 14px; }
.event-card .ec-date { position: absolute; top: 12px; right: 12px; width: 52px; border-radius: 16px; background: rgba(255,255,255,.95); color: var(--crimson); text-align: center; padding: 6px 0; box-shadow: var(--shadow); }
.event-card .ec-date b { display: block; font-family: var(--serif); font-size: 1.35rem; line-height: 1; }
.event-card .ec-date small { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.event-card .ec-body { position: absolute; left: 12px; right: 12px; bottom: 12px; background: rgba(255,255,255,.96); color: var(--charcoal); border-radius: 20px; padding: 12px 14px; }
.event-card .ec-body b { display: block; font-family: var(--serif); font-size: 1.02rem; color: var(--crimson); line-height: 1.25; }
.event-card .ec-body span { font-size: .78rem; color: var(--muted); }

.event-row { display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit; }
.date-badge { width: 54px; flex: none; text-align: center; border-radius: 16px; background: var(--white); box-shadow: var(--shadow); padding: 7px 0; }
.date-badge small { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--delta-red); }
.date-badge b { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--crimson); line-height: 1.1; }
.date-badge.gold { box-shadow: inset 0 0 0 1.5px var(--gold), var(--shadow); }

.crown-card { position: relative; perspective: 1000px; min-height: 172px; cursor: pointer; }
.crown-card .flip { position: relative; width: 100%; min-height: 172px; transition: transform .6s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; }
.crown-card.flipped .flip { transform: rotateY(180deg); }
.crown-card .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; justify-content: center; }
.crown-card .front { background: var(--crimson); color: var(--cream); box-shadow: inset 0 0 0 1.5px var(--gold), var(--shadow-lift); align-items: center; text-align: center; gap: 6px; }
.crown-card .front svg { width: 40px; height: 40px; color: var(--gold); }
.crown-card .front b { font-family: var(--serif); font-size: 1.2rem; color: var(--white); }
.crown-card .front span { font-size: .8rem; opacity: .85; }
.crown-card .back { transform: rotateY(180deg); background: var(--white); box-shadow: inset 0 0 0 1.5px var(--gold), var(--shadow); }
.crown-card .back .eyebrow { color: var(--gold-ink); display: flex; align-items: center; gap: 6px; }
.crown-card .back .eyebrow svg { width: 14px; height: 14px; }
.crown-card .back h3 { margin: 6px 0; font-size: 1.15rem; }
.crown-card .back p { margin: 0; font-size: .93rem; color: #4a4540; }
.countdown-chip { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--gold), var(--shadow); font-size: .82rem; font-weight: 600; color: var(--crimson); text-decoration: none; }
.countdown-chip svg { width: 16px; height: 16px; color: var(--gold); }

.president-card { display: flex; gap: 14px; align-items: flex-start; }
.president-card img { width: 72px; height: 88px; border-radius: 18px; object-fit: cover; object-position: center 20%; flex: none; box-shadow: var(--shadow); }
.president-card .scripture { font-family: var(--serif); font-style: italic; color: var(--crimson); font-size: .9rem; }
.sig { font-family: var(--serif); font-style: italic; color: var(--crimson); font-size: .9rem; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-actions a, .quick-actions button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow); text-decoration: none; color: var(--charcoal); font-size: .82rem; font-weight: 600; border: 0; cursor: pointer; }
.quick-actions .qa-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; color: var(--crimson); }
.quick-actions .qa-icon svg { width: 22px; height: 22px; }

/* ---------- Calendar ---------- */
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; margin: 0 -16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.day-strip::-webkit-scrollbar { display: none; }
.day-strip button { flex: none; width: 58px; min-height: 76px; border-radius: 20px; border: 0; background: var(--canvas); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; position: relative; scroll-snap-align: start; }
.day-strip button b { font-size: 1.35rem; font-weight: 600; color: var(--charcoal); }
.day-strip button small { font-size: .7rem; color: var(--muted); }
.day-strip button.selected { background: var(--white); box-shadow: var(--shadow-float); }
.day-strip button.selected b { color: var(--crimson); }
.day-strip button i { position: absolute; bottom: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--delta-red); }
.day-strip button i.gold { background: var(--gold); }
.month-head { display: flex; align-items: center; justify-content: space-between; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.month-grid .dow { font-size: .7rem; font-weight: 600; color: var(--faint); padding: 6px 0; }
.month-grid button { aspect-ratio: 1; min-height: var(--tap); border: 0; border-radius: 14px; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 500; }
.month-grid button.other { color: #cfc6b8; }
.month-grid button.today { box-shadow: inset 0 0 0 1.5px var(--delta-red); font-weight: 700; }
.month-grid button.selected { background: var(--crimson); color: var(--cream); }
.month-grid button .pips { display: flex; gap: 2px; height: 5px; }
.month-grid button .pip { width: 5px; height: 5px; border-radius: 50%; background: var(--delta-red); }
.month-grid button .pip.gold { background: var(--gold); }
.month-grid button.selected .pip { background: var(--cream); }
.event-hero { position: relative; border-radius: var(--radius-xl); padding: 24px 20px 22px; color: var(--cream); background: var(--grad-crimson); overflow: hidden; }
.event-hero.gold { background: var(--crimson); box-shadow: inset 0 0 0 2px var(--gold); }
.event-hero h1 { color: #fff; font-size: 1.55rem; margin: 10px 0 4px; }
.event-hero .tag { background: rgba(255,255,255,.18); color: #fff; }
.event-hero .ec-art { position: absolute; right: -20px; bottom: -30px; font-size: 8rem; opacity: .14; }
.action-bar { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px); z-index: 20; display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 999px; background: var(--crimson); color: var(--cream); box-shadow: var(--shadow-lift); }
.action-bar button, .action-bar a { flex: 1; min-height: 46px; border: 0; border-radius: 999px; background: transparent; color: var(--cream); font-weight: 600; font-size: .86rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.action-bar button.active { background: var(--cream); color: var(--crimson); }
.action-bar svg { width: 18px; height: 18px; }
.detail-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 0; }
.detail-row .li-icon { width: 38px; height: 38px; border-radius: 12px; }
.copy-box { display: flex; gap: 8px; align-items: center; }
.copy-box .input { font-size: .78rem; min-height: var(--tap); }

/* ---------- Chat ---------- */
.chat-item .li-title { display: flex; justify-content: space-between; gap: 8px; }
.chat-item .time { font-size: .74rem; color: var(--faint); font-weight: 400; flex: none; }
.unread-pill { background: var(--delta-red); color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 700; min-width: 22px; height: 22px; display: grid; place-items: center; padding: 0 6px; }
.thread { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; min-height: calc(100dvh - 160px); background: var(--canvas); }
.thread .day-sep { align-self: center; font-size: .72rem; color: var(--muted); background: var(--white); padding: 4px 12px; border-radius: 999px; margin: 10px 0; box-shadow: var(--shadow); }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 84%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble-wrap { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.msg.mine .bubble-wrap { align-items: flex-end; }
.msg .who { font-size: .74rem; font-weight: 600; color: var(--crimson); padding-left: 12px; }
.bubble { background: var(--white); border-radius: 20px 20px 20px 6px; padding: 11px 15px; box-shadow: var(--shadow); word-wrap: break-word; cursor: pointer; font-size: .95rem; }
.msg.mine .bubble { background: var(--crimson); color: var(--cream); border-radius: 20px 20px 6px 20px; }
.bubble.media { padding: 4px; background: transparent; box-shadow: none; }
.bubble.media img { border-radius: 18px; max-width: 220px; }
.msg .stamp { font-size: .68rem; color: var(--faint); padding: 0 6px; }
.reactions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: -2px; }
.reactions span { background: var(--white); border-radius: 999px; font-size: .76rem; padding: 2px 8px; box-shadow: var(--shadow); }
.receipt { font-size: .7rem; color: var(--faint); padding-right: 4px; display: inline-flex; align-items: center; gap: 4px; }
.receipt svg { width: 14px; height: 14px; color: var(--success); }
.composer { position: sticky; bottom: 0; z-index: 20; background: var(--canvas); padding: 8px 12px calc(12px + var(--safe-b)); }
.composer-inner { display: flex; gap: 2px; align-items: flex-end; background: var(--white); border-radius: 28px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow-float); }
.composer textarea { flex: 1; min-height: 44px; max-height: 120px; padding: 11px 4px; border: 0; font: inherit; resize: none; background: transparent; }
.composer textarea:focus { outline: none; }
.composer .icon-btn { color: var(--delta-red); }
.send-btn { background: var(--crimson) !important; color: var(--cream) !important; }
.tray { background: var(--white); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 14px; max-height: 320px; overflow-y: auto; box-shadow: 0 -8px 24px rgba(0,0,0,.05); }
.tray-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.tray-grid button { border: 0; background: var(--canvas); border-radius: 16px; padding: 6px; cursor: pointer; min-height: 84px; display: grid; place-items: center; }
.tray-grid img { border-radius: 10px; max-height: 92px; object-fit: cover; }
.sticker { width: 120px; height: 120px; }
.tray-grid .sticker { width: 88px; height: 88px; }
.reaction-picker { position: fixed; inset: 0; z-index: 60; background: rgba(43,43,43,.3); display: grid; place-items: center; }
.reaction-picker .pick { background: var(--white); border-radius: 999px; padding: 8px; display: flex; gap: 4px; box-shadow: var(--shadow-float); }
.reaction-picker .pick button { font-size: 1.6rem; width: 52px; height: 52px; border: 0; background: none; border-radius: 50%; cursor: pointer; }

/* ---------- Community ---------- */
.post-card { background: var(--white); }
.post-card .post-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.post-card .post-head .name { font-weight: 600; font-size: .9rem; }
.post-card h3 { margin-bottom: 6px; }
.post-card .post-body { color: #4a4540; white-space: pre-line; }
.post-actions { display: flex; gap: 4px; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); align-items: center; }
.post-actions button, .post-actions a { min-height: var(--tap); display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: .84rem; cursor: pointer; padding: 0 10px; min-width: var(--tap); justify-content: center; border-radius: 999px; text-decoration: none; }
.post-actions button.on { color: var(--delta-red); }
.post-actions svg { width: 19px; height: 19px; }
.im-in { background: var(--crimson) !important; color: var(--cream) !important; }
.im-in.on { background: var(--cream) !important; color: var(--crimson) !important; box-shadow: inset 0 0 0 1.5px var(--crimson); }
.howto-card { background: var(--crimson); color: var(--cream); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-lift); }
.howto-card h3 { color: #fff; }
.howto-card ol { margin: 8px 0 0; padding-left: 20px; font-size: .9rem; }
.howto-card li { margin: 4px 0; }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-grid button { text-align: left; padding: 14px; border-radius: var(--radius); border: 0; background: var(--white); box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 92px; }
.type-grid button b { font-size: .92rem; }
.type-grid button span { font-size: .75rem; color: var(--muted); }
.type-grid button.active { box-shadow: inset 0 0 0 2px var(--crimson), var(--shadow); }
.type-grid .tg-icon { font-size: 1.4rem; }
.forum-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; background: var(--cream); flex: none; }
.fab { position: fixed; z-index: 45; bottom: calc(var(--tabbar-h) + var(--safe-b) + 24px); right: max(20px, calc(50% - 240px + 20px)); min-height: 56px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--crimson); color: var(--cream); font-weight: 700; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-lift); cursor: pointer; }
.fab svg { width: 22px; height: 22px; }

/* ---------- Directory / Profile ---------- */
.search { position: relative; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--faint); }
.search .input { padding-left: 46px; border-radius: 999px; background: var(--canvas); }
.profile-hero { position: relative; margin: -8px -16px 0; height: 320px; overflow: hidden; border-radius: 0 0 var(--radius-xl) var(--radius-xl); background: var(--grad-crimson); }
.profile-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.profile-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,43,43,0) 40%, rgba(43,43,43,.7) 100%); }
.profile-hero .ph-initials { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 5rem; color: rgba(255,247,225,.35); }
.profile-hero .ph-text { position: absolute; left: 20px; right: 20px; bottom: 22px; z-index: 1; text-align: center; color: #fff; }
.profile-hero .ph-text h1 { color: #fff; font-size: 2rem; text-transform: uppercase; letter-spacing: .02em; }
.profile-hero .ph-text small { display: block; letter-spacing: .3em; text-transform: uppercase; font-size: .72rem; margin-top: 6px; opacity: .9; }
.profile-hero .ph-back { position: absolute; top: calc(12px + var(--safe-t)); left: 16px; z-index: 2; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.letter-head { font-family: var(--serif); color: var(--crimson); font-weight: 700; padding: 10px 18px 0; }

/* Officer grid */
.officer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.officer { background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.officer .ph { aspect-ratio: 4/5; background: var(--grad-crimson); display: grid; place-items: center; color: rgba(255,247,225,.5); font-family: var(--serif); font-size: 2.4rem; }
.officer .ph img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.officer .ob { padding: 10px 12px 14px; }
.officer .ob b { display: block; font-size: .9rem; line-height: 1.25; }
.officer .ob span { font-size: .74rem; color: var(--delta-red); font-weight: 600; }
.officer.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 42% 1fr; }
.officer.featured .ph { aspect-ratio: auto; height: 100%; min-height: 200px; }
.officer.featured .ob { padding: 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.officer.featured .ob b { font-family: var(--serif); font-size: 1.3rem; color: var(--crimson); }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--canvas); border-radius: var(--radius-lg); }
.empty .em-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 1.8rem; }
.empty h3 { margin: 0; }
.empty p { color: var(--muted); margin: 0; max-width: 300px; font-size: .92rem; }

/* ---------- The Crown (gold) ---------- */
.crown-screen { background: linear-gradient(180deg, #fffaf0 0%, var(--white) 320px); }
.crown-hero { text-align: center; padding: 22px 18px 20px; border-radius: var(--radius-xl); color: var(--cream); background: var(--crimson); box-shadow: inset 0 0 0 1.5px var(--gold), var(--shadow-lift); }
.crown-hero .crown-mark { width: 190px; max-width: 64%; margin: 0 auto 6px; }
.crown-hero h1 { color: var(--gold); font-size: 1.9rem; }
.crown-hero p { opacity: .9; margin: 4px 0 14px; font-size: .95rem; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.countdown div { background: rgba(255,255,255,.08); border: 1px solid rgba(198,156,85,.55); border-radius: 16px; padding: 10px 4px; }
.countdown b { display: block; font-family: var(--serif); font-size: 1.55rem; color: var(--gold); line-height: 1.1; }
.countdown small { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.gold-rule { height: 1px; background: linear-gradient(90deg, rgba(198,156,85,0), var(--gold), rgba(198,156,85,0)); }
.gala-card { border-radius: var(--radius-xl); overflow: hidden; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--gold), var(--shadow); text-decoration: none; color: inherit; display: block; }
.gala-card img { width: 100%; height: 220px; object-fit: cover; object-position: center 35%; }
.gala-card .gb { padding: 16px 18px 18px; }
.tier { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tier:last-child { border-bottom: 0; }
.tier b { color: var(--crimson); white-space: nowrap; }
.room-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.room-tile { position: relative; border-radius: var(--radius-lg); padding: 16px 14px; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; text-decoration: none; color: inherit; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--gold-light), var(--shadow); overflow: hidden; }
.room-tile .ri { position: absolute; top: 12px; left: 14px; font-size: 1.8rem; }
.room-tile b { font-family: var(--serif); color: var(--crimson); font-size: 1rem; line-height: 1.2; }
.room-tile span { font-size: .74rem; color: var(--muted); }
.room-tile .check { position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--gold-ink); }
.room-tile .check svg { width: 14px; height: 14px; }
.room-tile.locked { background: var(--canvas); box-shadow: none; }
.room-tile.locked .ri { filter: grayscale(1) brightness(.4); opacity: .35; }
.room-tile.locked b { color: var(--muted); }
.room-tile.locked .opens { font-weight: 700; color: var(--crimson); font-size: .76rem; display: inline-flex; align-items: center; gap: 4px; }
.room-tile.locked .opens svg { width: 12px; height: 12px; }
.room-tile.just-opened, .unlock-anim { animation: shimmer 1.6s ease-out 1; }
@keyframes shimmer { 0% { box-shadow: inset 0 0 0 1.5px var(--gold), 0 0 0 0 rgba(198,156,85,.7); } 100% { box-shadow: inset 0 0 0 1.5px var(--gold-light), 0 0 0 18px rgba(198,156,85,0); } }
.game-card { text-align: left; padding: 18px 16px; border-radius: var(--radius-lg); background: var(--white); box-shadow: inset 0 0 0 1.5px var(--gold-light), var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; }
.game-card .gc-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--cream); display: grid; place-items: center; font-size: 1.5rem; }
.milestone { display: flex; gap: 14px; }
.milestone .yr { font-family: var(--serif); font-weight: 700; color: var(--crimson); font-size: 1.05rem; min-width: 86px; }
.quote { font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: var(--crimson); border-left: 3px solid var(--gold); padding-left: 14px; }
.option-btn { width: 100%; min-height: 56px; text-align: left; padding: 12px 18px; border-radius: var(--radius); border: 0; background: var(--white); box-shadow: var(--shadow); font-weight: 600; cursor: pointer; }
.option-btn.correct { background: #e6f2ea; color: var(--success); box-shadow: inset 0 0 0 2px var(--success); }
.option-btn.wrong { background: #fbe9e8; color: var(--error); box-shadow: inset 0 0 0 2px var(--error); }
.memory { border-radius: var(--radius-lg); padding: 18px; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--gold), var(--shadow); }
.poem { font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: var(--crimson); white-space: pre-line; line-height: 1.6; text-align: center; }

/* ---------- Auth / onboarding ---------- */
.auth-screen { min-height: 100dvh; display: flex; flex-direction: column; background: var(--white); }
.auth-hero { position: relative; height: 300px; overflow: hidden; border-radius: 0 0 var(--radius-xl) var(--radius-xl); background: var(--crimson); }
.auth-hero img.bg { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; opacity: .45; }
.auth-hero .ah-mark { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding-top: var(--safe-t); }
.auth-hero .ah-mark img { width: 92px; height: 92px; object-fit: contain; background: var(--white); border-radius: 22px; padding: 8px; box-shadow: 0 10px 26px rgba(0,0,0,.3); }
.auth-hero .ah-mark b { font-family: var(--sans); letter-spacing: .22em; font-weight: 300; color: #fff; font-size: 1.05rem; text-transform: uppercase; }
.auth-hero .ah-mark b strong { font-weight: 700; }
.auth-hero .ah-mark small { color: var(--gold-light); letter-spacing: .4em; font-size: .7rem; font-weight: 600; text-transform: uppercase; }
.auth-body { padding: 24px 20px 32px; display: flex; flex-direction: column; gap: 16px; }
.auth-body h1 { font-size: 1.7rem; font-weight: 400; color: var(--charcoal); }
.auth-body h1 b { color: var(--crimson); font-weight: 700; }
.step-dashes { display: flex; gap: 6px; }
.step-dashes i { width: 18px; height: 4px; border-radius: 2px; background: var(--cream-deep); }
.step-dashes i.on { background: var(--crimson); width: 28px; }
.demo-banner { background: var(--canvas); color: var(--charcoal); border-radius: var(--radius); padding: 12px 14px; font-size: .84rem; }
.onboard { min-height: 100dvh; display: flex; flex-direction: column; background: var(--white); }
.slides { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; justify-content: center; padding: 32px 28px; gap: 14px; }
.slide .art { width: 100%; aspect-ratio: 1.1; border-radius: var(--radius-xl); display: grid; place-items: center; font-size: 5rem; background: var(--canvas); position: relative; overflow: hidden; }
.slide .art img { width: 100%; height: 100%; object-fit: cover; }
.slide .art img.contain { object-fit: contain; padding: 24px; background: var(--white); }
.slide .art.gold { box-shadow: inset 0 0 0 2px var(--gold); background: var(--white); }
.slide h1 { font-size: 2rem; font-weight: 400; color: var(--charcoal); }
.slide h1 b { color: var(--crimson); font-weight: 700; }
.slide p { color: var(--muted); font-size: 1rem; margin: 0; }
.dots { display: flex; gap: 6px; padding: 0 28px; }
.dots i { width: 8px; height: 6px; border-radius: 3px; background: var(--cream-deep); transition: .2s; }
.dots i.on { width: 26px; background: var(--crimson); }
.onboard-foot { padding: 16px 20px calc(24px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; }
.photo-pick { display: flex; align-items: center; gap: 16px; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tip-card { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.tip-card .ti { font-size: 1.4rem; }

/* ---------- Admin ---------- */
.stat { text-align: center; background: var(--white); }
.stat b { display: block; font-family: var(--serif); font-size: 1.8rem; color: var(--crimson); }
.stat small { color: var(--muted); font-size: .76rem; font-weight: 600; }
.table-wrap { overflow-x: auto; }
table.simple { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.simple th, table.simple td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); }
table.simple th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---------- Sheet / toast / loading ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(43,43,43,.4); z-index: 70; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto; background: var(--white); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 10px 20px calc(24px + var(--safe-b)); animation: up .22s ease; display: flex; flex-direction: column; gap: 14px; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #e2d8c8; margin: 0 auto 4px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-b) + 100px); z-index: 90; background: var(--charcoal); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .9rem; font-weight: 500; box-shadow: var(--shadow-float); animation: up .2s; max-width: 90%; text-align: center; --tx: -50%; }
@keyframes up { from { transform: translate(var(--tx, 0), 30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.loading { display: grid; place-items: center; padding: 60px; }
.skeleton { background: linear-gradient(90deg, var(--canvas), #f2ede6, var(--canvas)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius-lg); }
@keyframes sk { to { background-position: -200% 0; } }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--crimson); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: #fbe9e8; color: var(--error); font-size: .88rem; font-weight: 500; text-decoration: none; }
.banner svg { width: 20px; height: 20px; flex: none; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Inline icons inside text links and small labels */
.link-btn svg, .meta svg, .tag svg, .label svg, .eyebrow svg, .banner svg { width: 16px; height: 16px; flex: none; }
.link-btn { gap: 4px; }
.grid-3 .btn-sm { padding: 0 8px; font-size: .84rem; gap: 4px; white-space: nowrap; }

/* Event flyers */
.event-card .ec-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.event-card:has(.ec-img)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,43,43,.25), rgba(43,43,43,0) 40%); }
.event-card .tag.dark, .event-card .ec-date, .event-card .ec-body { z-index: 1; }
.flyer { width: 100%; max-height: 460px; object-fit: contain; background: var(--canvas); border-radius: var(--radius-xl); box-shadow: var(--shadow); }

/* Chat: replies, photos, actions */
.quote-chip { display: flex; flex-direction: column; gap: 1px; text-align: left; width: 100%; margin: -2px 0 6px; padding: 6px 10px; border: 0; border-left: 3px solid var(--gold); border-radius: 10px; background: rgba(43,43,43,.06); color: inherit; font: inherit; font-size: .8rem; cursor: pointer; }
.msg.mine .quote-chip { background: rgba(255,247,225,.16); }
.quote-chip b { font-size: .74rem; }
.quote-chip span { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.bubble.media.photo { padding: 4px; background: var(--white); box-shadow: var(--shadow); border-radius: 18px; }
.msg.mine .bubble.media.photo { background: var(--crimson); }
.bubble.media.photo img { border-radius: 14px; max-width: 240px; max-height: 320px; object-fit: cover; }
.bubble .caption { padding: 6px 8px 4px; font-size: .92rem; }
.reply-bar { display: flex; align-items: center; gap: 8px; margin: 0 6px 8px; padding: 8px 6px 8px 12px; border-left: 3px solid var(--gold); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); font-size: .82rem; }
.reply-bar div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reply-bar span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.flash .bubble { box-shadow: 0 0 0 3px var(--gold); transition: box-shadow .3s; }
.msg.mine .bubble.media:not(.photo) { background: transparent; box-shadow: none; color: var(--charcoal); }

/* ---------- The Crown: Phase 5 ---------- */
.badge-tile { border: 0; cursor: pointer; font: inherit; text-align: center; padding: 14px 6px 12px; border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 112px; color: var(--charcoal); }
.badge-tile .bt-icon { font-size: 1.8rem; filter: grayscale(1); opacity: .55; }
.badge-tile b { font-size: .76rem; line-height: 1.2; margin-top: 4px; }
.badge-tile span { font-size: .68rem; color: var(--muted); }
.badge-tile.earned { box-shadow: inset 0 0 0 1.5px var(--gold), var(--shadow); background: linear-gradient(180deg, var(--cream), var(--white) 60%); }
.badge-tile.earned .bt-icon { filter: none; opacity: 1; }
.consent-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-lg); background: var(--cream); box-shadow: inset 0 0 0 1.5px var(--gold), var(--shadow); text-decoration: none; color: var(--charcoal); animation: shimmer 1.6s ease-out 1; }
.consent-banner .cb-icon { font-size: 1.6rem; }
.consent-banner div { flex: 1; display: flex; flex-direction: column; }
.consent-banner b { color: var(--crimson); }
.consent-banner span { font-size: .8rem; color: var(--muted); }
.consent-banner > svg { width: 18px; height: 18px; color: var(--gold); }
.room-tile .new-pill { position: absolute; top: 12px; right: 12px; padding: 2px 9px; border-radius: 999px; background: var(--grad-gold); color: var(--crimson); font-size: .66rem; font-weight: 700; }
.room-tile .lock-badge { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--white); display: grid; place-items: center; color: var(--crimson); }
.room-tile .lock-badge svg { width: 14px; height: 14px; }
.locked-room { text-align: center; padding: 28px 18px; border-radius: var(--radius-xl); background: var(--canvas); display: flex; flex-direction: column; gap: 10px; }
.locked-room .lr-lock { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 2px var(--gold), var(--shadow); display: grid; place-items: center; color: var(--crimson); animation: lockwiggle 3s ease-in-out infinite; }
.locked-room .lr-lock svg { width: 30px; height: 30px; }
.locked-room h1 { color: #6f655e; font-size: 1.5rem; margin: 0; }
.locked-room p { margin: 0; color: var(--muted); }
.locked-room .countdown b { color: var(--crimson); }
@keyframes lockwiggle { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-10deg); } 94% { transform: rotate(10deg); } 97% { transform: rotate(-5deg); } }
.unlock-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(145, 8, 17, .92); pointer-events: none; animation: uofade 1.9s ease forwards; }
.unlock-overlay .uo-lock, .unlock-overlay .uo-burst { grid-area: 1 / 1; }
.unlock-overlay .uo-lock { width: 96px; height: 96px; border-radius: 50%; background: var(--grad-gold); display: grid; place-items: center; color: var(--crimson); animation: uoshake .8s ease both, uoout .3s .8s ease forwards; }
.unlock-overlay .uo-lock svg { width: 44px; height: 44px; }
.unlock-overlay .uo-burst { font-size: 5rem; opacity: 0; animation: uoburst .8s .95s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes uoshake { 0% { transform: scale(.6); } 30% { transform: scale(1) rotate(0); } 45% { transform: rotate(-14deg); } 60% { transform: rotate(14deg); } 75% { transform: rotate(-8deg); } 100% { transform: rotate(0); } }
@keyframes uoout { to { transform: scale(1.6); opacity: 0; } }
@keyframes uoburst { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes uofade { 0%, 75% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .unlock-overlay { display: none; } .locked-room .lr-lock, .room-tile.just-opened, .unlock-anim, .consent-banner { animation: none; } }
.my-guess { padding: 10px 12px; border-radius: var(--radius); background: var(--cream); }
.guess-search { display: flex; flex-direction: column; gap: 6px; }
.guess-results { display: flex; flex-direction: column; gap: 4px; }
.result-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border: 0; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); text-align: left; font: inherit; cursor: pointer; color: var(--charcoal); }
.result-row span { display: flex; flex-direction: column; }
.result-row small { color: var(--muted); font-size: .74rem; }
.memory-photo { width: 100%; border-radius: 12px; margin-bottom: 12px; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-tile { border: 0; padding: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--gold-light); background: var(--cream); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.collection-link { text-decoration: none; color: inherit; box-shadow: inset 0 0 0 1.5px var(--gold-light), var(--shadow); margin-top: 12px; }
.collection-link > svg { width: 18px; height: 18px; flex: none; color: var(--gold); }

/* ---------- Admin console ---------- */
.big-num { font-family: var(--serif); font-size: 1.4rem; color: var(--crimson); }
.edit-card { border: 0; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { -webkit-line-clamp: 2; } .clamp-3 { -webkit-line-clamp: 3; }
.push-preview { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: start; padding: 12px; border-radius: 18px; background: #f1ece4; }
.push-preview img { width: 38px; height: 38px; border-radius: 9px; }
.push-preview div { display: flex; flex-direction: column; min-width: 0; font-size: .86rem; }
.push-preview b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.push-preview span { color: #4a4540; overflow-wrap: anywhere; }
.push-preview small { color: var(--muted); font-size: .72rem; }
.bar-row { display: grid; grid-template-columns: minmax(70px, 34%) 1fr 28px; gap: 10px; align-items: center; font-size: .86rem; }
.bar-row span { overflow-wrap: anywhere; color: var(--charcoal); }
.bar-row b { text-align: right; }
.bar { height: 12px; border-radius: 6px; background: var(--canvas); overflow: hidden; }
.bar div { height: 100%; background: var(--crimson); border-radius: 6px; }
.crown-rows .li-icon { color: var(--gold); }
.block-ed { background: var(--canvas); box-shadow: none; }
.check-grid .chip.active, .check-grid label.chip.active { background: var(--crimson); color: var(--cream); }

/* ---------- Phase 7 polish ---------- */
.tag-link { min-height: var(--tap); padding: 0 14px; text-decoration: none; }
.trivia-q { font-family: var(--serif); font-weight: 700; color: var(--crimson); font-size: 1.35rem; line-height: 1.3; margin: 0; }
a:focus-visible, button:focus-visible, .chip:focus-within, .input:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--delta-red); outline-offset: 2px; }
.gold-ink { color: var(--gold-ink) !important; }
.sk-wrap { display: flex; flex-direction: column; gap: 16px; }
.sk-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }
.sk-avatar { width: 48px; height: 48px; border-radius: 50%; flex: none; }
.sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 13px; border-radius: 7px; }
.sk-line.short { width: 55%; }
.sk-list { padding: 4px 0; }
.sk-carousel { display: flex; gap: 12px; }
.sk-carousel > .skeleton { flex: 1; }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.splash { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: var(--white); }
.splash img { width: 120px; height: 120px; object-fit: contain; }
.install-card { border: 0; width: 100%; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.install-steps { text-align: left; margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.install-steps svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--delta-red); }
