/* =====================================================================
   The Office — legacy.css: the v1 rules for screens this redesign didn't touch
   (Uno, notes and letters, the character creator internals, the radio, gifts,
   frames, whiteboard, team list, phone sign-in with QR, code boxes, sliders).
   Extracted unchanged from v1 style.css. Load AFTER tokens.css and BEFORE
   components.css, so v2 components win wherever they overlap.
   v1 custom properties used here are mapped to v2 tokens at the top.
   The second half holds the v1 rules the app still needs that the handoff
   left out (bubbles over heads, Habib's and Yazan's panels, dialog content,
   message actions, the joystick…), restated in v2 tokens.
   ===================================================================== */
:root {
  --ink-soft: var(--ink-muted);
  --paper: var(--surface);
  --paper-2: var(--surface-2);
  --paper-3: var(--surface-3);
  --peach: var(--primary);
  --peach-2: var(--accent-ink);
  --rose: var(--rose-ink);
  --line: var(--edge);
  --shadow: var(--sh-1);
  --radius: var(--r-sm);
  --gold: var(--selected);
  --bg-2: var(--bg-raised);
  --red: var(--danger);
}

.decor-selected { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border-radius: 8px; background: var(--paper-2); }
.decor-selected strong { flex-basis: 100%; font-size: 15px; }
.decor-selected .nudge { display: flex; gap: 4px; }
.decor-selected .nudge .btn { min-width: 40px; padding: 4px; }
.decor-selected .btn .px-icon { width: 14px; height: 14px; }
.decor-selected .turn { display: flex; align-items: center; gap: 6px; }
.decor-selected .way { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 2px 8px; border: 2px solid var(--paper-3); border-radius: 6px; background: #fffdf8; font-size: 13px; font-weight: 700; white-space: nowrap; }
.decor-selected .way .px-icon { width: 13px; height: 13px; color: var(--peach-2); }
.decor-selected .btn.rotate:disabled { opacity: 0.45; cursor: default; }
.decor-selected .held { display: flex; gap: 4px; }
.tray-group h4 { margin: 0 0 4px; font-size: 13px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.link-box {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.link-box input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 14px !important;
  font-family: ui-monospace, Menlo, monospace !important;
}
.fine { font-size: 13px !important; color: var(--ink-soft); }
.note-box { padding: 8px 12px; border-radius: 8px; background: var(--paper-2); color: var(--ink) !important; font-weight: 700; }
.radio-recs { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.radio-rec { padding: 8px; border-radius: 10px; background: var(--paper-2); }
.radio-head { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.radio-head .fine { flex: 1; min-width: 0; }
.radio-tracks { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.radio-tracks li { display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: 4px; }
.radio-tracks .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.join-team { text-align: left; border-top: none; margin-top: 8px; padding: 12px; border-radius: 10px; background: var(--paper-2); }
.join-team .link-box input.code-input { font-size: 18px !important; letter-spacing: 0.12em; text-transform: uppercase; }
.code-problem, .login-problem { margin: 6px 0 0; color: var(--red, #c24f55) !important; font-weight: 700; }
.or-new { margin: 16px 0 0; font-size: 16px; text-align: left; }
.login-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.login-form .row { justify-content: flex-start; }
.login-form .field-row .btn { flex: none; }
.login-form .field-row .input { flex: 1; min-width: 0; }
.join-team > h3 { margin: 0 0 8px; font-size: 16px; }
.username-show { margin: 0; font-size: 1.1rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.slider { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: center; margin: 8px 0; font-weight: 700; }
.slider input { accent-color: var(--peach-2); width: 100%; }
.card .slider { display: grid; }
.slider.light { grid-template-columns: 110px 1fr; margin: 4px 0 0; }
.slider .light-name { font-weight: 800; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; font-weight: 700; }
.desk-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.desk-style { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 2px solid var(--paper-3); border-radius: 8px; background: #fffdf8; color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; }
.desk-style.on { border-color: var(--peach-2); background: #fff1e6; }
.desk-style canvas { width: 72px; height: auto; image-rendering: pixelated; }
.desk-style img { max-width: 72px; max-height: 64px; width: auto; height: auto; image-rendering: pixelated; }
.desk-styles.colors .desk-style img { min-height: 36px; object-fit: contain; }
.gift-pic { display: block; margin: 4px auto 8px; width: 96px; height: auto; image-rendering: pixelated; }
textarea.paper-input.small { min-height: 70px; }
.frame-arts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.frame-arts canvas { width: 48px; }
.wall-photo { display: block; max-width: 100%; max-height: 60vh; margin: 8px auto; border: var(--line); border-radius: 6px; image-rendering: auto; }
.card.uno-modal { width: min(560px, 100%); }
.uno-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-right: 40px; }
.uno-score { margin: 0 !important; font-weight: 800; color: var(--ink) !important; }
/* the table: everyone sits round it in play order, you at the bottom */
.uno-table { position: relative; width: 100%; aspect-ratio: 5 / 4; min-height: 270px; max-height: 440px; margin: 6px 0 2px; border-radius: 28px; background: radial-gradient(ellipse at 50% 50%, #fff6dd 0, #fdebc2 62%, #f8dfa6 100%); box-shadow: inset 0 0 0 2px rgba(59, 40, 48, 0.12); }
.uno-ring { position: absolute; inset: 9% 8%; pointer-events: none; }
.uno-ring svg { width: 100%; height: 100%; overflow: visible; }
.uno-ring ellipse { fill: none; stroke: rgba(59, 40, 48, 0.28); stroke-width: 3; stroke-dasharray: 2 14; stroke-linecap: round; animation: uno-flow 6s linear infinite; }
.uno-table.ccw .uno-ring ellipse { animation-direction: reverse; }
@keyframes uno-flow { to { stroke-dashoffset: -64; } }
.uno-table.mine .uno-ring ellipse { stroke: rgba(224, 138, 76, 0.7); }
.uno-dir { position: absolute; right: 10px; top: 6px; font-size: 22px; font-weight: 800; color: var(--ink-soft); line-height: 1; }
.uno-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 10px; width: 118px; }
.uno-center .uno-color { margin-top: 2px; white-space: nowrap; }
.uno-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.uno-fan { display: flex; justify-content: center; height: 48px; padding-inline-end: 0; }
.uno-fan .uno-card { margin-inline-start: -20px; transform: translateY(var(--y, 0)) rotate(var(--r, 0deg)); transform-origin: 50% 120%; }
.uno-fan .uno-card:first-child { margin-inline-start: 0; }
.uno-name { display: flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border-radius: 999px; background: #fff; border: var(--line); font-weight: 800; font-size: 12px; color: var(--ink); max-width: 132px; box-shadow: 0 2px 0 rgba(20, 12, 18, 0.3); }
.uno-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uno-count { min-width: 20px; height: 20px; border-radius: 999px; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.uno-said { color: #c55357; margin-inline: 2px 4px; }
.uno-seat.turn .uno-name { background: #ffe08a; animation: uno-pulse 1.4s ease-in-out infinite; }
.uno-seat.turn .uno-fan { filter: drop-shadow(0 0 6px rgba(240, 191, 76, 0.95)); }
@keyframes uno-pulse { 50% { transform: translateY(-3px); } }
.uno-handwrap { container-type: inline-size; }
.uno-hand { display: flex; justify-content: center; align-items: flex-end; padding: 24px 12px 26px; margin: 2px 0; --step: 6px; }
.uno-hand .uno-card { flex: none; margin-inline-start: clamp(-46px, calc((100cqw - 76px) / var(--span) - 52px), 6px); transform: translateY(var(--y, 0)) rotate(var(--r, 0deg)); transform-origin: 50% 130%; transition: transform 0.14s ease; cursor: pointer; }
.uno-hand .uno-card:first-child { margin-inline-start: 0; }
.uno-hand.mine .uno-card:disabled { filter: saturate(0.6) brightness(0.92); cursor: default; }
.uno-hand .uno-card.ok { transform: translateY(calc(var(--y, 0px) - 14px)) rotate(var(--r, 0deg)); box-shadow: 0 3px 0 rgba(20, 12, 18, 0.45), 0 0 0 3px #ffe08a; }
.uno-hand .uno-card.ok:hover, .uno-hand .uno-card.ok:focus-visible { transform: translateY(calc(var(--y, 0px) - 26px)) rotate(0deg) scale(1.08); z-index: 99 !important; }
.uno-table.n2 { aspect-ratio: 9 / 5; min-height: 250px; }
@media (max-width: 480px) { .uno-table { aspect-ratio: 1 / 1.12; } .uno-table.n2 { aspect-ratio: 1 / 0.8; min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .uno-ring ellipse, .uno-seat.turn .uno-name { animation: none; } .uno-hand .uno-card { transition: none; } }
.uno-rules { margin: 4px 0 8px; padding-left: 18px; }
.uno-card {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 76px; flex: none; border: var(--line); border-radius: 8px;
  background: #fff6e8; color: #fff; font-weight: 900; font-size: 22px; line-height: 1;
  box-shadow: 0 3px 0 rgba(20, 12, 18, 0.45); padding: 0; font-family: inherit;
}
.uno-card .mid { display: flex; align-items: center; justify-content: center; width: 38px; height: 54px; border-radius: 50% / 40%; background: rgba(255, 255, 255, 0.92); transform: rotate(-12deg); }
.uno-card .mid { color: var(--ink); }
.uno-card .corner { position: absolute; top: 3px; left: 5px; font-size: 12px; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,0.35); }
.uno-card.c-r { background: #e36f73; }
.uno-card.c-r .mid { color: #c55357; }
.uno-card.c-y { background: #f0bf4c; }
.uno-card.c-y .mid { color: #b98a1f; }
.uno-card.c-g { background: #74b27a; }
.uno-card.c-g .mid { color: #4f8a55; }
.uno-card.c-b { background: #6f95c0; }
.uno-card.c-b .mid { color: #4f74a0; }
.uno-card.c-w, .uno-card.wild { background: conic-gradient(#e36f73 0 25%, #f0bf4c 0 50%, #74b27a 0 75%, #6f95c0 0); }
.uno-card.c-w .mid, .uno-card.wild .mid { color: var(--ink); }
.uno-card.back { background: #3b2830; background-image: repeating-linear-gradient(45deg, rgba(255, 246, 232, 0.08) 0 4px, transparent 4px 8px); color: #f07f95; font-size: 22px; }
.uno-card.back.small { font-size: 13px; }
.uno-card.small { width: 30px; height: 44px; font-size: 9px; border-radius: 6px; }
.uno-card.deck { cursor: pointer; }
.uno-card.deck:disabled { opacity: 0.7; cursor: default; }
.uno-color { padding: 4px 10px; border-radius: 999px; border: var(--line); font-weight: 800; font-size: 13px; color: #fff; text-transform: capitalize; }
.uno-color.c-r { background: #e36f73; }
.uno-color.c-y { background: #f0bf4c; color: var(--ink); }
.uno-color.c-g { background: #74b27a; }
.uno-color.c-b { background: #6f95c0; }
.uno-status { text-align: center; font-weight: 800; margin: 6px 0 2px !important; color: var(--ink-soft) !important; }
.uno-status.mine { color: var(--peach-2) !important; }
.uno-last { text-align: center; margin: 0 0 6px !important; }
.uno-pick { display: flex; align-items: center; gap: 8px; justify-content: center; font-weight: 800; margin: 6px 0; }
.uno-swatch { width: 36px; height: 36px; border: var(--line); border-radius: 50%; cursor: pointer; }
.uno-swatch.c-r { background: #e36f73; }
.uno-swatch.c-y { background: #f0bf4c; }
.uno-swatch.c-g { background: #74b27a; }
.uno-swatch.c-b { background: #6f95c0; }
.paper {
  position: relative;
  padding: 18px 18px 14px;
  border: var(--line);
  border-radius: 4px;
  background: #fff4c9;
  background-image: repeating-linear-gradient(transparent 0 25px, rgba(59, 40, 48, 0.12) 25px 26px);
  color: var(--ink);
  font-size: 17px;
  line-height: 26px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 3px 0 rgba(20, 12, 18, 0.35);
  transform: rotate(-0.6deg);
}
.paper.p1 { background-color: #ffd8e1; }
.paper.p2 { background-color: #d7ecff; }
.paper.p3 { background-color: #dff2d3; }
.paper .from { display: block; margin-top: 8px; text-align: right; font-weight: 800; color: var(--ink-soft); font-size: 14px; }
.paper .magnet { position: absolute; top: -8px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--rose); border: var(--line); }
.note-list { display: flex; flex-direction: column; gap: 14px; margin: 12px 0; }
.note-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.papers { display: flex; gap: 8px; }
.papers button { width: 36px; height: 36px; border: var(--line); border-radius: 6px; cursor: pointer; }
.papers button.on { outline: 3px solid var(--peach-2); outline-offset: 2px; }
.paper.letter {
  background: #fffaf2;
  background-image: none;
  border-radius: 6px;
  padding: 22px 20px 14px;
  font-style: italic;
  transform: rotate(0.4deg);
}
.paper.letter .seal {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  background: var(--rose);
  border: var(--line);
}
.paper.letter .seal::after { content: '\2665'; position: absolute; inset: 0; color: #fff; font-size: 12px; line-height: 17px; text-align: center; font-style: normal; }
textarea.letter-input { background: #fffaf2 !important; background-image: none !important; font-style: italic; }
textarea.paper-input { background: #fff4c9; background-image: repeating-linear-gradient(transparent 0 25px, rgba(59, 40, 48, 0.12) 25px 26px); line-height: 26px; font-size: 17px; }
.screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(24px + var(--safe-t)) 16px calc(24px + var(--safe-b));
  background: var(--bg);
  background-image: radial-gradient(ellipse at 50% 20%, #3d4556 0%, var(--bg) 65%);
}
.screen .card { margin: auto 0; width: min(520px, 100%); }
.screen .stack .card { margin: 0; }
.hero { text-align: center; }
.hero canvas { width: min(100%, 360px); image-rendering: pixelated; margin: 4px auto 8px; display: block; border-radius: 8px; }
.hero h1 { margin: 6px 0 2px; font-size: 30px; letter-spacing: 0.5px; }
/* the wordmark: one height for every screen, with clear space round it (a pixel logo stays crisp) */
.hero h1.brand { margin: var(--s-2) 0 var(--s-3); font-size: 0; line-height: 0; }
.brand-logo { display: block; height: 84px; width: auto; max-width: 100%; margin-inline: auto; }
.hero .tag-line { margin: 0 0 14px; color: var(--ink-soft); font-size: 17px; }
.steps { text-align: left; margin: 12px 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.steps .px-icon { color: var(--peach-2); margin-top: 3px; }
.opt { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 8px; }
.opt > span { font-weight: 800; font-size: 15px; }
.noscript { color: var(--paper); text-align: center; margin-top: 40vh; }
.stack { display: grid; gap: 14px; width: min(520px, 100%); margin: auto 0; }
.with-icon { display: flex; align-items: center; gap: 6px; }
.with-icon .px-icon { color: #c89a2a; }
.uno-lobby { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 6px 0; }
.uno-tables { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.uno-trow { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 8px 10px; border: var(--line); border-radius: 14px; background: #fff; }
.uno-tinfo { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.uno-tstate { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.uno-tstate.on { color: #4f8a55; }
.uno-tnames { display: flex; flex-wrap: wrap; gap: 4px; }

/* the time clock: the dock's button while it runs, and its panel */
.clock-btn.running .px { color: var(--success-soft); }
.clock-btn .clock-time { font-variant-numeric: tabular-nums; }
.clock-btn.running .label { display: none; }
.clock-btn.running .clock-time { margin-inline-start: 2px; }
.clock-me { display: grid; justify-items: center; gap: 6px; margin: 6px 0 12px; padding: 14px 12px; border: var(--line); border-radius: 18px; background: #fff; text-align: center; }
.clock-me.running { background: var(--success-soft); }
.clock-me p { margin: 0; }
.clock-big { font-size: 40px; font-weight: 800; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.clock-off { font-size: 28px; color: var(--ink-muted); }
.clock-sessions, .clock-team { list-style: none; display: grid; gap: 6px; margin: 4px 0 12px; padding: 0; }
.clock-sessions li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 6px 10px; border: var(--line); border-radius: 12px; background: #fff; font-size: var(--fs-small); }
.clock-len { font-weight: 800; font-variant-numeric: tabular-nums; }
.clock-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: var(--line); border-radius: 14px; background: #fff; }
.clock-person.running { background: var(--success-soft); }
.clock-who { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.25; }
.clock-who span { font-variant-numeric: tabular-nums; }
.clock-sum { text-align: end; white-space: nowrap; margin: 0; }
/* the arcade's scores */
.scores { list-style: none; display: grid; gap: 6px; margin: 4px 0 12px; padding: 0; }
.scores-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: var(--line); border-radius: 14px; background: #fff; }
.scores-row.me { background: var(--success-soft); }
.scores-rank { width: 2.2em; flex: none; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.scores-rank svg { width: 18px; height: 18px; color: #c9953a; vertical-align: middle; }
.scores-who { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.25; }
.scores-best { font-weight: 800; font-size: 1.1em; font-variant-numeric: tabular-nums; }
.meeting-now { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 10px; border-radius: 10px; background: #fff1e6; font-weight: 800; }
.kmeta select { min-height: 28px; padding: 1px 4px; font-size: 12px; max-width: 100%; }
.kacts { display: flex; gap: 4px; margin-top: 6px; justify-content: flex-end; }
.cal-fields { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.cal-form textarea.small-area, textarea.minutes { min-height: 80px; }
textarea.minutes { min-height: 200px; font-size: 15px; }
.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 8px; border-radius: 10px; background: var(--paper-2); }
.team-row canvas { image-rendering: pixelated; border-radius: 50%; background: #fff; }
.team-info { display: flex; flex-direction: column; min-width: 0; }
.team-info strong { display: flex; align-items: center; gap: 4px; }
.team-info .px-icon { width: 14px; height: 14px; color: #c89a2a; }
.team-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.team-acts .link-box { flex-basis: 100%; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.pick { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 2px solid var(--paper-3); border-radius: 8px; background: #fffdf8; color: var(--ink); font-weight: 700; cursor: pointer; text-align: left; flex-wrap: wrap; }
.pick canvas { image-rendering: pixelated; border-radius: 50%; }
.pick.on { border-color: var(--peach-2); }
.wb-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.wb-swatch { width: 30px; height: 30px; border: var(--line); border-radius: 50%; cursor: pointer; }
.wb-swatch.on { outline: 3px solid var(--peach-2); outline-offset: 2px; }
.wb-eraser.on { outline: 3px solid var(--peach-2); outline-offset: 2px; }
.wb-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 560; border: var(--line); border-radius: 8px; background: #fbfaf6; touch-action: none; cursor: crosshair; }
.wb-canvas.typing { cursor: text; }
.wb-stage { position: relative; container-type: inline-size; }
.wb-text { position: absolute; box-sizing: border-box; margin: 0; padding: 0 2px; border: 0; outline: 2px dashed var(--peach-2); background: transparent; font-family: Rubik, system-ui, sans-serif; line-height: 1.1; }
.share-big { display: block; width: 100%; max-height: 70vh; background: #000; border-radius: 8px; }
/* someone's shared screen, opened by a viewer: as large as their whole screen */
.modal:has(.card.screen-full) { padding: 0; background: #000; }
.app.phone ~ .modal .card.screen-full, .card.screen-full {
  width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; padding: 0; background: #000; color: #fff;
}
.card.screen-full .dialog-head { position: absolute; inset: 0 0 auto 0; z-index: 1; padding: var(--s-2) var(--s-3); background: linear-gradient(#000a, #0000); opacity: 0; transition: opacity var(--dur-fast); }
.card.screen-full:hover .dialog-head, .card.screen-full:focus-within .dialog-head, .app.phone ~ .modal .card.screen-full .dialog-head { opacity: 1; }
.card.screen-full .dialog-head h2, .card.screen-full .dialog-head .close { color: #fff; }
.card.screen-full .dialog-body { padding: 0; overflow: hidden; display: flex; }
.card.screen-full .share-big { width: 100%; height: 100%; max-height: none; object-fit: contain; border-radius: 0; }

.paper.hidden-note { font-style: italic; color: var(--ink-soft); }
.desk-styles { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.kcard input.kedit { width: 100%; min-height: 32px !important; margin-bottom: 6px; padding: 4px 6px !important; font-weight: 700; font-size: 14px; }
.card:has(.phone-signin) { width: min(600px, 100%); }
.phone-ways { display: flex; align-items: stretch; gap: 14px; margin: 6px 0 8px; }
.phone-way { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--paper-2); }
.phone-way h3 { margin: 0; }
.phone-way .fine { margin: 0; }
.phone-or { align-self: center; font-weight: 800; color: var(--ink-soft); }
canvas.qr { width: 180px; height: 180px; image-rendering: pixelated; border-radius: 8px; border: 2px solid var(--paper-3); background: #fff; }
.signin-code { white-space: nowrap; font: 800 28px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 2px; padding: 10px 14px; border-radius: 10px; background: #fffdf8; border: 2px dashed var(--peach-2); color: var(--ink); margin: auto 0; }
.phone-left { text-align: center; }
.phone-done { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0; text-align: center; font-weight: 700; }
.phone-done .px-icon { font-size: 34px; color: #4f9a5f; }

@media (max-width: 420px) {
  .opt { grid-template-columns: 1fr; gap: 4px; }
  .person { padding-right: 10px; }
  .person .name { max-width: 7em; }
}
@media (max-width: 560px) {
  .phone-ways { flex-direction: column; }
  .phone-or { align-self: center; }
}

/* =====================================================================
   v1 rules the app still needs, restated in v2 tokens. They come before
   components.css, so where a v2 component styles the same element, v2 wins.
   ===================================================================== */

/* ------------------------------------------------------------ dialog content */
/* a card that is not built from dialog-head/body/foot (the character maker,
   the front page, Uno) keeps its own padding and scrolls as one */
.card h2 { margin: 0 0 6px; font-size: var(--fs-h2); line-height: var(--lh-snug); }
.card p { margin: 6px 0 12px; color: var(--ink-muted); }
.card h3 { margin: 0 0 var(--s-1); font-size: var(--fs-body); font-weight: var(--fw-bold); line-height: var(--lh-snug); }
.card h4 { margin: var(--s-3) 0 var(--s-1); font-size: var(--fs-small); font-weight: var(--fw-bold); color: var(--ink-muted); }
.card label:where(:not(.switch)) { display: block; margin: 10px 0 var(--s-1); font-size: var(--fs-small); font-weight: var(--fw-bold); }
.card input[type="text"], .card input[type="url"], .card input[type="password"], .card textarea,
.card select, .card input[type="date"], .card input[type="time"] {
  min-height: var(--tap); padding: 10px var(--s-3);
  border: var(--edge); border-radius: var(--r-sm);
  background: var(--surface-input); color: var(--ink);
  font: inherit; font-size: var(--fs-body); line-height: var(--lh-snug);
}
.card input[type="text"], .card input[type="url"], .card input[type="password"], .card textarea { width: 100%; }
.card select, .card input[type="date"], .card input[type="time"] { padding: 6px var(--s-2); }
.card input::placeholder, .card textarea::placeholder { color: var(--ink-placeholder); opacity: 1; }
.card textarea { min-height: 130px; resize: vertical; line-height: var(--lh-body); }
.card .row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.card .row .btn { flex: 1; }
.card .row.center { justify-content: center; }
.card .row.center .btn { flex: 0 1 auto; }
.section > h3 { font-size: var(--fs-label); }
.choice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-row .btn { flex: 1; min-width: 90px; }
.choice-row.two { display: grid; grid-template-columns: 1fr 1fr; }
.choice-row.two .btn { min-width: 0; }
.btn.armed { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.live-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 2px rgba(224, 82, 94, 0.3); animation: rec 1.4s infinite; }
.hero h2 { margin: 6px 0; }

/* ------------------------------------------------------------ the room tabs */
.room-tab .live-dot { width: 8px; height: 8px; }
@media (max-width: 1359px) { .room-more { display: none; } }
:lang(ar) .room-more { display: none; } /* ("Break room" is said whole in Arabic) */

/* ------------------------------------------------------------ over the room: names and words */
.tag { position: absolute; left: 0; top: 0; }
.tag .px { width: var(--icon-sm); height: var(--icon-sm); }
.tag.away { background: rgba(42, 32, 41, 0.6); color: #d8cbd2; }
.tag.me { background: rgba(58, 74, 96, 0.82); }
.tag.habib { color: #fbf8f2; box-shadow: 0 0 0 1px rgba(232, 196, 106, 0.55); }
.tag.habib .px { color: #e8c46a; }
.tag.yazan { color: #fbf8f2; box-shadow: 0 0 0 1px rgba(182, 209, 240, 0.6); }
.tag.yazan .px { color: #b6d1f0; }
.tag.yazan .ai { padding: 0 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); font-size: 10px; letter-spacing: 0.04em; }
.bubble {
  position: absolute;
  transform: translate(-50%, -100%);
  width: max-content; max-width: min(240px, 60vw);
  padding: 6px 10px;
  border: var(--edge); border-radius: var(--r-md);
  background: var(--surface-input); color: var(--ink);
  box-shadow: var(--sh-1);
  font-size: var(--fs-small); font-weight: var(--fw-semibold); line-height: var(--lh-snug);
  overflow-wrap: anywhere;
  animation: pop-in var(--dur-base) var(--ease-pop);
}
.bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -8px;
  width: 10px; height: 10px; margin-left: -5px;
  background: var(--surface-input);
  border-right: var(--edge); border-bottom: var(--edge);
  transform: rotate(45deg) scaleX(0.8);
}
.bubble.typing { padding: 2px 10px; font-size: 18px; letter-spacing: 2px; }
.bubble.fading { opacity: 0; transition: opacity 0.5s; }
@keyframes pop-in { from { transform: translate(-50%, -90%) scale(0.85); opacity: 0; } to { transform: translate(-50%, -100%) scale(1); opacity: 1; } }

/* ------------------------------------------------------------ Habib: the status card and the order panel */
.habib-status { max-width: calc(100% - 16px); animation: toast-in var(--dur-base) var(--ease-out); }
.habib-status .portrait { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--habib-soft); image-rendering: pixelated; }
.habib-status .hs-text { display: flex; flex-direction: column; min-width: 0; padding-inline-end: var(--s-1); }
.habib-status .hs-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.habib-status .btn { flex: none; }
.habib-panel { line-height: var(--lh-snug); animation: rise-in var(--dur-fast) var(--ease-out); }
.habib-panel.docked { left: var(--s-2); right: var(--s-2); bottom: var(--s-2); width: auto; }
.habib-panel .portrait, .yazan-panel .portrait { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--habib-soft); image-rendering: pixelated; }
.hp-q { margin: 0; font-size: var(--fs-small); font-weight: var(--fw-semibold); }
.hp-q strong { display: block; color: var(--habib); font-size: var(--fs-label); font-weight: var(--fw-bold); }
.hp-form { display: flex; flex-direction: column; padding: 0 var(--s-4) var(--s-4); }
.hp-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.habib-panel label { display: block; margin: var(--s-3) 0 var(--s-1); font-size: var(--fs-small); font-weight: var(--fw-bold); }
.habib-panel input, .yazan-panel textarea {
  width: 100%; min-height: var(--tap); padding: 10px var(--s-3);
  border: var(--edge); border-radius: var(--r-sm);
  background: var(--surface-input); color: var(--ink);
  font: inherit; font-size: var(--fs-body); line-height: var(--lh-snug);
}
.habib-panel input::placeholder, .yazan-panel textarea::placeholder { color: var(--ink-placeholder); opacity: 1; }
.habib-panel input[aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.hp-hint { margin: var(--s-1) 0 0; font-size: var(--fs-caption); color: var(--ink-muted); }
.hp-hint.error { color: var(--danger); font-weight: var(--fw-bold); }
.hp-actions { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-3); }
/* along the bottom of a small room (a phone): as compact as it gets */
.habib-panel.docked .hp-head { padding-block: var(--s-2) var(--s-1); }
.habib-panel.docked .portrait { width: 28px; height: 28px; }
.habib-panel.docked .hp-q strong { display: inline; font-size: inherit; }
.habib-panel.docked .hp-form { padding-bottom: var(--s-3); }
.habib-panel.docked label { margin-top: var(--s-2); }
.habib-panel.docked .hp-hint:not(.error) { display: none; }
.habib-panel.docked .hp-actions { margin-top: var(--s-2); }

/* ------------------------------------------------------------ Yazan: his panel (head, log, form and fine print are in components.css) */
.yazan-panel { line-height: var(--lh-snug); animation: rise-in var(--dur-fast) var(--ease-out); }
.yazan-panel.left { inset-inline: var(--s-2) auto; }
.yazan-panel .portrait { background: var(--yazan-soft); }
.yp-who { flex: 1; min-width: 0; }
.yp-ai { padding: 0 6px; border-radius: 4px; background: var(--yazan-soft); color: var(--yazan); font-size: 11px; font-weight: var(--fw-bold); letter-spacing: 0.04em; }
.yp-again, .yp-close { flex: none; }
.yp-close { min-width: 32px; padding: 0 6px; }
.yp-head, .yp-form, .yp-fine { flex: none; }
.yp-log { flex: 1 1 auto; min-height: 0; max-height: 320px; overscroll-behavior: contain; }
.yp-log p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.yp-a.miss { background: #f6ece4; color: #6b4a3a; }
.yp-a.thinking { color: var(--ink-muted); font-style: italic; }
.yp-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.yp-mic { flex: none; align-self: stretch; min-width: var(--tap); padding: 0 var(--s-2); }
.yp-mic.listening { background: #c0533a; border-color: #8f3a27; color: #fff; animation: yp-listen 1.2s ease-in-out infinite; }
@keyframes yp-listen { 50% { box-shadow: 0 0 0 4px rgba(192, 83, 58, 0.3); } }
.yp-mic.listening.metered { animation: none; box-shadow: 0 0 0 calc(1px + var(--lvl, 0) * 7px) rgba(192, 83, 58, 0.35); transition: box-shadow 0.08s linear; }
.yp-hint { flex: none; margin: 0; text-align: left; padding: 0 var(--s-2); font-size: var(--fs-caption); color: var(--ink-muted); }
.yp-hint[hidden] { display: none; }
.yp-speak { flex: none; }
.yp-speak .px { width: var(--icon-sm); height: var(--icon-sm); }
.yp-speak.on { background: var(--yazan-soft); color: var(--yazan); }
.yazan-panel textarea { flex: 1; min-width: 0; max-height: 120px; resize: none; }
.yp-offer p { padding: 0; border-radius: 0; background: none; }
.yp-offer .px { flex: none; width: var(--icon-sm); height: var(--icon-sm); }
.yp-offer-fine { font-size: var(--fs-caption); color: var(--ink-muted); }
.yp-offer.no { opacity: 0.75; }
.yp-offer-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 2px; }
.yp-offer-all { align-self: flex-start; }
/* what you left with him, folded to one line */
.yp-desk { flex: none; margin: 0 var(--s-4) var(--s-2); border: 1px solid var(--yazan-soft); border-radius: var(--r-md); background: #f6f9fd; font-size: var(--fs-small); }
.yp-desk summary { padding: 6px 10px; color: var(--yazan); cursor: pointer; }
.yp-desk summary span { font-weight: var(--fw-bold); }
.yp-desk-list { display: flex; flex-direction: column; gap: 6px; max-height: 150px; margin: 0; padding: 0 10px var(--s-2); overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.yp-desk-list li { display: flex; align-items: flex-start; gap: 6px; }
.yp-desk-list li > div { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.yp-desk-list .px { flex: none; width: var(--icon-sm); height: var(--icon-sm); margin-top: 4px; color: var(--yazan); }
.yp-desk-head { font-size: var(--fs-caption); color: var(--ink-muted); }
.yp-desk-text { overflow-wrap: anywhere; }
.yp-desk-list .btn { flex: none; }
/* tabs: the conversation, or what you have with him */
.yp-tabs { flex: none; display: flex; gap: var(--s-1); margin: 0 var(--s-4) var(--s-2); border-bottom: 2px solid var(--yazan-soft); }
.yp-tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 var(--s-3); margin-bottom: -2px;
  border: 0; border-bottom: 3px solid transparent; background: none; color: var(--ink-muted);
  font: inherit; font-size: var(--fs-small); font-weight: var(--fw-semibold);
}
.yp-tab.on, .yp-tab[aria-selected="true"] { color: var(--yazan); border-bottom-color: var(--yazan); font-weight: var(--fw-bold); }
.yp-badge { min-width: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--rose-ink); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.yp-work { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; min-height: 0; max-height: 360px; padding: var(--s-1) var(--s-4) var(--s-2); overflow-y: auto; overscroll-behavior: contain; font-size: var(--fs-small); }
.yp-sec { display: flex; flex-direction: column; gap: 6px; padding-bottom: var(--s-2); border-bottom: 1px dashed var(--yazan-soft); }
.yp-sec:last-child { border-bottom: 0; }
.yp-sec h3 { margin: 0 0 var(--s-1); font-size: var(--fs-small); color: var(--yazan); letter-spacing: 0.02em; }
.yp-sec-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.yp-empty, .yp-sec .yp-fine { margin: 0; padding: 0; font-size: var(--fs-caption); color: var(--ink-muted); }
.yp-tasks, .yp-projects, .yp-ms, .yp-mem, .yp-risks, .yp-log-list { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.yp-task, .yp-project { display: flex; flex-direction: column; gap: var(--s-1); padding: 6px var(--s-2); border: 1px solid var(--yazan-soft); border-radius: var(--r-sm); background: var(--surface-input); }
.yp-task.flagged { border-color: #e1b98a; background: #fff8ee; }
.yp-task.done .yp-task-title { color: var(--ink-muted); text-decoration: line-through; }
.yp-task-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.yp-task-title { display: flex; align-items: flex-start; gap: 6px; font-weight: var(--fw-bold); overflow-wrap: anywhere; }
.yp-task-title .px { flex: none; width: var(--icon-sm); height: var(--icon-sm); margin-top: 4px; color: var(--success); }
.yp-rank { flex: none; min-width: 18px; border-radius: var(--r-pill); background: var(--yazan-soft); color: var(--yazan); font-size: 11px; line-height: 18px; text-align: center; }
.yp-task-meta { font-size: var(--fs-caption); color: var(--ink-muted); overflow-wrap: anywhere; }
.yp-task-meta.soft { font-style: italic; }
.yp-task-flag { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-caption); font-weight: var(--fw-bold); color: var(--warning); }
.yp-task-acts, .yp-desk-btns { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); }
.yp-ask { display: flex; flex-direction: column; gap: var(--s-1); padding: 6px var(--s-2); border: 1px solid #b6d1f0; border-radius: var(--r-sm); background: #eef3fa; }
.yp-more { margin-top: 2px; }
.yp-more summary { cursor: pointer; font-size: var(--fs-caption); color: var(--yazan); }
.yp-project-head { display: flex; flex-direction: column; }
.yp-ms li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--s-2); }
.yp-ms-title { font-weight: var(--fw-bold); }
.yp-ms-title.done { color: var(--ink-muted); text-decoration: line-through; }
.yp-risks { padding-inline-start: 14px; list-style: disc; font-size: var(--fs-caption); color: var(--warning); }
.yp-mem li { display: flex; align-items: flex-start; gap: 6px; }
.yp-mem li > div { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.yp-log-list li { display: flex; flex-direction: column; font-size: var(--fs-caption); }
.yp-toggles { display: flex; flex-direction: column; gap: var(--s-1); }
.yp-toggle { justify-content: space-between; text-align: start; }
.yp-toggle span { margin-inline-start: var(--s-2); font-weight: var(--fw-bold); }
.yp-city { flex: 1 1 120px; min-width: 0; min-height: 36px; padding: 2px var(--s-2); border: var(--edge); border-radius: var(--r-sm); background: var(--surface-input); color: var(--ink); font: inherit; font-size: var(--fs-small); }
@media (max-height: 480px) {
  .yp-fine { display: none; }
  .yp-desk-list { max-height: 90px; }
  .yp-work { max-height: 200px; }
}

/* ------------------------------------------------------------ chat: what the v2 sheet does not cover */
.empty-chat { margin: auto; }
.msg .edited { font-size: var(--fs-caption); color: var(--ink-muted); }
.msg-acts { display: none; gap: var(--s-1); margin: 4px 2px 0; }
.msg:is(.repliable):hover .msg-acts, .msg:is(.repliable):focus-within .msg-acts, .msg:is(.repliable).acts .msg-acts { display: flex; }
.msg:is(.repliable) .text { cursor: pointer; }
.msg .text.editing { display: flex; flex-direction: column; gap: 6px; min-width: min(260px, 70vw); cursor: auto; }
.msg .text.editing .row { display: flex; justify-content: flex-end; gap: 6px; }
.msg-edit { width: 100%; min-height: 36px; padding: 4px var(--s-2); border: var(--edge); border-radius: var(--r-sm); background: var(--surface-input); color: var(--ink); font: inherit; }
@media (hover: none) { .msg:is(.repliable):hover .msg-acts { display: none; } .msg:is(.repliable).acts .msg-acts { display: flex; } }
.msg .text.voice.gone { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink-muted); font-style: italic; }
.voice-wave i.on, .voice-note .wave i.on { background: var(--accent-ink); }
.recorder .rec-label { flex: none; }

/* ------------------------------------------------------------ the phone's peek and joystick */
.peek { min-width: 0; margin-bottom: var(--s-1); animation: toast-in var(--dur-base) var(--ease-out); }
.peek .avatar { width: 26px; height: 26px; }
.peek-text { display: -webkit-box; min-width: 0; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.joy { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
.joy.held { border-color: rgba(255, 246, 232, 0.6); background: radial-gradient(circle, rgba(30, 34, 42, 0.42) 0 54%, rgba(30, 34, 42, 0.68) 56%); cursor: grabbing; }
.joy-arrow { position: absolute; color: rgba(255, 246, 232, 0.65); line-height: 0; transition: color var(--dur-fast); }
.joy-arrow .px { width: var(--icon-sm); height: var(--icon-sm); }
.joy-arrow.up { top: 8px; left: 50%; transform: translateX(-50%); }
.joy-arrow.down { bottom: 8px; left: 50%; transform: translateX(-50%) rotate(180deg); }
.joy-arrow.left { left: 8px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.joy-arrow.right { right: 8px; top: 50%; transform: translateY(-50%) rotate(90deg); }
.joy[data-dir="up"] .joy-arrow.up, .joy[data-dir="down"] .joy-arrow.down,
.joy[data-dir="left"] .joy-arrow.left, .joy[data-dir="right"] .joy-arrow.right { color: var(--selected); }
.joy-knob { transition: transform 0.14s ease-out; pointer-events: none; }
.joy.held .joy-knob { transition: none; }
@media (max-height: 420px) {
  .joy { width: 100px; height: 100px; }
  .joy-knob { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
}

/* ------------------------------------------------------------ strips over the room */
.meeting-bar .mt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meeting-bar .btn.tiny { flex: none; }

/* ------------------------------------------------------------ board, meetings, arrange: the leftovers */
.kcol .count { padding: 0 var(--s-2); border-radius: var(--r-pill); background: var(--surface-input); font-size: var(--fs-caption); line-height: 20px; }
.kcards { max-height: 48vh; overflow-y: auto; }
.kmeta select { min-height: 30px; padding: 1px 4px; max-width: 100%; border: 1px solid rgba(59, 40, 48, 0.3); border-radius: var(--r-xs); background: var(--surface-input); color: var(--ink); font: inherit; font-size: var(--fs-caption); }
.cal-what .agenda { white-space: pre-wrap; }
.cal-what strong, .cal-what .fine, .meeting-now > span:not(.live-dot) { min-width: 0; overflow-wrap: anywhere; }
.cal-acts { display: flex; align-items: center; gap: var(--s-1); }
.tray-items .count { font-size: 11px; font-weight: var(--fw-regular); color: var(--ink-muted); }
.tray-items button:disabled { opacity: 0.45; cursor: default; }
.tray-items img:not(.swatch) { width: auto; box-shadow: none; }

/* rock, paper, scissors */
.rps-board { display: flex; justify-content: space-around; gap: 12px; margin: 8px 0; text-align: center; }
.rps-board > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rps-dots { display: inline-flex; gap: 5px; }
.rps-dots i { width: 14px; height: 14px; border-radius: 50%; border: var(--line); background: transparent; }
.rps-dots i.on { background: var(--peach-2); }
.rps-hands { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 8px 0 2px; }
.rps-hand { font-size: 52px; line-height: 1; padding: 6px 12px; border-radius: 12px; border: var(--line); background: #fff6e8; }
.rps-hand.win { background: #d6efd2; }
.rps-hand.lose { opacity: 0.6; }
.rps-vs { font-weight: 800; color: var(--ink-soft); }
.rps-moves { display: flex; justify-content: center; gap: 10px; margin: 8px 0; }
.rps-move { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 88px; padding: 10px 8px; border: var(--line); border-radius: 12px; background: #fff6e8; color: var(--ink); font-family: inherit; cursor: pointer; box-shadow: 0 3px 0 rgba(20, 12, 18, 0.45); }
.rps-move:hover:not(:disabled) { transform: translateY(-2px); }
.rps-move:disabled { cursor: default; opacity: 0.6; box-shadow: none; }
.rps-move.chosen { opacity: 1; background: #d6efd2; }
.rps-face { font-size: 40px; line-height: 1.1; }
.rps-who { display: flex; justify-content: center; margin: 8px 0; }
.rps-friends { margin-bottom: 8px; }

/* ------------------------------------------------------------ chat: replying to a message */
.msg .quote { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; margin: 0 0 4px; padding: 3px 8px; border: 0; border-inline-start: 3px solid var(--ink-muted); border-radius: var(--r-sm); background: rgba(0, 0, 0, 0.06); color: var(--ink-muted); font: inherit; font-size: var(--fs-caption); text-align: start; cursor: pointer; }
.msg .quote b { color: var(--ink); font-weight: var(--fw-bold); }
.msg .quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.msg.flash .text { animation: reply-flash 1.4s ease-out; }
@keyframes reply-flash { from { box-shadow: 0 0 0 3px var(--ink-muted); } to { box-shadow: 0 0 0 3px transparent; } }
.reply-bar { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 var(--s-1); padding: 4px 4px 4px var(--s-2); border-inline-start: 3px solid var(--ink-muted); border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--fs-caption); }
.reply-bar[hidden] { display: none; }
.reply-bar .reply-text { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--ink-muted); }
.reply-bar .reply-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-bar .reply-text b { color: var(--ink); font-weight: var(--fw-bold); }
@media (prefers-reduced-motion: reduce) { .msg.flash .text { animation: none; } }

/* ------------------------------------------------------------ chat: reacting to a message (like Discord's) */
.msg .reactions { display: flex; flex-wrap: wrap; gap: 4px; max-width: 100%; margin-top: 4px; }
.msg.mine .reactions { justify-content: flex-end; }
.react-chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 26px; padding: 0 8px; border: 1px solid transparent; border-radius: 999px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: var(--fs-small); font-weight: var(--fw-semibold); line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color 0.12s, border-color 0.12s; }
.react-emoji { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; font-size: 15px; line-height: 1; }
.react-count { min-width: 0.6em; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
/* yours: outlined and tinted, with the number in full ink (so it is never colour alone) */
.react-chip.on { border-color: var(--primary); background: var(--surface-2); background: color-mix(in srgb, var(--primary) 24%, var(--surface-2)); }
.react-chip.on .react-count { color: var(--ink); }
.react-chip:active { transform: scale(0.96); }
.react-more { width: 30px; padding: 0; color: var(--ink-muted); }
.react-more .px-icon, .react-more svg { width: 16px; height: 16px; }
.msg-acts .react-btn { width: 36px; padding: 0; }
.react-btn[aria-expanded="true"] { background: var(--surface-3); }
/* the "add another" pill waits until you point at the message (a touch screen has no pointing: it is always there) */
@media (hover: hover) { .msg:not(:hover):not(:focus-within):not(.acts) .react-more { opacity: 0; } }
@media (hover: hover) { .react-chip:hover { border-color: var(--chrome-line); background: var(--surface-3); } .react-chip.on:hover { border-color: var(--primary); } }
@media (pointer: coarse) { .react-chip { min-height: 32px; padding: 0 10px; } .react-more { width: 36px; } }
/* (four buttons in a narrow column: tighter, and never on two lines) */
.msg-acts { flex-wrap: nowrap; width: max-content; max-width: 100vw; }
@media (prefers-reduced-motion: reduce) { .react-chip { transition: none; } .react-chip:active { transform: none; } }
