/* Build Your Weight Room. Morning Rep design system:
   cream / paper / ink, Archivo + IBM Plex Sans + JetBrains Mono, Morning Rep red. */

:root{
  --cream:#F5F3EC; --paper:#FFFFFF; --paper-2:#FAF8F2;
  --ink:#16140F; --ink-2:#3B372E; --muted:#6F6A5C; --faint:#8C8778;
  --line:rgba(22,20,15,.13); --line-2:rgba(22,20,15,.26); --line-a:rgba(22,20,15,.1);
  --app-bg:#FAF9F5;
  --red:#E63946; --red-dk:#C42B37; --red-ink:#B3242F; --green:#3F7D4E;
  --sans:"IBM Plex Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  --display:Archivo,Helvetica,Arial,sans-serif;
  --mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
  --col:680px; --pad:20px;
}

*{margin:0;padding:0;box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{background:var(--cream);color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.5;
  -webkit-font-smoothing:antialiased;min-height:100vh;display:flex;flex-direction:column}
[hidden]{display:none !important}
a{color:inherit}
button,input{font:inherit;color:inherit}
button{cursor:pointer;-webkit-tap-highlight-color:transparent}
h1,h2,h3{font-family:var(--display);font-weight:800;letter-spacing:-.025em;line-height:1.1;text-wrap:balance}

/* ---------- test mode banner ---------- */
.testbar{background:#FFE9A8;color:#4A3A00;font-size:13px;font-weight:600;text-align:center;padding:7px var(--pad)}

/* ---------- header ---------- */
#top{height:58px;padding:0 var(--pad);display:flex;align-items:center;justify-content:space-between;gap:12px;
  border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;
  font-family:var(--display);font-weight:800;font-size:16px;letter-spacing:-.02em;white-space:nowrap}
.brand img{border-radius:7px;display:block}
.tool-name{font-family:var(--mono);font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);text-align:right}

/* ---------- score bar with the live room ---------- */
#scorebar{position:sticky;top:0;z-index:20;background:var(--ink);color:var(--cream)}
.sb{max-width:var(--col);margin:0 auto;padding:10px var(--pad);display:flex;align-items:center;gap:14px}
.sb-map{flex:none;width:112px;height:140px;padding:0;border:0;background:#16140F;border-radius:8px;overflow:hidden;cursor:pointer}
.sb-map svg{width:100%;height:100%;display:block}
.sb-info{flex:1;min-width:0}
.sb-num{display:flex;align-items:baseline;gap:6px}
.sb-num b{font-family:var(--display);font-weight:800;font-size:34px;line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.sb-num span{font-family:var(--mono);font-size:11px;font-weight:700;letter-spacing:.08em;color:rgba(245,243,236,.6)}
.sb-segs{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px;margin-top:10px}
.sb-segs i{height:9px;border-radius:2px;background:rgba(245,243,236,.18);transition:background .2s}
.sb-segs i.on{background:var(--red)}
.sb-segs i.no{background:rgba(245,243,236,.42)}
.sb-segs i.now{outline:2px solid var(--cream);outline-offset:1px}
.sb-cat{font-family:var(--mono);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:rgba(245,243,236,.6);
  margin-top:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* desktop: the room becomes a left column beside the form */
@media(min-width:900px){
  .builder{display:grid;grid-template-columns:400px minmax(0,1fr);gap:40px;max-width:1120px;margin:0 auto;padding:0 20px;align-items:start}
  #scorebar[hidden] ~ #app{grid-column:1 / -1}
  #scorebar{position:sticky;top:16px;background:transparent;color:var(--cream);padding-top:28px}
  .sb{display:block;padding:14px;background:var(--ink);border-radius:14px}
  .sb-map{width:100%;height:auto;aspect-ratio:4/5;cursor:default}
  .sb-info{margin-top:14px;display:flex;align-items:center;gap:16px;flex-wrap:wrap}
  .sb-segs{flex:1;margin-top:0;min-width:160px}
  .sb-cat{flex-basis:100%;margin-top:4px}
}

/* phone: tap the small room to see it big */
#zoom{position:fixed;inset:0;z-index:60;background:rgba(22,20,15,.97);display:flex;align-items:center;justify-content:center;padding:16px}
.zoom-box{width:100%;max-width:420px}
.zoom-box svg{width:100%;height:auto;aspect-ratio:4/5;display:block;border-radius:12px}
.zoom-hint{color:rgba(245,243,236,.7);text-align:center;font-size:14px;margin:12px 0}
.zoom-box .btn{color:var(--cream);border-color:var(--cream)}

/* ---------- layout ---------- */
#app{flex:1 0 auto;width:100%;max-width:var(--col);margin:0 auto;padding:28px var(--pad) 40px}
.step{font-family:var(--mono);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted);margin-bottom:10px}
h1{font-size:24px;margin-bottom:10px}
h2{font-size:24px;margin-bottom:8px}
.lede{font-size:1.06rem;color:var(--ink-2);margin-bottom:26px;max-width:34em}
.hint{color:var(--muted);margin-bottom:20px}
.field{margin-bottom:22px;position:relative}
.field>label,.field>.label{display:block;font-family:var(--display);font-weight:700;font-size:15px;margin-bottom:8px}
.field .opt{font-family:var(--sans);font-weight:400;color:var(--muted);font-size:14px}
.field .note{font-size:13.5px;color:var(--muted);margin-top:6px}
input[type=text],input[type=email]{width:100%;height:52px;padding:0 14px;background:var(--paper);
  border:1.5px solid var(--line-2);border-radius:10px;font-size:16px;outline:none}
input:focus{border-color:var(--ink)}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.signed{background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin-bottom:22px;
  font-size:14.5px;display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}
.signed b{font-weight:600;word-break:break-all}
.linkbtn{background:none;border:0;text-decoration:underline;color:var(--muted);font-size:14px;padding:4px 0}

/* school suggestions */
.suggest{position:absolute;left:0;right:0;top:100%;z-index:10;margin-top:4px;background:var(--paper);
  border:1.5px solid var(--ink);border-radius:10px;overflow:hidden;box-shadow:0 14px 30px -18px rgba(22,20,15,.6)}
.suggest button{display:block;width:100%;text-align:left;padding:12px 14px;background:none;border:0;
  border-bottom:1px solid var(--line);font-size:16px}
.suggest button:last-child{border-bottom:0}
.suggest button:hover,.suggest button:focus{background:var(--paper-2);outline:none}

/* chips: role, sport, waitlist level */
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{min-height:44px;padding:0 15px;background:var(--paper);border:1.5px solid var(--line-2);border-radius:10px;
  font-weight:600;font-size:15px}
.chip[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:var(--cream)}

/* brand tiles */
.tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:10px}
@media(min-width:560px){.tiles{grid-template-columns:repeat(3,1fr)}}
.tile{min-height:52px;padding:0 14px;display:flex;align-items:center;gap:8px;text-align:left;background:#fff;
  border:1px solid rgba(22,20,15,.08);border-radius:14px;font:600 14px/1.2 var(--sans);color:var(--ink)}
.tiles.primary .tile{min-height:58px;padding:4px 6px;justify-content:center;text-align:center;font-size:13px}
.tile img{max-height:34px;max-width:100%;display:block}
.tile[aria-pressed=true]{background:#FCE8EA;color:#B3242F;border:1.5px solid #F0B9C0}
.tiles:not(.primary) .tile::before{content:"";flex:none;width:18px;height:18px;border-radius:6px;border:1.5px solid rgba(22,20,15,.18)}
.tiles:not(.primary) .tile[aria-pressed=true]::before{border-color:#E63946;background:#E63946 center/11px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.4l2.6 2.6L10 3.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
.other-input{grid-column:1/-1}
select.other-input{width:100%;height:52px;padding:0 14px;background:var(--paper);border:1.5px solid var(--line-2);border-radius:10px;font:500 16px var(--sans);color:var(--ink)}
select.other-input:focus{border-color:var(--ink);outline:none}

/* context line on each category screen: "Men's soccer · Football weight room" */
.ctx{font-size:13px;font-weight:700;color:var(--ink-2);margin-bottom:10px}
.lastone{color:var(--red-ink)}
/* My Room: the room section, then the team's tech */
.sect-h{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:10px 4px 0}
.sect-h .h.lg{font-size:17px;font-weight:600}
.tools>.sect-h:first-child{padding-top:0}
.more-sect{margin-top:8px}
.room-hint{display:flex;flex-direction:column;gap:3px;padding:14px 16px;border-radius:16px;background:#FCE8EA;border:1px solid #F0B9C0}
.room-hint .h{font-size:15px;font-weight:600;color:var(--red-ink)}
.room-hint .m{color:var(--ink-2)}
.more-sect>div{gap:3px}
.more-sect .h.lg{font-size:17px}
.more-sect .chev{transition:transform .2s ease}
.more-sect.open .chev{transform:rotate(90deg)}

/* team picker: search box over grouped chips */
input[type=search]{width:100%;height:48px;padding:0 14px;background:var(--paper);border:1.5px solid var(--line-2);border-radius:10px;
  font-size:16px;outline:none;-webkit-appearance:none;appearance:none}
.sport-more{margin:16px 0 0}
.sport-more select{width:100%;height:52px;padding:0 14px;background:var(--paper);border:1.5px solid var(--line-2);border-radius:10px;font:500 16px var(--sans);color:var(--ink)}
.sport-more select:focus{border-color:var(--ink);outline:none}
#teamList .chips{margin-top:0}

/* "How many racks?" under the tiles */
.urow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.urow .uname{flex:1 0 100%;font-size:14px;font-weight:600;color:var(--ink-2)}
.urow input[type=number]{width:120px;height:44px;padding:0 12px;background:var(--paper-2);border:1.5px solid var(--line-2);border-radius:10px;font:500 16px var(--sans);color:var(--ink)}
.urow input:focus{border-color:var(--ink);outline:none}
.urow .chip{min-height:44px;font-size:14px;font-weight:600}
.f .urow input[type=number]{flex:1;width:auto}

/* buttons */
.nav{display:flex;gap:10px;margin-top:26px}
.stickbar{position:sticky;bottom:0;z-index:15;margin:16px calc(-1 * var(--pad)) 0;padding:12px var(--pad) 14px;
  background:rgba(245,243,236,.94);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:1px solid var(--line)}
.stickbar .nav{margin-top:0}
.stickbar .err{margin:0 0 10px;min-height:0}
.stickbar .err:empty{display:none}
.notice{background:var(--paper);border:1.5px solid var(--red);border-radius:10px;padding:12px 14px;margin-bottom:22px;
  color:var(--red-ink);font-weight:600}
.btn{height:52px;padding:0 22px;border-radius:10px;border:1.5px solid var(--ink);background:transparent;
  font-family:var(--display);font-weight:800;font-size:16px;letter-spacing:-.01em;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}
.btn.primary{flex:1;background:var(--ink);border-color:var(--ink);color:var(--cream)}
.btn.primary:hover{background:#2A271F;border-color:#2A271F}
.btn[disabled]{opacity:.38;cursor:not-allowed}
.btn.block{width:100%}
.err{color:var(--red-ink);font-weight:600;margin-top:14px;min-height:1.5em}

/* ---------- shared bits: cards, labels, pills ---------- */
.mono{font-family:var(--mono);font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.card{background:var(--paper);border:1px solid var(--line-a);border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:8px;min-width:0;
  text-align:left;color:inherit;font:inherit}
.card .h{font-size:15px;font-weight:600;line-height:1.35}
.card .h.lg{font-size:18px;line-height:1.25}
.card .t{font-size:14px;line-height:1.45;color:var(--ink-2)}
.card .m,.m{font-size:13px;color:var(--muted);line-height:1.45}
.card.dashed{border:1px dashed rgba(22,20,15,.3);background:transparent}
.card.locked{background:var(--paper-2)}
.card.tap{cursor:pointer;width:100%}
.card.tap:active{background:var(--paper-2)}
.card .foot{padding-top:10px;border-top:1px solid var(--line-a)}
.add{color:var(--red-ink);font-weight:600}
.bar{height:6px;border-radius:3px;background:#EAE6DA;overflow:hidden}
.bar i{display:block;height:100%;background:var(--red)}
.lnk{padding:0;border:0;background:none;color:var(--red-ink);font:600 14px var(--sans);text-align:left;cursor:pointer;text-decoration:none}
.lnk:hover{text-decoration:underline}
.row{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px}
.chev{font-size:20px;color:var(--muted);line-height:1}
.pill{align-self:flex-start;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;background:var(--cream);color:var(--ink-2);white-space:nowrap}
.linkbox{font-family:var(--mono);font-size:12.5px;background:var(--paper-2);border:1px solid var(--line-a);
  border-radius:8px;padding:10px 12px;word-break:break-all;margin:2px 0 4px}
.loading{padding:60px 0;text-align:center;color:var(--muted);font-family:var(--display);font-weight:700;font-size:1.1rem}
.ring{display:block;flex:none}

/* ---------- the app: one phone-width column, bottom nav on phones, top nav on desktop ---------- */
body.app{background:var(--app-bg)}
body.app #top,body.app footer{display:none}
body.app #app{max-width:520px;padding:0 16px calc(90px + env(safe-area-inset-bottom))}
body.app:not(.tabs) #app{padding-bottom:40px}
.screen{display:flex;flex-direction:column;gap:14px}
.apphead{min-height:64px;padding:14px 0 0;display:flex;align-items:center;justify-content:center;gap:10px;position:relative}
.apphead .logo{font-family:var(--display);font-weight:800;font-size:22px;letter-spacing:-.02em}
.apphead .title{font-size:21px;font-weight:600}
.apphead .mr-badge{position:absolute;left:0;top:14px;margin:0;height:36px}
.hh-main{display:flex;align-items:center;gap:9px;max-width:calc(100% - 120px)}
.hh-logo{flex:none;width:34px;height:34px;object-fit:contain}
.hh-text{display:flex;flex-direction:column;min-width:0}
.hh-team{font:800 20px/1.15 var(--display);letter-spacing:-.02em}
.hh-school{font-size:12.5px;color:#8A8473}
.apphead.back{justify-content:flex-start;min-height:52px}
.apphead.back .to-home{margin-left:auto}
.avatar{position:absolute;right:0;top:12px;width:34px;height:34px;border-radius:50%;border:0;background:#E3DFD3;color:var(--muted);font:600 13px var(--sans)}
.badge{width:38px;height:38px;border-radius:50%;border:3px solid var(--red);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;
  background:none;color:inherit;padding:0;cursor:pointer}
.backbtn{padding:0;border:0;background:none;color:var(--red-ink);font:600 15px var(--sans)}
.tchips,.fchips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px 2px}
.tchips::-webkit-scrollbar,.fchips::-webkit-scrollbar{display:none}
.tchips .chip,.fchips .chip{flex:none;min-height:36px;padding:0 15px;font-size:14px;border-width:1px;border-color:var(--line)}
.tchips .chip.add{border-style:dashed;color:var(--muted);font-weight:500}

/* bottom nav; top nav on desktop */
.appnav{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;background:var(--paper);border-top:1px solid var(--line-a);
  padding:10px 0 calc(10px + env(safe-area-inset-bottom))}
.appnav button{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;border:0;background:none;color:#8A8473;font:600 11.5px var(--sans)}
.appnav button i{width:22px;height:22px;border-radius:7px;border:2px solid #B9B3A3}
.appnav button[aria-pressed=true]{color:var(--ink)}
.appnav button[aria-pressed=true] i{background:var(--red);border-color:var(--red)}
@media(min-width:700px){
  body.app #app{padding:0 16px 48px}
  .appnav{position:sticky;top:0;bottom:auto;max-width:520px;margin:0 auto;border-top:0;border-bottom:1px solid var(--line-a);padding:8px 0;flex-direction:row}
  .appnav button{flex-direction:row;gap:8px;height:40px;font-size:13.5px}
  .appnav button i{width:14px;height:14px;border-radius:4px}
  .apphead{min-height:72px;padding-top:20px}
  .avatar{top:20px}
  .apphead .mr-badge{top:24px}
}

/* ---------- score reveal ---------- */
.ringrow{display:flex;align-items:center;gap:16px}
.ringrow>div{display:flex;flex-direction:column;gap:4px;min-width:0}
.ringrow .h{font-size:17px;font-weight:600}
.ringbtn{border:0;background:none;padding:0;display:block;flex:none;cursor:pointer;border-radius:50%}
.ringbtn:focus-visible,.scorebox:focus-visible,.badge:focus-visible,.tap-row:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.t .lnk{font:inherit;font-weight:600;padding:0;vertical-align:baseline}

/* ---------- score breakdown ---------- */
.score-head{padding:4px 0 10px}
.score-head h1{margin:2px 0 4px;font-size:22px}
.brk{display:grid;grid-template-columns:28px 1fr auto;gap:4px 12px;align-items:center;padding:12px 0;border-top:1px solid var(--line-a)}
.brk .yes,.brk .no{width:26px;height:26px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px}
.brk .yes{background:#E6F0E8;color:var(--green)}
.brk .no{background:#F1EFE8;color:var(--muted)}
.brk .lnk{align-self:flex-start;font-size:13.5px;padding:0;text-align:left}
.pts{font-size:14px;color:var(--muted);white-space:nowrap}
.pts b{font-size:17px;font-weight:600;color:var(--ink)}
.pts.add b{color:var(--red-ink)}

/* ---------- Home ---------- */
.stats{display:flex}
.stats>div{flex:1;display:flex;flex-direction:column;padding-left:14px;border-left:1px solid var(--line-a)}
.stats>div:first-child{padding-left:0;border-left:0}
.stats b{font-size:22px;font-weight:600;line-height:1.2}
.stats span{font-size:13px;color:var(--muted)}
.tap-row{display:flex;flex-direction:column;gap:8px;width:100%;padding:0;border:0;background:none;text-align:left;color:inherit;font:inherit;cursor:pointer}
.scorebox{background:var(--cream);border:0;border-radius:14px;padding:14px;display:flex;align-items:center;gap:16px;width:100%;text-align:left;color:inherit;font:inherit;cursor:pointer}
.scorebox>div{display:flex;flex-direction:column;gap:4px}
.row-card{flex-direction:row;align-items:center;gap:12px;padding:16px 18px}
.row-card>div{flex:1;display:flex;flex-direction:column;gap:2px;min-width:0}
.dot{width:10px;height:10px;border-radius:50%;background:var(--red);flex:none}
.ed{display:flex;gap:12px;align-items:center}
.ed .thumb{width:52px;height:52px;border-radius:10px;background:#EAE6DA;flex:none}
.ed>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.ed .h{font-size:14px}

/* ---------- My Room ---------- */
.row.sub{padding:2px 4px 0}
.row-actions{display:flex;align-items:center;gap:14px}
.btn.small{height:34px;padding:0 14px;border-radius:10px;border:1px solid var(--line-2);font:600 14px var(--sans);flex:none}
.tools{display:flex;flex-direction:column;gap:12px}
.card.tool{position:relative;flex-direction:row;padding:0;overflow:hidden}
.tool-main{flex:1;display:flex;flex-direction:column;min-width:0;padding:0;border:0;background:none;text-align:left;color:inherit;font:inherit;cursor:pointer}
/* The logo sits on the card itself at its own shape, no frame around it. */
.tile-b{flex:none;align-self:flex-start;display:flex;align-items:center}
.tile-b>img{display:block;height:44px;width:auto;max-width:200px;object-fit:contain;object-position:left center;border-radius:8px}
.tile-b>img.wide{height:30px}
.tile-b>img.dk{box-sizing:content-box;padding:8px 12px;background:var(--ink);border-radius:10px}
.tile-b.ini{width:44px;height:44px;justify-content:center;background:var(--cream);border-radius:10px;font:800 14px var(--display);color:var(--muted)}
.tool .tile-b{margin:14px 52px 0 16px}
.tool-body{flex:1;min-width:0;padding:10px 44px 14px 16px;display:flex;flex-direction:column;gap:6px}
.tool-kv{display:flex;flex-direction:column;gap:4px;font-size:13.5px}
.tool .more{position:absolute;right:8px;top:8px;width:36px;height:32px;border:0;background:none;color:var(--muted);font-weight:700;letter-spacing:1px;border-radius:8px}
.tool .more:hover{background:var(--paper-2)}
.tool .menu{position:absolute;right:10px;top:40px;z-index:5;background:var(--paper);border:1px solid var(--line-2);border-radius:12px;padding:6px;display:flex;flex-direction:column;min-width:180px}
.tool .menu button{text-align:left;padding:10px 12px;border:0;background:none;border-radius:8px;font:500 14px var(--sans);color:var(--ink)}
.tool .menu button:hover{background:var(--paper-2)}
.tool .menu .danger{color:var(--red-ink)}
.card.empty{padding:16px;gap:4px}

/* tool page */
.tool-head{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-bottom:14px}
.tool-head .tile-b>img{height:60px;max-width:260px}
.tool-head .tile-b>img.wide{height:40px}
.tool-head .tile-b.ini{width:60px;height:60px;font-size:18px}
.tool-head h1{margin:2px 0 0}
.card.form{gap:16px}
.f{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:var(--ink-2)}
.f.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.f.two label{display:flex;flex-direction:column;gap:6px;min-width:0}
.f.two input{min-width:0}
.f input,.f select,.f textarea{width:100%;min-height:46px;padding:0 12px;background:var(--paper-2);border:1.5px solid var(--line-2);border-radius:10px;font:500 16px var(--sans);color:var(--ink)}
.f textarea{padding:10px 12px;min-height:84px;resize:vertical;font-weight:400;line-height:1.45}
.f input:focus,.f select:focus,.f textarea:focus{border-color:var(--ink);outline:none}
.f .chips{margin-top:2px}
.f .chip{min-height:36px;padding:0 13px;font-size:14px}
.screen .nav,body.app .nav{margin-top:6px}

/* ---------- Compare: add your price to unlock ---------- */
.cmp-chips{gap:6px;flex-wrap:wrap;overflow:visible}
.cmp-chips .chip{flex:1 0 auto;display:flex;align-items:center;justify-content:center;gap:4px;min-height:34px;padding:0 8px;border-radius:10px;font:600 12.5px var(--sans)}
.cmp-chips .st{font-size:11px;line-height:1}
.cmp-chips .st.ok{font-size:13px;font-weight:700;color:var(--green)}
.cmp-chips .chip[aria-pressed=true] .st.ok{color:#9AD0A8}
.cmp-banner{border-radius:16px;padding:14px 16px;display:flex;flex-direction:column;gap:3px;background:#E5F0E7;color:#1F4A2D;animation:cmpin .3s ease both}
.cmp-banner b{font-size:15px;font-weight:600}
.cmp-banner span{font-size:13.5px;line-height:1.45;opacity:.85}
.cmp-banner.live{background:var(--ink);color:#FAF9F5}
.cmp-card{gap:12px}
.cmp-title{display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.cmp-title .tile-b>img{height:34px}
.cmp-title .tile-b>img.wide{height:24px}
.cmp-row{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.cmp-row .m{flex:none;font-size:12px}
.cmp-row .mine{color:var(--red-ink)}
.cmp-src{font-size:11.5px;color:#8A8473}
.cmp-note{font-size:12px;line-height:1.45;color:#8A8473;text-align:center;padding:0 12px}
.you{flex:none;padding:2px 5px;border-radius:4px;background:var(--red);color:#fff;font:700 9px/1.3 var(--mono);letter-spacing:.06em;white-space:nowrap}
.sh{display:flex;flex-direction:column;gap:5px}
.sh-top{display:flex;justify-content:space-between;gap:10px;font-size:13.5px}
.sh-name{display:flex;align-items:center;gap:6px;min-width:0;font-weight:500}
.sh-pct{font-weight:600;color:var(--muted)}
.sh-bar{height:8px;border-radius:4px;background:#F2EFE7;overflow:hidden}
.sh-bar i{display:block;height:100%;border-radius:4px;background:#3B372E;transform-origin:left;animation:shbar .7s cubic-bezier(.2,.8,.2,1) both}
.sh.other .sh-name{color:#8A8473}
.sh.other .sh-bar i{background:#D6D1C4}
.sh.me .sh-name{font-weight:700;color:var(--ink)}
.sh.me .sh-pct{color:var(--red-ink)}
.sh.me .sh-bar i{background:var(--red)}
.rg{position:relative;padding-top:26px}
.rg-bar{height:12px;border-radius:6px;background:linear-gradient(90deg,#CFE6D6,#F3E3C2,#F2C4C9)}
.rg-mark{position:absolute;top:0;display:flex;flex-direction:column;align-items:center;transform:translateX(-50%)}
.rg-mark i{width:2px;height:22px;background:var(--red)}
.rg-nums{display:flex;justify-content:space-between;font-size:12px;line-height:1.35;color:var(--muted)}
.rg-nums span{display:flex;flex-direction:column}
.rg-nums span:nth-child(2){align-items:center}
.rg-nums span:nth-child(3){align-items:flex-end}
.rg-nums b{font-size:14px;color:var(--ink)}
.rg-empty{height:12px;border-radius:6px;background:repeating-linear-gradient(90deg,#EFEBE1 0 8px,#FAF9F5 8px 14px)}
.gate{position:relative;min-height:236px;margin:4px -18px -18px;padding:16px 18px 18px;border-top:1px solid var(--line-a);border-radius:0 0 18px 18px;overflow:hidden}
.gate-blur{display:flex;flex-direction:column;gap:12px;filter:blur(4px);opacity:.55;pointer-events:none;-webkit-user-select:none;user-select:none}
.gate-over{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:0 26px;text-align:center;
  background:linear-gradient(rgba(255,255,255,.35),rgba(255,255,255,.82))}
.gate-lock{font-size:22px;line-height:1}
.gate-h{font-size:20px;font-weight:600;line-height:1.25;text-wrap:balance}
.gate .pill-btn{width:auto;max-width:100%;min-height:48px;height:auto;margin-top:2px;padding:8px 26px;border-radius:24px;font-size:15px;line-height:1.25}
@keyframes cmpin{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes shbar{from{transform:scaleX(0)}to{transform:scaleX(1)}}

/* The "Add my price" sheet */
body.sheet-on{overflow:hidden}
.sheet-back{position:fixed;inset:0;z-index:70;background:rgba(22,20,15,.45);animation:sheetfade .2s ease both}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:71;max-width:520px;max-height:92vh;margin:0 auto;overflow-y:auto;
  padding:22px 20px max(22px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;
  background:var(--paper);border-radius:22px 22px 0 0;box-shadow:0 -12px 40px rgba(22,20,15,.18);animation:sheetup .28s cubic-bezier(.2,.8,.2,1) both}
.sheet-x{position:absolute;right:10px;top:10px;width:44px;height:44px;border:0;border-radius:50%;background:none;font-size:26px;line-height:1;color:var(--muted)}
.sheet .tile-b>img{height:34px}
.sheet .tile-b>img.wide{height:24px}
.sheet-q{padding-right:20px;font:600 20px/1.25 var(--sans);letter-spacing:-.01em}
.money{display:flex;align-items:center;gap:8px;height:58px;padding:0 16px;background:var(--app-bg);border:1.5px solid var(--line-2);border-radius:14px}
.money:focus-within{border-color:var(--ink)}
.money span{font:800 22px var(--display);color:var(--muted)}
.money input[type=text]{flex:1;min-width:0;width:auto;height:100%;padding:0;border:0;border-radius:0;background:none;outline:none;font:800 22px var(--display);color:var(--ink)}
.sheet-opt{margin-left:4px;font-style:normal;font-weight:400;color:var(--muted)}
.sheet .err{margin:0;min-height:0;font-size:14px}
.sheet .err:empty{display:none}
@keyframes sheetup{from{transform:translateY(100%)}to{transform:none}}
@keyframes sheetfade{from{opacity:0}to{opacity:1}}
@media(min-width:900px){.sheet{bottom:auto;top:50%;border-radius:22px;animation:none;transform:translateY(-50%)}}

/* ---------- Community: placeholder, nothing on it works ---------- */
.cm-head{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding-top:22px}
.cm-pill{padding:6px 12px;border-radius:999px;background:var(--red);color:#fff;font:700 11.5px var(--mono);letter-spacing:.1em;text-transform:uppercase}
.cm-title{margin:0;font:600 24px/1.2 var(--sans);letter-spacing:-.01em}
.cm-line{margin:0;font-size:14.5px;line-height:1.45;color:var(--ink-2)}
.cm-posts{display:flex;flex-direction:column;gap:10px;opacity:.9;pointer-events:none;-webkit-user-select:none;user-select:none;
  -webkit-mask-image:linear-gradient(#000 70%,transparent);mask-image:linear-gradient(#000 70%,transparent)}
.cm-post{background:#fff;border:1px solid rgba(22,20,15,.07);border-radius:16px;padding:14px 16px;display:flex;flex-direction:column;gap:8px}
.cm-meta{display:flex;align-items:center;gap:8px}
.cm-av{flex:none;width:26px;height:26px;border-radius:50%}
.cm-who{font-size:12px;font-weight:600;color:var(--muted)}
.cm-when{font-size:11px;color:#B9B3A3}
.cm-q{font-size:15px;font-weight:600;line-height:1.35}
.cm-n{font-size:12px;color:#8A8473}
.cm-ask{gap:12px;margin-top:-6px;opacity:.75;pointer-events:none;-webkit-user-select:none;user-select:none}
.cm-ask .h{font-size:16px}
.cm-box{min-height:72px;padding:12px 14px;border-radius:12px;border:1px solid rgba(22,20,15,.12);background:var(--app-bg);font-size:15px;line-height:1.4;color:#8A8473}
.cm-locked{height:50px;border-radius:25px;background:#E3DFD3;color:var(--muted);display:flex;align-items:center;justify-content:center;gap:6px;font:600 15px var(--sans)}

/* ---------- Terms: the line under sign-up, and the /terms page ---------- */
.terms-line{margin:10px 0 0;text-align:center;font-size:12px;color:#8A8473}
.terms-line a{color:inherit;text-decoration:underline}
.terms-page{background:var(--app-bg)}
.terms{max-width:640px;margin:0 auto;padding:28px var(--pad) 60px}
.terms h1{margin:0 0 18px;font:600 24px/1.25 var(--sans);letter-spacing:-.01em}
.terms p{margin:0 0 16px;font-size:16px;line-height:1.6;color:var(--ink-2)}
.terms .terms-foot{margin-top:28px;font-size:13px;color:var(--muted)}

/* ---------- footer ---------- */
footer{flex-shrink:0;border-top:1px solid var(--line);padding:22px var(--pad) 30px;text-align:center;
  font-size:13.5px;color:var(--muted)}
footer p{max-width:var(--col);margin:0 auto 8px}


/* ---------- dark pill button (intro, score reveal) ---------- */
.pill-btn{display:block;width:100%;height:56px;border-radius:28px;border:0;background:#2B2924;color:#fff;font:600 17px var(--sans);position:relative}
.pill-btn:focus-visible{outline:2px solid var(--ink);outline-offset:3px}

/* ---------- score screen ---------- */
@keyframes arcgrow{from{stroke-dashoffset:var(--len)}}
.rv-ring{display:block;border:0;background:none;padding:0;color:inherit;cursor:pointer}
.new-b{display:inline-block;margin-left:8px;padding:2px 7px;border-radius:999px;background:#E5F0E7;color:var(--green);font:700 11px var(--sans);vertical-align:2px}
.sc-head{position:relative;justify-content:space-between}
.sc-head .title{position:absolute;left:0;right:0;text-align:center;font-size:17px;pointer-events:none}
.sc-head .to-home{margin-left:auto}
.sc-typical{margin:-14px 0 0;text-align:center;font-size:14px;color:var(--muted)}
.sc-typical b{color:var(--ink);font-weight:700}
.sc-sect{display:flex;flex-direction:column;gap:8px;margin-top:6px}
.sc-sect .sc-title{padding:0 4px}
.score-text .typical{font-size:12.5px;color:var(--muted)}
.tool-kv .ok{color:var(--green);font-weight:600}
.sc-tabs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin-bottom:14px}
.sc-tabs::-webkit-scrollbar{display:none}
.sc-tabs .chip{flex:none;min-height:32px;padding:0 12px;border:1px solid rgba(22,20,15,.1);border-radius:9px;background:#fff;font:600 13px var(--sans);color:var(--ink-2)}
.sc-tabs .chip[aria-pressed=true]{background:#FCE8EA;color:#B3242F;border:1px solid #F0B9C0}
.sc-card{position:relative;padding:18px 14px 20px;background:#fff;border:1px solid rgba(22,20,15,.07);border-radius:22px;margin-bottom:16px}
.sc-ring{position:relative;width:210px;height:210px;margin:10px auto 24px}
.sc-ring svg{display:block}
.arc-grow{animation:arcgrow 1.1s cubic-bezier(.2,.8,.2,1) both}
.sc-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.sc-center .mr-badge{align-self:center;margin:0;height:30px}
.sc-center b{margin-top:4px;font:800 54px/1 var(--display)}
.sc-center>span:last-child{font-size:12px;color:#8A8473}
.sc-label{position:absolute;display:flex;flex-direction:column;gap:4px}
.sc-label>span{font-size:15px;font-weight:600}
.sc-label b{padding:3px 7px;border-radius:5px;color:#fff;font:700 9.5px var(--mono);letter-spacing:.06em}
.sc-l0{top:16px;right:18px;align-items:flex-end}
.sc-l1{bottom:16px;left:50%;transform:translateX(-50%);align-items:center}
.sc-l2{top:16px;left:18px;align-items:flex-start}
.sc-copy{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.sc-title{font-size:17px;font-weight:600}
.sc-copy p{margin:0;font-size:14.5px;line-height:1.45;color:var(--ink-2)}
.sc-rows{display:flex;flex-direction:column;gap:10px;padding-bottom:20px}
.sc-row{display:flex;align-items:center;gap:12px;width:100%;padding:14px 16px;text-align:left;background:#fff;border:1px solid rgba(22,20,15,.07);border-radius:16px;color:inherit;font:inherit}
.sc-dot{flex:none;width:9px;height:9px;border-radius:50%}
.sc-row>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.sc-t{font-size:15px;font-weight:600}
.sc-s{font-size:13px;color:#8A8473}
.sc-s.warn{color:#B3242F;font-weight:600}

/* ---------- Home ---------- */
.home-card{gap:16px}
.home-card .tap-row{display:flex;flex-direction:column;gap:14px}
.home-card .hc-top .h.lg{font-size:19px}
.hl-row{display:flex;align-items:center;gap:12px}
.hl-logos{display:flex}
.hl{flex:none;width:30px;height:30px;margin-left:-8px;border-radius:9px;background:#fff;border:1.5px solid #FAF9F5;box-shadow:0 0 0 1px rgba(22,20,15,.08);display:flex;align-items:center;justify-content:center;overflow:hidden}
.hl:first-child{margin-left:0}
.hl.dk{background:var(--ink)}
.hl img{width:100%;height:100%;object-fit:contain;padding:2px}
.hl b{font:800 9.5px var(--display)}
.hl-count{font-size:14px;color:var(--muted);white-space:nowrap}
.cnt{font:800 16px var(--display);color:var(--ink)}
.count-ok .cnt{counter-reset:n var(--n)}
.count-ok .cnt::before{content:counter(n)}
.count-ok .cnt-final{display:none}
.ring-dock{flex:none;display:block}
.score-text{flex:1;min-width:0}
.trend{font-size:13px;font-weight:600;color:var(--green)}
.trend.down{color:var(--red-ink)}
.home-after{display:contents}
.stack-card{flex-direction:row;align-items:center;gap:14px;padding:18px;background:var(--paper);border:1.5px solid var(--red);color:var(--ink);text-align:left;
  box-shadow:0 0 0 4px rgba(230,57,70,.08),0 14px 30px -14px rgba(230,57,70,.45)}
.stack-card.tap:active{background:#FFF7F7}
.stack-card>div{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}
.sk-h{font:600 17px/1.3 var(--sans);letter-spacing:-.01em}
.sk-m{font-size:13.5px;line-height:1.4;color:var(--muted)}
.sk-icon{flex:none;width:46px;height:46px;border-radius:13px;background:var(--red);display:flex;align-items:flex-end;justify-content:center;gap:4px;padding-bottom:11px}
.sk-icon i{width:6px;border-radius:2px;background:#fff}
.sk-icon i:nth-child(1){height:11px;opacity:.7}
.sk-icon i:nth-child(2){height:24px}
.sk-icon i:nth-child(3){height:17px;opacity:.85}
.sk-go{flex:none;width:32px;height:32px;border-radius:50%;background:#FCE8EA;color:var(--red-ink);display:flex;align-items:center;justify-content:center;font-size:20px;line-height:1;padding-bottom:2px}
.insight{gap:4px}
.insight .mono{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8A8473}
.insight .ins{font-size:15px;font-weight:600;line-height:1.35}
.ed-list{display:flex;flex-direction:column;gap:12px}
a.ed{color:inherit;text-decoration:none}
.ed.loading>div{flex:1;gap:8px}
.ed.loading i{display:block;height:10px;border-radius:5px;background:#EFEBE1}
.ed.loading i:first-child{width:30%}
.ed.loading i:last-child{width:85%;height:13px}
.ed .thumb{width:64px;height:64px;border-radius:12px;object-fit:cover}

/* The first time Home opens, right after the score reveal. Finished state underneath. */
@keyframes dock{0%,35%{transform:translate(calc(min(50vw,260px) - 94px),150px) scale(1.9)}}
@keyframes pop{0%{opacity:0;transform:translateY(-26px) scale(.6)}70%{opacity:1;transform:translateY(3px) scale(1.05)}}
@keyframes homefade{from{opacity:0;transform:translateY(12px)}}
body.opening .ring-dock{position:relative;z-index:2;transform-origin:center;animation:dock 1.1s .1s cubic-bezier(.2,.8,.2,1) both}
body.opening .hl{animation:pop .45s var(--d) ease-out both}
body.opening .hc-top{animation:homefade .45s .9s cubic-bezier(.2,.8,.2,1) both}
body.opening .score-text{animation:homefade .45s 1s cubic-bezier(.2,.8,.2,1) both}
body.opening .hl-count{animation:homefade .45s 1.05s cubic-bezier(.2,.8,.2,1) both}
.count-ok body.opening .cnt{animation:countup .9s 1.05s ease-out both}
body.opening .apphead,body.opening .tchips{animation:homefade .45s 1.7s cubic-bezier(.2,.8,.2,1) both}
body.opening .home-after>*:nth-child(1){animation:homefade .45s 1.9s cubic-bezier(.2,.8,.2,1) both}
body.opening .home-after>*:nth-child(2){animation:homefade .45s 1.98s cubic-bezier(.2,.8,.2,1) both}
body.opening .home-after>*:nth-child(n+3){animation:homefade .45s 2.05s cubic-bezier(.2,.8,.2,1) both}
body.opening .appnav{animation:homefade .45s 2.1s cubic-bezier(.2,.8,.2,1) both}

/* ---------- question screens ---------- */
@keyframes formgrow{from{width:var(--from)}}
@keyframes fuopen{from{opacity:0;transform:translateY(-6px)}}
body.ask{background:var(--app-bg)}
body.ask .chip[aria-pressed=true]{background:#FCE8EA;color:#B3242F;border:1.5px solid #F0B9C0}
body.ask .btn{height:56px;border-radius:28px}
body.ask .btn.primary{border:0;background:#2B2924;color:#fff;font:600 17px var(--sans)}
body.ask input[type=text],body.ask input[type=email]{border:1px solid rgba(22,20,15,.12);border-radius:14px}
body.form #top,body.form footer{display:none}
body.form #app{max-width:440px;padding:0}
.form{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
.form-top{position:sticky;top:0;z-index:5;padding:calc(16px + env(safe-area-inset-top)) 20px 8px;display:flex;align-items:center;gap:12px;background:var(--app-bg)}
.round-back{flex:none;width:34px;height:34px;border-radius:50%;border:1px solid rgba(22,20,15,.1);background:#fff;font-size:18px;line-height:1;color:var(--muted)}
.form-track{flex:1;height:4px;border-radius:2px;background:#ECE8DE;overflow:hidden}
.form-fill{height:100%;border-radius:2px;background:#E63946}
.form-fill.grow{animation:formgrow .35s ease both}
.form-count{flex:none;width:34px;text-align:right;font-size:12px;color:#8A8473}
.form-body{flex:1;padding:26px 22px 16px;display:flex;flex-direction:column;gap:10px}
.form-body.enter{animation:rise .4s ease both}
.form-body.has-mug{padding-bottom:78px}   /* room to scroll the last options clear of the mug */
.form .ctx{margin:0;font-size:13px;font-weight:600;color:#8A8473}
.form h2{margin:0;font:600 28px/1.2 var(--sans);letter-spacing:-.02em}
.form .hint{margin:0;font-size:15px;line-height:1.45;color:var(--muted)}
.form .field{margin:0}
.form .tiles{grid-template-columns:repeat(2,1fr);gap:9px;margin:12px 0 0}
.form .tiles.primary{grid-template-columns:repeat(3,1fr)}
.more-row{display:flex;gap:9px}
.more-row .tile{flex:1;min-height:46px;justify-content:center;font:500 14px var(--sans);color:var(--muted)}
.form .other-btn{flex:1;min-height:46px;background:transparent;border:1px dashed rgba(22,20,15,.2);border-radius:14px;font:500 14px var(--sans);color:var(--muted)}
.form .more-row [aria-pressed=true]{background:#FCE8EA;color:#B3242F;border:1.5px solid #F0B9C0}
.form .chip{min-height:38px;padding:0 14px;background:#fff;border:1px solid rgba(22,20,15,.08);border-radius:12px;font:600 14px var(--sans);color:var(--ink)}
#teamList{margin-top:12px;display:flex;flex-direction:column;gap:9px}
#teamList .chips{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}
#teamList .chips.more-row{display:flex}
#teamList .chip{min-height:52px;text-align:left}
#teamList .chip.other-btn{min-height:46px;text-align:center;border-radius:14px;background:transparent}
.opt-cards{display:flex;flex-direction:column;gap:10px;margin-top:18px}
.opt,.form .chip.opt{min-height:0;padding:16px 18px;display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left;background:#fff;border:1px solid rgba(22,20,15,.08);border-radius:16px;color:var(--ink)}
.opt b{font:600 16px var(--sans)}
.opt span{font-size:13px;font-weight:400;color:#8A8473}
.form .opt[aria-pressed=true]{background:#FCE8EA;color:#B3242F;border:1.5px solid #F0B9C0}
.opt[aria-pressed=true] span{color:#B3242F;opacity:.8}
.fu-card{margin-top:6px;padding:16px;display:flex;flex-direction:column;gap:12px;background:#fff;border:1px solid rgba(22,20,15,.08);border-radius:18px}
.fu-card.opening{animation:fuopen .3s ease both}
.fu-h{display:block;font-size:15px;font-weight:600}
.fu-card input[type=text],.fu-card select{width:100%;height:48px;padding:0 14px;background:var(--app-bg);border:1px solid rgba(22,20,15,.1);border-radius:12px;font:500 16px var(--sans);color:var(--ink)}
.fu-card .uname{font-size:14px;font-weight:600;color:var(--ink-2)}
.fu-card .urow{flex-wrap:nowrap}
.step-btn{flex:none;width:44px;height:44px;border-radius:12px;border:1px solid rgba(22,20,15,.1);background:var(--app-bg);font-size:20px;color:var(--ink)}
.fu-card .urow input[type=number]{flex:1;min-width:0;width:auto;height:44px;padding:0;text-align:center;background:var(--app-bg);border:1px solid rgba(22,20,15,.06);border-radius:12px;font:800 20px var(--display);-moz-appearance:textfield;appearance:textfield}
.fu-card .urow input::-webkit-outer-spin-button,.fu-card .urow input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.fu-card .urow .chip{flex:none;min-height:44px;padding:0 12px;font-size:13px}
.form-foot{position:sticky;bottom:0;z-index:4;padding:8px 22px max(34px,env(safe-area-inset-bottom));background:var(--app-bg)}
.form-foot .mug{top:-66px}
.form-foot .err{margin:0 0 8px;min-height:0;font-size:14px}
.form-foot .err:empty{display:none}
.who .form-body{padding-top:calc(26px + env(safe-area-inset-top))}
.who h1{margin:0;font:600 28px/1.2 var(--sans);letter-spacing:-.02em}
.who .lede{margin:0 0 14px;font-size:15px;line-height:1.45;color:var(--muted)}
.who .field{margin:0 0 8px}
.who .field>label,.who .field>.label{margin-bottom:6px;font:600 14px var(--sans)}
.who .note{margin-top:6px;font-size:12.5px;line-height:1.4;color:#8A8473}
.who .signed{border-radius:14px}
.who .chips[data-group=role]{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.who .chips[data-group=role] .chip{min-height:58px;padding:4px 8px;border-radius:14px;font-size:13px;line-height:1.2}
@media(min-height:780px){.who .form-body{padding-top:calc(52px + env(safe-area-inset-top))}}
.pill-btn[disabled]{background:#D6D1C4;color:#FAF9F5;cursor:not-allowed}
@media(min-height:780px){.form-top{padding-top:calc(52px + env(safe-area-inset-top))}}

/* ---------- intro ---------- */
@keyframes rise{from{opacity:0;transform:translateY(10px)}}
@keyframes tap{0%,60%,100%{transform:scale(1)}70%{transform:scale(.94)}80%{transform:scale(1.03)}}
@keyframes introfill{from{stroke-dashoffset:264}}
@keyframes curl{0%,100%{transform:rotate(0)}50%{transform:rotate(-18deg)}}
@keyframes dotgrow{from{width:6px}}
body.intro-on{background:var(--app-bg)}
body.intro-on #top,body.intro-on footer{display:none}
body.intro-on #app{max-width:440px;padding:0}
.intro{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.intro-top{padding:calc(16px + env(safe-area-inset-top)) 24px 0;display:flex;justify-content:flex-end}
.intro-skip{border:0;background:none;font:500 16px var(--sans);color:#8A8473;padding:4px 0}
.mr-badge{display:block;align-self:center;width:auto;height:36px;margin-top:12px}
.mr-full{height:42px}
.intro-copy{display:flex;flex-direction:column;align-items:center;animation:rise .45s ease both}
.intro-copy h1{margin:22px 32px 0;text-align:center;font:600 28px/1.2 var(--sans);letter-spacing:-.02em}
.intro-copy p{margin:10px 40px 0;text-align:center;font-size:15px;line-height:1.45;color:var(--muted);text-wrap:balance}
.intro-preview{flex:1;min-height:236px;display:flex;align-items:center;justify-content:center;padding:16px 24px;pointer-events:none;-webkit-user-select:none;user-select:none}
/* Illustrations, not inputs. The mask sits on the illustration itself so its edges really fade. */
.intro-preview>*{width:300px;max-width:100%;opacity:.9;-webkit-mask-image:radial-gradient(ellipse 85% 75% at 50% 50%,#000 62%,transparent 100%);mask-image:radial-gradient(ellipse 85% 75% at 50% 50%,#000 62%,transparent 100%);animation:rise .5s .1s ease both}
.ip-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.ip-tile{height:54px;border-radius:14px;display:flex;align-items:center;justify-content:center;font:600 13px var(--sans);background:#fff;color:#A8A292;border:1px solid rgba(22,20,15,.07)}
.ip-tile.on{background:#FCE8EA;color:#B3242F;border-color:#F4C7CC;animation:tap 2.4s var(--d) ease infinite}
.ip-score{background:#fff;border:1px solid var(--line-a);border-radius:20px;padding:20px;display:flex;align-items:center;gap:18px;box-shadow:0 12px 30px rgba(22,20,15,.06)}
.ip-score svg{flex:none}
.ip-fill{stroke-dashoffset:95;animation:introfill 1.4s .3s cubic-bezier(.2,.8,.2,1) both}
.ip-lines{flex:1;display:flex;flex-direction:column;gap:8px}
.ip-lines i{display:block;height:8px;border-radius:4px}
.ip-lines span{font-size:11px;color:#B9B3A3;margin-top:4px}
.ip-cards{display:flex;flex-direction:column;gap:10px}
.ip-card.ip-price{flex-direction:column;align-items:stretch;gap:2px;padding:14px 16px}
.ip-price>.rg{flex:none;display:block;padding-top:24px}
.ip-price>.rg-nums{flex:none;flex-direction:row;justify-content:space-between;gap:0;font-size:11px}
.ip-price .rg-nums b{font-size:13px}
.ip-price b.you{font-size:9px;font-weight:700}
.intro-checks{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:9px}
.intro-checks li{display:flex;align-items:center;gap:10px;font-size:15px;line-height:1.35;color:var(--ink-2)}
.intro-checks span{flex:none;width:20px;height:20px;border-radius:50%;background:#FCE8EA;color:var(--red);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800}
.ip-card{background:#fff;border:1px solid var(--line-a);border-radius:16px;padding:12px 14px;display:flex;align-items:center;gap:12px}
.ip-card>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.ip-card b{font-size:14px;font-weight:600}
.ip-ini{flex:none;width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;font:800 12px var(--display)}
.ip-ini.red{background:#FCE8EA;color:#B3242F}
.ip-ini.blue{background:#DCE6FB;color:#5B8DEF}
.ip-ini.green{background:#DDEFE2;color:#5FA777}
.ip-cat{font:700 9.5px var(--mono);letter-spacing:.08em;color:#B9B3A3}
.ip-pill{flex:none;font-size:11px;font-weight:600;padding:3px 8px;border-radius:999px;background:var(--cream);color:var(--muted)}
.ip-pill.warn{background:#FBE3E5;color:var(--red-ink)}
.intro-dots{display:flex;justify-content:center;gap:6px;margin-bottom:18px}
.intro-dots span{width:6px;height:6px;border-radius:3px;background:#D6D1C4}
.intro-dots span.on{width:22px;background:#8A8473;animation:dotgrow .25s ease both}
.intro-cta{position:relative;padding:0 22px max(34px,env(safe-area-inset-bottom))}
.mug{position:absolute;right:48px;top:-74px;width:76px;height:76px;z-index:1;pointer-events:none}
.mug svg{display:block}
/* Shorter phones: tighten the third intro preview so the price bar clears the mug. */
@media(max-height:720px){
  .ip-cards{gap:7px}
  .ip-card{padding:8px 12px}
  .ip-ini{width:30px;height:30px}
  .ip-card.ip-price{padding:10px 14px}
  .ip-price>.rg{padding-top:20px}
  .intro-checks{margin-top:10px;gap:6px}
  .intro-preview{align-items:flex-start;padding-top:12px}
}
@media(max-height:640px){
  .intro-copy h1{margin-top:14px;font-size:24px}
  .intro-copy p{margin-top:8px}
  .intro-preview{min-height:0;align-items:flex-start;padding:10px 24px 0}
  .intro-cta{padding-bottom:max(24px,env(safe-area-inset-bottom))}
}
/* The mockup's top spacing, where the screen is tall enough to spare it. */
@media(min-height:780px){
  .intro-top{padding-top:calc(54px + env(safe-area-inset-top))}
  .mr-badge{margin-top:28px}
}
.mug-arm{transform-origin:45px 82px;animation:curl 2.4s ease-in-out infinite}

/* ---------- score reveal ---------- */
@property --n{syntax:"<integer>";initial-value:0;inherits:false}
@keyframes countup{from{--n:0}}
@keyframes ringfill{from{stroke-dashoffset:264}}
@keyframes rvin{from{opacity:0;transform:translateY(8px)}}
@keyframes barfill{from{transform:scaleX(0)}}
.reveal{display:flex;flex-direction:column;gap:14px;margin:0 4px;padding-top:calc(20px + env(safe-area-inset-top))}
@media(min-height:780px){.reveal{padding-top:calc(54px + env(safe-area-inset-top))}}
.rv-in{animation:rvin .4s var(--d,0s) cubic-bezier(.2,.8,.2,1) both}
.rv-head{font-size:13px;color:var(--muted)}
.rv-top{display:flex;flex-direction:column;align-items:center;gap:4px;padding-top:6px}
.rv-ring{position:relative;width:168px;height:168px}
.rv-ring svg{display:block}
.rv-fill{stroke-dashoffset:var(--off);animation:ringfill 1.4s .2s cubic-bezier(.2,.8,.2,1) both}
.rv-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.rv-num{font:800 50px/1 var(--display)}
.count-ok .rv-num{counter-reset:n var(--n);animation:countup 1.4s .2s cubic-bezier(.2,.8,.2,1) both}
.count-ok .rv-num::after{content:counter(n)}
.count-ok .rv-final{display:none}
.rv-of{font-size:12px;color:#8A8473}
.rv-band{margin:6px 0 0;font:600 18px/1.3 var(--sans);letter-spacing:0}
.rv-story{margin:2px 12px 0;text-align:center;font-size:14.5px;line-height:1.45;color:var(--ink-2)}
.rv-card{background:#fff;border:1px solid var(--line-a);border-radius:18px}
.rv-peer{border-radius:14px;padding:12px 16px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px}
.rv-note{flex:none;font-size:11px;color:#8A8473}
.rv-points{padding:16px 16px 6px;display:flex;flex-direction:column}
.rv-points .mono{font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8A8473;margin-bottom:10px}
.rv-row{display:flex;align-items:center;gap:10px;padding:7px 0;animation-duration:.35s}
.rv-name{width:108px;flex-shrink:0;font-size:13px}
.rv-track{flex:1;height:8px;border-radius:4px;background:#F2EFE7;overflow:hidden}
.rv-bar{height:100%;border-radius:4px;background:var(--ink);transform-origin:left;animation:barfill .6s var(--d,0s) cubic-bezier(.2,.8,.2,1) both}
.rv-pts{width:44px;flex-shrink:0;text-align:right;font-size:12px;font-weight:600;color:var(--muted)}
.rv-pts.miss{color:var(--red-ink)}
.rv-moves{padding:16px 16px 6px;display:flex;flex-direction:column;gap:6px}
.rv-h{font-size:15px;font-weight:600}
.rv-move{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--line-a);font-size:14px}
.rv-move span{flex:1}
.rv-move b{font-size:13px;font-weight:700;color:var(--green);background:#E5F0E7;padding:3px 9px;border-radius:999px}
.rv-foot{position:sticky;bottom:0;margin:0 -20px;padding:10px 20px max(34px,env(safe-area-inset-bottom));background:var(--app-bg)}

/* Account page: the Terms link at the bottom */
.acct-terms{margin:4px 0 0;text-align:center;font-size:13px}
.acct-terms a{color:var(--muted);text-decoration:underline}

/* ---------- Desktop (1024px and up) ----------
   Everything for wide screens lives in this one block. Nothing outside it changes,
   so phones and tablets look exactly as before. Intro, sign-up, builder, reveal,
   tool page, account and score screen keep their narrow centered column. */
@media(min-width:1024px){
  body.app.tabs .builder{width:100%}
  body.app.tabs #app{max-width:1040px}
  body.app.tabs .appnav{max-width:1040px}

  /* Home: left column (team chips, room and score, price card, insight, coming up), news on the right.
     The last row is flexible, so a tall news card never spreads out the left column. */
  .screen.tab-home{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,380px);grid-template-rows:auto repeat(6,auto) 1fr;column-gap:28px;row-gap:14px;align-items:start}
  .tab-home>*,.tab-home .home-after>*{grid-column:1}
  .tab-home>.apphead{grid-column:1 / -1}
  .tab-home .home-after>.news-card{grid-column:2;grid-row:2 / -1}
  /* With team chips above, news starts level with the My weight room card, not the chips. */
  .tab-home:has(>.tchips) .home-after>.news-card{grid-row:3 / -1}

  /* My Room: core cards two across; Everything else and section titles full width */
  /* Every card the same size: a dashed "Nothing logged" card matches a tool card, and cards in a row match each other. */
  .tab-room .tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:stretch}
  .tab-room .tools>.card:not(.more-sect){min-height:168px}
  .tab-room .tools>.sect-h,.tab-room .tools>.more-sect{grid-column:1 / -1}

  .screen.tab-compare{width:100%;max-width:760px;margin:0 auto}
  .screen.tab-community{width:100%;max-width:680px;margin:0 auto}
}

/* No motion: everything above has its finished state underneath its animation. */
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none !important;transition:none !important}}
