:root {
  color-scheme: dark;
  --background: #121018;
  --surface: #1b1824;
  --surface-raised: #221e2e;
  --stage: #15121d;
  --line: #332d42;
  --line-strong: #473c59;
  --text: #f6f2fb;
  --muted: #b1a7bf;
  --soft: #9489a6;
  --violet: #cfb4ff;
  --accent-text: #231333;
  --danger: #ffa8b4;
  --radius: 20px;
  --font-sans: "Pretendard", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse 75rem 33rem at 67% 12%, #211830 0%, transparent 69%),
    var(--background);
}
h1, h2, p { margin: 0; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #e1ccff;
  outline-offset: 3px;
}
button:disabled { cursor: default; opacity: .48; }
.icon-library { position: absolute; width: 0; height: 0; pointer-events: none; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.site-header {
  border-bottom: 1px solid #2a2336;
  background: #15121c;
}
.header-inner, .main-shell {
  width: min(1200px, calc(100% - 72px));
  margin-inline: auto;
}
.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  letter-spacing: .025em;
  font: 800 1rem/1 system-ui, sans-serif;
  white-space: nowrap;
}
.brand-accent { color: var(--violet); }
.brand-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #211430;
  border: 1px solid #ecdfff;
  border-radius: 9px;
  background: #ceb2fa;
  box-shadow: inset 0 -3px #a280d6, 0 3px 10px #12081c;
}
.brand-icon .icon { width: 25px; height: 25px; stroke-width: 1.8; }
.header-actions { display: flex; gap: 9px; align-items: center; }
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font-weight: 650;
  font-size: .875rem;
  text-align: center;
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s, transform .16s;
}
.button:active:enabled { transform: translateY(1px); }
.button-header {
  min-height: 40px;
  padding-inline: 13px;
  border-color: #393047;
  background: #201a2b;
  color: #e9ddf9;
}
.button-header .icon { width: 17px; height: 17px; color: var(--violet); }
.button-header:hover:enabled, .button-secondary:hover:enabled, .button-icon:hover:enabled { background: #30273e; border-color: #695781; }
.language-button { white-space: nowrap; }
.sound-button { width: 42px; padding: 0; }
.sound-button .sound-off, .sound-button[aria-pressed="false"] .sound-on { display: none; }
.sound-button[aria-pressed="false"] .sound-off { display: block; }
.button-primary {
  min-height: 48px;
  border-color: #e1caff;
  background: #c9a9f6;
  color: var(--accent-text);
  font-weight: 800;
  box-shadow: inset 0 -2px #9c7cc9, 0 4px 12px #150b2370;
}
.button-primary:hover:enabled { background: #dbc4ff; }
.button-secondary {
  border-color: var(--line-strong);
  background: #252031;
  color: #f0e7fb;
}
.button-icon {
  align-self: flex-start;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-color: var(--line);
  background: #231d2e;
  color: var(--muted);
}
.button-danger {
  border-color: #744051;
  background: #492637;
  color: #ffe1e7;
}
.button-danger:hover:enabled { background: #663044; }
.main-shell { padding-block: 47px 38px; }
.page-intro { margin-block-end: 27px; }
.page-intro h1 {
  font-size: clamp(2.45rem, 5.5vw, 3.85rem);
  line-height: 1.18;
  letter-spacing: -.077em;
  font-weight: 800;
}
.page-intro h1 > span:last-child { margin-left: .065em; color: #c5a4fb; }
.page-intro p {
  margin-top: 13px;
  color: #c1b5ce;
  font-size: 1rem;
  letter-spacing: -.022em;
  word-break: keep-all;
}
.setup-grid {
  display: grid;
  grid-template-columns: minmax(356px, 380px) minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
}
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 11px 26px #0b081649;
}
.setup-controls { padding: 23px; }
.setup-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 21px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
  list-style: none;
}
.setup-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-weight: 650;
  font-size: .875rem;
  letter-spacing: -.025em;
  white-space: nowrap;
}
.setup-step + .setup-step::before {
  width: 22px;
  height: 1px;
  margin-inline: 0 3px;
  background: #484058;
  content: "";
}
.step-marker {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #53465f;
  border-radius: 8px;
  background: #211a2c;
  color: #b5a7c3;
  font: 700 .8rem/1 var(--font-mono);
}
.setup-step.is-current { color: var(--text); }
.setup-step.is-current .step-marker { color: var(--accent-text); background: #c6a6f4; border-color: #e1c6ff; }
.setup-step.is-done { color: #cdbbe2; }
.setup-step.is-done .step-marker { color: #e1c8ff; background: #382745; border-color: #795da1; }
.step-content { display: grid; gap: 20px; }
.step-title h2 {
  font-size: 1.27rem;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.047em;
}
.step-title p {
  margin-top: 5px;
  color: var(--muted);
  font-size: .875rem;
  letter-spacing: -.028em;
  word-break: keep-all;
}
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend, .nickname-label {
  padding: 0;
  color: #e8dff0;
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: -.01em;
}
legend { margin-bottom: 10px; }
.case-options { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; }
.case-option {
  display: grid;
  min-width: 0;
  min-height: 60px;
  align-content: start;
  justify-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #bdb0ca;
  font-size: .75rem;
  white-space: nowrap;
  cursor: pointer;
}
html[lang="en"] .case-option {
  font-size: .6875rem;
  letter-spacing: -.025em;
}
.color-swatch {
  display: block;
  width: min(28px, calc(100% - 3px));
  aspect-ratio: 1;
  margin: 4px 0 0;
  border: 1px solid #fff5;
  border-radius: 8px;
  background: var(--swatch);
  box-shadow: inset 0 -3px #0004, inset 0 1px #fff3;
}
.case-option:hover .color-swatch, .case-option.is-selected .color-swatch { outline: 2px solid #d7baff; outline-offset: 3px; }
.case-option.is-selected { color: #e6d5fc; font-weight: 800; }
.switch-options, .layout-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.layout-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.switch-option, .layout-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 65px;
  padding: 8px 10px;
  border: 1px solid #393147;
  border-radius: 11px;
  background: #221e2d;
  text-align: left;
  color: #ebe3f3;
  cursor: pointer;
  transition: background .16s, border-color .16s;
}
.switch-option {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  gap: 3px 9px;
}
.switch-option .switch-sample { grid-row: 1 / span 2; }
.switch-option strong, .layout-option strong, .switch-option .option-label, .layout-option .option-label {
  display: block;
  font-weight: 750;
  font-size: .875rem;
  line-height: 1.3;
}
.switch-option .option-detail, .layout-option .option-detail {
  display: block;
  margin-top: 4px;
  color: #b8a9c8;
  font-size: .75rem;
  line-height: 1.25;
  letter-spacing: -.032em;
}
.switch-option .option-detail { margin-top: 0; }
.switch-option:hover, .layout-option:hover { border-color: #75618c; background: #2a2236; }
.switch-option.is-selected, .layout-option.is-selected {
  border-color: #b999e5;
  background: #342847;
  box-shadow: inset 0 0 0 1px #b999e52a;
}
.layout-option {
  display: block;
  min-height: 60px;
  padding: 8px 9px;
  text-align: center;
}
.nickname-label { display: block; }
.nickname-label > span:not(.nickname-title) { margin-left: 4px; color: #a99ab8; font-size: .75rem; font-weight: 500; }
.nickname-label input, .ranking-filter select {
  width: 100%;
  height: 42px;
  margin-top: 8px;
  padding: 0 11px;
  border: 1px solid #473a58;
  border-radius: 9px;
  background: #17131f;
  color: var(--text);
}
.nickname-label input::placeholder { color: #9487a3; }
.setup-primary { width: 100%; margin-top: 2px; }
.setup-bottom { display: grid; grid-template-columns: .65fr 1.35fr; gap: 9px; }
.setup-bottom .icon { width: 16px; height: 16px; fill: currentColor; }

.preview-panel { display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
.panel-heading {
  min-height: 61px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 21px;
}
.panel-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .99rem;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -.025em;
}
.panel-heading h2 .icon { color: var(--violet); }
.preview-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d1badf;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.preview-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #caa8fa;
  box-shadow: 0 0 8px #d4a7ff9c;
}
.preview-stage, .play-stage, .hint-stage {
  position: relative;
  background-color: var(--stage);
  background-image:
    radial-gradient(ellipse at center, #503a735c 0%, transparent 77%),
    linear-gradient(#a181ce12 1px, transparent 1px),
    linear-gradient(90deg, #a181ce12 1px, transparent 1px);
  background-position: center;
  background-size: auto, 23px 23px, 23px 23px;
}
.preview-stage {
  display: grid;
  min-height: 320px;
  align-content: center;
  justify-items: center;
  padding: 28px;
  border-block: 1px solid #332945;
}
.preview-stage .keyboard { width: 100%; }
.stage-corner {
  position: absolute;
  width: 17px;
  height: 17px;
  border: solid #7d639c80;
  border-width: 0;
  pointer-events: none;
}
.top-left { top: 15px; left: 15px; border-top-width: 1px; border-left-width: 1px; }
.top-right { top: 15px; right: 15px; border-top-width: 1px; border-right-width: 1px; }
.bottom-left { bottom: 15px; left: 15px; border-bottom-width: 1px; border-left-width: 1px; }
.bottom-right { bottom: 15px; right: 15px; border-bottom-width: 1px; border-right-width: 1px; }
.preview-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; padding: 14px 12px; }
.preview-spec {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 15px;
  color: #cfbbdf;
}
.preview-spec + .preview-spec { border-left: 1px solid var(--line); }
.preview-spec .icon {
  width: 31px;
  height: 31px;
  padding: 6px;
  border: 1px solid #4b3d5f;
  border-radius: 8px;
  background: #2b223a;
  color: #cbaeec;
}
.preview-spec div > * { display: block; line-height: 1.3; }
.preview-spec div > span { color: #b7a8c5; font-size: .75rem; }
.preview-spec strong { margin-top: 3px; color: #f0e8f7; font-size: .91rem; font-weight: 750; }
.setup-help {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 26px;
  row-gap: 10px;
  margin-top: 19px;
  padding: 18px 0 0;
  border-top: 1px solid #2d253b;
  color: #baadca;
  font-size: .875rem;
}
.setup-help > span { display: inline-flex; align-items: center; gap: 7px; }
.setup-help .icon { width: 15px; height: 15px; color: #b995e5; }

.game-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.game-intro .page-intro { margin: 0; }
.game-intro h1 { font-size: clamp(2.25rem, 5vw, 3.4rem); }
.game-metrics { display: flex; align-items: stretch; gap: 9px; }
.game-metrics > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 61px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #1f1929;
}
.elapsed-time > .icon { color: var(--violet); }
.elapsed-time span, .elapsed-time output { display: block; }
.elapsed-time span, .game-progress > div > span:first-child { color: #bcadca; font-size: .75rem; }
.elapsed-time output, #progress-label, #finish-time {
  color: #f4e8ff;
  font: 700 1.18rem/1.4 var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.game-metrics .game-progress { min-width: 158px; flex-direction: column; align-items: stretch; justify-content: center; gap: 6px; }
.game-progress > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
#progress-label { font-size: .87rem; white-space: nowrap; }
.progress-track { height: 5px; overflow: hidden; border-radius: 5px; background: #453650; }
.progress-track #progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #ceabff;
  transition: width .16s ease;
}
.play-panel, .tray-panel { overflow: hidden; }
.play-stage {
  overflow-x: auto;
  padding: 23px 24px 25px;
  border-top: 1px solid #332945;
  scrollbar-color: #68557e #1a1425;
}
.play-stage .game-keyboard { margin-inline: auto; max-width: 900px; }
.layout-chip {
  padding: 3px 8px;
  border: 1px solid #5c4773;
  border-radius: 8px;
  background: #2c203c;
  color: #e1c9ff;
  font-size: .81rem;
  font-weight: 700;
  white-space: nowrap;
}
.tray-panel { margin-top: 14px; }
.tray-title, .selection { display: flex; align-items: center; gap: 10px; }
#tray-status { color: #c1aed1; font-size: .8125rem; white-space: nowrap; }
.selection > span { color: #b1a4c0; font-size: .8125rem; white-space: nowrap; }
#selection-name {
  max-width: min(17vw, 156px);
  min-width: 35px;
  padding: 3px 7px;
  overflow-wrap: anywhere;
  border: 1px solid #5a4671;
  border-radius: 6px;
  background: #2b213c;
  color: #f1dbff;
  text-align: center;
  font: 700 .875rem/1.25 var(--font-mono);
}
.tray-field {
  min-height: 72px;
  padding: 15px 19px 21px;
  border-top: 1px solid #332945;
  background: radial-gradient(ellipse at 50% 0%, #38294b82 0%, #231b2e 67%);
}
.game-actions {
  display: flex;
  position: sticky;
  bottom: 0;
  z-index: 8;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 12px;
  padding: 9px 0;
  background: #17111edb;
  backdrop-filter: blur(10px);
}
.game-actions .icon { width: 17px; height: 17px; }
.hint-count {
  border-radius: 5px;
  padding: 2px 5px;
  color: #e2c9fe;
  background: #3c2c50;
  white-space: nowrap;
  font: 700 .75rem/1.4 var(--font-mono);
}
.button-quit { border-color: #5c3548; color: #ffc2ce; background: #372131; }
.button-quit:hover:enabled { background: #582944; }

.dialog {
  width: min(100% - 28px, 448px);
  max-height: min(90dvh, 720px);
  padding: 24px;
  border: 1px solid #604a78;
  border-radius: 17px;
  background: #211a2d;
  box-shadow: 0 24px 90px #07030c;
  color: var(--text);
}
.dialog::backdrop { background: #100a18b8; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog h2 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -.047em; }
.dialog p { margin-top: 8px; color: #c4b5d1; font-size: .91rem; word-break: keep-all; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 23px; }
.dialog-wide { width: min(100% - 28px, 970px); }
.hint-stage {
  overflow: auto;
  margin-top: 17px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.hint-stage .keyboard { width: 100%; min-width: 510px; margin-inline: auto; }
.finish-dialog .finish-medal {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border: 1px solid #8767aa;
  border-radius: 12px;
  background: #4d3665;
  color: #e9d3ff;
}
.finish-medal > .icon { width: 25px; height: 25px; }
.finish-dialog #finish-title { margin-top: 11px; color: #e3c6ff; font: 900 3.2rem/1 system-ui, sans-serif; letter-spacing: -.065em; }
#finish-time { display: block; margin-top: 14px; font-size: 1.55rem; }
.finish-dialog .dialog-actions { flex-wrap: wrap; }
#retry-record { margin-top: 10px; }
.ranking-filter { display: block; margin-top: 15px; color: #ded1e9; font-size: .875rem; }
.ranking-filter select {
  appearance: none;
  display: block;
  background-image: linear-gradient(45deg, transparent 50%, #c8aedb 50%), linear-gradient(135deg, #c8aedb 50%, transparent 50%);
  background-position: right 17px center, right 12px center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
#ranking-list { margin: 15px 0 0; padding: 0; list-style: none; }
#ranking-list > li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) max-content;
  gap: 7px;
  align-items: center;
  min-height: 41px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
  overflow-wrap: anywhere;
}
#ranking-list .rank-position { color: var(--violet); font: 700 .75rem/1 var(--font-mono); }
#ranking-list > li > :last-child { color: #e5ccff; font-family: var(--font-mono); }
.dialog .dialog-status { min-height: 1.4em; margin-top: 10px; font-size: .85rem; }
.noscript { margin-top: 1rem; color: var(--danger); }

@media (max-width: 1050px) {
  .header-inner, .main-shell { width: calc(100% - 48px); }
  .setup-grid { grid-template-columns: minmax(342px, 355px) minmax(0, 1fr); gap: 13px; }
  .setup-controls { padding: 19px; }
  .preview-stage { padding: 19px; }
  .preview-spec { padding-inline: 9px; }
}
@media (min-width: 791px) and (max-height: 820px) {
  .header-inner { min-height: 64px; }
  .main-shell { padding-top: 33px; }
  .page-intro { margin-bottom: 21px; }
  .page-intro h1 { font-size: clamp(2.45rem, 4.8vw, 3.5rem); }
  .page-intro p { margin-top: 9px; }
  .setup-steps { margin-bottom: 17px; padding-bottom: 14px; }
  .step-content { gap: 16px; }
  .main-shell:has(#game-view:not([hidden])) { padding-top: 23px; }
  .game-intro { margin-bottom: 13px; }
  .game-intro h1 { font-size: clamp(2.25rem, 3.5vw, 2.55rem); }
  .game-intro p { margin-top: 5px; }
  .game-metrics > div { min-height: 53px; }
  .play-panel .panel-heading, .tray-panel .panel-heading { min-height: 47px; padding-block: 9px; }
  .play-stage { padding-block: 15px 20px; }
  .play-stage .game-keyboard { max-width: 750px; }
  .tray-panel { margin-top: 10px; }
}
@media (max-width: 790px) {
  .main-shell { padding-top: 34px; }
  .setup-grid { grid-template-columns: 1fr; }
  .setup-controls { padding: 20px; }
  .setup-steps { justify-content: flex-start; }
  .setup-step + .setup-step::before { margin-inline: 3px 6px; }
  .preview-stage { min-height: 246px; }
  .switch-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .layout-options { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .case-options { max-width: 405px; }
  .setup-help { justify-content: start; }
  .game-intro { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .header-inner, .main-shell { width: calc(100% - 28px); }
  .header-inner { min-height: 60px; gap: 8px; }
  .brand { gap: 7px; font-size: .83rem; }
  .brand-icon { width: 29px; height: 29px; border-radius: 7px; }
  .brand-icon .icon { width: 22px; height: 22px; }
  .header-actions { gap: 6px; }
  .button-header { min-height: 36px; padding-inline: 8px; font-size: .8125rem; }
  .sound-button { width: 36px; padding: 0; }
  .main-shell { padding-block: 26px 24px; }
  .page-intro { margin-bottom: 20px; }
  .page-intro p { margin-top: 8px; font-size: .91rem; }
  .setup-controls { padding: 15px; }
  .setup-steps { margin-bottom: 17px; padding-bottom: 14px; }
  .step-content { gap: 16px; }
  .case-options { gap: 2px; }
  .color-swatch { width: min(25px, calc(100% - 3px)); border-radius: 6px; }
  .case-option { min-height: 49px; font-size: .6875rem; }
  .switch-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preview-stage { min-height: 155px; padding: 15px; }
  .stage-corner { width: 11px; height: 11px; }
  .top-left, .top-right { top: 8px; }
  .bottom-left, .bottom-right { bottom: 8px; }
  .top-left, .bottom-left { left: 8px; }
  .top-right, .bottom-right { right: 8px; }
  .panel-heading { min-height: 51px; padding: 10px 14px; gap: 7px; }
  .panel-heading h2 { font-size: .91rem; gap: 5px; }
  .panel-heading h2 .icon { width: 18px; height: 18px; }
  .preview-specs { padding: 11px 5px; }
  .preview-spec { gap: 5px; padding-inline: 6px; }
  .preview-spec .icon { width: 25px; height: 25px; padding: 4px; }
  .setup-help { margin-top: 12px; padding-top: 12px; column-gap: 13px; font-size: .8125rem; }
  .game-intro { gap: 11px; margin-bottom: 13px; }
  .game-metrics { width: 100%; }
  .game-metrics > div { min-height: 53px; }
  .game-metrics .game-progress { flex: 1; min-width: 0; }
  .play-stage { padding: 15px 12px 18px; }
  .tray-field { padding-inline: 12px; }
  .tray-title, .selection { gap: 5px; }
  #tray-status, .selection > span { font-size: .75rem; }
  .game-actions .button { padding-inline: 9px; font-size: .8125rem; gap: 5px; }
  .dialog { padding: 17px; }
  .hint-stage { padding: 10px; }
}
@media (max-width: 420px) {
  #ranking-button { width: 36px; padding: 0; }
  #ranking-button span, .language-button .icon { display: none; }
  html[lang="en"] .selection > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  html[lang="en"] .case-options {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
