/* Screens: layout pieces, coach, landing, goal, scan, fix, report. (Base tokens and the board are in app.css.) */
.main { flex: 1; padding: 8px 0 56px; }
.center { text-align: center; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row.gap { justify-content: flex-start; }
.wrap > .card, .narrow > .card, .narrow > .btn, .narrow > .coach { margin-top: 14px; }
.card h3 { font-size: 17px; margin-bottom: 10px; }
.card h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px; }
.fine { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.err { color: var(--red); font-weight: 700; font-size: 14px; margin: 10px 0 0; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .06); color: var(--muted); }
.iconbtn:hover { color: var(--cream); background: rgba(255, 255, 255, .12); }
.boardwrap { width: 100%; max-width: min(100%, calc(100vh - 190px), 720px); margin: 0 auto; }
.bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--yellow); transition: width .5s ease; }
.strip { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 12px; min-height: 10px; }
.strip i { width: 9px; height: 9px; border-radius: 3px; background: var(--muted); }
.strip.big i { width: 11px; height: 16px; }
.strip i.win { background: var(--green); } .strip i.loss { background: var(--red); } .strip i.draw { background: #6B7686; }
.steps { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.steps i { width: 26px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.steps i.done { background: var(--green); } .steps i.on { background: var(--yellow); }
.ring { position: relative; flex: none; }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; }
.ring small { position: absolute; left: 0; right: 0; bottom: -18px; text-align: center; font-size: 11px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stats.two { grid-template-columns: 1fr 1fr; }
.stats div { background: rgba(255, 255, 255, .04); border-radius: var(--r-sm); padding: 10px 12px; }
.stats b { display: block; font-size: 19px; } .stats small { color: var(--muted); font-size: 12px; }

/* coach */
.coach { display: flex; gap: 12px; align-items: flex-start; }
.coach-face { flex: none; width: 52px; height: 52px; border-radius: 50%; background: #0F131A; border: 2px solid var(--line); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.coach-face img { width: 100%; height: 100%; display: block; }
.coach-face.talking { border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 216, 77, .18); }
.coach-bubble { position: relative; flex: 1; background: var(--cream); color: #171C24; border-radius: 4px 16px 16px 16px; padding: 12px 40px 12px 14px; min-height: 52px; box-shadow: var(--shadow); }
.coach-text { margin: 0; font-weight: 650; font-size: 16.5px; line-height: 1.42; }
.coach-text span { opacity: .5; transition: opacity .12s; } .coach-text span.said { opacity: 1; }
.coach.good .coach-bubble { background: #DDF8E8; } .coach.bad .coach-bubble { background: #FBE3E4; }
.coach-replay { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(23, 28, 36, .08); color: #171C24; display: flex; align-items: center; justify-content: center; }
.coach-replay:hover { background: rgba(23, 28, 36, .18); }
.coach.small .coach-face { width: 40px; height: 40px; } .coach.small .coach-text { font-size: 15px; }

/* landing */
.landing .hero { max-width: 640px; margin: 28px auto 0; text-align: center; }
.landing h1 { font-size: clamp(40px, 9vw, 68px); }
.landing .lead { color: #C5CDD8; font-size: 17px; margin: 14px auto 22px; max-width: 520px; }
.startbox { text-align: left; display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 34px; }
.how .card b { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: #14181F; align-items: center; justify-content: center; font-weight: 900; margin-bottom: 10px; }
.how .card p { color: var(--muted); margin: 0; font-size: 15px; }

/* goal */
.profile .who { display: flex; gap: 12px; align-items: center; }
.profile .who img, .profile .ava { width: 46px; height: 46px; border-radius: 12px; background: var(--card2); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 20px; }
.profile .who small { display: block; color: var(--muted); }
.ratings { display: flex; gap: 10px; margin-top: 14px; }
.ratings div { flex: 1; background: rgba(255, 255, 255, .04); border-radius: var(--r-sm); padding: 8px 12px; }
.ratings small { color: var(--muted); display: block; font-size: 12px; } .ratings b { font-size: 20px; }
.wrapseg { flex-wrap: wrap; } .wrapseg button { flex: 1 1 auto; }
.goal .target { display: flex; align-items: baseline; justify-content: space-between; }
.goal .target b { font-size: 54px; color: var(--yellow); }
input[type=range] { width: 100%; accent-color: var(--yellow); height: 28px; }

/* scan */
.scan, .fix, .report { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.scan > *, .fix > *, .report > * { min-width: 0; }
.vs { margin-bottom: 8px; font-size: 14px; height: 22px; line-height: 22px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-right { display: flex; flex-direction: column; gap: 14px; }
.counts .row { padding: 7px 0; border-bottom: 1px solid var(--line); } .counts .row:last-child { border: 0; }
.counts b { font-size: 18px; color: var(--yellow); }

/* fix */
.fix-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; flex-wrap: wrap; }
.fix-side { display: flex; flex-direction: column; gap: 14px; }
.fix-side .fade-up { display: flex; flex-direction: column; gap: 12px; }
.prompt p { margin: 0 0 12px; }
.habit { background: linear-gradient(180deg, rgba(255, 216, 77, .14), rgba(255, 216, 77, .05)); border: 1px solid rgba(255, 216, 77, .35); border-radius: var(--r); padding: 12px 14px; }
.habit small { color: var(--yellow); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.habit p { margin: 4px 0 0; font-weight: 700; font-size: 17px; }
.lines .row { padding: 5px 0; }
.ask .asklog p { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; font-size: 15px; }
.ask .asklog p.me { background: var(--card2); margin-left: 40px; } .ask .asklog p.coach { background: rgba(245, 241, 230, .1); margin-right: 20px; display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chips button { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 7px 12px; font-size: 14px; font-weight: 600; color: var(--text); }
.chips button:hover { border-color: var(--yellow); }
.ask .input { padding: 10px 12px; font-size: 16px; }

/* report */
.leakcard { background: linear-gradient(160deg, #2A2230 0%, var(--card) 60%); border-color: rgba(229, 72, 77, .45); margin-top: 14px; }
.leakcard small { color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.leakcard h2 { font-size: 38px; margin: 4px 0 8px; } .leakcard p { margin: 0 0 10px; font-size: 16px; }
.skills { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.skill { padding: 14px; }
.skill.isleak { border-color: rgba(229, 72, 77, .45); }
.skill-head { display: flex; gap: 14px; align-items: center; width: 100%; background: none; border: 0; text-align: left; padding: 0; }
.skill-title { flex: 1; min-width: 0; } .skill-title small { display: block; color: var(--muted); font-size: 13px; } .skill-title b { font-size: 18px; display: block; }
.grade { font-size: 13px; font-weight: 800; }
.chev { color: var(--muted); transition: transform .2s; } .skill.open .chev { transform: rotate(180deg); }
.skill-headline { margin: 10px 0 0; font-size: 15.5px; }
.skill-body { margin-top: 14px; }
.bypiece .row span { width: 76px; font-size: 14px; } .bypiece .row b { width: 52px; text-align: right; font-size: 14px; } .bypiece .row { padding: 4px 0; }
.optable .row { display: grid; grid-template-columns: 1.6fr .5fr .8fr .8fr; font-size: 14px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.optable .row.head { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.example { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; padding: 9px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .04); margin-bottom: 6px; text-decoration: none; color: var(--text); }
.example:hover { background: rgba(255, 255, 255, .09); }
.example small { grid-column: 1 / 3; } .example i { grid-row: 1 / 3; grid-column: 3; font-style: normal; font-weight: 800; }
.example span { font-size: 14.5px; }
.report-side { display: flex; flex-direction: column; gap: 14px; }

@media (min-width: 900px) {
  .scan, .fix { grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); align-items: start; gap: 28px; }
  .report { grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); align-items: start; gap: 24px; }
  .report-side { position: sticky; top: 14px; margin-top: 14px; }
  .top nav a { font-size: 15px; }
}
@media (max-width: 899px) {
  .top nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(15, 19, 26, .96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); }
  .top .logo b { font-size: 18px; }
  /* Phones: the board is as wide as the screen (capped for tablets). Its size must not follow the browser's
     address bar showing and hiding, so no dynamic viewport height here. */
  .boardwrap { max-width: min(100%, 560px); }
}
