@font-face {
  font-family: OpeningManrope;
  src: url("/assets/fonts/Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #f6f5fa;
  --surface: #fff;
  --soft: #f1ebfa;
  --border: #e4dced;
  --ink: #241d37;
  --muted: #635771;
  --accent: #5a46db;
  --accent-dark: #513783;
  --board-light: #eeedd7;
  --board-dark: #83956c;
  font: 16px/1.45 OpeningManrope, system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
}
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.svg-defs { position: absolute; width: 0; height: 0; pointer-events: none; }
.sr-only, .board-jump:not(:focus), .board-panel-jump:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  z-index: 30;
  inset: 10px auto auto 10px;
  padding: 9px 14px;
  border-radius: 8px;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--surface);
}
.skip-link:focus { transform: none; }

.workspace {
  width: min(calc(100% - 72px), 1120px);
  margin-inline: auto;
  padding: 28px 0 32px;
}
.workspace:focus, #topic-title:focus, #panel-title:focus, #check-summary-title:focus { outline: none; }

.studio-heading {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 16px;
}
.studio-heading h1 {
  margin: 4px 0 0;
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
}
#studio-count { color: var(--muted); font-size: .8125rem; font-weight: 800; }
.studio-status { color: var(--muted); }
.studio-search-box {
  position: relative;
  width: min(100%, 366px);
  margin-bottom: 10px;
}
.studio-search-box > svg {
  position: absolute;
  inset: 50% auto auto 12px;
  width: 21px;
  height: 21px;
  transform: translateY(-50%);
  fill: none;
  stroke: #665481;
  stroke-width: 1.75;
  stroke-linecap: round;
  pointer-events: none;
}
.studio-search {
  width: 100%;
  min-height: 46px;
  padding: 8px 14px 8px 39px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 1rem;
}
.studio-search::placeholder { color: var(--muted); opacity: 1; }
.studio-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.studio-entry {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 2px 0 #e9e3f0;
  background: var(--surface);
  text-align: start;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.studio-entry img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.studio-entry-copy {
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: 65px;
  padding: 7px 38px 10px 11px;
}
.studio-entry-side { color: #635180; font-size: .6875rem; font-weight: 800; }
.studio-entry strong {
  overflow-wrap: anywhere;
  text-wrap: balance;
  font-size: .9375rem;
  font-weight: 800;
  line-height: 1.12;
}
.studio-entry::before, .studio-entry::after {
  position: absolute;
  content: "";
  pointer-events: none;
}
.studio-entry::before {
  inset: auto 10px 8px auto;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  background: var(--soft);
}
.studio-entry::after {
  inset: auto 19px 16px auto;
  width: 5px;
  height: 5px;
  transform: rotate(-45deg);
  border-inline-end: 1.5px solid #715d8c;
  border-block-end: 1.5px solid #715d8c;
}
@media (hover: hover) {
  .studio-entry:hover { transform: translateY(-2px); border-color: #bbaaec; box-shadow: 0 4px 10px #39186014; }
}
@media (761px <= width <= 1219px) {
  .studio-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (761px <= width <= 1020px) {
  .studio-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

#study { position: relative; }
.study-header, .study-layout {
  --panel-width: min(40.1%, 434px);
  --study-gap: 17px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-width);
  align-items: start;
  gap: var(--study-gap);
}
.study-header { align-items: center; margin-bottom: 21px; }
.study-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.study-heading-copy { min-width: 0; }
#topic-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -.026em;
  line-height: 1.12;
}
#study-side-caption { margin: 3px 0 0; color: var(--muted); font-size: .8125rem; font-weight: 750; }

.board-panel { min-width: 0; }
.board-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 1px 0 1px #d9dcca;
}
.chessboard {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  width: 100%;
  aspect-ratio: 1;
  background: conic-gradient(var(--board-light) 25%, var(--board-dark) 0 50%, var(--board-light) 0 75%, var(--board-dark) 0) 0 0 / 25% 25%;
  user-select: none;
}
.square {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  touch-action: manipulation;
}
.square.light { background: var(--board-light); color: #46583b; }
.square.dark { background: var(--board-dark); color: #fffdf2; }
.square:focus-visible {
  z-index: 5;
  outline: none;
  box-shadow: inset 0 0 0 3px #3c2968, inset 0 0 0 5px #faf4ff;
}
.square:is(.previous, .selected, .correct, .mistake, .hint)::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: #ffda6d91;
  pointer-events: none;
}
.square.selected::before, .square.hint::before { background: #c9b6ecab; }
.square.correct::before { background: #c9dfa3a6; }
.square.mistake::before { background: #efaa9bb0; animation: opening-mistake 220ms ease-out; }
@keyframes opening-mistake { from { background: #dd786cbe; } }
.square.target::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 36%;
  border-radius: 50%;
  background: #48306865;
  pointer-events: none;
}
.square.target:has(.piece)::after {
  inset: 0;
  background: radial-gradient(circle closest-side, transparent 81%, #48306875 83%);
}
.square > .piece {
  position: relative;
  z-index: 2;
  display: block;
  width: 93%;
  height: 93%;
  object-fit: contain;
  pointer-events: none;
}
.square .coord {
  position: absolute;
  z-index: 3;
  color: inherit;
  font-size: clamp(.5rem, 1vw, .75rem);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.square .rank { top: 6%; left: 6%; }
.square .file { right: 6%; bottom: 6%; }
.move-badge {
  position: absolute;
  z-index: 3;
  inset: 7% 6% auto auto;
  display: grid;
  place-items: center;
  width: clamp(.9rem, 1.4vw, 1.2rem);
  aspect-ratio: 1;
  border: 1px solid #fff7f2;
  border-radius: 50%;
  background: #4d765a;
  color: #fff;
  font-size: clamp(.65rem, 1vw, .875rem);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.square.mistake .move-badge { background: #9a4a43; }
.piece-motion {
  position: absolute;
  z-index: 5;
  width: 12.5%;
  height: 12.5%;
  overflow: visible;
  pointer-events: none;
}
.piece-motion-trail { z-index: 4; filter: blur(1.4px); }
body .board-frame .move-guide-arrow { fill: #7654bd; stroke: #f7f1fc; }

.board-toolbar, .guide-navigation, .board-controls, .move-history { display: flex; align-items: center; }
.board-toolbar { justify-content: end; gap: 7px; margin-top: 9px; }
#study[data-mode="guide"] .board-toolbar {
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}
#study[data-mode="beginner"] .board-toolbar, #study[data-summary="check"] .board-panel { display: none; }
.guide-navigation { flex: none; gap: 3px; }
.board-controls { flex: none; }
.move-history {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: auto hidden;
  scrollbar-width: thin;
  white-space: nowrap;
}
.move-history button {
  flex: none;
  min-height: 44px;
  padding: 4px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 800;
}
.move-history button:is(:hover, [aria-current]) { background: var(--soft); color: var(--accent-dark); }
.move-history button:focus-visible { outline-offset: -3px; }

.icon-button {
  display: inline-grid;
  flex: none;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: #665084;
}
.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
#study[data-mode="guide"] .board-toolbar .icon-button { border-color: transparent; background: #f5f0fa; }
.icon-button:hover:not(:disabled), #study[data-mode="guide"] .board-toolbar .icon-button:hover:not(:disabled) {
  background: #ede3f9;
}
.icon-button:disabled { opacity: .5; }

.study-sidebar { display: grid; align-content: start; gap: 9px; min-width: 0; }
.study-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: clamp(13px, 1.55vw, 19px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 2px 0 #eae4ef;
}
#study[data-mode="guide"] .study-panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}
.segmented button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 5px 3px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 800;
  line-height: 1.12;
}
.segmented button:not(:disabled):hover { background: #f5f0fa; }
.segmented button[aria-pressed="true"] { background: #eee7fa; color: #503380; }
.segmented button:disabled { opacity: .5; }
.training-side { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: .8125rem; font-weight: 750; }
.side-selector { flex: 1 1 250px; }

.position-heading {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
}
.position-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.position-meta:not(:has(> :not([hidden]))) { display: none; }
#position-step { color: var(--muted); font-size: .8125rem; font-weight: 800; }
.turn-context {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  margin: 0;
  margin-inline-start: auto;
  padding: 3px 7px;
  border-radius: 7px;
  background: #f4eff8;
  color: #5c4a6c;
  font-size: .6875rem;
  font-weight: 800;
}
.turn-context::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid #88789a;
  border-radius: 50%;
  background: #fffdf7;
}
.turn-context[data-side="b"]::before { background: #635171; }
.position-progress {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 5px;
  margin-block-end: 6px;
}
.position-progress span {
  height: 4px;
  border-radius: 3px;
  background: #eae4f1;
  transition: background-color .18s ease;
}
.position-progress .complete { background: var(--accent); }
.position-progress .current { background: #a58be5; }
#panel-title {
  margin: 0;
  font-size: clamp(1.18rem, 2.1vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.18;
}
.position-prompt, .position-instruction { margin: 0; color: var(--muted); line-height: 1.42; overflow-wrap: anywhere; }
.position-prompt { font-size: .9375rem; }
.position-instruction { font-size: .875rem; }
.board-jump:focus, .board-panel-jump:focus {
  position: relative;
  width: auto;
  height: auto;
  clip-path: none;
}

#study[data-mode="guide"] .position-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
#study[data-mode="guide"] .position-meta { order: 1; }
#study[data-mode="guide"] .position-instruction { flex-basis: 100%; }
#study[data-mode="guide"] .study-panel:has(.choices:not(:empty)) .position-heading {
  border-bottom: 0;
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}
#study[data-mode="guide"] .coach-note { order: -1; }
#study[data-mode="guide"] .choices {
  margin-top: -12px;
  padding: 0 14px 14px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: var(--surface);
}

.coach-note, .check-solution {
  position: relative;
  min-width: 0;
  padding: 11px 13px 12px 15px;
  border-radius: 11px;
  background: #f3eef9;
  color: #51465d;
}
.coach-note::before, .check-solution::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 2px;
  border-radius: 2px;
  background: #a48ad3;
}
.coach-note[data-tone="correct"] { background: #eaf3eb; color: #385945; }
.coach-note[data-tone="correct"]::before { background: #76a183; }
.coach-note[data-tone="mistake"] { background: #faeeed; color: #65474d; }
.coach-note[data-tone="mistake"]::before { background: #c58282; }
.coach-note h3, .check-solution strong { color: #413052; font-size: .9375rem; font-weight: 800; }
.coach-note h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 4px;
  line-height: 1.25;
}
.coach-note[data-tone="correct"] h3 { color: #2f5d43; }
.coach-note[data-tone="mistake"] h3 { color: #7b3d43; }
.coach-note p, .check-solution p { margin: 0; font-size: .875rem; line-height: 1.42; overflow-wrap: anywhere; }
.coach-note h3:empty, .coach-note p:empty { display: none; }
.coach-note:not(:has(h3:not(:empty), p:not(:empty))) { display: none; }
.note-move-chip {
  flex: none;
  padding: 2px 6px;
  border-radius: 6px;
  background: #eadef7;
  color: #563d81;
  font-size: .6875rem;
}
.check-solution p { margin-top: 4px; }
.check-line { margin: 0; color: var(--muted); font-size: .8125rem; overflow-wrap: anywhere; }

.choices { display: grid; gap: 7px; }
.choices:empty, .actions:empty { display: none; }
.opening-choice {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbf9fd;
  text-align: start;
}
.guide-move {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 8px;
  transition: background-color .18s ease, border-color .18s ease;
}
.guide-move:is(:hover, :focus-visible) { border-color: #bfa7ea; background: #f6f0fb; }
.guide-move.is-main { border-color: #e2d5f0; background: #f1ebfa; }
.guide-move-piece { width: 39px; height: 37px; padding: 5px; border-radius: 8px; background: #efe9f7; }
.guide-move-copy { display: grid; gap: 2px; min-width: 0; }
.guide-move-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 6px; }
.guide-move-title strong { font-size: .875rem; font-weight: 800; line-height: 1.28; overflow-wrap: anywhere; }
.guide-move-detail { color: var(--muted); font-size: .75rem; font-weight: 750; }
.guide-move-label { padding: 2px 6px; border-radius: 6px; background: #e9dcf8; color: #563984; font-size: .65rem; font-weight: 800; }
.guide-move.is-error .guide-move-label { background: #f7e8e7; color: #81434b; }
.guide-move-arrow { color: #79648e; font-size: 1.25rem; font-weight: 800; line-height: 1; }

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #eee8f2;
}
.actions > :only-child { grid-column: 1 / -1; }
.actions > .practice-skip:only-child { grid-column: 2; }
.button {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid #d9cfea;
  border-radius: 10px;
  background: var(--surface);
  color: #57446e;
  font-size: .8125rem;
  font-weight: 800;
  line-height: 1.24;
  text-align: center;
  transition: background-color .18s ease, border-color .18s ease;
}
.button:hover:not(:disabled) { background: #f5effa; border-color: #bcade3; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover:not(:disabled) { border-color: #5039cb; background: #5039cb; }
.button.soft { background: #f1ebfa; color: #583b8e; }
.button.quiet { background: transparent; border-color: transparent; color: #634891; }
.button:disabled { opacity: .5; }
.check-reply { justify-self: end; }
.summary-result { color: var(--muted); font-size: .875rem; }
.summary-result > summary { cursor: pointer; }
.summary-result strong { color: var(--ink); }
.summary-result p { margin: 6px 0 0; }
.summary-result :is(.summary-show, .summary-hide) { display: block; margin-top: 4px; color: var(--accent-dark); font-weight: 750; }
.summary-result[open] .summary-show, .summary-result:not([open]) .summary-hide { display: none; }

.beginner-move {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 9px;
  background: #f1ebfa;
  color: #4e396c;
}
.beginner-piece { flex: none; width: 30px; height: 30px; padding: 3px; border-radius: 8px; background: #eae0f7; }
.beginner-route { display: flex; align-items: center; gap: 5px; font-size: .9375rem; font-weight: 800; white-space: nowrap; }
.beginner-arrow { color: #766189; }

#study[data-summary="check"] .study-layout { display: block; }
#study[data-summary="check"] .study-sidebar { display: none; }
.check-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.025fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 2px 0 #eae4ef;
}
.check-summary img { display: block; width: 100%; height: 100%; object-fit: cover; }
.check-summary-copy { display: grid; align-content: start; gap: 14px; min-width: 0; padding: clamp(18px, 3vw, 38px); }
.check-summary-copy h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; line-height: 1.17; }
.check-summary-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0; color: #4c3d62; font-weight: 800; }
.check-summary-score strong { color: var(--accent); font-size: clamp(2.15rem, 4vw, 3rem); line-height: 1; }
.check-summary-progress {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.check-summary-progress li {
  display: grid;
  place-items: center;
  min-height: 35px;
  border-radius: 8px;
  background: #f3eef7;
  color: #694d80;
  font-weight: 800;
}
.check-summary-progress li[data-outcome="independent"] { background: #e9f2e9; color: #3d694e; }
.check-summary-progress li[data-outcome="error"] { background: #faeeed; color: #87474d; }
.check-summary-history { margin: 0; color: var(--muted); font-size: .875rem; }
#check-summary-notes h3 { margin: 0 0 6px; font-size: 1rem; }
.check-summary-missed {
  display: grid;
  gap: 2px;
  margin-bottom: 5px;
  padding: 7px 10px;
  border: 1px solid #efdee2;
  border-radius: 9px;
  background: #f9eff1;
  color: #613d4c;
  font-size: .8125rem;
  line-height: 1.38;
}
.check-summary-missed span { color: #824b55; }
#check-summary-actions { margin-top: 8px; }

@media (max-width: 1020px) {
  .study-header, .study-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .study-header { margin-bottom: 10px; }
  .study-layout { align-items: stretch; }
  .study-sidebar, .study-panel { display: contents; }
  .board-panel { order: 2; }
  .position-heading {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    order: 1;
  }
  .coach-note { order: 3; }
  .choices { order: 4; }
  .actions { order: 5; }
  #study[data-mode="guide"] .coach-note { order: 3; }
  #study[data-mode="guide"] .position-heading {
    order: 4;
    padding: 0;
    border: 0;
    background: transparent;
  }
  #study[data-mode="guide"] .choices {
    order: 5;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }
  #study[data-mode="guide"] .actions { order: 6; }
  .actions { padding-top: 0; border: 0; }
  #study:is([data-mode="train"], [data-mode="check"]):not([data-summary="check"]) .study-title { padding-inline-end: 48px; }
  #study:is([data-mode="train"], [data-mode="check"]) .board-toolbar { margin: 0; }
  #study:is([data-mode="train"], [data-mode="check"]) #board-flip { position: absolute; inset: 0 0 auto auto; }
  .position-progress { margin-block-end: 2px; }
  .position-prompt { font-size: .875rem; }
  #study[data-mode="beginner"] .position-heading-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
  }
  .beginner-move { flex: none; margin: 0; }
  .check-summary { grid-template-columns: minmax(0, 1fr); }
  .check-summary img { aspect-ratio: 2; height: auto; max-height: 280px; }
  #check-summary-actions { padding-top: 9px; border-top: 1px solid #eee8f2; }
}

@media (max-width: 760px) {
  .workspace { width: min(calc(100% - 32px), 580px); padding-top: 14px; }
  .studio-heading { justify-content: space-between; margin: 9px 0 13px; }
  .studio-heading h1 { margin: 0; font-size: 1.875rem; }
  .studio-search-box { width: 100%; margin-bottom: 10px; }
  .studio-search { min-height: 44px; }
  .studio-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .studio-entry { border-radius: 12px; }
  .studio-entry img { aspect-ratio: 1.835; }
  .studio-entry-copy { min-height: 56px; padding: 5px 8px 7px; }
  .studio-entry strong { font-size: .8125rem; }
  .studio-entry::before, .studio-entry::after { display: none; }
  .study-title { gap: 10px; }
  #topic-title { font-size: clamp(1.15rem, 5.4vw, 1.6rem); }
  .study-caption { font-size: .75rem; }
  .board-frame { border-radius: 11px; }
  .board-toolbar { gap: 4px; }
  .move-history button { min-height: 40px; padding-inline: 5px; font-size: .75rem; }
  .guide-navigation { gap: 2px; }
  .guide-move { grid-template-columns: 24px minmax(0, 1fr); gap: 4px 5px; padding: 6px; }
  .guide-move-piece { width: 24px; height: 25px; padding: 2px; }
  .guide-move-title strong { font-size: .8125rem; }
  .guide-move-detail { font-size: .6875rem; }
  .guide-move-arrow { display: none; }
  .coach-note, .check-solution { padding: 9px 11px 10px 13px; }
}
@media (max-width: 360px) {
  .studio-entry strong { font-size: .75rem; }
  .position-prompt { font-size: .8125rem; }
  .segmented button { font-size: .75rem; }
  .button { padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
