:root {
  --bg: #f7f8f4;
  --paper: #fffefb;
  --ink: #294438;
  --muted: #788279;
  --pine: #2c513e;
  --line: #e4e9df;
  --soft: #edf1e8;
  --radius: 22px;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans KR",
    "Noto Sans JP",
    Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: transparent;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
canvas:focus-visible,
circle:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #6f947d;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
img {
  max-width: 100%;
  height: auto;
}
svg {
  display: block;
}
.icon {
  width: 21px;
  height: 21px;
  flex: none;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-200%);
  background: var(--pine);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
}
.skip-link:focus {
  transform: none;
}
.site-header {
  border-bottom: 1px solid var(--line);
  background: #f7f8f4ed;
}
.header-inner {
  max-width: 1320px;
  margin: auto;
  padding: 21px 40px;
  display: flex;
  align-items: center;
  gap: 36px;
}
.wordmark {
  display: block;
  flex: none;
  line-height: 0;
}
.wordmark img {
  width: 219px;
  height: 50px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
  font-size: 13px;
  white-space: nowrap;
}
.main-nav a {
  color: var(--muted);
  padding: 10px 0;
  position: relative;
}
.main-nav a.active {
  color: var(--pine);
  font-weight: 650;
}
.main-nav a.active:after {
  content: "";
  height: 2px;
  background: var(--pine);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 3px;
}
.header-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}
.icon-button {
  height: 42px;
  min-width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}
.icon-button:hover {
  background: var(--soft);
}
.sign-in {
  display: block;
  padding: 9px 17px;
  border-radius: 30px;
  background: var(--pine);
  color: white;
  font-size: 13px;
  white-space: nowrap;
}
.account-link {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 6px 8px;
  font-size: 13px;
}
.account-link span {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-loading {
  font-size: 11px;
  color: var(--muted);
}
.library-main,
.player-main {
  max-width: 1320px;
  margin: auto;
  padding: 36px 40px 60px;
  min-height: 75vh;
}
.collection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 5px 0 24px;
}
.collection-heading h1 {
  font-size: 24px;
  letter-spacing: -0.7px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 650;
}
.collection-count {
  font-size: 12px;
  background: var(--soft);
  color: #7a8d72;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0;
  font-weight: 500;
}
.search-box {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 30px;
  width: 250px;
}
.search-box .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}
.search-box input {
  border: 0;
  background: transparent;
  outline: 0;
  min-width: 0;
  width: 100%;
  font-size: 13px;
  color: var(--ink);
}
.search-box input::placeholder {
  color: #8c958c;
}
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 25px;
}
.filter-chip {
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: #76826f;
  min-height: 38px;
}
.filter-chip.active {
  background: var(--pine);
  color: #fff;
  border-color: var(--pine);
}
.filter-chip:hover {
  border-color: #869c80;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 22px;
}
.game-card {
  min-width: 0;
  position: relative;
  border: 1px solid #e5e9e0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px #2944380b;
}
.game-link {
  display: block;
}
.card-art {
  background: var(--game-color);
  aspect-ratio: 1.6;
  position: relative;
  overflow: hidden;
}
.card-art canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.favorite-button {
  position: absolute;
  right: 11px;
  top: 11px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fffefaab;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--game-ink);
  backdrop-filter: blur(8px);
}
.favorite-button .icon {
  width: 17px;
  height: 17px;
}
.is-favorite .icon {
  fill: currentColor;
}
.play-peek {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background: #ffffff12;
  transition: opacity 0.2s;
}
.play-peek .icon {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 50%;
  background: #ffffffdb;
  color: var(--game-ink);
}
.game-link:hover .play-peek,
.game-link:focus-visible .play-peek {
  opacity: 1;
}
.continue-pill {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: #fffefbcc;
  color: var(--game-ink);
  font-size: 10px;
  letter-spacing: 0.2px;
  padding: 3px 9px;
  border-radius: 15px;
}
.card-copy {
  padding: 17px 17px 18px;
}
.card-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.card-title-row h2 {
  font-size: 15px;
  letter-spacing: -0.25px;
  font-weight: 650;
}
.card-arrow {
  width: 16px;
  height: 16px;
  color: #9aa796;
}
.english-name {
  font-size: 11px;
  letter-spacing: 0.2px;
  color: #81907f;
  display: block;
  margin-top: 3px;
}
.card-record {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin-top: 17px;
  font-size: 10px;
  color: #7e8a7a;
  font-variant-numeric: tabular-nums;
}
.card-record b {
  color: #4f6751;
  font-weight: 600;
  margin-left: 3px;
}
.progress-track {
  height: 3px;
  border-radius: 3px;
  background: #edf1e8;
  margin-top: 9px;
  overflow: hidden;
}
.progress-track i {
  display: block;
  height: 100%;
  background: var(--game-ink);
  border-radius: 3px;
  opacity: 0.65;
}
.empty-state {
  grid-column: 1/-1;
  padding: 70px 0;
  text-align: center;
  color: var(--muted);
}
.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 24px 0 35px;
  font-size: 11px;
  color: #8d9789;
}
.text-button {
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.back-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #71806d;
  margin-bottom: 25px;
}
.back-link .icon {
  width: 17px;
  height: 17px;
}
.player-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
}
.player-heading h1 {
  font-size: 26px;
  letter-spacing: -0.8px;
  font-weight: 650;
}
.player-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.soft-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 10px 15px;
  font-size: 13px;
  min-height: 42px;
}
.soft-button:hover {
  background: var(--soft);
}
.soft-button.primary {
  background: var(--pine);
  border-color: var(--pine);
  color: white;
}
.soft-button.primary:hover {
  background: #3d664e;
}
.soft-button.danger {
  background: #965854;
  color: white;
}
.soft-button small {
  opacity: 0.6;
}
.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 800px) minmax(230px, 1fr);
  gap: 28px;
  align-items: start;
}
.game-stage {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  padding: 24px;
}
.game-hud {
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
}
.game-hud > div {
  display: flex;
  flex-direction: column;
}
.game-hud span {
  font-size: 10px;
  color: #82907c;
}
.game-hud strong {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.save-status {
  margin-left: auto;
  font-size: 10px;
  color: #7e9575;
  max-width: 165px;
  text-align: right;
  line-height: 1.5;
}
.save-status[data-status="saving"],
.save-status[data-status="pending"] {
  color: #a48d61;
}
.save-status.save-failed {
  color: #ac6560;
  text-decoration: underline;
}
.play-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--game-ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: 20px;
  min-height: 21px;
}
.status-side {
  opacity: 0.75;
}
.board-wrap {
  max-width: 640px;
  margin: 0 auto;
}
.game-canvas {
  width: 100%;
  display: block;
  border-radius: 17px;
  touch-action: none;
}
.game-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.game-help {
  font-size: 12px;
  line-height: 1.85;
  color: #82907f;
  max-width: 590px;
  margin: 20px auto 0;
  word-break: keep-all;
}
.completion {
  display: none;
  margin-top: 24px;
  background: #edf3e6;
  border-radius: 17px;
  padding: 20px;
}
.completion.visible {
  display: block;
}
.result-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.result-mark {
  width: 40px;
  height: 40px;
  background: #dbe9cf;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-top > div {
  display: flex;
  flex-direction: column;
}
.result-top strong {
  font-size: 16px;
}
.result-stars {
  font-size: 13px;
  color: #a48c51;
  letter-spacing: 3px;
}
.result-score {
  margin-left: auto;
  font-size: 23px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.result-saving {
  font-size: 11px;
  color: #869177;
  margin: 12px 0;
}
.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pause-layer {
  position: absolute;
  inset: 0;
  background: #f8faf3ed;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  backdrop-filter: blur(5px);
}
.pause-layer .icon {
  margin: 0 auto 16px;
  width: 30px;
  height: 30px;
  color: #8c9f83;
}
.pause-layer h2 {
  font-size: 24px;
  margin-bottom: 25px;
}
.player-aside {
  min-width: 0;
  padding-top: 0;
}
.music-card {
  padding: 23px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #edf1e9;
}
.music-card > span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #84937a;
}
.music-card > span .icon {
  width: 15px;
  height: 15px;
}
.music-card strong {
  font:
    21px/1.35 Georgia,
    serif;
  display: block;
  margin: 15px 0 20px;
  color: #53704d;
}
.music-controls {
  display: flex;
  gap: 13px;
  align-items: center;
}
.music-controls input {
  min-width: 0;
  width: 100%;
  accent-color: #64805d;
}
.login-card {
  padding: 20px 3px;
}
.login-card p {
  font-size: 11px;
  color: #849078;
  margin-bottom: 12px;
}
.login-card a {
  font-size: 11px;
}
.record-shortcut {
  display: flex;
  justify-content: space-between;
  padding: 19px 3px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.record-shortcut .icon {
  width: 16px;
  height: 16px;
}
.next-games {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}
.next-game {
  display: flex;
  gap: 12px;
  align-items: center;
}
.next-game canvas {
  width: 62px;
  height: 44px;
  border-radius: 9px;
}
.next-game span {
  flex: 1;
  min-width: 0;
}
.next-game strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
}
.next-game small {
  font-size: 10px;
  color: var(--muted);
}
.next-game > .icon {
  width: 16px;
  height: 16px;
  color: #95a08b;
}
.loading-panel {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}
.loading-panel p {
  margin-bottom: 20px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--paper);
  color: var(--ink);
  width: min(520px, calc(100% - 30px));
  max-height: 85vh;
  padding: 26px;
  box-shadow: 0 30px 100px #18372520;
}
dialog::backdrop {
  background: #273d3555;
  backdrop-filter: blur(5px);
}
.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.modal-top h2 {
  font-size: 20px;
  font-weight: 600;
}
.modal-top .icon-button {
  height: 36px;
  min-width: 36px;
}
.setting-group {
  margin: 20px 0;
}
.setting-group > label {
  font-size: 12px;
  display: block;
  margin-bottom: 10px;
}
.segmented {
  display: flex;
  gap: 5px;
  background: var(--soft);
  border-radius: 12px;
  padding: 5px;
}
.segmented button {
  flex: 1;
  padding: 8px;
  border-radius: 9px;
  font-size: 12px;
}
.segmented button.selected {
  background: var(--paper);
  box-shadow: 0 2px 8px #3450250a;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.setting-row input[type="range"] {
  width: 150px;
  accent-color: #69815d;
}
.setting-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--pine);
}
.setting-note {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 20px;
}
.settings-foot {
  padding-top: 26px;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 22px;
}
.stage-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}
.stage-choice {
  border: 1px solid var(--line);
  background: #f4f6f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  min-height: 65px;
}
.stage-choice b {
  font-size: 16px;
}
.stage-choice small {
  font-size: 9px;
  letter-spacing: 1px;
  color: #ae995d;
}
.stage-choice.current {
  outline: 2px solid #67885b;
  background: #edf4e4;
}
.stage-choice.cleared {
  background: #e7efdc;
}
.stage-choice:disabled {
  opacity: 0.35;
}
.account-callout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: #edf2e6;
  border-radius: 16px;
  padding: 21px;
  margin-bottom: 24px;
  font-size: 13px;
}
.record-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 35px;
}
.record-summary > div {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 24px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}
.record-summary b {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 550;
  letter-spacing: -1px;
}
.record-summary b small {
  font-size: 16px;
  color: #a4b09b;
  font-weight: 400;
}
.record-summary span {
  font-size: 11px;
  color: #839078;
  margin-top: 9px;
}
.record-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.record-row {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
}
.record-row:last-child {
  border: 0;
}
.record-row:hover {
  background: #f3f6ee;
}
.record-row canvas {
  width: 78px;
  height: 52px;
  border-radius: 10px;
}
.record-row > .record-game {
  flex: 1;
}
.record-row > span {
  display: flex;
  flex-direction: column;
  min-width: 130px;
}
.record-row strong {
  font-size: 14px;
  font-weight: 600;
}
.record-row b {
  font-size: 16px;
  font-weight: 550;
}
.record-row small {
  font-size: 10px;
  color: var(--muted);
}
.record-row > .icon {
  width: 17px;
  color: #9caa94;
}
.info-page {
  max-width: 760px;
  padding: 60px 30px;
  min-height: 75vh;
  margin: auto;
}
.info-page h1 {
  font-size: 30px;
  margin-bottom: 30px;
}
.info-page p {
  font-size: 14px;
  line-height: 1.9;
  color: #7f8d79;
  margin-bottom: 22px;
}
.catalog-ad {
  display: none;
}
.catalog-ad.ad-visible {
  display: block;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: 100%;
  min-height: 120px;
}
.ad-label {
  display: block;
  text-align: center;
  font-size: 10px;
  letter-spacing: 1px;
  color: #98a18f;
  margin-bottom: 12px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #2a483eee;
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 13px;
  max-width: calc(100% - 32px);
  width: max-content;
  z-index: 1000;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1450px) {
  .library-main {
    padding-top: 45px;
  }
  .game-grid {
    gap: 28px;
  }
  .card-copy {
    padding: 20px;
  }
  .card-art {
    aspect-ratio: 1.55;
  }
}
@media (max-width: 1100px) {
  .header-inner {
    gap: 20px;
    padding: 18px 28px;
  }
  .wordmark img {
    width: 190px;
    height: auto;
  }
  .main-nav {
    gap: 17px;
  }
  .header-tools {
    gap: 7px;
  }
  .library-main,
  .player-main {
    padding: 30px 28px 45px;
  }
  .site-footer {
    margin: 0 28px;
  }
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .player-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 20px;
  }
  .game-stage {
    padding: 19px;
  }
  .account-link span {
    max-width: 65px;
  }
  .music-card {
    padding: 19px;
  }
}
@media (max-width: 800px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px 22px 0;
  }
  .wordmark img {
    width: 175px;
  }
  .header-tools {
    margin-left: auto;
  }
  .main-nav {
    order: 3;
    width: 100%;
    margin: 2px 0 0;
    justify-content: center;
    gap: 36px;
  }
  .main-nav a {
    padding: 12px 0;
  }
  .account-link {
    padding: 0;
  }
  .account-link .icon {
    display: none;
  }
  .player-layout {
    grid-template-columns: 1fr;
  }
  .player-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .music-card {
    padding: 20px;
  }
  .music-card strong {
    font-size: 19px;
    margin: 9px 0 13px;
  }
  .next-games {
    grid-column: 1/-1;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
  }
  .next-game {
    gap: 8px;
  }
  .next-game > .icon {
    display: none;
  }
  .next-game canvas {
    width: 49px;
    height: 36px;
  }
  .record-shortcut {
    height: 70px;
  }
  .game-stage {
    padding: 25px;
  }
  .record-row {
    gap: 14px;
  }
  .record-row > span {
    min-width: 100px;
  }
}
@media (max-width: 600px) {
  :root {
    font-size: 14px;
  }
  .header-inner {
    padding: 13px 17px 0;
  }
  .wordmark img {
    width: 162px;
  }
  .header-tools {
    gap: 6px;
  }
  .icon-button {
    height: 36px;
    min-width: 36px;
  }
  .icon-button .icon {
    width: 18px;
    height: 18px;
  }
  .sign-in {
    font-size: 11px;
    padding: 7px 12px;
  }
  .account-link span {
    max-width: 60px;
    font-size: 11px;
  }
  .main-nav {
    font-size: 12px;
    gap: 35px;
  }
  .library-main,
  .player-main {
    padding: 25px 17px 36px;
  }
  .collection-heading {
    gap: 13px;
    margin-bottom: 19px;
  }
  .collection-heading h1 {
    font-size: 21px;
    gap: 8px;
    white-space: nowrap;
  }
  .collection-count {
    font-size: 10px;
    padding: 2px 7px;
  }
  .search-box {
    width: 145px;
    padding: 8px 10px;
    gap: 6px;
  }
  .search-box input {
    font-size: 11px;
  }
  .search-box .icon {
    width: 14px;
    height: 14px;
  }
  .filter-chips {
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 21px;
  }
  .filter-chip {
    white-space: nowrap;
    padding: 7px 12px;
    font-size: 11px;
    min-height: 35px;
  }
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 12px;
  }
  .game-card {
    border-radius: 16px;
  }
  .card-copy {
    padding: 13px 12px 14px;
  }
  .card-title-row h2 {
    font-size: 13px;
    line-height: 1.5;
    word-break: keep-all;
  }
  .card-arrow {
    width: 13px;
    height: 13px;
  }
  .english-name {
    font-size: 9px;
    letter-spacing: 0;
  }
  .card-record {
    font-size: 9px;
    margin-top: 12px;
    display: grid;
    gap: 1px;
  }
  .card-record b {
    font-size: 10px;
  }
  .favorite-button {
    width: 33px;
    height: 33px;
    right: 6px;
    top: 6px;
  }
  .favorite-button .icon {
    width: 15px;
    height: 15px;
  }
  .continue-pill {
    left: 7px;
    bottom: 7px;
    font-size: 9px;
    padding: 2px 7px;
  }
  .card-art {
    aspect-ratio: 1.35;
  }
  .progress-track {
    margin-top: 8px;
  }
  .site-footer {
    margin: 0 17px;
    padding: 20px 0 30px;
    font-size: 10px;
  }
  .back-link {
    margin-bottom: 18px;
  }
  .player-heading {
    margin-bottom: 18px;
  }
  .player-heading h1 {
    font-size: 21px;
  }
  .player-actions {
    gap: 5px;
  }
  .player-actions > .soft-button {
    padding: 8px 10px;
    font-size: 11px;
    min-height: 36px;
  }
  .player-actions > .soft-button small {
    display: none;
  }
  .game-stage {
    border-radius: 18px;
    padding: 16px 12px;
  }
  .game-hud {
    gap: 19px;
    margin-bottom: 13px;
    padding: 0 3px 13px;
  }
  .game-hud strong {
    font-size: 22px;
  }
  .game-hud span {
    font-size: 9px;
  }
  .save-status {
    font-size: 9px;
    max-width: 125px;
  }
  .play-status {
    font-size: 10px;
    margin: 0 3px 17px;
  }
  .game-tools {
    gap: 6px;
    margin-top: 18px;
  }
  .game-tools .soft-button {
    padding: 9px 11px;
    font-size: 11px;
  }
  .game-help {
    font-size: 11px;
    line-height: 1.75;
    margin-top: 17px;
    padding: 0 3px;
  }
  .player-aside {
    gap: 13px;
  }
  .music-card {
    padding: 16px;
  }
  .music-card strong {
    font-size: 17px;
  }
  .music-controls {
    gap: 8px;
  }
  .login-card {
    padding: 13px 0;
  }
  .login-card .soft-button {
    padding: 8px;
    font-size: 10px;
  }
  .next-games {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 2px 4px;
  }
  .next-game canvas {
    width: 57px;
    height: 40px;
  }
  .next-game > .icon {
    display: block;
  }
  .next-game strong {
    font-size: 12px;
  }
  .completion {
    padding: 16px;
    margin-top: 20px;
  }
  .result-score {
    font-size: 21px;
  }
  .result-top strong {
    font-size: 14px;
  }
  .result-mark {
    width: 32px;
    height: 32px;
  }
  .result-actions {
    gap: 6px;
  }
  .result-actions .soft-button {
    font-size: 11px;
    padding: 9px 11px;
  }
  .record-summary {
    gap: 9px;
    margin-bottom: 22px;
  }
  .record-summary > div {
    padding: 18px 13px;
    border-radius: 14px;
  }
  .record-summary b {
    font-size: 25px;
  }
  .record-summary b small {
    font-size: 12px;
  }
  .record-summary span {
    font-size: 9px;
  }
  .account-callout {
    align-items: flex-start;
    flex-direction: column;
    padding: 17px;
    gap: 12px;
    font-size: 12px;
  }
  .record-row {
    padding: 14px 12px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .record-row canvas {
    width: 54px;
    height: 40px;
  }
  .record-row > .record-game {
    min-width: 100px;
  }
  .record-row > span {
    min-width: 60px;
  }
  .record-row strong {
    font-size: 12px;
  }
  .record-row small {
    font-size: 9px;
  }
  .record-row b {
    font-size: 12px;
  }
  .record-row > .icon {
    display: none;
  }
  .record-game small {
    display: none;
  }
  .record-row > span:last-of-type {
    min-width: 52px;
    text-align: right;
  }
  .stage-picker {
    gap: 7px;
  }
  .stage-choice {
    padding: 8px;
    min-height: 62px;
  }
  .loading-panel {
    padding: 55px 12px;
  }
  dialog {
    padding: 22px;
  }
  .settings-foot .text-button {
    font-size: 12px;
  }
}
@media (max-width: 370px) {
  .header-inner {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .wordmark img {
    width: 139px;
  }
  .header-tools {
    gap: 4px;
  }
  .header-tools .icon-button {
    min-width: 32px;
    height: 32px;
  }
  .account-link span {
    max-width: 45px;
  }
  .library-main,
  .player-main {
    padding-left: 12px;
    padding-right: 12px;
  }
  .collection-heading h1 {
    font-size: 19px;
  }
  .search-box {
    width: 130px;
  }
  .card-title-row h2 {
    font-size: 12px;
  }
  .record-row canvas {
    display: none;
  }
  .game-hud {
    gap: 15px;
  }
  .save-status {
    max-width: 105px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
[data-reduced="true"] *,
[data-reduced="true"] *:before,
[data-reduced="true"] *:after {
  transition: none !important;
  animation: none !important;
}
.footer-links {
  display: flex;
  gap: 19px;
}
.auth-main {
  min-height: 78vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 24px;
}
.auth-mark {
  display: block;
  margin: 0 auto 15px;
}
.auth-card h1 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 17px 0;
  font-size: 12px;
  color: #687b60;
}
.auth-field input,
.auth-field select,
.auth-field textarea {
  background: #f7f9f2;
  border: 1px solid #dfe7d7;
  border-radius: 11px;
  padding: 12px;
  color: var(--ink);
  width: 100%;
  font: inherit;
  font-size: 14px;
}
.auth-field textarea {
  resize: vertical;
  min-height: 110px;
}
.auth-field input:focus,
.auth-field textarea:focus {
  outline: 2px solid #91ab7e;
  outline-offset: 0;
}
.field-note {
  font-size: 11px;
  color: #839179;
  line-height: 1.8;
  margin: 7px 0 16px;
  word-break: keep-all;
}
.auth-check {
  display: flex;
  gap: 9px;
  font-size: 11px;
  align-items: flex-start;
  margin: 12px 0;
  color: #72836a;
}
.auth-check input {
  margin: 3px 0 0;
  width: 16px;
  height: 16px;
  accent-color: #48633d;
  flex: none;
}
.auth-check a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-submit {
  width: 100%;
  margin-top: 12px;
}
.auth-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 11px;
  color: #809174;
  margin-top: 24px;
}
.form-error {
  font-size: 12px;
  line-height: 1.7;
  color: #a35e57;
  margin: 13px 0;
}
.form-error:empty {
  display: none;
}
.account-main {
  max-width: 940px;
  margin: auto;
  min-height: 75vh;
  padding: 40px 28px 60px;
}
.account-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.account-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 25px;
  min-width: 0;
}
.account-panel h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 17px;
}
.account-record-actions {
  display: grid;
  gap: 13px;
  justify-items: start;
}
.recovery-code {
  display: block;
  overflow-wrap: anywhere;
  background: #edf3e5;
  border: 1px solid #d9e5d0;
  border-radius: 12px;
  padding: 15px;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 1.5px;
  margin: 18px 0;
  user-select: all;
}
.support-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  padding: 16px;
  background: #f1f5e9;
  border-radius: 12px;
  margin: 15px 0;
}
.legal-date {
  font-size: 11px;
  color: #8e9b83;
  letter-spacing: 1px;
}
.legal-page h1 {
  margin-top: 8px;
}
.legal-page section {
  margin: 32px 0;
}
.legal-page h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 12px;
}
.legal-page p {
  font-size: 13px;
  color: #6e7d67;
}
.legal-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  margin-top: 35px;
}
@media (max-width: 600px) {
  .auth-main {
    padding: 32px 17px;
  }
  .auth-card {
    padding: 25px;
  }
  .account-main {
    padding: 25px 17px 40px;
  }
  .account-panels {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .account-panel {
    padding: 22px;
  }
  .footer-links {
    gap: 12px;
  }
  .legal-page {
    padding: 35px 22px;
  }
  .legal-page h1 {
    font-size: 25px;
  }
}

.player-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 25px;
}
.player-topline .back-link { margin-bottom: 0; }
.player-topline .soft-button { font-size: 12px; }
.share-link-input { width: 100%; min-width: 0; padding: 12px; font: inherit; }
