/* Timepass shell: "sticker sheet" look. Paper, ink outlines, hard offset shadows. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url(/fonts/archivo-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/rubik-latin.woff2) format('woff2');
}

:root {
  --ink: #121212;
  --paper: #f2ece0;
  --bg: var(--paper);
  --bg-2: #e9e1cf;
  --surface: #ffffff;
  --surface-2: #f7f2e7;
  --line: var(--ink);
  --text: var(--ink);
  --text-2: #3b3833;
  --text-3: #6d675c;
  --gold: #ffd23f;
  --gold-deep: #f2b705;
  --blue: #5d8bff;
  --red: #ff5d5d;
  --mint: #9ee0c6;
  --good: #2fbf71;
  --bad: #ff5d5d;
  --accent: #5d8bff;
  --edge: 2.5px solid var(--ink);
  --pop: 4px 4px 0 var(--ink);
  --pop-lg: 6px 6px 0 var(--ink);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: var(--pop);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Archivo', system-ui, sans-serif;
  --top-h: 64px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.07'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--paper); }
body {
  background: var(--grain), var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
svg { display: block; }

/* display type: wide, heavy, uppercase */
.display, .sheet-title, .result-score, .topbar .title, .brand-name {
  font-family: var(--display); font-stretch: 118%; font-weight: 900; letter-spacing: -.005em;
}

/* ---------- buttons: ink edge + offset shadow that you press into ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px;
  border: var(--edge); border-radius: 12px;
  font-weight: 900; font-stretch: 112%; font-size: 16px; text-transform: uppercase; letter-spacing: .01em;
  text-decoration: none; user-select: none;
  background: var(--surface); color: var(--ink);
  box-shadow: var(--pop);
  transition: transform .07s ease, box-shadow .07s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.accent { background: var(--accent); color: var(--ink); }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn:disabled { background: var(--bg-2); color: var(--text-3); box-shadow: 2px 2px 0 var(--ink); transform: none; cursor: default; }
.link-btn { background: none; border: 0; color: var(--text-2); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; padding: 10px; min-height: 44px; }
.icon-btn {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border: var(--edge); border-radius: 12px; background: var(--surface); color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink); text-decoration: none;
  transition: transform .07s, box-shadow .07s;
}
.icon-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- coin pill ---------- */
.coin-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 14px 0 5px; border-radius: 999px;
  background: var(--gold); border: var(--edge); box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900; font-stretch: 110%; font-variant-numeric: tabular-nums;
}
.coin-icon { width: 30px; height: 30px; display: inline-block; }
.coin-icon svg { width: 100%; height: 100%; }
.coin-icon.sm { width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; }
.coin-pill.bump-up { animation: thunk .32s cubic-bezier(.2,.8,.3,1.6); }
.coin-pill.bump-down { animation: wobble .36s ease; }
@keyframes thunk { 0% { transform: translate(0,0); } 35% { transform: translate(2px, 2px) rotate(-3deg); box-shadow: 1px 1px 0 var(--ink); } 100% { transform: none; } }
@keyframes wobble { 25% { transform: rotate(-5deg); } 60% { transform: rotate(4deg); } }
@keyframes shake { 25% { transform: translateX(-5px) rotate(-1deg); } 75% { transform: translateX(5px) rotate(1deg); } }

/* ---------- game page top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  background: var(--grain), var(--paper);
  border-bottom: var(--edge);
}
.topbar .title { font-size: 20px; text-transform: uppercase; white-space: nowrap; }
.hud { flex: 1; display: flex; justify-content: center; gap: 8px; min-width: 0; }
.hud-item { display: flex; flex-direction: column; align-items: center; line-height: 1.05; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--surface); }
.hud-label { font-size: 10px; font-weight: 800; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.hud-value { font-weight: 900; font-stretch: 112%; font-size: 18px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; height: auto; row-gap: 8px; padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 8px; }
  .topbar .title { flex: 1; }
  .hud { order: 5; flex-basis: 100%; }
}
.game-root {
  position: relative;
  height: calc(100dvh - var(--top-h) - env(safe-area-inset-top));
  min-height: min(420px, calc(100dvh - var(--top-h)));
  padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
@media (max-width: 560px) { .game-root { height: calc(100dvh - 124px - env(safe-area-inset-top)); padding-top: 10px; } }

/* ---------- sheets: a card dealt onto the table ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(18, 18, 18, 0.42);
  opacity: 0; transition: opacity .18s ease;
}
.scrim.in { opacity: 1; }
.sheet {
  position: relative;
  width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto;
  background: var(--grain), var(--surface);
  border: var(--edge); border-bottom: 0; border-radius: 18px 18px 0 0;
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(40px) rotate(-1.5deg); transform-origin: 50% 100%;
  transition: transform .26s cubic-bezier(.2,.9,.25,1.25);
}
.scrim.in .sheet { transform: none; }
@media (min-width: 640px) {
  .scrim { align-items: center; padding: 20px; }
  .sheet { border-bottom: var(--edge); border-radius: 18px; padding-bottom: 24px; box-shadow: 8px 8px 0 var(--ink); }
}
.sheet-body { display: flex; flex-direction: column; gap: 14px; }
.sheet-title { margin: 0; font-size: 22px; text-transform: uppercase; }
.sheet-title.big { font-size: 40px; line-height: .95; }
.sheet-text { margin: 0; color: var(--text-2); }
.start-head .genre { display: inline-block; padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--accent); font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.sheet .row { display: flex; gap: 12px; }
.sheet .row > * { flex: 1; }
.segmented { display: flex; gap: 8px; }
.segmented button { flex: 1; min-height: 46px; border: var(--edge); border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 900; font-stretch: 108%; font-size: 14px; text-transform: uppercase; box-shadow: 3px 3px 0 var(--ink); transition: transform .07s, box-shadow .07s; }
.segmented button[aria-checked="true"] { background: var(--accent); transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.best-line { margin: -2px 0 0; color: var(--text-3); font-weight: 700; font-size: 14px; text-align: center; }
.howto { border: 2px dashed var(--ink); border-radius: 12px; padding: 2px 14px; background: var(--surface-2); }
.howto summary { min-height: 44px; display: flex; align-items: center; font-weight: 900; text-transform: uppercase; font-size: 14px; cursor: pointer; }
.howto ol { margin: 0 0 12px; padding-left: 20px; color: var(--text-2); display: grid; gap: 6px; }
.challenge-banner { display: grid; gap: 2px; padding: 14px; border: var(--edge); border-radius: 12px; background: var(--gold); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-1deg); }
.challenge-banner span { color: var(--text-2); }
.result { text-align: center; }
.result-kicker { margin: 0; font-weight: 900; font-stretch: 118%; text-transform: uppercase; letter-spacing: .04em; font-size: 15px; }
.result-score { font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.badge-best { align-self: center; padding: 6px 14px; border: var(--edge); border-radius: 10px; background: var(--red); color: #fff; font-weight: 900; font-stretch: 118%; font-size: 15px; text-transform: uppercase; box-shadow: 3px 3px 0 var(--ink); animation: stamp .42s cubic-bezier(.2,.8,.3,1.5) .25s both; }
@keyframes stamp { 0% { transform: rotate(-24deg) scale(2.4); opacity: 0; } 60% { transform: rotate(7deg) scale(.9); opacity: 1; } 100% { transform: rotate(5deg) scale(1); opacity: 1; } }
.challenge-outcome { margin: 0; font-weight: 900; }
.earned { margin: 0; display: inline-flex; align-self: center; align-items: center; padding: 4px 12px 4px 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--gold); font-weight: 900; }
.share-box { display: grid; gap: 10px; padding: 14px; border: 2px dashed var(--ink); border-radius: 12px; background: var(--surface-2); text-align: left; }
.field { display: grid; gap: 6px; color: var(--text-2); font-weight: 700; font-size: 14px; }
.input { min-height: 48px; padding: 0 14px; border: var(--edge); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 600; }
.input:focus { outline: none; box-shadow: 3px 3px 0 var(--blue); }
.switch-row { display: flex; justify-content: space-between; align-items: center; min-height: 48px; font-weight: 800; }
.switch-row input { width: 46px; height: 26px; accent-color: var(--blue); }

/* ---------- toast: a little sticker ---------- */
.toast-host { position: fixed; left: 50%; top: calc(var(--top-h) + 10px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 60; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 9px 16px; border: var(--edge); border-radius: 10px; background: var(--gold); color: var(--ink); font-weight: 900; font-stretch: 108%; box-shadow: 3px 3px 0 var(--ink); opacity: 0; transform: translateY(-14px) rotate(-6deg) scale(.9); transition: transform .24s cubic-bezier(.2,.8,.3,1.5), opacity .14s; white-space: nowrap; }
.toast.in { opacity: 1; transform: rotate(-1.5deg); }
@media (max-width: 560px) { .toast-host { top: calc(130px + env(safe-area-inset-top)); } }
body.home .toast-host { top: calc(84px + env(safe-area-inset-top)); }

/* ---------- shared game controls ---------- */
.toolbar { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tool {
  display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 16px;
  border: var(--edge); border-radius: 12px; background: var(--surface); color: var(--ink);
  font-weight: 900; font-stretch: 108%; text-transform: uppercase; font-size: 15px;
  box-shadow: var(--pop); transition: transform .07s, box-shadow .07s;
}
.tool:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.tool .price { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px 1px 2px; border: 2px solid var(--ink); border-radius: 999px; background: var(--gold); font-size: 13px; }
.tool .price .coin-icon { width: 18px; height: 18px; }
.tool:disabled { background: var(--bg-2); color: var(--text-3); box-shadow: 2px 2px 0 var(--ink); }
.shake { animation: shake .3s ease; }

/* ---------- live play ---------- */
.live-box { display: grid; gap: 10px; padding: 14px; border: 2px dashed var(--ink); border-radius: 12px; background: var(--surface-2); }
.live-title { font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.live-wait { text-align: center; align-items: center; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: var(--edge); background: conic-gradient(var(--accent) 0 25%, var(--surface) 0 50%, var(--accent) 0 75%, var(--surface) 0); animation: spin 1.1s steps(8) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- sheet close + after-game bar ---------- */
.sheet-x { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; display: grid; place-items: center; border: var(--edge); border-radius: 10px; background: var(--surface); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); z-index: 1; }
.sheet-x:active { transform: translate(2px, 2px); box-shadow: none; }
.sheet-x svg { width: 18px; height: 18px; }
.after-bar { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%) rotate(-1deg); z-index: 40; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border: var(--edge); border-radius: 14px; background: var(--surface); box-shadow: var(--pop-lg); animation: barIn .3s cubic-bezier(.2,.8,.3,1.4); }
.after-label { font-weight: 900; text-transform: uppercase; font-size: 14px; margin-right: 4px; white-space: nowrap; }
.btn.sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
@keyframes barIn { from { transform: translate(-50%, 40px) rotate(-6deg); opacity: 0; } }

/* ---------- group lobby ---------- */
.lobby-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lobby-list li { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--surface); font-weight: 800; }
.lobby-list li.me { background: color-mix(in srgb, var(--accent) 25%, var(--surface)); }
.lobby-list .seat { width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 8px; display: grid; place-items: center; background: var(--gold); font-weight: 900; font-size: 13px; }
.lobby-list .chip { margin-left: auto; font-size: 11px; font-weight: 900; text-transform: uppercase; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--mint); }
.waiting-host { text-align: center; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .06s !important; }
}
@media (max-width: 420px) {
  .tool { padding: 0 10px; gap: 6px; font-size: 13px; font-stretch: 100%; }
  .tool .price { font-size: 12px; padding-right: 5px; }
}

/* ---------- game page layout: the play area takes exactly what the top bar leaves ---------- */
body:not(.home) { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body:not(.home) > .game-root { flex: 1 1 auto; height: auto; min-height: 0; }
@media (max-width: 560px) {
  .topbar { column-gap: 8px; }
  .topbar .icon-btn { width: 40px; height: 40px; }
  .topbar .title { font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .topbar .coin-pill { height: 40px; padding-right: 10px; }
  .topbar .coin-icon { width: 26px; height: 26px; }
  .hud-item { padding: 3px 8px; }
  .hud-value { font-size: 16px; }
}
.tool:disabled .price { background: var(--bg-2); color: var(--text-3); border-color: var(--text-3); }

/* ---------- accounts: profile button, sign in, profile, friends ---------- */
.profile-btn.signed-in { background: var(--av, var(--gold)); }
.profile-initial { font-weight: 900; font-stretch: 120%; font-size: 19px; line-height: 1; transform: rotate(-4deg); }
.avatar {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border: var(--edge); border-radius: 11px; background: var(--av, var(--gold)); color: var(--ink);
  font-weight: 900; font-stretch: 120%; font-size: 18px; line-height: 1;
  box-shadow: 2px 2px 0 var(--ink); transform: rotate(var(--tilt, -3deg));
}
.avatar.sm { width: 28px; height: 28px; border-width: 2px; border-radius: 8px; font-size: 13px; box-shadow: 1.5px 1.5px 0 var(--ink); }
.avatar.lg { width: 72px; height: 72px; border-radius: 18px; font-size: 38px; box-shadow: var(--pop); animation: slap .42s cubic-bezier(.2,.8,.3,1.5) both; }
@keyframes slap { 0% { transform: rotate(-28deg) scale(1.5); opacity: 0; } 60% { transform: rotate(6deg) scale(.94); opacity: 1; } 100% { transform: rotate(var(--tilt, -3deg)); } }

.acct { gap: 16px; }
.acct .sheet-title.big { font-size: 34px; line-height: .98; padding-right: 48px; }
.acct-kicker { align-self: flex-start; padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--mint); font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; transform: rotate(-2deg); margin-bottom: -4px; }
.perk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.perk-list li { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-2); }
.perk-list li::before { content: ''; flex: none; width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 7px; background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23121212' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; transform: rotate(-4deg); }
.perk-list li:nth-child(2)::before { background-color: var(--mint); transform: rotate(3deg); }
.perk-list li:nth-child(3)::before { background-color: #ff8f6b; }
.acct-form { display: grid; gap: 12px; }
.acct-fine { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-3); }
.acct-fine a, .acct-fine .link-btn { color: var(--text-2); font-weight: 800; }
.acct-fine.center { text-align: center; display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; }
.acct-fine .link-btn { padding: 4px; min-height: 0; font-size: 13px; }
.link-btn.danger { color: #c22f2f; }
.acct-error { margin: -4px 0 0; min-height: 0; font-weight: 800; color: #c22f2f; font-size: 14px; }
.acct-error:empty { display: none; }
.acct-note { margin: -4px 0 0; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--mint); font-weight: 800; font-size: 14px; transform: rotate(-.6deg); }
.acct-note:empty { display: none; }
.acct-links { display: flex; justify-content: space-between; flex-wrap: wrap; margin-top: -6px; }
.acct-links .link-btn { padding: 8px 2px; font-size: 14px; }
.acct-links .link-btn:disabled { text-decoration: none; color: var(--text-3); cursor: default; }

/* 6 printed boxes; one real input on top handles typing, paste and autofill */
.otp { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-cell { height: 60px; display: grid; place-items: center; border: var(--edge); border-radius: 12px; background: var(--surface); box-shadow: 3px 3px 0 var(--ink); font-weight: 900; font-stretch: 115%; font-size: 28px; font-variant-numeric: tabular-nums; transition: transform .1s, box-shadow .1s, background .1s; }
.otp-cell.on { background: var(--gold); transform: translate(2px, 2px) rotate(-2deg); box-shadow: 1px 1px 0 var(--ink); }
.otp-cell.on:nth-child(even) { transform: translate(2px, 2px) rotate(2deg); }
.otp-cell.caret { box-shadow: 3px 3px 0 var(--blue); border-color: var(--blue); }
.otp-cell.caret::after { content: ''; width: 3px; height: 28px; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.otp-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; letter-spacing: 2em; caret-color: transparent; color: transparent; background: transparent; }
.otp.busy .otp-cell { background: var(--mint); }
@media (max-width: 360px) { .otp { gap: 6px; } .otp-cell { height: 52px; font-size: 24px; } }

.profile-head { display: flex; align-items: center; gap: 16px; padding-right: 44px; }
.profile-id { display: grid; gap: 2px; min-width: 0; }
.profile-id .sheet-title { font-size: 28px; overflow-wrap: anywhere; line-height: 1; }
.masked { color: var(--text-3); font-weight: 700; font-size: 14px; }
.code-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 14px 14px 14px 16px; border: var(--edge); border-radius: 14px; background: var(--gold); box-shadow: var(--pop); transform: rotate(-.8deg); }
.code-label { grid-column: 1; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.code-value { grid-column: 1; white-space: nowrap; font-size: clamp(21px, 6.6vw, 30px); font-weight: 900; font-stretch: 125%; letter-spacing: .04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.code-card .copy-btn { grid-column: 2; grid-row: 1 / span 2; background: var(--surface); }
.btn-icon { width: 18px; height: 18px; display: inline-block; }
.btn-icon svg { width: 100%; height: 100%; }
.inline { display: flex; gap: 10px; }
.inline .input { flex: 1; min-width: 0; }
.inline .btn { flex: none; min-height: 48px; }
.count-badge { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--red); color: #fff; font-size: 13px; transform: rotate(6deg); }

.add-friend .btn { padding: 0 22px; }
.mycode { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 2px dashed var(--ink); border-radius: 10px; background: var(--surface-2); font-weight: 800; font-size: 14px; color: var(--text-2); }
.mycode strong { color: var(--ink); font-stretch: 120%; letter-spacing: .03em; }
.mycode .link-btn { margin-left: auto; padding: 4px 8px; min-height: 32px; font-size: 14px; }
.friend-lists { display: grid; gap: 16px; min-height: 60px; }
.friend-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.friend-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.friend-h::after { content: ''; flex: 1; border-top: 2px dashed var(--ink); }
.friend-h .n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); font-size: 12px; }
.friend-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border: var(--edge); border-radius: 12px; background: var(--surface); box-shadow: 3px 3px 0 var(--ink); }
.friend-main { display: grid; gap: 3px; min-width: 0; flex: 1; }
.friend-main strong { font-weight: 900; font-stretch: 110%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-sub { color: var(--text-3); font-weight: 700; font-size: 13px; }
.friend-actions { display: flex; gap: 8px; flex: none; }
.friend-actions .btn.sm { min-height: 40px; padding: 0 12px; font-size: 13px; box-shadow: 3px 3px 0 var(--ink); }
.best-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.best-chip { padding: 1px 7px; border: 2px solid var(--ink); border-radius: 999px; background: var(--c); font-size: 12px; font-weight: 900; white-space: nowrap; }
.mini-x { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 9px; background: var(--surface); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.mini-x:active { transform: translate(2px, 2px); box-shadow: none; }
.mini-x svg { width: 16px; height: 16px; }
.empty-note { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 20px 14px; border: 2px dashed var(--ink); border-radius: 12px; background: var(--surface-2); }
.empty-note strong { font-weight: 900; text-transform: uppercase; font-stretch: 115%; }
.empty-note span { color: var(--text-2); font-weight: 600; font-size: 14px; }
.spinner.small { width: 30px; height: 30px; justify-self: center; background: conic-gradient(var(--blue) 0 25%, var(--surface) 0 50%, var(--blue) 0 75%, var(--surface) 0); }

/* result sheet: send straight to a friend */
.send-friends { display: grid; gap: 8px; padding-top: 10px; border-top: 2px dashed var(--ink); }
.send-title { font-weight: 800; font-size: 14px; color: var(--text-2); }
.send-list { display: flex; flex-wrap: wrap; gap: 8px; }
.send-list .link-btn { padding: 4px 0; min-height: 0; font-size: 14px; text-align: left; }
.send-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 7px; border: var(--edge); border-radius: 12px; background: var(--surface); font-weight: 900; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); transition: transform .07s, box-shadow .07s; }
.send-chip:active { transform: translate(3px, 3px); box-shadow: none; }
.send-chip.sent { background: var(--mint); transform: translate(3px, 3px) rotate(-2deg); box-shadow: none; }
.send-chip:disabled { cursor: default; color: var(--ink); }
