/* Taskamigo: alpine resort theme (from the Google Stitch design, 2026-11-28) */
@font-face { font-family: "Commissioner"; font-weight: 400; font-display: swap; src: url(/fonts/commissioner-400.woff2) format("woff2"); }
@font-face { font-family: "Commissioner"; font-weight: 500; font-display: swap; src: url(/fonts/commissioner-500.woff2) format("woff2"); }
@font-face { font-family: "Commissioner"; font-weight: 600; font-display: swap; src: url(/fonts/commissioner-600.woff2) format("woff2"); }
@font-face { font-family: "Commissioner"; font-weight: 700; font-display: swap; src: url(/fonts/commissioner-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(/fonts/barlowc-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(/fonts/barlowc-700.woff2) format("woff2"); }
@font-face { font-family: "Reddit Mono"; font-weight: 500; font-display: swap; src: url(/fonts/redditmono-500.woff2) format("woff2"); }

:root {
  --navy: #0F1E36; --navy-2: #1E3A5F; --surface: #F8FAFC; --paper: #FFFFFF; --low: #F1F5F9; --line: #CBD5E1; --line-2: #E2E8F0;
  --ink: #0F1E36; --muted: #475569; --faint: #64748B;
  --accent: #C2410C; --success: #15803D; --error: #B91C1C; --error-bg: #FEE2E2; --sky: #93C5FD;
  --loc-bl: #1D4ED8; --loc-bull: #0F1E36; --loc-fa: #B91C1C; --loc-adm: #475569; --loc-srs: #C2410C;
  --r: 8px; --r-lg: 14px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif; --body: "Commissioner", system-ui, sans-serif; --mono: "Reddit Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--surface); color: var(--ink); font: 400 16px/1.5 var(--body); -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--loc-bl); outline-offset: 2px; }
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; background: var(--surface); }
main { flex: 1; padding: 22px 18px calc(110px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 22px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0; }
h2 { font-size: 26px; } h3 { font-size: 22px; }
p { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: .02em; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.icon { width: 22px; height: 22px; fill: currentColor; flex: none; }
.icon.sm { width: 18px; height: 18px; }

/* navy header band with ridge line art */
.band { position: sticky; top: 0; z-index: 10; overflow: hidden; background: var(--navy); color: #fff; padding: calc(14px + env(safe-area-inset-top)) 18px 16px; }
.band .ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 48px; opacity: .12; pointer-events: none; }
.band .inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.band .left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.band .eyebrow { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.band h1 { font-size: 30px; color: #fff; overflow-wrap: anywhere; }
.band .sub { color: rgba(255,255,255,.8); font-size: 15px; margin-top: 2px; }
.band .brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 24px; }
.band-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: var(--r); border: 1px dashed rgba(255,255,255,.4);
  background: rgba(30,58,95,.6); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.band-back { background: none; border: 0; color: #fff; min-width: 44px; min-height: 44px; margin-left: -10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 0 20px; border: 0; border-radius: var(--r);
  background: var(--accent); color: #fff; font-weight: 600; font-size: 16px; cursor: pointer; box-shadow: 0 1px 2px rgba(15,30,54,.12); text-decoration: none; transition: opacity .15s, transform .08s; }
.btn:active { transform: scale(.985); }
.btn:hover { opacity: .92; }
.btn.success { background: var(--success); }
.btn.dark { background: var(--navy); }
.btn.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: var(--error-bg); color: var(--error); box-shadow: none; }
.btn.small { width: auto; min-height: 48px; padding: 0 16px; font-size: 15px; }
.btn[disabled] { opacity: .5; }
.linkbtn { background: none; border: 0; padding: 10px 4px; color: var(--muted); font-weight: 600; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.linkbtn.center { width: 100%; justify-content: center; }

/* forms */
label.field { display: block; }
label.field > span { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
label.field > span em { font-style: normal; font-weight: 400; color: var(--faint); }
label.field small { display: block; color: var(--muted); margin-top: 5px; font-size: 13px; }
input[type=text], input[type=tel], input[type=password], textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--faint); border-radius: var(--r); background: var(--paper); font-size: 16px; }
input:focus, textarea:focus { border-color: var(--loc-bl); outline: 2px solid rgba(29,78,216,.25); }
input.upper { text-transform: uppercase; }
input.pin, input.upper, textarea.mono { font-family: var(--mono); letter-spacing: .08em; }
input::placeholder, textarea::placeholder { color: var(--faint); font-family: var(--body); letter-spacing: normal; }
textarea { min-height: 96px; resize: vertical; }
.error { color: var(--error); font-weight: 600; font-size: 14px; min-height: 1.3em; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 18px; }

/* welcome + simple centered screens */
.center-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 20px 0; }
.mascot-circle { width: 128px; height: 128px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mascot-circle img { width: 96px; }
.center-screen h2 { font-size: 34px; }
.bottom-actions { display: flex; flex-direction: column; gap: 10px; }

/* lift tickets */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: -8px; }
.tickets { display: flex; flex-direction: column; gap: 12px; }
.ticket { display: flex; align-items: stretch; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: 0 1px 2px rgba(15,30,54,.06); }
.ticket .stub { width: 64px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--c, var(--loc-bl)); color: #fff;
  border-right: 2px dashed var(--line); font-family: var(--mono); font-weight: 500; font-size: 14px; letter-spacing: .04em; padding: 8px 4px; text-align: center; }
.ticket .body { flex: 1; min-width: 0; padding: 14px 14px 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ticket .task { font-family: var(--display); font-weight: 700; font-size: 23px; line-height: 1.1; }
.ticket .where { color: var(--muted); font-size: 14px; margin-top: 2px; }
.ticket .note { color: var(--navy-2); font-size: 14px; margin-top: 4px; }
.ticket .time { font-family: var(--mono); font-size: 13px; margin-top: 6px; color: var(--ink); }
.ticket .punch { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--faint); background: var(--surface); }
.ticket.working { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(194,65,12,.25); }
.pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 6px; font-size: 13px; font-weight: 600; background: var(--line-2); color: var(--ink); }
.xbtn { background: none; border: 0; min-width: 44px; min-height: 44px; border-radius: var(--r); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }

/* manager message banner */
.ping { background: var(--navy); color: #fff; border-radius: var(--r); padding: 16px; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.ping .msg { display: flex; gap: 10px; align-items: flex-start; }
.ping strong { font-weight: 600; }
.ping .gotit { flex: none; min-height: 48px; padding: 0 16px; border-radius: var(--r); background: var(--navy-2); color: #fff; border: 1px solid rgba(255,255,255,.25); font-weight: 600; cursor: pointer; }

/* working screen */
.work-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 30px 18px calc(24px + env(safe-area-inset-bottom)); gap: 18px; text-align: center; }
.dancefloor { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.dance-circle { width: 200px; height: 200px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: center; position: relative; overflow: hidden; }
.hamish { width: 128px; margin-bottom: 18px; transform-origin: 50% 100%; animation: dance 1.1s ease-in-out infinite; }
.dance-shadow { width: 110px; height: 10px; border-radius: 50%; background: var(--line-2); animation: shadow 1.1s ease-in-out infinite; margin-top: -10px; }
@keyframes dance { 0%, 100% { transform: translateY(0) rotate(-6deg); } 25% { transform: translateY(-20px) rotate(0) scaleY(1.03); } 50% { transform: translateY(0) rotate(6deg) scaleY(.96); } 75% { transform: translateY(-10px) rotate(0); } }
@keyframes shadow { 0%, 50%, 100% { transform: scaleX(1); } 25%, 75% { transform: scaleX(.7); } }
.cheer { font-family: var(--display); font-weight: 700; font-size: 26px; min-height: 1.2em; }
.work-actions { width: 100%; display: flex; flex-direction: column; gap: 6px; }

/* completed */
.done-check { width: 64px; height: 64px; border-radius: 50%; background: var(--success); color: #fff; display: flex; align-items: center; justify-content: center; animation: pop .4s cubic-bezier(.3,1.6,.5,1) both; }
.done-check .icon { width: 36px; height: 36px; }
.complete-ticket { width: 100%; text-align: left; }
.complete-ticket .punch { animation: punch .45s cubic-bezier(.3,1.6,.5,1) .3s both; }
@keyframes pop { from { transform: scale(0); } }
@keyframes punch { from { transform: scale(0); } }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 500; font-size: 15px; cursor: pointer; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip[aria-pressed=true] { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip[aria-pressed=true] .dot { box-shadow: 0 0 0 2px #fff; }
.label { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.sublabel { font-size: 13px; font-weight: 600; color: var(--ink); margin: 10px 0 6px; }

/* manager */
.person { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 8px 12px 14px; cursor: pointer; }
.person.picked { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.person .check { width: 24px; height: 24px; flex: none; border-radius: 6px; border: 2px solid var(--faint); display: flex; align-items: center; justify-content: center; color: #fff; }
.person.picked .check { background: var(--navy); border-color: var(--navy); }
.person .who { flex: 1; min-width: 0; }
.person .name { font-weight: 600; font-size: 16px; }
.person .status { font-size: 14px; color: var(--muted); }
.person .status.free { color: var(--success); font-weight: 500; }
.person.off { opacity: .55; }
.signup { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 12px 14px; }
.signup .btn { min-height: 44px; }
.crew { display: flex; flex-direction: column; gap: 10px; }
.fab { position: fixed; right: max(18px, calc(50vw - 242px)); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 6; display: inline-flex; align-items: center; gap: 8px;
  min-height: 56px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font-weight: 600; font-size: 16px; box-shadow: 0 8px 20px -6px rgba(194,65,12,.6); cursor: pointer; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs .wrap { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.tabs button { background: none; border: 0; border-top: 3px solid transparent; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; }
.tabs button[aria-current=page] { color: var(--navy); border-top-color: var(--navy); font-weight: 700; }

/* sheets */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(15,30,54,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: var(--paper); border-radius: 18px 18px 0 0;
  padding: 26px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .22s cubic-bezier(.2,.9,.3,1); }
.sheet::before { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
.sheet .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.sheet .head h2 { font-size: 28px; }
.sheet .sheet-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

#toast { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff;
  padding: 12px 18px; border-radius: var(--r); font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: .2s; z-index: 30; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.idchips .chip { font-family: var(--mono); font-size: 14px; min-height: 44px; border-radius: 6px; }

/* help */
.help details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; }
.help summary { list-style: none; cursor: pointer; padding: 14px 16px; font-family: var(--display); font-weight: 700; font-size: 21px; display: flex; justify-content: space-between; align-items: center; min-height: 56px; }
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: "+"; font-family: var(--body); font-size: 24px; color: var(--muted); }
.help details[open] summary::after { content: "−"; }
.help ul { margin: 0; padding: 0 16px 14px 34px; }
.help li { margin: 0 0 10px; max-width: 62ch; }

@media (prefers-reduced-motion: reduce) {
  .hamish { animation: sway 3s ease-in-out infinite; } .dance-shadow { animation: none; }
  @keyframes sway { 50% { transform: rotate(3deg); } }
  .done-check, .complete-ticket .punch, .sheet, .scrim { animation: none; }
}
