/* =====================================================================
   Yuki website / sign in + link your PC. The same catalogue voice as the
   landing, in a quieter room: one clearing, one field, one thing to do.
   Round 2 (18 Oct): readable sizes (nothing a person reads under 13 px; mono caps tags 12.5 px), the shared fx
   vocabulary (css/fx.css + js/fx.js: crop on the cards, matrix on the main key, lit rows, pulse on live dots), a
   sliding dotted tab indicator, a rolling resend countdown, dot carets in the code boxes. Less copy.
   Load after base.css and fx.css.
   ===================================================================== */
body.auth { min-height: 100vh; min-height: 100svh; background: var(--bg); }
.abar { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 var(--gut); }
.abar .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.abar .brand .ymark { width: 26px; height: 26px; }
.abar .brand .doto { font-size: 24px; font-weight: 900; letter-spacing: .04em; line-height: 1; }
.abar .mid { margin: 0 auto; }
.abar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.acct { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 4px; border-radius: 999px; border: 1px solid var(--hair-2); font-size: 13.5px; color: var(--text-2); }
.acct .av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--raise-2); border: 1px solid var(--hair-2); font: 800 12px/1 var(--f-display); font-variation-settings: 'ROND' 100; color: var(--text); }

/* ---------------- sign in: field left, form right ---------------- */
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(420px, 1fr); min-height: 100vh; min-height: 100svh; }
.split .side { position: relative; overflow: hidden; border-right: 1px solid var(--hair); }
.split .side canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: manipulation; }
.side-cap { position: absolute; left: var(--gut); right: var(--gut); bottom: 32px; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; pointer-events: none; }
.side-cap .big { font-size: clamp(22px, 2vw, 30px); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; max-width: 15ch; margin: 8px 0 0; }
.side-top { position: absolute; left: var(--gut); top: 86px; z-index: 2; pointer-events: none; }
.side p.lbl { margin: 0; }
.split .main { display: flex; align-items: center; justify-content: center; padding: 96px var(--gut) 48px; }
.card { width: 100%; max-width: 420px; padding: 34px 32px 28px; }
.card p.lbl { margin: 0; }
.card h1 { margin: 14px 0 12px; font-family: var(--f-display); font-variation-settings: 'ROND' 100; font-weight: 800; font-size: 54px; line-height: .92; letter-spacing: .01em; }
.card .lead { margin: 0 0 22px; color: var(--text-2); font-size: var(--t-read); line-height: 1.5; }
.card .lead b { color: var(--text); font-weight: 500; }

/* tabs: a raised pill slides between them (transform only), with a dotted row under the current one */
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; gap: 2px; border: 1px solid var(--hair-2); border-radius: 10px; margin-bottom: 20px; }
.tabs .ind {
  position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc(50% - 4px); border-radius: 7px; pointer-events: none;
  background: var(--raise-2); box-shadow: inset 0 0 0 1px var(--hair-2);
  transition: transform 360ms var(--ease-spring);
}
.tabs .ind::after {
  content: ''; position: absolute; left: 30%; right: 30%; bottom: 4px; height: 3px;
  background: radial-gradient(circle, var(--text-2) 1px, transparent 1.3px) 0 0 / 5px 3px repeat-x;
}
.tabs[data-on="create"] .ind { transform: translateX(calc(100% + 2px)); }
.tabs a { position: relative; z-index: 1; display: grid; place-items: center; height: 34px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none; transition: color var(--d-fast); }
.tabs a[aria-current="page"] { color: var(--text); }
html.fx-hover .tabs a:not([aria-current="page"]):hover { color: var(--text); }
.tabs a:focus-visible { outline: 1.5px solid var(--lit); outline-offset: -2px; }

.fl { display: block; font: 500 var(--t-lbl)/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 0 0 9px; }
.err { display: none; align-items: flex-start; gap: 8px; margin: 10px 0 0; font-size: 14px; color: var(--text); line-height: 1.45; }
.err::before { content: '!'; flex: none; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--lit); display: grid; place-items: center; font: 700 11px/1 var(--f-mono); margin-top: 1px; }
.err.on { display: flex; animation: errin .3s var(--ease-out); }
@keyframes errin { from { opacity: 0; transform: translateY(-4px); } }
.field-in[aria-invalid="true"] { border-color: var(--lit); border-style: dashed; }
.btn-full { width: 100%; height: 46px; margin-top: 16px; font-size: 15px; }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; font: 500 var(--t-lbl)/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.or::before, .or::after { content: ''; flex: 1; height: 3px; background: radial-gradient(circle, var(--hair-2) 1px, transparent 1.3px) 0 0 / 6px 3px repeat-x; }
.gkey { width: 100%; height: 46px; font-size: 15px; }
.gkey svg { width: 16px; height: 16px; }
.pnote { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; padding: 14px; border: 1px dashed var(--hair-2); border-radius: 12px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.pnote b { color: var(--text); font-weight: 500; }
.pnote .dic { width: 15px; height: 15px; margin-top: 2px; color: var(--text); }
.fine { margin: 16px 0 0; font-size: var(--t-cap); color: var(--text-2); }
.fine a { color: var(--text); }
.spin { display: inline-flex; gap: 4px; }
.spin i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .25; animation: spin 1s infinite; }
.spin i:nth-child(2) { animation-delay: .15s; } .spin i:nth-child(3) { animation-delay: .3s; }
@keyframes spin { 30% { opacity: 1; } }
.key.loading { pointer-events: none; }
.bl { display: inline-flex; align-items: center; gap: 8px; }
.stage-in { animation: stin .45s var(--ease-out); }
@keyframes stin { from { opacity: 0; transform: translateY(8px); } }
.mail { display: flex; align-items: center; gap: 12px; padding: 14px; margin: 0 0 18px; border: 1px solid var(--hair-2); border-radius: 12px; background: var(--raise); }
.mail .env { width: 40px; height: 30px; flex: none; position: relative; border-radius: 4px; background: radial-gradient(circle, var(--text-3) 1px, transparent 1.4px) 0 0 / 5px 5px; }
.mail b { display: block; font-size: 15px; font-weight: 600; }
.mail span { font-size: var(--t-cap); color: var(--text-2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row2 .key { height: 42px; }
.resend { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; color: var(--text-2); }
.resend a { color: var(--text-2); }
.resend .cd { font: 500 13.5px/1 var(--f-mono); color: var(--text-2); display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
/* the resend countdown: each digit is a column that rolls to the next value (local, not fx's odometer, because
   this one counts every second; fx's rolls from 0 once on reveal) */
.ro { display: inline-flex; color: var(--text); }
.ro-c { display: inline-block; height: 1.15em; overflow: hidden; line-height: 1.15em; }
.ro-s { display: flex; flex-direction: column; transition: transform 380ms var(--ease-out); }
.ro-s span { height: 1.15em; line-height: 1.15em; text-align: center; }
.mockact { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px dashed var(--mark); background: transparent; color: var(--text-2); font: 500 12.5px/1 var(--f-mono); text-decoration: none; }
.mockact:hover, .mockact:focus-visible { color: var(--text); border-color: var(--text-3); }
.who { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--hair-2); border-radius: 12px; margin-bottom: 14px; }
.who .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--hair-2); background: var(--raise-2); font: 800 18px/1 var(--f-display); font-variation-settings: 'ROND' 100; }
.who b { display: block; font-size: 15px; font-weight: 600; }
.who span.em-addr { font: 500 13px/1.4 var(--f-mono); color: var(--text-2); }
.who .chip { margin-left: auto; }
.next { padding: 16px; border-radius: 12px; background: var(--raise); border: 1px solid var(--hair-2); }
.next .lbl { margin-bottom: 8px !important; }
.next p { margin: 0 0 14px; font-size: 14.5px; color: var(--text-2); line-height: 1.45; }
.next p b { color: var(--text); font-weight: 600; display: block; font-size: 16px; margin-bottom: 4px; }
.alt { display: inline-block; margin-top: 16px; font-size: 14px; color: var(--text-2); }
[data-pane] { display: none; }
[data-pane].on { display: block; }

/* ---------------- link your PC ---------------- */
.lwrap { max-width: 1240px; margin: 0 auto; padding: 108px var(--gut) 96px; }
.lhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; margin-bottom: 34px; }
.lhead p.lbl { margin: 0; }
.lhead h1 { margin: 12px 0 14px; font-family: var(--f-display); font-variation-settings: 'ROND' 100; font-weight: 800; font-size: clamp(52px, 7vw, 96px); line-height: .88; letter-spacing: .01em; }
.lhead p.line { margin: 0; color: var(--text-2); font-size: var(--t-line); max-width: 46ch; line-height: 1.5; }
.lsteps { display: flex; gap: 22px; font: 500 var(--t-lbl)/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.lsteps b { color: var(--text); font-weight: 500; margin-right: 6px; }
.lsteps .done { color: var(--text-2); }
.banner { display: none; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 22px; border-radius: 12px; border: 1px solid rgba(var(--live-rgb), .35); background: var(--live-dim); }
.banner.on { display: flex; animation: stin .45s var(--ease-out); }
.banner b { font-weight: 600; font-size: 15px; }
.banner span.t2 { font-size: 14px; }
.banner .key { margin-left: auto; }
.panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.pane { padding: 26px 26px 24px; display: flex; flex-direction: column; }
.pane > p.lbl { margin: 0; }
.pane h2 { margin: 10px 0 8px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.pane .sub { margin: 0 0 22px; color: var(--text-2); font-size: var(--t-read); line-height: 1.5; }

/* code boxes: each sits in a cell that draws a blinking dot caret when it has focus and is empty, and presses in
   when a letter lands (scale .92 -> 1, 120 ms). The wrong-code shake is transform only. */
.code { display: flex; align-items: center; gap: 8px; }
.cb { position: relative; flex: 1 1 0; min-width: 0; max-width: 62px; }
.cb::after {
  content: ''; position: absolute; left: 50%; bottom: 16px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: var(--text); opacity: 0; pointer-events: none;
}
.cb:focus-within:has(input:placeholder-shown)::after { animation: caret 1s steps(2, jump-none) infinite; }
@keyframes caret { 0% { opacity: 1; } 100% { opacity: 0; } }
.cb.pop { animation: cbpop 140ms var(--ease-out); }
@keyframes cbpop { from { transform: scale(.92); } to { transform: none; } }
.code input { width: 100%; height: 72px; text-align: center; border-radius: 10px; border: 1px solid var(--hair-2); background: var(--raise); font: 800 34px/1 var(--f-display); font-variation-settings: 'ROND' 100; text-transform: uppercase; color: var(--text); caret-color: transparent; transition: border-color var(--d-fast), background var(--d-fast); }
html.fx-hover .code input:hover:not(:focus):not(:disabled) { border-color: var(--edge-2); }
.code input:focus { outline: 0; border-color: var(--text-2); background: var(--bg); }
.code .dash { width: 12px; height: 3px; flex: none; background: radial-gradient(circle, var(--text-3) 1.2px, transparent 1.5px) 0 0 / 6px 3px repeat-x; }
.code.bad input { border-color: var(--lit); border-style: dashed; }
.code.bad { animation: shake .42s var(--ease); }
.code.ok input { border-color: rgba(var(--live-rgb), .55); color: var(--live); }
.code.dead input { color: var(--text-3); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.pane .key.pri.btn-full { margin-top: 18px; }
.help { margin-top: auto; padding-top: 22px; }
.help ol { list-style: none; margin: 0; padding: 0; counter-reset: s; border-top: 1px solid var(--hair); }
.help li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--hair); font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
.help li::before { content: counter(s); font: 800 16px/1.3 var(--f-display); font-variation-settings: 'ROND' 100; color: var(--text); }
.help li b { color: var(--text); font-weight: 500; }
.openpc { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 14px; color: var(--text-2); }

/* the PC app's own sign-in screen (Lattice look). Chrome inside this mock may be 12 px; what it says is 13.5 px+ */
.pcwin { position: relative; flex: 1; min-height: 400px; border-radius: 12px; border: 1px solid var(--edge); background: var(--bg); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(var(--shade-rgb), .45); }
.pcwin canvas { position: absolute; inset: 34px 0 0 0; width: 100%; height: calc(100% - 34px); }
.pc-bar { position: relative; z-index: 2; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 0 0 12px; border-bottom: 1px solid var(--hair); background: rgba(var(--bg-rgb), .9); }
.pc-bar .ymark { width: 16px; height: 16px; }
.pc-bar .doto { font-size: 15px; font-weight: 900; letter-spacing: .04em; }
.pc-bar .lbl { margin-left: 6px; font-size: 12px; }
.pc-bar .ctl { margin-left: auto; display: flex; height: 100%; }
.pc-bar .ctl i { width: 38px; display: grid; place-items: center; }
.pc-bar .ctl i::before { content: ''; width: 9px; height: 1px; background: var(--text-3); }
.pc-body { position: relative; z-index: 2; flex: 1; display: grid; place-items: center; padding: 26px; }
.pc-card { width: 100%; max-width: 360px; padding: 22px 22px 20px; background-color: var(--bg); }
.pc-card p.lbl { margin: 0; font-size: 12px; }
.pc-card h3 { margin: 10px 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.pc-card p { margin: 0 0 16px; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.pc-code { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--hair-2); background-color: var(--raise); color: var(--text); cursor: pointer; text-align: left; transition: border-color var(--d-fast), background-color var(--d-fast); }
.pc-code .doto { font-size: 40px; letter-spacing: .08em; line-height: 1; white-space: nowrap; }
.pc-code .lbl { white-space: nowrap; font-size: 12px; }
html.fx-hover button.pc-code:hover, button.pc-code:focus-visible { border-color: var(--text-3); background-color: var(--raise-2); }
.pc-wait { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13.5px; color: var(--text-2); }
.pc-wait .spin { color: var(--live); }
.pc-meta { display: flex; justify-content: space-between; margin-top: 12px; font: 500 12px/1.3 var(--f-mono); color: var(--text-3); }
.pc-card .key { margin-top: 14px; }
.pc-done { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(var(--live-rgb), .35); background: var(--live-dim); font-size: 14px; }
.pc-done b { display: block; font-weight: 600; }
.pc-done span span { font: 500 12px/1.4 var(--f-mono); color: var(--text-2); }
.pc-dead .doto { color: var(--text-3); text-decoration: line-through; text-decoration-thickness: 2px; }
.pc-dead .pc-code { cursor: default; }

/* Your PCs: each row lights its border (fx "lit") on hover, focus inside, or tap */
.devs { margin-top: 34px; padding: 22px 26px; }
.devs-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.devs-h .lbl { margin: 0; }
.devs-h .cap { margin: 0; }
.dev { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 10px; margin: 0 -10px; border-radius: 10px; font-size: 14px; transition: background var(--d-fast); }
.dev + .dev { margin-top: 4px; }
html.fx-hover .dev:hover { background: var(--raise); }
.dev .ic { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--hair-2); display: grid; place-items: center; color: var(--text-2); }
.dev b { display: block; font-weight: 600; font-family: var(--f-mono); font-size: 14px; letter-spacing: .02em; }
.dev small { display: block; color: var(--text-2); font-size: var(--t-cap); margin-top: 3px; }
.dev .acts { display: flex; gap: 10px; align-items: center; }
.dev.new { animation: stin .5s var(--ease-out); }
.confirm { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--hair-2); background: var(--raise); font-size: 14px; color: var(--text-2); }
.confirm b { color: var(--text); font-weight: 600; }
.confirm .acts { margin-left: auto; display: flex; gap: 6px; }
.empty-dev, .gone-dev { padding: 16px 0 6px; color: var(--text-2); font-size: 14px; margin: 0; }

/* ---------------- responsive ---------------- */
@media (max-width: 980px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split .side { height: 300px; border-right: 0; border-bottom: 1px solid var(--hair); }
  .split .main { padding-top: 28px; align-items: flex-start; }
  .side-cap { bottom: 18px; } .side-cap .big { font-size: 20px; } .side-cap > .lbl { display: none; }
  .side-top { top: 72px; }
  .panes { grid-template-columns: minmax(0, 1fr); }
  .lhead { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --gut: 18px; }
  .abar { height: 56px; }
  .abar .mid { display: none; }
  .acct span.em { display: none; }
  .split .side { height: 200px; }
  .side-top, .side-cap { display: none; }
  .card { padding: 26px 18px 22px; }
  .card h1 { font-size: 44px; }
  .lwrap { padding-top: 84px; }
  .lsteps { flex-wrap: wrap; gap: 8px 16px; }
  .pane { padding: 20px 16px; }
  .code { gap: 5px; }
  .code input { height: 58px; font-size: 26px; border-radius: 8px; }
  .cb::after { bottom: 12px; }
  .code .dash { width: 8px; }
  .pcwin { min-height: 380px; }
  .pc-body { padding: 16px; }
  .pc-code .doto { font-size: 28px; }
  .devs { padding: 18px 16px; }
  .dev { gap: 12px; }
  .dev .chip { display: none; }
  .dev b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .banner { flex-wrap: wrap; }
  .banner .key { margin-left: 0; }
  .resend { flex-wrap: wrap; }
}

/* header: a quiet backdrop once the page scrolls */
.abar { transition: background var(--d-med), border-color var(--d-med); border-bottom: 1px solid transparent; }
.scrolled .abar { background: rgba(var(--bg-rgb), .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--hair); }
/* link: done key, PC start screen, mock row */
.key.pri.done[disabled] { opacity: 1; background: transparent; color: var(--live); border-color: rgba(var(--live-rgb), .45); }
.key.pri.done .dic { width: 13px; height: 13px; }
/* link #expired: the waiting key is a dark key with a dashed edge and full-strength --text-2 (about 9:1), never a faded bone key */
.key.pri.wait[disabled] { opacity: 1; background: var(--raise); color: var(--text-2); border: 1px dashed var(--mark); font-weight: 500; }
.key.pri.wait .spin i { opacity: .35; }
[data-motion="reduced"] .key.pri.wait .spin i { animation: none; opacity: .8; }
@media (prefers-reduced-motion: reduce) { .key.pri.wait .spin i { animation: none; opacity: .8; } }
.pc-go { width: 100%; height: 40px; margin-top: 2px !important; font-size: 13.5px; }
.pc-go:not([disabled]) { animation: pcgo 2.4s var(--ease) infinite; }
@keyframes pcgo { 0%, 60%, 100% { box-shadow: 0 0 0 0 rgba(242,239,233,0); } 30% { box-shadow: 0 0 0 5px rgba(242,239,233,.08); } }
.mockrow { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.mockrow .mockact { margin: 0; }

/* touch: 40 px targets on a phone or a touch screen. Inline text links get a taller hit box without moving the text. */
@media (max-width: 760px), (pointer: coarse) {
  .abar .brand { min-height: 40px; }
  .tabs a { height: 40px; }
  .fine a { display: inline-block; padding: 13px 4px; margin: -13px -2px; --dl-y: 11px; --dl-rest: 11px; }
  .resend a { display: inline-flex; align-items: center; min-height: 40px; --dl-y: 9px; --dl-rest: 9px; }
  .alt { display: inline-flex; align-items: center; min-height: 40px; margin-top: 8px; --dl-y: 9px; --dl-rest: 9px; }
  .mockact { height: 40px; }
}
