/* CheckInSquad. Engraved gold on warm black, big condensed display type, one filled button per region.
   Section tones (so nothing is one flat accent): gold = brand/actions, green = check-ins/presence,
   amber = chores, blue = calendar/reminders, violet = chat, red = alerts/no-shows. */
:root {
  --bg: #0c0a07; --bg2: #13100b; --bg3: #1a1610; --line: #241f16; --line2: #332b1d;
  --ink: #f7f0dd; --ink2: #d3c7aa; --muted: #a39779;
  --gold: #d4a53a; --gold2: #f3d77a; --gold3: #8a6420;
  --green: #4fc37a; --green-bg: #12261a;
  --amber: #f0a534; --amber-bg: #2b1f0c;
  --blue: #5aa7ff; --blue-bg: #0f1c2e;
  --violet: #b48cff; --violet-bg: #1d152e;
  --red: #ff6b5c; --red-bg: #2e1410;
  --radius: 14px; --nav-h: 64px;
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --body: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body { background: var(--bg); min-height: 100vh; }
a { color: var(--gold2); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--ink2); }
.tiny { font-size: 13px; color: var(--muted); }
.small { font-size: 14.5px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.gap { height: 12px; }

/* ---------- display type ---------- */
.wordmark, h1, h2, .display { font-family: var(--display); letter-spacing: .02em; font-weight: 400; margin: 0; line-height: .95; }
.wordmark { font-size: 44px; }
.wordmark span, .gold-text { background: linear-gradient(180deg, #fff2b8 0%, var(--gold2) 30%, var(--gold) 55%, var(--gold3) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 2px 0 rgba(0,0,0,.35); filter: drop-shadow(0 2px 1px rgba(0,0,0,.6)); }
h1 { font-size: 40px; } h2 { font-size: 28px; color: var(--ink); }
h3 { font-size: 17.5px; font-weight: 700; margin: 0 0 6px; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; }

/* ---------- layout ---------- */
#app { max-width: 640px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
.boot { display: grid; place-items: center; gap: 10px; min-height: 80vh; }
header.top { position: sticky; top: 0; z-index: 5; background: rgba(14,12,9,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
header.top .title { font-family: var(--display); font-size: 32px; line-height: 1; letter-spacing: .03em; }
header.top .sub { font-size: 13.5px; color: var(--ink2); margin-top: 3px; font-weight: 500; }
main { padding: 16px; }
.iconbtn { background: var(--bg3); border: 1px solid var(--line2); border-radius: 12px; width: 42px; height: 42px; display: grid; place-items: center; position: relative; cursor: pointer; font-size: 18px; }
.iconbtn .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

nav.bottom { position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #0b0906; border-top: 1px solid var(--line2); display: flex; justify-content: center; z-index: 6; }
nav.bottom .inner { display: flex; width: 100%; max-width: 640px; }
nav.bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink2); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
nav.bottom a .ic { font-size: 23px; line-height: 1; filter: grayscale(1) opacity(.8); }
nav.bottom a.active { color: var(--gold2); } nav.bottom a.active .ic { filter: none; }

/* ---------- cards + tones ---------- */
.card { background: linear-gradient(180deg, #221c14, var(--bg2)); border: 1px solid #443a26; border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 6px 20px rgba(0,0,0,.35); }
.card + .card { margin-top: 12px; }
.card.tone-green { border-color: #1f4a2f; background: linear-gradient(180deg, #14291b, var(--bg2)); }
.card.tone-amber { border-color: #4a3413; background: linear-gradient(180deg, #2a1f0c, var(--bg2)); }
.card.tone-blue { border-color: #1d3557; background: linear-gradient(180deg, #111f33, var(--bg2)); }
.card.tone-violet { border-color: #3a2a5c; background: linear-gradient(180deg, #1f1733, var(--bg2)); }
.card.tone-red { border-color: #5c2a22; background: linear-gradient(180deg, #2e1410, var(--bg2)); }
.card.tone-gold { border-color: var(--gold3); background: linear-gradient(180deg, #2b2110, var(--bg2)); }
.card .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card .head h2 { font-size: 26px; }
.help { font-size: 14.5px; color: var(--ink2); margin: 4px 0 10px; line-height: 1.4; }
.help b { color: var(--ink); }
.empty { text-align: center; padding: 22px 12px; color: var(--ink2); font-size: 15px; }
.empty .big { font-size: 34px; margin-bottom: 6px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 12px 16px; font-weight: 800; font-size: 16.5px; border: 1px solid var(--line2); background: var(--bg3); color: var(--ink); cursor: pointer; min-height: 46px; user-select: none; transition: transform .06s ease; }
.btn:active { transform: translateY(1px); }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 6px 13px; font-size: 14.5px; border-radius: 10px; }
.btn.primary { color: #1a1204; border: 1px solid #6b4d12; background: linear-gradient(180deg, #ffe9a3 0%, #e6bd52 35%, #c9982e 70%, #9c7220 100%); box-shadow: 0 1px 0 #fff4c8 inset, 0 -2px 0 rgba(0,0,0,.25) inset, 0 6px 16px rgba(212,165,58,.25); text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.btn.green { color: #06200f; border-color: #2f7a4b; background: linear-gradient(180deg, #8ff0b0, #4fc37a 45%, #2f8a52); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 -2px 0 rgba(0,0,0,.25) inset; }
.btn.blue { color: #061428; border-color: #2d5f9e; background: linear-gradient(180deg, #a9d1ff, #5aa7ff 45%, #3577c9); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 -2px 0 rgba(0,0,0,.25) inset; }
.btn.amber { color: #2a1704; border-color: #8a5a12; background: linear-gradient(180deg, #ffd48a, #f0a534 45%, #b8741a); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 -2px 0 rgba(0,0,0,.25) inset; }
.btn.violet { color: #150a2c; border-color: #6a4bb0; background: linear-gradient(180deg, #d9c4ff, #b48cff 45%, #7d55d6); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 -2px 0 rgba(0,0,0,.25) inset; }
.btn.danger { color: var(--red); border-color: #5c2a22; background: var(--red-bg); }
.btn.ghost { background: transparent; }
.btn.big { min-height: 68px; font-size: 24px; font-family: var(--display); letter-spacing: .05em; border-radius: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- forms ---------- */
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink2); margin-bottom: 5px; letter-spacing: .02em; }
input.in, select.in, textarea.in { width: 100%; background: #0b0906; border: 1px solid var(--line2); border-radius: 11px; padding: 12px 13px; color: var(--ink); outline: none; min-height: 46px; }
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,165,58,.15); }
textarea.in { min-height: 84px; resize: vertical; }
select.in { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink2) 50%), linear-gradient(135deg, var(--ink2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line2); background: var(--bg3); border-radius: 999px; padding: 8px 13px; font-size: 14.5px; font-weight: 700; cursor: pointer; color: var(--ink2); }
.chip.on { border-color: var(--gold); color: var(--gold2); background: #2b2110; }
.chip.on.green { border-color: var(--green); color: var(--green); background: var(--green-bg); }
.chip.on.blue { border-color: var(--blue); color: var(--blue); background: var(--blue-bg); }
.chip.on.amber { border-color: var(--amber); color: var(--amber); background: var(--amber-bg); }
.chip.on.violet { border-color: var(--violet); color: var(--violet); background: var(--violet-bg); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: 0; }
.switch .t { font-weight: 700; font-size: 16.5px; } .switch .d { font-size: 13.5px; color: var(--ink2); margin-top: 2px; }
.toggle { width: 48px; height: 28px; border-radius: 14px; background: #2a2418; border: 1px solid var(--line2); position: relative; cursor: pointer; flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 10px; background: #6b6250; transition: .15s; }
.toggle.on { background: #3b2d0f; border-color: var(--gold3); } .toggle.on::after { left: 23px; background: linear-gradient(180deg, var(--gold2), var(--gold)); }
.err { color: var(--red); font-size: 13.5px; margin: 6px 0; }
.ok { color: var(--green); font-size: 13.5px; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: 12px; background: #110e0a; border: 1px solid #2f281b; }
.item .av { width: 46px; height: 46px; border-radius: 13px; background: var(--bg3); display: grid; place-items: center; font-size: 26px; flex: none; border: 1px solid var(--line2); }
.item .t { font-weight: 700; font-size: 17px; } .item .s { font-size: 14px; color: var(--ink2); margin-top: 2px; }
.item.done { opacity: .65; } .item.done .t { text-decoration: line-through; }
.badge { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line2); color: var(--ink2); }
.badge.green { color: var(--green); border-color: #2f5a3f; background: var(--green-bg); }
.badge.amber { color: var(--amber); border-color: #5a3f14; background: var(--amber-bg); }
.badge.blue { color: var(--blue); border-color: #234a7a; background: var(--blue-bg); }
.badge.violet { color: var(--violet); border-color: #4a3577; background: var(--violet-bg); }
.badge.red { color: var(--red); border-color: #6a2e25; background: var(--red-bg); }
.badge.gold { color: var(--gold2); border-color: var(--gold3); background: #2b2110; }
.stat { text-align: center; padding: 10px; border-radius: 12px; background: #0f0d09; border: 1px solid var(--line); flex: 1; }
.stat .n { font-family: var(--display); font-size: 34px; line-height: 1; } .stat .l { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ---------- presence tiles (home) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tile { border-radius: 12px; background: #0f0d09; border: 1px solid var(--line); padding: 10px 6px; text-align: center; }
.tile .av { font-size: 34px; } .tile .n { font-size: 14px; font-weight: 800; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .st { font-size: 12.5px; color: var(--ink2); margin-top: 3px; font-weight: 500; }
.tile.in { border-color: #2f5a3f; background: var(--green-bg); } .tile.in .st { color: var(--green); }

/* ---------- chat ---------- */
.msgs { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.msg { max-width: 84%; padding: 11px 13px; border-radius: 14px; background: var(--bg3); border: 1px solid var(--line2); font-size: 16px; }
.msg .who { font-size: 12.5px; color: var(--violet); font-weight: 800; margin-bottom: 2px; }
.msg .when { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.msg.me { align-self: flex-end; background: #2b2110; border-color: var(--gold3); }
.composer { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); background: var(--bg); padding: 10px 0 4px; display: flex; gap: 8px; }
.composer input { flex: 1; }

/* ---------- toasts / modal ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 50; pointer-events: none; }
.toast { background: #1f1a13; border: 1px solid var(--gold3); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.5); animation: pop .18s ease; max-width: 90vw; }
.toast.err { border-color: var(--red); } .toast.ok { border-color: var(--green); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
#modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
#modal .sheet { background: var(--bg2); border: 1px solid var(--line2); border-bottom: 0; border-radius: 20px 20px 0 0; width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); animation: up .2s ease; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
#modal .sheet h2 { margin-bottom: 8px; }

/* ---------- auth / landing ---------- */
.auth { padding: 36px 20px 20px; }
.auth .wordmark { font-size: 54px; }
.tagline { font-size: 17px; color: var(--ink2); margin: 8px 0 22px; max-width: 34ch; }
.tabs { display: flex; gap: 6px; background: #0b0906; border: 1px solid var(--line2); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--bg3); color: var(--gold2); }
.tier { border: 1px solid var(--line2); border-radius: 14px; padding: 12px; cursor: pointer; background: #0f0d09; }
.tier.on { border-color: var(--gold); background: #2b2110; }
.tier .n { font-family: var(--display); font-size: 24px; letter-spacing: .04em; }
.tier .p { color: var(--gold2); font-weight: 700; font-size: 14px; }
.tier .d { font-size: 12.5px; color: var(--ink2); margin-top: 2px; }
.code { font-family: var(--display); font-size: 40px; letter-spacing: .18em; text-align: center; padding: 10px; border: 1px dashed var(--gold3); border-radius: 12px; background: #0b0906; }
.photo-prev { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line2); }
.day-h { font-family: var(--display); font-size: 23px; letter-spacing: .05em; color: var(--blue); margin: 14px 0 6px; }
.day-h:first-child { margin-top: 0; }
:where(html:not(.zoomed)) { @media (min-width: 720px) { main { padding: 22px; } } }

/* ---------- headshots + seals ---------- */
.av { overflow: hidden; }
.avimg { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.mono { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--display); font-size: 1.15em; letter-spacing: .04em; color: #1a1204; background: linear-gradient(180deg, #ffe9a3 0%, #e6bd52 40%, #c9982e 75%, #9c7220 100%); border-radius: inherit; text-shadow: 0 1px 0 rgba(255,255,255,.35); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 -2px 0 rgba(0,0,0,.25) inset; }
.tile .av { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 6px; border: 2px solid var(--gold3); background: var(--bg3); overflow: hidden; display: grid; place-items: center; font-size: 30px; }
.tile.in .av { border-color: var(--green); box-shadow: 0 0 0 3px rgba(79,195,122,.18); }
.av.big { width: 72px; height: 72px; border-radius: 18px; background: var(--bg3); border: 1px solid var(--line2); display: grid; place-items: center; font-size: 30px; flex: none; overflow: hidden; }
.av.big.seal { border-radius: 50%; }
.sealwrap { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; border: 2px solid var(--gold3); background: var(--bg3); display: grid; place-items: center; }
.sealimg { width: 100%; height: 100%; object-fit: cover; }
.mono.seal { font-size: 22px; }

/* ---------- structured cards (calendar items, chores, today) ---------- */
.ev { display: grid; grid-template-columns: 48px 1fr auto; grid-template-areas: "ic title time" "ic meta meta" "act act act"; gap: 4px 12px; align-items: center; padding: 14px; border-radius: 14px; background: #110e0a; border: 1px solid #2f281b; }
.ev + .ev { margin-top: 10px; }
.ev .ic { grid-area: ic; width: 48px; height: 48px; border-radius: 13px; background: var(--bg3); border: 1px solid var(--line2); display: grid; place-items: center; font-size: 26px; overflow: hidden; align-self: start; }
.ev .title { grid-area: title; font-weight: 800; font-size: 17.5px; line-height: 1.2; }
.ev .time { grid-area: time; font-family: var(--display); font-size: 22px; letter-spacing: .03em; color: var(--blue); white-space: nowrap; align-self: start; }
.ev .meta { grid-area: meta; font-size: 14px; color: var(--ink2); display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.ev .act { grid-area: act; display: flex; gap: 8px; margin-top: 8px; }
.ev .act .btn { flex: 1; min-height: 44px; }
.ev.done { opacity: .6; } .ev.done .title { text-decoration: line-through; }
.ev.tone-amber .time { color: var(--amber); } .ev.tone-green .time { color: var(--green); }

/* ---------- month calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head .mo { font-family: var(--display); font-size: 28px; letter-spacing: .04em; }
.cal-head .iconbtn { width: 40px; height: 40px; font-size: 22px; }
.cal-wd { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .d { aspect-ratio: 1; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 700; font-size: 16px; background: #0f0d09; border: 1px solid var(--line); color: var(--ink2); cursor: pointer; position: relative; }
.cal .d.out { opacity: .3; }
.cal .d.has { border-color: #2f5a3f; background: var(--green-bg); color: var(--ink); }
.cal .d.has::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.cal .d.routine::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #4a5a45; }
.cal .d.alldone { border-color: #2c4a35; } .cal .d.alldone::after { background: #2c8a52; }
.cal .d.today { box-shadow: 0 0 0 2px var(--gold) inset; color: var(--gold2); }
.cal .d.sel { background: var(--blue); border-color: var(--blue); color: #061428; }
.cal .d.sel::after { background: #061428; }
.cal .d .n { line-height: 1; }
.day-panel { margin-top: 14px; }
.day-panel .dh { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.day-panel .dh .day-h { margin: 0; }

/* ---------- desktop: sidebar nav, wider content ---------- */
aside.side { display: none; }
:where(html:not(.zoomed)) {
@media (min-width: 900px) {
  #app { max-width: none; padding-bottom: 30px; }
  aside.side { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: 240px; background: #0b0906; border-right: 1px solid var(--line2); padding: 22px 16px; z-index: 7; }
  .side-brand { font-family: var(--display); font-size: 30px; letter-spacing: .03em; margin: 0 8px 22px; }
  .side-links { display: flex; flex-direction: column; gap: 4px; }
  .side-links a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; color: var(--ink2); font-weight: 700; font-size: 15.5px; }
  .side-links a .ic { font-size: 20px; filter: grayscale(1) opacity(.8); }
  .side-links a.active { background: #221c14; color: var(--gold2); border: 1px solid var(--line2); } .side-links a.active .ic { filter: none; }
  .side-foot { display: none; }
  .cal .d { aspect-ratio: auto; height: 74px; }
  header.top, main { margin-left: 240px; }
  header.top { padding: 16px 28px; }
  main { padding: 26px 28px; max-width: 980px; }
  nav.bottom { display: none; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .card .head h2 { font-size: 28px; }
  #modal { align-items: center; }
  #modal .sheet { border-radius: 20px; border-bottom: 1px solid var(--line2); max-width: 720px; }
  .auth { max-width: 560px; margin: 0 auto; }
  #toasts { bottom: 30px; }
  .composer { bottom: 0; }
}
@media (min-width: 1300px) {
  main { max-width: 1100px; }
  main .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
}
}

/* ---------- premium pass: flat, crisp, hairline ---------- */
.card { background: var(--bg2); border: 1px solid var(--line2); box-shadow: none; border-radius: 16px; padding: 18px 16px; }
.card.tone-green, .card.tone-amber, .card.tone-blue, .card.tone-violet, .card.tone-red, .card.tone-gold { background: var(--bg2); border-color: var(--line2); border-top: 2px solid var(--line2); }
.card.tone-green { border-top-color: var(--green); } .card.tone-amber { border-top-color: var(--amber); } .card.tone-blue { border-top-color: var(--blue); } .card.tone-violet { border-top-color: var(--violet); } .card.tone-red { border-top-color: var(--red); } .card.tone-gold { border-top-color: var(--gold); }
.item, .ev, .tile, .stat, .day-panel .ev { background: var(--bg3); border: 1px solid var(--line2); box-shadow: none; }
.ev { border-radius: 14px; }
.ev .ic, .item .av { background: #221c14; border: 1px solid var(--line2); color: var(--ink2); }
.ev.tone-amber .ic { color: var(--amber); } .ev.tone-green .ic { color: var(--green); } .day-panel .ev .ic, .card.tone-blue .ev .ic { color: var(--blue); }
.item .av.ic { color: var(--gold2); }
.ico { display: block; }
.btn { border-radius: 12px; box-shadow: none; border: 1px solid var(--line2); background: var(--bg3); letter-spacing: .01em; }
.btn.primary { background: linear-gradient(180deg, #ecc964 0%, #d1a83f 100%); border-color: #8a6a1e; box-shadow: 0 1px 0 rgba(255,255,255,.28) inset; text-shadow: none; color: #17110a; }
.btn.green { background: linear-gradient(180deg, #4fc37a 0%, #2f9a5a 100%); border-color: #1f6b3e; box-shadow: 0 1px 0 rgba(255,255,255,.22) inset; color: #06200f; }
.btn.blue { background: linear-gradient(180deg, #6fb4ff 0%, #3f88e0 100%); border-color: #2a5c99; box-shadow: 0 1px 0 rgba(255,255,255,.22) inset; }
.btn.amber { background: linear-gradient(180deg, #f5b545 0%, #d08a1f 100%); border-color: #8a5a12; box-shadow: 0 1px 0 rgba(255,255,255,.22) inset; }
.btn.violet { background: linear-gradient(180deg, #c3a4ff 0%, #8f66e6 100%); border-color: #5a41a0; box-shadow: 0 1px 0 rgba(255,255,255,.22) inset; }
.btn.big { border-radius: 14px; min-height: 64px; font-size: 22px; letter-spacing: .06em; display: inline-flex; gap: 10px; }
.btn.big .ico { width: 24px; height: 24px; }
.btn:active { transform: none; filter: brightness(.94); }
.badge { letter-spacing: .05em; font-size: 11px; padding: 3px 8px; background: transparent; }
.badge.green, .badge.amber, .badge.blue, .badge.violet, .badge.red, .badge.gold { background: transparent; }
header.top { background: rgba(12,10,7,.96); border-bottom: 1px solid var(--line2); backdrop-filter: none; }
header.top .title { font-size: 30px; }
.iconbtn { background: var(--bg2); border-color: var(--line2); color: var(--gold2); }
nav.bottom { background: #0c0a07; border-top: 1px solid var(--line2); }
nav.bottom a { color: var(--muted); font-size: 11.5px; letter-spacing: .04em; gap: 4px; }
nav.bottom a .ic { filter: none; opacity: .75; }
nav.bottom a .ic .ico { width: 22px; height: 22px; }
nav.bottom a.active { color: var(--gold2); } nav.bottom a.active .ic { opacity: 1; }
nav.bottom a.active::before { content: ""; position: absolute; top: 0; width: 28px; height: 2px; background: var(--gold); border-radius: 0 0 2px 2px; }
nav.bottom a { position: relative; }
.side-links a .ic { filter: none; opacity: .8; } .side-links a .ic .ico { width: 20px; height: 20px; }
.side-links a.active { background: var(--bg3); border: 1px solid var(--line2); }
.tile { border-radius: 14px; }
.tile.in { background: #10231a; border-color: #1f5a34; }
.tile .av { border: 2px solid var(--line2); }
.tile.in .av { border-color: var(--green); box-shadow: none; }
.toast { background: var(--bg3); border: 1px solid var(--line2); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.toast.ok { border-color: var(--green); } .toast.err { border-color: var(--red); }
#modal .sheet { background: var(--bg2); border-color: var(--line2); }
.chip { background: var(--bg3); }
.chip.on { background: #221c14; }
.mono { background: linear-gradient(180deg, #ecc964, #b8902c); box-shadow: none; text-shadow: none; }
.sealwrap { border-color: #6b5321; }
.cal .d { background: var(--bg3); border-color: var(--line2); }
.cal .d.has { background: #10231a; }
.cal .d.sel { background: var(--blue); }
.stat .n { color: var(--ink); }
.empty { color: var(--muted); padding: 26px 12px; }
.wordmark span, .gold-text { filter: none; text-shadow: none; }
.help { color: var(--ink2); }
.eyebrow { color: var(--gold); }
.card .head h2 { letter-spacing: .04em; }
.switch { border-bottom-color: var(--line); }
.toggle { background: #1f1a12; border-color: var(--line2); } .toggle.on { background: #3a2c10; border-color: #8a6a1e; }
.toggle::after { background: #6b6250; } .toggle.on::after { background: linear-gradient(180deg, #ecc964, #c9a13a); }

/* ---------- Who's here: roomy tiles, status as a pill ---------- */
.tiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { padding: 18px 10px 14px; border-radius: 16px; }
.tile .av { width: 84px; height: 84px; border-width: 2px; margin-bottom: 10px; font-size: 40px; }
.tile .av .mono { font-size: 34px; }
.tile .n { font-size: 16px; font-weight: 800; }
.tile .st { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); background: var(--bg2); }
.tile.in .st { color: #06200f; background: var(--green); border-color: var(--green); }
.tile.in { background: var(--bg3); border-color: #2f5a3f; }
:where(html:not(.zoomed)) { @media (min-width: 560px) { .tiles { grid-template-columns: repeat(3, 1fr); } } }
:where(html:not(.zoomed)) { @media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } } }

/* ---------- emblem ---------- */
.emblem { width: 100%; height: 100%; display: block; border-radius: 50%; }
.sealwrap { border: 0; background: transparent; box-shadow: 0 6px 16px rgba(0,0,0,.5); }
.tile .av { border: 0; background: transparent; box-shadow: 0 8px 22px rgba(0,0,0,.5); }
.tile .av .avimg { border: 2px solid #8a6a1e; border-radius: 50%; }
.tile.in .av { box-shadow: 0 0 0 3px rgba(79,195,122,.35), 0 8px 22px rgba(0,0,0,.5); }
.item .av { border-radius: 50%; }
.av.big { border-radius: 50%; border: 0; background: transparent; }
