@font-face {
  font-family: Golos;
  src: url('assets/GolosText.ttf') format('truetype');
  font-display: swap;
  font-weight: 100 900;
}

/* One portrait composition at every width. Desktop is a preview of the phone.
   Layers: scene 0, content 1, controls 2, native dialog top layer.
   Shapes: 16px interactive surfaces, 24px help sheet, no decorative cards.
   Purple/gold are established brand colors; blue/red express game sides. */
:root {
  color-scheme: dark;
  --bg: #121022;
  --surface: #211c35;
  --ink: #f6f3fc;
  --muted: #b4abc9;
  --subtle: #91889f;
  --line: #d8c7f125;
  --gold: #e7c870;
  --gold-ink: #292039;
  --blue: #a2bcff;
  --red: #ff9aae;
  --green: #b4e2ba;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #0b0a14;
  color: var(--ink);
  font: 14px/1.5 Golos, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, summary { -webkit-tap-highlight-color: transparent; }
button {
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  border: 0;
}
button:disabled { cursor: default; opacity: .46; }
button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
button img { pointer-events: none; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
.app {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  min-height: 560px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
}
.app::before {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 0;
  background: linear-gradient(#121022bf, #1210224d 40%, #121022 92%), url('assets/arena-mobile-v1.jpg') center / cover;
  opacity: .75;
  pointer-events: none;
}
.app::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: #6c4da31c;
  clip-path: polygon(100% 0, 100% 64%, 28% 0);
  pointer-events: none;
}
.app[data-screen=result]::before, .app[data-screen=interrupted]::before { opacity: .3; }
.masthead {
  flex: 0 0 calc(78px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 20px 6px;
}
.brands { display: flex; align-items: center; gap: 16px; }
.tatsugi { display: block; width: 51px; height: 58px; object-fit: contain; mix-blend-mode: screen; }
.brand-divider { height: 24px; width: 1px; background: var(--line); }
.fkr { width: 139px; height: 23px; object-fit: contain; }
.icon { width: 23px; height: 23px; flex: 0 0 auto; filter: invert(1); }
.quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  color: #d4cde2;
  min-height: 44px;
  padding: 8px;
  font-size: 11px;
}
.help-button { flex-direction: column; gap: 1px; padding: 0; min-width: 44px; font-size: 9px; }
.help-button .icon { width: 22px; height: 22px; opacity: .8; }
main { position: relative; flex: 1; min-height: 0; }
.home-screen { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.home-copy { padding: 16px 22px 0; pointer-events: auto; }
.eyebrow { color: #c4b4dc; font-size: 8px; font-weight: 600; letter-spacing: 1.1px; }
.home-copy h1 {
  font-size: clamp(34px, 9.5vw, 46px);
  font-weight: 850;
  line-height: 1.04;
  letter-spacing: -1.5px;
  margin: 14px 0 12px;
}
.home-copy h1 > span { color: #edd38e; }
.intro { font-size: 12px; color: #c8bfd8; }
.home-actions { position: absolute; left: 22px; right: 22px; bottom: 2px; pointer-events: auto; }
.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 60px;
  padding: 16px 22px;
  border-radius: 16px;
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 16px;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: inset 0 1px #fff6, 0 6px 0 #8c6f3226, 0 16px 28px #0e0b2444;
  transition: transform .16s cubic-bezier(.2,.8,.2,1), background .16s;
}
.primary-button .icon { filter: none; opacity: .78; }
.primary-button:active { transform: scale(.975); background: #f0d58a; }
.text-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 12px;
  color: #ded5ee;
  background: transparent;
}
.text-button .icon { width: 17px; height: 17px; opacity: .65; }
.home-actions .text-button { width: 100%; margin-top: 4px; }
.arena-wrap { position: relative; isolation: isolate; min-height: 0; }
.dragon-backdrop { display: none; position: absolute; pointer-events: none; }
.app[data-screen=home] .arena-wrap { position: absolute; inset: 158px -24px 112px; }
.app[data-screen=home] .dragon-backdrop {
  display: block;
  width: 140%;
  left: -11%;
  top: -12%;
  opacity: .2;
  z-index: -1;
  transform: rotate(-8deg);
}
.arena { position: relative; min-height: 0; }
.arena-art { display: block; width: 100%; height: 100%; overflow: visible; }
#audience, .arena-facets, .arena-rails { display: none; }
.app[data-screen=home] .arena { height: 100%; }
.app[data-screen=home] .arena-art { overflow: hidden; }
.app[data-screen=home] .arena-topline,
.app[data-screen=home] .scoreboard,
.app[data-screen=home] .signal,
.app[data-screen=home] .episode-track { display: none; }
.app[data-screen=home] .arena-facets { opacity: .18; }
.arena-topline { display: flex; align-items: center; justify-content: space-between; padding: 4px 22px; color: #b0a3c7; font-size: 10px; }
.arena-status { font-size: 9px; opacity: .8; }
.scoreboard {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: center;
  padding: 10px 20px 4px;
  margin: 0 18px;
  position: relative;
  z-index: 1;
  background: #17132a80;
  border-radius: 16px;
}
.score-side { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.score-side > strong { font-size: 48px; line-height: .98; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -2px; }
.blue-side > strong { color: var(--blue); }
.red-side > strong { color: var(--red); }
.athlete-label { font-size: 10px; color: #c4b8d8; padding-bottom: 8px; }
.clock { text-align: center; }
.clock-label { display: block; font-size: 8px; color: #b2a7c7; }
.clock strong { display: block; font-size: 32px; line-height: 1.3; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.round-label { display: block; padding-bottom: 6px; color: #dac68f; font-size: 9px; }
.app[data-screen=fight] main { display: flex; flex-direction: column; }
.app[data-screen=fight] .arena-wrap { flex: 1; display: flex; flex-direction: column; }
.app[data-screen=fight] .arena { flex: 1; margin-top: 2px; overflow: hidden; }
.signal {
  --signal: var(--gold);
  position: absolute;
  left: 12px;
  right: 12px;
  top: 6px;
  z-index: 1;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .12s, transform .16s;
}
.signal.visible { opacity: 1; transform: none; }
.signal > span { color: var(--signal); font-size: clamp(17px, 5vw, 23px); font-weight: 750; line-height: 1.2; letter-spacing: -.4px; }
.signal small { display: block; color: #d2c7e2; font-size: 10px; margin-top: 5px; }
.technique-badge { display: block; margin-top: 5px; color: var(--signal); font-size: 10px; line-height: 1.3; font-weight: 550; }
.signal[data-tone=blue] { --signal: #bad0ff; }
.signal[data-tone=muted] { --signal: #c9bed9; }
.signal[data-tone=green] { --signal: var(--green); }
.signal[data-tone=red] { --signal: #ffa6b5; }
.timing-meter { display: none; position: relative; width: 164px; height: 3px; border-radius: 2px; margin: 10px auto 0; background: #ece1ff2b; overflow: visible; }
.timing-meter i { display: block; width: 100%; height: 100%; background: var(--signal); transform: scaleX(0); transform-origin: left; }
.timing-meter b { position: absolute; top: -3px; left: 50%; width: 2px; height: 9px; background: #f3edffb3; }
.signal[data-stage=window] .timing-meter { display: block; }
.episode-track { position: absolute; bottom: 8px; left: 24px; right: 24px; display: flex; gap: 3px; justify-content: center; }
.episode-track i { flex: 1; max-width: 8px; min-width: 0; height: 3px; border-radius: 2px; background: #e5d8fc29; }
.episode-track i.current { background: #f4edff; }
.episode-track i.success { background: var(--gold); }
.episode-track i.error { background: #e77991; }
.play-ui { position: relative; z-index: 2; flex: 0 0 auto; padding: 0 18px 9px; background: linear-gradient(transparent, #121022 30%); }
.fight-context { min-height: 48px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.fight-context > span:first-child { font-size: 10px; color: #d9cde8; }
.quality-readout { display: flex; align-items: center; gap: 6px; color: #b4a6ca; font-size: 10px; white-space: nowrap; }
.quality-readout b { font-size: 17px; font-weight: 600; color: #f2d58b; font-variant-numeric: tabular-nums; }
#leave-button { min-width: 36px; padding: 8px 0 8px 8px; }
#leave-button .icon { width: 18px; height: 18px; opacity: .65; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; user-select: none; -webkit-user-select: none; }
.action-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  min-height: 112px;
  padding: 16px 18px;
  border: 1px solid #c1a8ef45;
  border-radius: 16px;
  background: linear-gradient(135deg, #383052, #282039);
  color: #fff7e8;
  text-align: left;
  touch-action: none;
  box-shadow: inset 0 1px #e6d0ff14, 0 4px 0 #0907144d;
  transition: transform .12s, background .12s, border-color .12s;
}
.action-button > .icon { width: 25px; height: 25px; opacity: .85; }
.action-button > span { font-size: 20px; font-weight: 650; line-height: 1.1; }
.action-button small { display: block; font-size: 10px; font-weight: 400; margin-top: 7px; color: #cbc0da; white-space: nowrap; }
.attack-button { border-color: #dfc16b72; background: linear-gradient(135deg, #57442f, #362b32); }
.defend-button { border-color: #7b9be079; background: linear-gradient(135deg, #293e6a, #252a45); }
.action-button.pressed, .action-button:active { transform: translateY(3px) scale(.975); border-color: #f1d78e; background: #584b68; box-shadow: inset 0 2px 10px #0e0b244d; }
.defend-button.pressed, .defend-button:active { border-color: #c1d1ff; background: #3a5084; }
.feint-key { grid-column: 1/-1; grid-row: 2; display: flex; justify-content: center; gap: 7px; color: #b3a4c9; font-size: 10px; margin-top: 3px; }
.feint-key > span { color: #dfd1ed; }
.feint-key small { font-size: inherit; }
.app.is-ending .clock strong { color: var(--gold); }
.app.is-ending .scoreboard { box-shadow: inset 0 0 0 1px #cfac694d; }
.app[data-feedback=good] .score-side strong { text-shadow: 0 0 14px #d3b16a26; }
.app[data-screen=tutorial] main { display: grid; grid-template-rows: minmax(155px, 1fr) auto auto; gap: 10px; }
.app[data-screen=tutorial] .arena-wrap { grid-row: 1; }
.app[data-screen=tutorial] .arena { height: 100%; overflow: hidden; }
.app[data-screen=tutorial] .scoreboard, .app[data-screen=tutorial] .arena-topline { display: none; }
.app[data-screen=tutorial] .episode-track { display: none; }
.app[data-screen=tutorial] .play-ui { grid-row: 3; }
.app[data-screen=tutorial] .fight-context { display: none; }
.app[data-screen=tutorial] .controls .action-button { min-height: 82px; flex-direction: row; align-items: center; padding: 14px; gap: 12px; }
.app[data-screen=tutorial] .action-button > span { font-size: 17px; }
.app[data-screen=tutorial] .action-button small { font-size: 8px; margin-top: 5px; }
.app[data-screen=tutorial] .signal { top: 0; }
.tutorial-panel { grid-row: 2; padding: 0 22px; }
.tutorial-head { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
#tutorial-step { color: var(--gold); font-size: 11px; font-weight: 500; }
.tutorial-head .quiet-button { padding: 6px 0 6px 12px; font-size: 11px; }
.tutorial-panel h2 { font-size: 22px; font-weight: 650; letter-spacing: -.6px; line-height: 1.2; margin: 4px 0 8px; }
.tutorial-panel p { font-size: 12px; line-height: 1.6; color: #bfb2d2; }
.tutorial-footer { margin-top: 10px; }
#tutorial-feedback { display: block; min-height: 31px; color: #e7d295; font-size: 11px; margin-bottom: 8px; }
.compact { min-height: 46px; padding: 12px 16px; font-size: 13px; border-radius: 12px; }
.result-screen { height: 100%; display: flex; flex-direction: column; min-height: 0; padding: 8px 22px 0; }
.app[data-screen=result] .arena-wrap, .app[data-screen=interrupted] .arena-wrap { display: none; }
.result-heading { flex: 0 0 auto; position: relative; padding: 0 0 19px; }
.result-heading .eyebrow { color: #b1a0ca; font-size: 9px; }
.result-heading h1 { font-size: clamp(30px, 8.8vw, 40px); line-height: 1.15; font-weight: 800; letter-spacing: -1.3px; margin: 10px 0 4px; }
.final-score { display: flex; gap: 13px; align-items: center; font-size: 58px; line-height: 1.25; font-weight: 600; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.final-score > span:first-child { color: var(--red); }
.final-score > span:last-child { color: var(--blue); }
.final-score i { font-size: 25px; font-style: normal; color: #7d6e95; }
.result-heading > p { font-size: 11px; color: #bfb2d2; max-width: 310px; line-height: 1.6; }
.result-detail { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 14px; }
.quality-total { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 17px; border-top: 1px solid var(--line); }
.quality-total > span { font-size: 9px; color: #bbaacb; letter-spacing: .8px; }
.quality-total > strong { font-size: 39px; font-weight: 650; letter-spacing: -1.3px; color: var(--gold); line-height: 1.1; }
.quality-total > b { font-size: 10px; color: #e1c985; font-weight: 550; width: 100%; }
.formula { font-size: 10px; color: #bcb0ce; line-height: 1.7; margin: 10px 0 18px; max-width: 290px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.stat-grid > div { grid-column: span 2; }
.stat-grid > div:nth-last-child(-n+2) { grid-column: span 3; }
.stat-grid strong { display: block; font-size: 27px; font-weight: 500; line-height: 1.2; }
.stat-grid span { display: block; font-size: 10px; color: #b2a2c6; margin-top: 4px; }
.result-tip { font-size: 12px; line-height: 1.7; color: #e1d4ee; border-left: 2px solid #c9aa65; padding-left: 13px; margin: 12px 0 24px; }
.result-techniques { font-size: 10px; line-height: 1.6; color: #d9c490; margin: 0 0 16px; }
.records { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.records > div { display: flex; flex-direction: column; gap: 5px; }
.records span { color: #ab99c1; font-size: 8px; letter-spacing: .8px; }
.records strong { font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; }
.records small { font-size: 10px; color: #a99bbd; }
.result-actions { flex: 0 0 auto; padding-top: 10px; background: var(--bg); }
.result-actions .primary-button { min-height: 54px; font-size: 14px; }
.result-actions .text-button { width: 100%; min-height: 40px; }
.match-details { color: #b6a5cb; font-size: 11px; }
.match-details summary { cursor: pointer; min-height: 44px; padding: 12px 0; }
#episode-review > div { display: flex; justify-content: space-between; gap: 12px; min-height: 42px; align-items: center; border-bottom: 1px solid #d9baf310; font-size: 10px; }
#episode-review b { color: #e9cc80; font-weight: 500; }
#episode-review .error b { color: #ef97aa; }
#result-seed { font-size: 9px; color: #9f8ab7; margin: 16px 0; line-height: 1.7; }
.interrupted-screen { padding: 50px 25px 0; text-align: left; }
.interrupted-screen h1 { font-size: 39px; font-weight: 750; line-height: 1.15; letter-spacing: -1.4px; margin: 20px 0; }
.interrupted-screen p { font-size: 13px; line-height: 1.7; color: #c4b6d7; margin-bottom: 28px; }
.interrupted-screen .text-button { margin: 6px auto 0; }
.site-footer { flex: 0 0 auto; min-height: 35px; padding: 6px 17px max(10px, env(safe-area-inset-bottom)); color: #aaa0ba; font-size: 9px; line-height: 1.5; text-align: center; }
dialog { position: fixed; max-width: 440px; width: calc(100% - 20px); max-height: calc(100dvh - 24px); overflow: auto; background: #211b34; border: 1px solid #b59bd33d; color: var(--ink); padding: 32px 25px 25px; border-radius: 24px; box-shadow: 0 25px 80px #0e0a20b3; }
dialog::backdrop { background: #080610d9; }
.dialog-close { position: absolute; top: 8px; right: 16px; font-size: 11px; }
dialog .eyebrow { color: #c4acd9; }
dialog h2 { font-size: 28px; line-height: 1.2; font-weight: 650; letter-spacing: -.6px; margin: 16px 0 22px; }
dialog p { font-size: 12px; line-height: 1.8; color: #c5b7d9; margin: 14px 0; }
dialog b { color: #eee6fa; font-weight: 550; }
.help-scoring { font-size: 12px; line-height: 1.9; color: #e7cc8b; margin: 21px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.fine-print { font-size: 10px; }
@media (prefers-reduced-motion: no-preference) {
  .app[data-screen=home] .home-copy { animation: arrive .45s both; }
  .app[data-screen=home] .home-actions { animation: arrive .45s .12s both; }
  .app[data-screen=home] .arena-wrap { animation: scene-arrive .7s .08s both; }
  .app[data-screen=result] .result-heading { animation: arrive .4s both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes scene-arrive { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
}
@media (max-height: 700px) {
  .masthead { flex-basis: calc(66px + env(safe-area-inset-top)); padding-top: calc(4px + env(safe-area-inset-top)); }
  .tatsugi { width: 45px; height: 51px; }
  .home-copy { padding-top: 8px; }
  .home-copy h1 { margin: 11px 0 9px; }
  .app[data-screen=home] .arena-wrap { top: 138px; bottom: 104px; }
  .primary-button { min-height: 54px; }
  .action-button { min-height: 94px; padding: 12px 15px; gap: 7px; }
  .action-button > span { font-size: 18px; }
  .action-button > .icon { width: 21px; height: 21px; }
  .action-button small { font-size: 9px; margin-top: 5px; }
  .fight-context { min-height: 40px; }
  .scoreboard { padding: 7px 18px 2px; }
  .app[data-screen=fight] .arena-art { position: absolute; left: 0; bottom: 0; height: calc(100% - 44px); }
  .score-side > strong { font-size: 42px; }
  .clock strong { font-size: 28px; }
  .site-footer { min-height: 30px; font-size: 7px; padding-bottom: max(7px, env(safe-area-inset-bottom)); }
  .tutorial-panel h2 { font-size: 19px; }
  .tutorial-panel p { font-size: 11px; }
  .tutorial-head { min-height: 30px; }
  .tutorial-footer { margin-top: 8px; }
  #tutorial-feedback { font-size: 10px; min-height: 28px; margin-bottom: 6px; }
  .app[data-screen=tutorial] main { gap: 6px; grid-template-rows: minmax(130px, 1fr) auto auto; }
  .app[data-screen=tutorial] .controls .action-button { min-height: 72px; padding: 11px; gap: 8px; }
  .app[data-screen=tutorial] .action-button small { display: none; }
  .tutorial-panel .compact { min-height: 42px; }
  .result-heading { padding-bottom: 12px; }
  .result-heading > p { font-size: 10px; }
  .result-heading h1 { font-size: 30px; }
  .final-score { font-size: 46px; }
}
@media (max-width: 350px) {
  .masthead { padding-left: 16px; padding-right: 16px; }
  .brands { gap: 11px; }
  .fkr { width: 117px; }
  .home-copy { padding-inline: 18px; }
  .home-copy h1 { font-size: 31px; letter-spacing: -1.3px; }
  .home-actions { left: 18px; right: 18px; }
  .eyebrow { font-size: 7px; letter-spacing: .8px; }
  .play-ui { padding-inline: 14px; }
  .action-button small { font-size: 8px; }
  .tutorial-panel { padding-inline: 18px; }
}
@media (max-height: 620px) and (orientation: portrait) {
  .app[data-screen=tutorial] main { grid-template-rows: minmax(100px, 1fr) auto auto; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .app { max-width: 760px; min-height: 320px; padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); }
  .masthead { flex-basis: calc(52px + env(safe-area-inset-top)); padding: calc(2px + env(safe-area-inset-top)) 20px 2px; }
  .tatsugi { width: 37px; height: 43px; }
  .app[data-screen=fight] main { display: grid; grid-template-columns: 1.6fr 1fr; }
  .app[data-screen=fight] .arena-wrap { grid-column: 1; }
  .app[data-screen=fight] .arena-art { position: static; height: 100%; }
  .app[data-screen=fight] .play-ui { grid-column: 2; grid-row: 1; align-self: center; padding: 0 18px 0 10px; }
  .app[data-screen=fight] .controls { grid-template-columns: 1fr; gap: 9px; }
  .app[data-screen=fight] .action-button { min-height: 68px; flex-direction: row; align-items: center; padding: 12px; gap: 14px; }
  .app[data-screen=fight] .action-button small { font-size: 9px; }
  .app[data-screen=fight] .feint-key { grid-column: 1; grid-row: 3; margin: 2px 0 0; }
  .app[data-screen=fight] .fight-context > span:first-child { display: none; }
  .app[data-screen=fight] .scoreboard { padding: 3px 8px; margin-inline: 20px; }
  .app[data-screen=fight] .score-side > strong { font-size: 31px; }
  .app[data-screen=fight] .clock strong { font-size: 23px; }
  .app[data-screen=fight] .round-label { display: none; }
  .app[data-screen=fight] .arena-topline { font-size: 8px; padding-top: 0; }
  .app[data-screen=fight] .signal { top: 0; }
  .app[data-screen=fight] .signal > span { font-size: 15px; }
  .app[data-screen=fight] .signal small { font-size: 8px; }
  .app[data-screen=fight] .timing-meter { margin-top: 5px; }
  .app[data-screen=home] .home-copy { width: 55%; padding-top: 6px; }
  .app[data-screen=home] .home-copy h1 { font-size: 34px; }
  .app[data-screen=home] .home-actions { right: auto; width: 43%; bottom: 0; }
  .app[data-screen=home] .home-actions .primary-button { min-height: 48px; font-size: 13px; }
  .app[data-screen=home] .home-actions .text-button { min-height: 32px; margin-top: 0; }
  .app[data-screen=home] .arena-wrap { inset: -12px -12px -3px 43%; }
  .site-footer { min-height: 24px; padding-bottom: max(5px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.community-nav { display:flex; justify-content:space-between; border-top:1px solid var(--line); margin-top:3px; }
.community-nav .quiet-button { color:var(--gold); font-size:11px; max-width:50%; }
#profile-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#community-status { font-size:11px; color:var(--red); line-height:1.5; }
#community-status:empty { display:none; }
.app[data-screen=home] .arena-wrap { bottom:158px; }
dialog.account-sheet, dialog.rating-sheet { padding:30px 22px 24px; width:calc(100% - 16px); max-height:calc(100dvh - 18px); }
.account-sheet h2, .rating-sheet h2 { margin:15px 0 10px; font-size:28px; }
.sheet-intro { margin:0 0 20px; font-size:12px; }
#registration-form { display:grid; gap:13px; }
.form-field { display:grid; gap:6px; font-size:12px; color:#e3d8ef; }
.form-field input { width:100%; min-width:0; min-height:46px; padding:10px 12px; border:1px solid #b6a6d14a; background:#131023; border-radius:10px; color:var(--ink); font:16px/1.4 Golos,Arial,sans-serif; }
.form-field input:focus { outline:2px solid var(--gold); outline-offset:1px; }
.form-field input::placeholder { color:#9186a3; font-size:13px; }
.form-field small { font-size:10px; color:var(--muted); }
.messenger-choice { border:0; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.messenger-choice legend { font-size:12px; margin-bottom:7px; color:#e3d8ef; }
.messenger-choice label { position:relative; }
.messenger-choice input { position:absolute; opacity:0; width:1px; height:1px; }
.messenger-choice span { min-height:44px; display:flex; justify-content:center; align-items:center; border:1px solid #b6a6d14a; border-radius:10px; background:#181328; font-size:13px; }
.messenger-choice input:checked+span { border-color:var(--gold); color:var(--gold); background:#e7c87010; }
.messenger-choice input:focus-visible+span { outline:2px solid var(--gold); outline-offset:3px; }
.consent-row { display:flex; gap:10px; align-items:flex-start; font-size:10px; color:#cfc3dd; line-height:1.6; }
.consent-row input { width:18px; height:18px; margin:1px 0 0; accent-color:var(--gold); flex:0 0 auto; }
.privacy-info { font-size:10px; color:var(--muted); }
.privacy-info summary { cursor:pointer; min-height:28px; color:#ddd0eb; }
.privacy-info p { font-size:10px; line-height:1.7; margin:8px 0; }
.form-error { color:var(--red); font-size:11px; line-height:1.6; margin:0; }
.form-error:empty { display:none; }
#registration-submit { font-size:13px; white-space:normal; justify-content:center; text-align:center; }
#profile-description { display:block; font-size:13px; line-height:1.8; font-weight:500; overflow-wrap:anywhere; }
.rating-meta { display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); font-size:10px; color:var(--muted); gap:8px; }
.rating-meta .quiet-button { color:var(--gold); }
.rating-personal { padding:12px 0; color:var(--gold); font-size:12px; }
.rating-head { display:flex; justify-content:space-between; margin-top:8px; font-size:9px; color:var(--muted); text-transform:uppercase; letter-spacing:.8px; }
.rating-list { padding:0; margin:0; list-style:none; }
.rating-row { display:grid; grid-template-columns:30px minmax(0,1fr) auto; gap:10px; align-items:center; border-bottom:1px solid var(--line); min-height:66px; }
.rating-row>b { font-size:18px; color:#9b8bae; font-weight:500; }
.rating-row>span { display:grid; gap:3px; min-width:0; }
.rating-row>span>strong { font-size:13px; overflow-wrap:anywhere; font-weight:550; }
.rating-row small { font-size:10px; color:var(--muted); }
.rating-row>strong { font-size:21px; color:#f1d791; font-weight:650; letter-spacing:-.6px; }
.rating-row.is-you { background:#e7c8700a; box-shadow:inset 2px 0 var(--tier-ink,var(--gold)); }
.rating-groups { display:grid; gap:16px; margin:12px 0 18px; }
.rating-group { --tier-ink:#bdb1d1; min-width:0; }
.rating-group-kimono { --tier-ink:#efd38e; border:1px solid #cbaa6752; background:#e7c87008; border-radius:16px; }
.rating-group-towel { --tier-ink:#d1d7eb; border:1px solid #aeb7d738; background:#aeb7d709; border-radius:16px; }
.rating-group-header { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:14px 13px 10px; color:var(--tier-ink); }
.rating-group-header h3 { margin:0; font-size:16px; font-weight:650; letter-spacing:-.3px; }
.rating-group-header>span { flex-shrink:0; font-size:10px; color:var(--tier-ink); }
.rating-group .rating-list { margin:0 12px 5px; }
.rating-group .rating-row { grid-template-columns:26px minmax(0,1fr) auto; gap:9px; min-height:62px; border-bottom:1px solid #d8c7f113; padding:6px 0; }
.rating-group .rating-row:last-child { border-bottom:0; }
.rating-group .rating-row>b { color:var(--tier-ink); font-size:17px; font-variant-numeric:tabular-nums; }
.rating-group .rating-row>strong { color:var(--tier-ink); font-size:20px; font-variant-numeric:tabular-nums; }
.rating-group .rating-row.is-you { margin-inline:-6px; padding-inline:6px; border-radius:7px; }
.rating-group-empty { margin:0 13px 15px; color:var(--muted); font-size:11px; }
.rating-group-general .rating-group-header { padding-left:0; padding-right:0; }
.rating-group-general .rating-group-header h3 { font-size:13px; font-weight:550; }
.rating-group-general .rating-list { margin-inline:0; }
.rating-state { color:#cdbddd; margin:20px 0; font-size:12px; }
.rating-state:empty { display:none; }
.rating-footnote { font-size:10px; color:var(--muted); line-height:1.7; }
#rating-updated { color:var(--subtle); font-size:9px; }
.ranking-feedback { color:var(--gold); font-size:11px; line-height:1.6; margin:16px 0 0; }
.rating-result { padding-left:0; justify-content:flex-start; color:var(--gold); }
@media (max-height:650px) { dialog.account-sheet,dialog.rating-sheet { padding:28px 18px 20px; }.account-sheet h2,.rating-sheet h2 { font-size:25px; }.sheet-intro { font-size:11px; margin-bottom:14px; }#registration-form { gap:10px; } }
@media (max-height:500px) and (orientation:landscape) { .app[data-screen=home] .arena-wrap { bottom:-3px; }.community-nav .quiet-button { min-height:32px; } }
/* Contest and account continuation */
.contest-pill{display:block;margin-top:14px;padding:10px 14px;border:1px solid #bca46f66;border-radius:13px;background:#221b38cf;color:#f5d99a;text-align:left;font:inherit;font-size:12px;max-width:100%;cursor:pointer}.contest-pill small{display:block;color:#d3c8e0;font-size:10px;margin-top:4px}.secret-code{display:block;user-select:all;overflow-wrap:anywhere;letter-spacing:1.5px;padding:18px;border:1px solid #aa925e;border-radius:13px;background:#100d1c;color:#f4d38c;font-size:18px;line-height:1.7;margin:20px 0}.account-sheet #profile-status .quiet-button{display:block;margin:18px 0}#login-form .primary-button{width:100%}#contest-rules p{font-size:13px;line-height:1.7;color:#d3c8e0}#recovery-dialog .primary-button{width:100%;margin-top:18px}
@media(max-height:700px){.contest-pill{margin-top:7px;padding:6px 11px;font-size:10px}.contest-pill small{font-size:9px;margin-top:1px}}
@media(max-height:620px) and (orientation:portrait){.home-copy .intro{display:none}.contest-pill{margin-top:6px}}
