/* ICC Health Check: member page (v2 wellness). Tokens and primitives live in base.css; do not redefine them here.
   base.css paints every <button> as a primary pill, so chips, tabs and pills below reset their own look. */

/* ---------- header ---------- */
.site-head { position: relative; }
.site-head::after { content: ""; display: block; height: 1px; max-width: 480px; margin: 0 auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7; }
.site-head .wrap { display: flex; align-items: center; justify-content: center; padding: 20px 16px 16px; }
.brand { flex-direction: row; align-items: center; gap: 12px; min-height: 44px; border-radius: var(--r-sm); }
.brand-mark { width: 40px; height: 40px; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.brand-words { display: flex; flex-direction: column; line-height: 1; }
.brand .brand-sub { color: var(--muted); }

/* ---------- views ---------- */
.view { min-width: 0; }
.nick-hl { color: var(--primary); }
.icon.xl { width: 36px; height: 36px; }

.who-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.back-link { margin-left: -6px; }
.back-link .icon { margin-right: -2px; }

/* ---------- notices ---------- */
.notice { margin: 0 0 12px; padding: 12px 14px; border-radius: var(--r-md); color: var(--ink); font-size: 15px; line-height: 1.5; }
.notice.info { background: var(--primary-soft); }
.notice.warn { background: var(--warm-soft); }
.notice.error { background: var(--danger-soft); border-left: 4px solid var(--danger); }

/* ---------- skeletons ---------- */
.sk-names { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sk-chip { height: 52px; border-radius: var(--r-md); }
.sk-tabs { display: flex; gap: 8px; padding: 4px 0; margin-bottom: 16px; overflow: hidden; }
.sk-tab { width: 64px; height: 56px; flex: none; border-radius: var(--r-md); }
.sk-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sk-pill { height: 64px; border-radius: var(--r-md); }

/* ---------- welcome ---------- */
.welcome { padding-top: 8px; }
.welcome { text-align: center; }
.big-mark { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; margin: 28px auto 20px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.big-mark .lotus { width: 52px; height: 52px; fill: none; stroke: var(--primary); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.welcome h2 { font-size: 30px; line-height: 1.35; margin-bottom: 10px; }
.welcome-sub { color: var(--muted); max-width: 36ch; margin: 0 auto; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
.welcome .ornament { margin: 22px auto; }

.menu-card { text-align: left; padding: 28px 24px; margin-bottom: 16px; border-color: var(--gold); outline: 1px solid var(--gold-soft); outline-offset: -8px; }
.menu-kicker { margin: 0 0 16px; text-align: center; font-family: var(--font-brand); font-style: italic; font-size: 24px; font-weight: 600; color: var(--ink); }
.menu-item + .menu-item { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.menu-line { display: flex; align-items: baseline; gap: 8px; }
.menu-name { margin: 0; font-family: var(--font-brand); font-size: 22px; font-weight: 600; letter-spacing: .01em; }
.menu-dots { flex: 1 1 auto; min-width: 12px; border-bottom: 1px dotted var(--gold); transform: translateY(-4px); }
.menu-price { font-family: var(--font-head); font-weight: 600; color: var(--primary-hi); }
.menu-meta { margin: 2px 0 6px; font-size: 14px; color: var(--muted); }
.menu-desc { margin: 0; font-size: 16px; }
.menu-foot { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--muted); font-style: italic; }

.facts { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; text-align: left; }
.facts li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; color: var(--muted); }
.facts li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 11px; transform: rotate(45deg); background: var(--gold); }
.welcome-link { text-align: center; margin-top: 12px; }

/* ---------- name list ---------- */
.search-sticky { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); padding: 8px 0 12px; }
.search-sticky .field { margin: 0; }
.search-box { position: relative; }
.search-box input { padding-left: 44px; }
.search-box .search-icon { position: absolute; left: 14px; top: 50%; margin-top: -12px; color: var(--muted); pointer-events: none; }

.dept-group { margin-top: 20px; }
.dept-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dept-head { gap: 12px; }
.dept-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); opacity: .6; }
.dept-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); }

.name-grid, .time-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.name-grid { grid-template-columns: 1fr 1fr; }
.name-grid > li, .time-grid > li { min-width: 0; }

.name-chip {
  width: 100%; min-height: 52px; padding: 12px 16px;
  justify-content: flex-start; text-align: left;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: 17px; font-weight: 500; overflow-wrap: anywhere;
}
.name-chip:hover { background: var(--surface-2); }
.name-chip:active { background: var(--surface-2); opacity: .85; }
.name-chip:focus-visible { border-radius: var(--r-md); }

.empty { margin-top: 16px; }

/* ---------- student ID ---------- */
#sid { font-size: 18px; letter-spacing: 1px; }
.field .error:empty { margin: 0; }

/* ---------- pick a time ---------- */
.move-card { margin-bottom: 16px; }
.move-card p { margin: 0 0 8px; }
.move-line { font-size: 16px; }

.day-tabs {
  position: relative; display: flex; gap: 8px; padding: 4px; margin: 0 -4px 12px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab {
  flex: none; min-width: 72px; min-height: 60px; padding: 6px 12px;
  flex-direction: column; gap: 0; line-height: 1.3; scroll-snap-align: center;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.day-tab .top { font-size: 15px; font-weight: 600; }
.day-tab .bottom { font-size: 14px; font-weight: 400; }
.day-tab:hover { background: var(--surface-2); }
.day-tab:active { opacity: .85; }
.day-tab[aria-selected="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.day-tab[aria-selected="true"]:hover { background: var(--primary-hi); border-color: var(--primary-hi); }
.day-tab:focus-visible { border-radius: var(--r-md); }
.day-tab { box-shadow: var(--shadow); }

.panel-title { margin: 8px 0 8px; font-size: 16px; font-weight: 500; color: var(--muted); }
.time-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.time-pill {
  width: 100%; min-height: 64px; padding: 8px 6px; flex-direction: column; gap: 0; line-height: 1.35;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px;
}
.time-pill .t { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.time-pill .w { font-size: 14px; font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.time-pill:hover { background: var(--primary-soft); border-color: var(--primary); }
.time-pill:active { background: var(--primary-soft); border-color: var(--primary); opacity: .85; }
.time-pill:focus-visible { border-radius: 999px; }

.reload { margin-top: 24px; }

.empty-state { text-align: center; padding: 32px 20px; }
.empty-state .empty-title { font-size: 18px; font-weight: 600; margin: 0 0 4px; }
.empty-state .muted { margin: 0 0 16px; }

/* ---------- booked / done ---------- */
.booked-card { text-align: center; padding: 28px; }
.check-circle {
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--primary-soft);
}
.check-mark { width: 36px; height: 36px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Resting state is the finished check, so reduced motion still shows it. */
.check-mark path { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-check 300ms var(--ease) 120ms both; }
.done .check-mark path { animation: none; }
@keyframes draw-check { from { stroke-dashoffset: 1; } }

.booked-day { font-size: 18px; font-weight: 500; margin: 0 0 4px; }
.booked-time { font-family: var(--font-head); font-size: 36px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; margin: 0 0 4px; }
.booked-with { font-size: 18px; margin: 0; }
.divider { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 22px 0 18px; }
.prep { margin: 0; }
.done-line { font-size: 15px; margin: 0; }

.block-section { margin-top: 24px; }
.block-section h3 { margin-bottom: 12px; }
.change-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.change-actions button { padding-left: 12px; padding-right: 12px; }

/* ---------- confirm sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(58, 46, 38, .45);
  animation: backdrop-in 200ms var(--ease) both;
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 480px; max-height: 100dvh; overflow-y: auto;
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-lg);
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  animation: sheet-up 260ms var(--ease) both;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.grabber { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }
.slip-kicker { margin: 0 0 4px; text-align: center; font-family: var(--font-brand); font-style: italic; font-size: 18px; color: var(--muted); }
.sheet h2 { text-align: center; }
.sheet-summary { border: 1px dashed var(--gold); background: var(--gold-soft); }
.sheet-summary { text-align: center; }
.sheet h2 { font-size: 22px; margin-bottom: 12px; }
.sheet-summary { text-align: left; margin-bottom: 12px; }
.sheet-summary p { margin: 0; }
.s-day { font-size: 16px; }
.s-time { font-family: var(--font-head); font-size: 28px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.s-with { font-size: 16px; }
.sheet-extra { margin: 0 0 12px; }
.sheet-actions { display: grid; gap: 8px; margin-top: 16px; }
body.sheet-open { overflow: hidden; }

@media (min-width: 560px) {
  .sheet-backdrop { align-items: center; padding: 16px; }
  .sheet { border-radius: var(--r-lg); }
}

/* Headings get focus from setView for screen readers; no ring needed. */
h2[tabindex="-1"]:focus { outline: none; }

.assigned-hr { margin: 0 0 12px; }

/* ---------- v4: result meeting ---------- */
.flow-section + .flow-section { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.flow-label { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--primary); letter-spacing: .04em; }
.who-lines { margin: 0 0 12px; text-align: left; }
.who-lines p { margin: 0 0 4px; font-size: 16px; overflow-wrap: anywhere; }
.who-lines .k { color: var(--muted); }
.booked-card .who-lines { text-align: center; margin: 0; }
.empty-state h2 { font-size: 20px; margin-bottom: 4px; }

/* ---------- wellness polish ---------- */
h1, h2, .booked-day, .empty-state .empty-title { font-family: var(--font-head); }
.card { box-shadow: var(--shadow); }
.name-chip { border-radius: 999px; padding-left: 20px; box-shadow: 0 2px 8px rgba(84, 62, 40, .05); }
.name-chip:focus-visible { border-radius: 999px; }
.name-chip:hover { border-color: var(--primary); background: var(--primary-soft); }
.booked-card { padding: 32px 24px; border-color: var(--gold); }
.check-circle { background: var(--surface); border: 1px solid var(--gold); }
.wrap { padding-top: 16px; }
.reload { margin-top: 28px; }
.view h2, .view h3 { overflow-wrap: anywhere; }

/* ---------- opening hero (Kevin's photo + logo, 12-11) ---------- */
.hero { position: relative; width: 100%; background: var(--bg); }
.hero picture, .hero-img { display: block; width: 100%; }
.hero-img { height: auto; max-height: 86vh; object-fit: cover; object-position: center top; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 56px; height: 90px; pointer-events: none;
  background: linear-gradient(180deg, rgba(245, 239, 230, 0), var(--bg)); }
.hero-cue { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; justify-content: center;
  color: var(--muted); font-size: 14px; text-decoration: none; }
.hero-cue svg { width: 22px; height: 22px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.brand-logo { display: block; height: 40px; width: auto; }
.site-head.under-hero .brand-logo { height: 36px; }
@media (min-width: 900px) { .hero-img { max-height: 78vh; } }
.site-head.under-hero { display: none; }

/* ---------- hero v2 (12-11): whole photo on computers, portrait photo + logo on phones ---------- */
.hero { background: linear-gradient(90deg, #2a1d14 0%, #6b5646 18%, #cbb3a2 50%, #cbb3a2 100%); }
.hero picture { display: flex; justify-content: center; }
.hero-img { width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 56px); object-fit: contain; }
.hero::after { bottom: 56px; height: 70px; }
.hero-cue { background: var(--bg); }
.hero-logo { display: none; }
@media (max-width: 700px) {
  .hero { background: var(--bg); }
  .hero-img { width: 100%; max-height: none; height: calc(100svh - 56px); object-fit: cover; object-position: center 35%; }
  .hero-logo { display: block; position: absolute; top: max(28px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
    width: min(84vw, 380px); height: auto; filter: drop-shadow(0 2px 10px rgba(255, 248, 238, .7)); }
}
.result-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-lg); margin: 4px 0 16px; box-shadow: var(--shadow); }
/* side bands on wide screens = a soft blurred copy of the photo (12-11) */
.hero { overflow: hidden; background: var(--bg); }
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 56px; z-index: 0;
  background: url("/img/hero-900.webp") center / cover; filter: blur(32px) saturate(.9); transform: scale(1.15); opacity: .9; }
.hero picture, .hero-cue, .hero-logo { position: relative; z-index: 1; }
.hero::after { z-index: 2; }
@media (max-width: 700px) { .hero::before { display: none; } .hero-logo { position: absolute; z-index: 3; } }
