.sm-studio-launch, .sm-panel, .sm-performance {
  border: 1px solid #dedddd;
  border-radius: 1rem;
  background: #fff;
}
.sm-studio-head {padding: 1.2rem 1.4rem .65rem;}
.sm-studio-head h2, .sm-performance h2, .sm-panel h2 {font-size: 1.2rem;}
.sm-launch-options {display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 0 .8rem .85rem; gap: .25rem;}
.sm-launch-options a {display: flex; align-items: flex-start; gap: .7rem; padding: .8rem .65rem; border-radius: .7rem; color: #272324;}
.sm-launch-options a:hover {background: #f8f4f4; text-decoration: none;}
.sm-launch-options strong, .sm-launch-options small {display: block;}
.sm-launch-options small {color: #625d5d; font-size: .85rem; line-height: 1.4; margin-top: .2rem;}
.sm-mode-icon, .sm-result-icon {color: #ae262c; background: #fff1f0; padding: .55rem; border-radius: .65rem; display: inline-flex; flex: none;}
.sm-mode-icon svg, .sm-result-icon svg {width: 1.35rem; height: 1.35rem;}
.sm-toolbar {display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin-bottom: 1rem;}
.sm-toolbar label {font-weight: 650; font-size: .88rem;}
.sm-toolbar select {font: inherit; background: #fff; border: 1px solid #c7c3c4; border-radius: .55rem; padding: .56rem .65rem; max-width: 100%; min-height: 44px;}
.sm-tabs, .sm-game-nav {display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem;}
.sm-tabs a, .sm-game-nav a {display: inline-flex; align-items: center; justify-content: center; gap: .55rem; border-radius: .65rem; color: #4c4748; text-decoration: none; padding: .7rem .9rem; font-weight: 600; line-height: 1.3; min-height: 44px;}
.sm-tabs {border-bottom: 1px solid #e8e4e4; padding-bottom: .65rem;}
.sm-tabs a svg {width: 1.2rem; height: 1.2rem; flex: none;}
.sm-tabs a[aria-current], .sm-tabs a:hover {background: #222021; color: #fff;}
.sm-game-nav {margin: 0 0 .8rem;}
.sm-game-nav a {font-size: .88rem; padding: .5rem .8rem;}
.sm-game-nav a[aria-current], .sm-game-nav a:hover {background: #f6e9e9; color: #8f191f;}
.sm-panel, .sm-performance {padding: clamp(1rem, 3.3vw, 2rem); min-width: 0;}
.sm-header, .sm-performance-title {display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; column-gap: .8rem; row-gap: .35rem;}
.sm-header > span, .sm-performance-title > span {font: 600 .86rem/1.5 Inter, sans-serif; font-variant-numeric: tabular-nums; color: #686163;}
.sm-card-stage {display: block; width: 100%; overflow: visible; perspective: clamp(30rem,85vw,62rem); background: transparent; border: 0; padding: 0; margin: 1.3rem 0 .9rem; color: #fff;}
.sm-flipper {
  --card-depth: 5px;
  position: relative; display: grid; width: 100%;
  -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
  transform: rotateY(0deg); transition: transform 520ms cubic-bezier(.32,.2,.28,.98);
}
.sm-card-stage.is-flipped .sm-flipper {transform: rotateY(180deg);}
.sm-flipper::before, .sm-flipper::after {
  content: ""; position: absolute; inset-block: .6rem;
  width: calc(2 * var(--card-depth)); pointer-events: none;
  background: linear-gradient(90deg,#a7383b,#4c292d 55%,#261d21);
  transform: translateX(-50%) rotateY(90deg);
}
.sm-flipper::before {left: 0;}
.sm-flipper::after {left: 100%;}
.sm-card-face {
  grid-area: 1/1; min-width: 0; min-height: 15rem; border-radius: .88rem;
  text-align: left; padding: clamp(1.2rem,4vw,2.25rem); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  color: #fff; background: radial-gradient(ellipse at top right,#542b31 0,transparent 58%),#211e20;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transform: translateZ(var(--card-depth)); border: 1px solid #574247;
  box-shadow: 0 .4rem 1.1rem #1e111930;
}
.sm-card-face > small {text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 650; color: #ffd1d1;}
.sm-card-face > strong {display: block; font-size: clamp(1.13rem,2.5vw,1.65rem); line-height: 1.35; letter-spacing: -.025em; margin: 1.3rem 0; max-width: 42rem; overflow-wrap: anywhere;}
.sm-card-hint {font-size: .85rem; color: #e5d7d8;}
.sm-card-back {transform: rotateY(180deg) translateZ(var(--card-depth)); border-color: #a84047; background: radial-gradient(ellipse at bottom right,#a5333a 0,transparent 65%),#6b1b23;}
.sm-controls {display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: 1rem;}
.sm-controls .button {min-height: 44px;}
.sm-card-detail {margin: 1rem 0; color: #544c4e;}
.sm-source {padding: .35rem 0; min-height: 44px; font: inherit; color: #a11b25; background: transparent; border: 0; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; text-align: left;}
.sm-source-label {display: block; margin-top: .5rem; color: #60595a;}
.sm-chart-slot {margin-top: 1rem;}
.sm-performance {background: #fcfbfb;}
.sm-performance-title p, .sm-instruction, .sm-empty p, .sm-result p {color: #60595b; margin: .25rem 0 0;}
.sm-chart-bar {display: flex; overflow: hidden; height: .7rem; background: #e3dfe0; border-radius: 99rem; margin: 1.1rem 0 .8rem;}
.sm-right {background: #303031;}
.sm-miss {background: #c33640;}
.sm-new {background: #ddd9da;}
.sm-chart-legend {display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; list-style: none; padding: 0; margin: 0;}
.sm-chart-legend li {display: flex; align-items: center; gap: .35rem; font-size: .88rem; color: #514c4d;}
.sm-chart-legend strong {color: #262323; font-variant-numeric: tabular-nums;}
.sm-chart-legend i {width: .63rem; height: .63rem; border-radius: 2px; display: inline-block;}
.sm-pairs {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: .8rem; margin-top: 1rem;}
.sm-pairs > div {display: grid; gap: .5rem;}
.sm-pairs h3 {font-size: .86rem; color: #625a5d; margin: 0 0 .15rem;}
.sm-tile, .sm-choice {color: #302d2e; font: inherit; background: #fff; text-align: left; border: 1px solid #cfcbcc; border-radius: .65rem; padding: .85rem 1rem; min-height: 46px; overflow-wrap: anywhere;}
.sm-tile {min-height: 4rem;}
.sm-tile:disabled, .sm-choice:disabled {opacity: 1; cursor: default;}
.sm-tile:disabled:not(.is-matched) {background: #fbfafa; color: #60595d;}
.sm-tile:not(:disabled):hover, .sm-choice:not(:disabled):hover, .sm-tile.is-selected {background: #fff3f3; border-color: #9f242d;}
.sm-tile.is-selected {box-shadow: inset 0 0 0 1px #9f242d;}
.sm-tile.is-matched {border-color: transparent; background: #eeeeec; color: #686262;}
.sm-tile-check {font-weight: 700; padding-right: .35rem;}
.sm-feedback-line {min-height: 1.5em; color: #5f3438; margin: .8rem 0 0; font-weight: 550;}
.sm-result, .sm-empty {text-align: center; padding-block: 2rem; display: grid; place-items: center; gap: .6rem;}
.sm-result p, .sm-empty p {margin: 0; max-width: 34rem;}
.sm-result .button, .sm-empty .button {margin-top: .45rem;}
.sm-result .sm-controls {justify-content: center; margin: 0;}
.sm-question {font-size: clamp(1.12rem,2.4vw,1.4rem); line-height: 1.4; font-weight: 620; color: #272123; margin: 1.25rem 0 .9rem;}
.sm-options {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem;}
.sm-choice {display: flex; gap: .7rem; align-items: center;}
.sm-choice > span {font-size: .78rem; font-weight: 650; display: inline-grid; place-items: center; background: #f2eeee; border-radius: .35rem; min-width: 1.6rem; min-height: 1.6rem;}
.sm-choice.is-correct {border-color: #3a6b4c; background: #f3f8f4;}
.sm-choice.is-wrong {border-color: #a62732; background: #fcf1f2;}
.sm-response {margin-top: 1rem; border-left: .2rem solid #b2363c; padding: .2rem .9rem;}
.sm-response p {margin-top: .3rem; color: #524b4d;}
@media (max-width: 1080px) { .sm-launch-options {grid-template-columns: repeat(2,minmax(0,1fr));} }
@media (max-width: 600px) {
  .sm-tabs {display: grid; grid-template-columns: repeat(2,minmax(0,1fr));}
  .sm-tabs a {justify-content: flex-start; padding: .55rem .65rem;}
  .sm-options {grid-template-columns: 1fr;}
  .sm-launch-options a {padding: .65rem .3rem; gap: .45rem;}
  .sm-mode-icon {padding: .4rem;}
  .sm-pairs {gap: .5rem;}
  .sm-tile {padding: .65rem .55rem;}
}
@media (max-width: 360px) {
  .sm-launch-options {grid-template-columns: 1fr;}
  .sm-toolbar select {width: 100%;}
}
@media (prefers-reduced-motion: reduce) {
  .sm-flipper {transition: none; transform: none !important;}
  .sm-flipper::before, .sm-flipper::after {display: none;}
  .sm-card-face, .sm-card-back {transform: none;}
  .sm-card-face[aria-hidden="true"] {visibility: hidden;}
}
.sm-chapter-action {padding: .75rem 1.35rem 1rem;}
.sm-response .sm-last-miss {font-size: .9rem;}
