/* Study Planner — screen-specific styles. */

/* ---------- home ---------- */
.hero { position: relative; padding-top: 22px; }
.hero .hand { font-size: 1.6rem; margin-bottom: 4px; }
.hero-count { display: flex; align-items: baseline; gap: 8px; }
.hero-num { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 3.6rem; line-height: 1; }
.hero-unit { font-family: var(--font-head); font-size: 1.3rem; }

/* ---------- theme picker ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .theme-grid { grid-template-columns: repeat(3, 1fr); } }
.theme-swatch {
  display: grid; gap: 8px; padding: 10px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface);
}
.theme-swatch[aria-checked="true"] { border-color: var(--c1); box-shadow: 0 0 0 2px var(--c1) inset; }
.theme-swatch-colors { display: grid; grid-template-columns: repeat(4, 1fr); height: 34px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.theme-swatch-name { font-weight: 700; font-size: .95rem; }

/* ---------- onboarding ---------- */
body.is-onboarding .topbar, body.is-onboarding .bottomnav, body.is-onboarding .sidenav, body.is-onboarding .buddy-panel { display: none; }
body.is-onboarding .shell { display: block; }
body.is-onboarding .view { padding: calc(20px + env(safe-area-inset-top)) 16px 32px; }
.ob { max-width: 560px; margin: 0 auto; display: grid; gap: 16px; }
.ob-progress { display: grid; grid-auto-flow: column; gap: 6px; }
.ob-progress i { height: 5px; border-radius: 9px; background: var(--line-strong); transition: background .3s; }
.ob-progress i.on { background: var(--c1); }
.ob-card { display: grid; gap: 14px; padding: 22px 18px; }
.ob-card h2 { font-size: 1.6rem; }
.ob-card > p { margin: 0; }
.ob-sub { margin-top: 6px; }
.ob-logo { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); }
.ob-error { margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #C2413B 12%, var(--surface)); color: #9A2A25; font-weight: 500; }
.ob-nav { display: flex; gap: 10px; position: sticky; bottom: 0; padding: 10px 0 calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); }
.ob-nav .btn { min-width: 132px; }
.input--code { font-size: 1.35rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; text-align: center; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: var(--line); }
.seg button { min-height: 44px; border: 0; border-radius: 12px; background: transparent; font-weight: 600; cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--surface); box-shadow: var(--shadow); }

.looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.look { display: grid; gap: 6px; padding: 6px 6px 10px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); cursor: pointer; font-size: .82rem; font-weight: 600; text-align: center; }
.look img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 13px; background: var(--surface-2); }
.look[aria-checked="true"] { border-color: var(--c1); box-shadow: 0 0 0 2px var(--c1) inset; }

.tracks { display: grid; gap: 8px; }
.track { display: flex; gap: 12px; align-items: center; padding: 12px; text-align: left; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; }
.track[aria-checked="true"] { border-color: var(--c1); box-shadow: 0 0 0 2px var(--c1) inset; }
.track-num { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.4rem; color: var(--muted); width: 34px; flex: none; }
.track-body { display: grid; gap: 2px; }

.targets { display: grid; gap: 10px; }
.target { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.target-head { display: flex; align-items: center; gap: 8px; }
.target-val { font-variant-numeric: tabular-nums; font-weight: 700; }
.target input[type=range] { width: 100%; accent-color: var(--subj); height: 28px; }

.photo-pick { cursor: pointer; }
.photo-pick-box { display: grid; place-items: center; min-height: 120px; padding: 12px; border: 1.5px dashed var(--line-strong); border-radius: 16px; color: var(--muted); text-align: center; overflow: hidden; }
.photo-pick-box img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; }

/* character face in the desktop panel */
.buddy-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.buddy-stage .placeholder { position: relative; align-self: end; background: color-mix(in srgb, var(--bg) 80%, transparent); border-radius: 12px; margin: 10px; padding: 4px 10px; font-size: 1.05rem; }
body.is-onboarding .buddy-fab { display: none; }
.ob-install { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px dashed var(--line-strong); }
.ob-install p { margin: 0; }

/* ---------- tabs (Challenge: Bucket list · Side quest · Memory Wall) ---------- */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--line); position: sticky; top: 64px; z-index: 5; }
.tab { padding: 9px 4px; border-radius: 11px; text-align: center; font-weight: 600; text-decoration: none; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- collapsible groups (Challenge categories) ---------- */
.chapters { display: grid; gap: 8px; }
.chapter { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.chapter > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; font-weight: 600; }
.chapter > summary::-webkit-details-marker { display: none; }
.chapter > summary::after { content: '›'; font-size: 1.2rem; color: var(--muted); transition: transform .2s; }
.chapter[open] > summary::after { transform: rotate(90deg); }
.chapter-name { flex: 1; min-width: 0; }
.chapter-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; }
.chapter-bar { width: 44px; height: 5px; }
