:root {
  color-scheme: light;
  --bg: #f4f4f5;
  --paper: #ffffff;
  --line: #dfe1e6;
  --line-strong: #cfd3da;
  --text: #33363d;
  --muted: #8a8e96;
  --teal: #58c7c3;
  --teal-dark: #36b8b0;
  --teal-soft: #d8fbf7;
  --green: #6bdc84;
  --blue: #5c78d7;
  --blue-soft: #e8eefc;
  --dark-pill: #3e4249;
  --danger: #ed6565;
  --danger-soft: #fde1e4;
  --shadow: 0 28px 80px rgba(36, 40, 48, 0.12);
  --soft-shadow: 0 20px 52px rgba(42, 49, 58, 0.1);
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
  -webkit-text-size-adjust: 100%;
}

button {
  font: inherit;
  touch-action: manipulation;
}

#app {
  min-height: 100vh;
}

.screen {
  min-height: 100vh;
}

.selection-screen {
  display: grid;
  place-items: start center;
  padding: 12px 22px 28px;
}

.selection-panel {
  width: min(1304px, 100%);
  margin: 0 auto;
  padding: 44px;
  border: 1px solid #dedfe4;
  border-radius: 16px;
  background: var(--paper);
}

.selection-row {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 50px;
  padding: 0 0 54px;
  border-bottom: 1px solid #e3e4e8;
}

.selection-row + .selection-row {
  padding-top: 54px;
}

.selection-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.selection-category {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  align-self: start;
  gap: 26px;
}

.selection-category h2 {
  margin: 0;
  color: #151922;
  font-size: 28px;
  font-weight: 950;
  line-height: 1.2;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  overflow: hidden;
  border-radius: 8px;
  background: #20262b;
  box-shadow: inset 0 -18px 24px rgba(0, 0, 0, 0.18);
}

.category-icon svg {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 8px 12px rgba(77, 231, 123, 0.28));
}

.category-icon.personality svg {
  width: 76px;
  height: 76px;
}

.category-icon.interview svg {
  width: 74px;
  height: 74px;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 26px;
}

.selection-button {
  min-height: 76px;
  padding: 10px 18px;
  border: 1px solid #ccd1d8;
  border-radius: 4px;
  background: #fff;
  color: #20242b;
  cursor: pointer;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  word-break: keep-all;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.selection-button:hover,
.selection-button:focus-visible {
  border-color: #8fded8;
  box-shadow: 0 10px 24px rgba(52, 185, 177, 0.12);
  outline: 0;
  transform: translateY(-1px);
}

.selection-button.is-ready {
  border-color: #a8deda;
}

.selection-button.is-pending {
  color: #2f333a;
}

.selection-button-pulse {
  background: #f6fbfb;
  border-color: #b9c0c9;
  animation: selection-pulse 0.36s ease;
}

@keyframes selection-pulse {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px) scale(0.99);
  }
  100% {
    transform: translateY(0);
  }
}

.detail-screen {
  display: grid;
  place-items: center;
  padding: 44px 24px 24px;
}

.detail-card {
  width: min(576px, 100%);
  overflow: hidden;
  border: 1px solid #eceef2;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.detail-tabs {
  display: flex;
  align-items: center;
  height: 80px;
  padding: 0 38px;
  border-bottom: 1px solid #eceef2;
  gap: 36px;
  font-size: 18px;
}

.detail-tabs span:last-child {
  font-weight: 800;
}

.detail-body {
  position: relative;
  padding: 38px 54px 36px;
}

.task-icon {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff368 0%, #f9eb4f 48%, #44d1ad 100%);
  color: #fff;
  box-shadow: inset 0 -10px 16px rgba(24, 142, 117, 0.1);
}

.task-icon.small {
  width: 54px;
  height: 54px;
}

.task-icon.floating {
  position: absolute;
  top: 38px;
  right: 54px;
  width: 62px;
  height: 62px;
}

.icon-hand {
  width: 33px;
  height: 33px;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.1));
}

.detail-title {
  margin: 0 0 58px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 900;
}

.meta-row {
  display: flex;
  gap: 26px;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 700;
}

.meta-row .accent {
  color: var(--green);
}

.meta-row .muted {
  color: #a0a4ab;
}

.intro-art {
  position: relative;
  height: 180px;
  overflow: hidden;
  border-radius: 16px;
  background: #fff0c2;
}

.swirl {
  position: absolute;
  inset: 12px 26px;
  opacity: 0.45;
}

.mini-card,
.shape-bit {
  position: absolute;
}

.mini-card {
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #17b995;
  color: white;
  box-shadow: 0 8px 18px rgba(18, 143, 116, 0.18);
}

.mini-card.rock {
  left: 90px;
  top: 40px;
  width: 82px;
  height: 102px;
}

.mini-card.scissors {
  left: 224px;
  top: 27px;
  width: 65px;
  height: 82px;
}

.mini-card.paper {
  right: 74px;
  top: 60px;
  width: 72px;
  height: 90px;
}

.shape-bit.a {
  left: 34px;
  top: 34px;
  width: 28px;
  height: 36px;
  border-radius: 5px;
  background: #f27e69;
}

.shape-bit.b {
  left: 60px;
  bottom: 22px;
  width: 38px;
  height: 46px;
  border-radius: 5px;
  background: #2e746e;
}

.shape-bit.c {
  right: 32px;
  top: 54px;
  width: 30px;
  height: 40px;
  border-radius: 5px;
  background: #f27e69;
}

.shape-bit.d,
.shape-bit.e {
  width: 14px;
  height: 18px;
  border: 2px solid #f1d78b;
  border-radius: 4px;
}

.shape-bit.d {
  left: 200px;
  bottom: 28px;
}

.shape-bit.e {
  right: 60px;
  bottom: 18px;
}

.hand-mark {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.hand-mark.small {
  width: 48px;
  height: 48px;
}

.detail-copy {
  margin: 22px 0 22px;
  color: #969aa1;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.62;
  word-break: keep-all;
}

.keyboard-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 30px;
  border: 1px solid #87eba1;
  border-radius: 999px;
  color: #32c05e;
  background: #f5fff8;
  font-size: 15px;
  font-weight: 800;
  gap: 12px;
}

.keyboard-pill.compact {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 15px;
}

.keyboard-pill svg {
  width: 18px;
  height: 18px;
}

.center {
  text-align: center;
}

.primary-button,
.secondary-button,
.dark-button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button:hover,
.secondary-button:hover,
.dark-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  width: 100%;
  height: 64px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  font-size: 18px;
  box-shadow: 0 5px 10px rgba(53, 179, 175, 0.22);
}

.secondary-button {
  min-width: 150px;
  height: 62px;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  font-size: 17px;
}

.dark-button {
  min-width: 150px;
  height: 62px;
  border-radius: 999px;
  background: #6f747c;
  color: white;
  font-size: 17px;
}

.explain-screen,
.play-page {
  min-height: 100vh;
  background: #f7f7f8;
}

.topbar {
  display: flex;
  align-items: center;
  height: 80px;
  padding: 0 45px;
  border-bottom: 1px solid #d9dbe0;
  gap: 18px;
}

.topbar-title {
  padding-right: 18px;
  border-right: 1px solid #d7d9de;
  font-size: 18px;
  font-weight: 700;
}

.topbar-tab {
  font-size: 18px;
  font-weight: 900;
}

.timer {
  display: grid;
  place-items: center;
  min-width: 108px;
  height: 44px;
  margin-left: auto;
  border: 1px solid #b8c9f7;
  border-radius: 8px;
  color: var(--blue);
  background: #fff;
  font-size: 24px;
  font-weight: 900;
}

.close-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  background: transparent;
  color: #6c7078;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.explain-content {
  position: relative;
  max-width: 1320px;
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.slide-pill {
  display: inline-grid;
  place-items: center;
  min-width: 92px;
  height: 48px;
  margin: 0 auto 28px;
  border-radius: 999px;
  background: var(--dark-pill);
  color: white;
  font-size: 19px;
  font-weight: 900;
}

.slide-copy {
  margin: 0 auto;
  max-width: 1080px;
  color: #3d4046;
  text-align: center;
  font-size: 35px;
  font-weight: 900;
  line-height: 1.58;
  word-break: keep-all;
}

.slide-copy .accent {
  color: var(--teal);
}

.time-note {
  display: inline-grid;
  place-items: center;
  min-height: 49px;
  margin-top: 22px;
  padding: 0 28px;
  border-radius: 8px;
  background: #e6edff;
  color: #2f67dd;
  font-size: 16px;
  font-weight: 700;
}

.lesson-stage {
  margin-top: 72px;
}

.stage-title {
  margin: 0 0 26px;
  text-align: center;
  font-size: 38px;
  font-weight: 950;
}

.rps-board {
  display: grid;
  grid-template-columns: 168px 320px 168px;
  justify-content: center;
  align-items: start;
  gap: 56px;
}

.player-block {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.avatar-ring {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  border-radius: 999px;
  background: #e8e9eb;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.player-block.active .avatar-ring {
  background: #a4eee9;
  box-shadow: 0 0 0 12px #dbfbf8;
}

.avatar {
  width: 132px;
  height: 132px;
}

.player-name {
  color: #3f4247;
  font-size: 22px;
  font-weight: 900;
}

.player-block.active .player-name {
  color: var(--teal-dark);
}

.cards-and-keys {
  display: grid;
  justify-items: center;
}

.cards-row {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.move-card {
  display: grid;
  place-items: center;
  width: 132px;
  height: 160px;
  border: 6px solid #fff;
  border-radius: 8px;
  background: linear-gradient(140deg, #dffdfa 0%, #bef3ef 100%);
  color: var(--teal);
  box-shadow: 0 16px 24px rgba(58, 178, 173, 0.16);
}

.move-card.unknown {
  background: #c9cdd2;
  color: white;
  box-shadow: 0 18px 28px rgba(85, 91, 101, 0.2);
  font-size: 80px;
  font-weight: 900;
}

.move-card.revealed-muted {
  opacity: 0.66;
}

.keys-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 38px;
}

.key-wrap {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.key-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.key-button:focus-visible {
  outline: 0;
}

.key-button:focus-visible .keycap {
  outline: 3px solid #8fded8;
  outline-offset: 3px;
}

.key-button:active .keycap {
  transform: translateY(1px);
}

.keycap {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid #767d87;
  border-radius: 7px;
  background: linear-gradient(#f8f9fa, #e8eaed);
  color: #34383e;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.18);
  font-size: 30px;
}

.keycap.active {
  background: #3d424b;
  color: white;
  border-color: #3d424b;
}

.key-label {
  color: #696d73;
  font-size: 14px;
  font-weight: 900;
}

.slide-arrow {
  position: fixed;
  top: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid #cfd3da;
  border-radius: 999px;
  background: white;
  color: #6d747d;
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 40px;
}

.slide-arrow.left {
  left: 46px;
}

.slide-arrow.right {
  right: 46px;
}

.slide-arrow:disabled {
  opacity: 0.48;
  cursor: default;
}

.understanding {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(682px, calc(100vw - 40px));
  min-height: 64px;
  margin: 30px auto 0;
  padding: 10px 26px 10px 22px;
  border: 1px solid #e5e7ec;
  border-radius: 12px;
  background: white;
  box-shadow: 0 18px 54px rgba(40, 45, 53, 0.08);
  gap: 24px;
}

.understanding-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #34383e;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.understanding-title svg {
  width: 24px;
  height: 24px;
}

.understanding-copy {
  color: #777b83;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.start-task-button {
  height: 42px;
  padding: 0 23px;
  border: 0;
  border-radius: 999px;
  background: #6d747d;
  color: white;
  cursor: pointer;
  font-weight: 900;
}

.countdown-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 36px 20px;
  background: #f1f2f4;
}

.countdown-card {
  width: min(830px, 100%);
  padding: 47px 54px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
}

.countdown-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  gap: 14px;
  font-size: 31px;
  font-weight: 950;
}

.countdown-copy {
  margin: 22px 0 40px;
  color: #767a82;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
}

.sample-frame {
  padding: 32px 30px 28px;
  border: 1px solid #cfd4dc;
  border-radius: 16px;
}

.sample-frame .stage-title {
  font-size: 28px;
  margin-bottom: 26px;
}

.sample-frame .rps-board {
  grid-template-columns: 124px 226px 124px;
  gap: 46px;
}

.sample-frame .avatar-ring {
  width: 124px;
  height: 124px;
}

.sample-frame .avatar {
  width: 98px;
  height: 98px;
}

.sample-frame .player-name {
  font-size: 16px;
}

.sample-frame .move-card {
  width: 98px;
  height: 120px;
  border-width: 5px;
}

.sample-frame .move-card.unknown {
  font-size: 58px;
}

.sample-frame .hand-mark {
  width: 72px;
  height: 72px;
}

.sample-frame .keys-row {
  margin-top: 30px;
  gap: 10px;
}

.sample-frame .keycap {
  width: 43px;
  height: 43px;
  font-size: 24px;
}

.progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  margin-top: 30px;
  border-radius: 999px;
  background: #e2e3e5;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.2s linear;
}

.auto-text {
  margin: 18px 0 0;
  color: #2765dc;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}

.play-page {
  display: grid;
  place-items: center;
  padding: 34px 20px;
}

.game-card {
  width: min(1262px, 100%);
  overflow: hidden;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
}

.game-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 82px;
  padding: 0 36px 0 48px;
  border-bottom: 1px solid #e0e2e7;
  gap: 28px;
}

.question-number {
  min-width: 42px;
  text-align: center;
  font-size: 19px;
  font-weight: 950;
}

.instruction {
  position: relative;
  color: #242832;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.instruction::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 16px;
  margin-right: 18px;
  background: #d2d5db;
  vertical-align: -2px;
}

.game-body {
  padding: 58px 34px 60px;
}

.game-body .stage-title {
  font-size: 42px;
  margin-bottom: 34px;
}

.game-body .rps-board {
  grid-template-columns: 218px 398px 218px;
  gap: 66px;
}

.game-body .avatar-ring {
  width: 218px;
  height: 218px;
}

.game-body .avatar {
  width: 176px;
  height: 176px;
}

.game-body .player-name {
  font-size: 27px;
}

.game-body .move-card {
  width: 180px;
  height: 216px;
  border-width: 9px;
}

.game-body .move-card.unknown {
  font-size: 104px;
}

.game-body .hand-mark {
  width: 148px;
  height: 148px;
}

.game-body .keycap {
  width: 72px;
  height: 72px;
  font-size: 38px;
}

.game-body .key-label {
  font-size: 17px;
}

.status-strip {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
  color: #71757d;
  font-size: 15px;
  font-weight: 800;
}

.status-strip strong {
  color: #34383e;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.result-card {
  width: min(700px, 100%);
  padding: 54px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
  text-align: center;
}

.result-title {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 950;
}

.result-copy {
  margin: 0 0 30px;
  color: #737780;
  font-size: 17px;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 34px;
}

.summary-item {
  padding: 22px 12px;
  border: 1px solid #e3e6eb;
  border-radius: 12px;
  background: #fafbfc;
}

.summary-value {
  color: var(--teal-dark);
  font-size: 28px;
  font-weight: 950;
}

.summary-label {
  margin-top: 8px;
  color: #747982;
  font-size: 14px;
  font-weight: 800;
}

.rotate-mark {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.1));
}

.rotate-intro-art {
  height: 180px;
  overflow: hidden;
  border-radius: 16px;
}

.rotate-intro-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.rotation-explain-content {
  padding-bottom: 60px;
}

.rotation-slide-copy {
  max-width: 1180px;
}

.rotation-lesson-stage {
  display: grid;
  justify-items: center;
  margin-top: 58px;
}

.rotation-work-board {
  display: grid;
  grid-template-columns: 314px 400px;
  justify-content: center;
  align-items: center;
  gap: 28px;
}

.rotation-comparison {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: center;
  width: 314px;
  min-height: 286px;
  overflow: hidden;
  border: 1px solid #dde1e6;
  border-radius: 12px;
  background: #fff;
}

.rotation-pane {
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 286px;
  padding: 24px 14px 30px;
}

.rotation-pane.after {
  background: #eefdf3;
}

.rotation-pane-label {
  color: #60656d;
  font-size: 13px;
  font-weight: 700;
}

.rotation-pane.after .rotation-pane-label {
  color: #31c663;
}

.rotation-arrow {
  display: grid;
  place-items: center;
  width: 56px;
  height: 100%;
  color: #64d772;
  font-size: 54px;
  font-weight: 950;
  line-height: 1;
}

.rotation-object-wrap {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
}

.rotation-object {
  display: grid;
  place-items: center;
  transform-origin: 50% 50%;
}

.rotation-letter {
  display: block;
  color: #050505;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 78px;
  font-weight: 950;
  line-height: 1;
}

.rotation-grid-shape {
  display: block;
  width: 74px;
  height: 74px;
  overflow: visible;
}

.rotation-side {
  min-width: 0;
}

.rotation-control-area {
  position: relative;
  display: grid;
  gap: 12px;
}

.rotation-action-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rotation-action-card {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 106px;
  padding: 10px 8px;
  border: 2px solid #8febaa;
  border-radius: 12px;
  background: #fbfffc;
  color: #21bd59;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  word-break: keep-all;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.rotation-action-card svg {
  width: 48px;
  height: 48px;
  margin-bottom: 5px;
}

.rotation-action-card:hover,
.rotation-action-card:focus-visible {
  background: #f2fff6;
  box-shadow: 0 10px 24px rgba(39, 195, 94, 0.15);
  outline: 0;
  transform: translateY(-1px);
}

.rotation-action-card:disabled {
  cursor: default;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.rotation-process-panel {
  display: grid;
  grid-template-columns: 1fr 122px;
  min-height: 172px;
  padding: 14px 12px 14px 18px;
  border: 1px solid #e1e4e9;
  border-radius: 12px;
  background: #fff;
  gap: 12px;
}

.rotation-step-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 8px 10px;
}

.rotation-step {
  display: grid;
  place-items: center;
  min-width: 32px;
  min-height: 34px;
  color: #e5e7eb;
  font-size: 22px;
  font-weight: 950;
}

.rotation-step.filled {
  color: #20bd57;
}

.rotation-step svg {
  width: 34px;
  height: 34px;
}

.click-panel {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 144px;
  padding: 14px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
}

.click-label {
  color: #8a8e96;
  font-size: 12px;
  font-weight: 800;
}

.click-count {
  margin: 6px 0 12px;
  color: #3b3f45;
  font-size: 32px;
  font-weight: 950;
}

.click-panel button {
  min-width: 84px;
  min-height: 28px;
  margin-top: 6px;
  border: 0;
  border-radius: 999px;
  background: #f2f3f5;
  color: #565b63;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.click-panel button:disabled {
  cursor: default;
  opacity: 0.45;
}

.rotation-helper {
  justify-self: end;
  max-width: 260px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #e6edff;
  color: #2865dc;
  font-size: 13px;
  font-weight: 800;
}

.rotation-submit {
  display: grid;
  place-items: center;
  min-width: 222px;
  height: 62px;
  margin: 28px auto 0;
  border: 0;
  border-radius: 999px;
  background: #5c78d7;
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  font-weight: 950;
  box-shadow: 0 5px 10px rgba(74, 101, 200, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.rotation-submit:hover,
.rotation-submit:focus-visible {
  outline: 0;
  transform: translateY(-1px);
  box-shadow: 0 9px 18px rgba(74, 101, 200, 0.22);
}

.rotation-submit:disabled,
.rotation-submit.sample {
  cursor: default;
  background: #a9bbee;
  box-shadow: none;
  transform: none;
}

.rotation-sample-frame .rotation-work-board {
  transform: scale(0.86);
  transform-origin: center;
}

.rotation-sample-frame .rotation-submit {
  margin-top: -12px;
}

.rotation-game-body {
  padding: 52px 34px 46px;
}

.rotation-game-body .rotation-work-board {
  grid-template-columns: 430px 545px;
  gap: 72px;
}

.rotation-game-body .rotation-comparison {
  width: 430px;
  min-height: 392px;
  grid-template-columns: 1fr 72px 1fr;
}

.rotation-game-body .rotation-pane {
  min-height: 392px;
  padding: 42px 22px 38px;
}

.rotation-game-body .rotation-arrow {
  width: 72px;
  font-size: 68px;
}

.rotation-game-body .rotation-object-wrap {
  width: 160px;
  height: 160px;
}

.rotation-game-body .rotation-letter {
  font-size: 104px;
}

.rotation-game-body .rotation-grid-shape {
  width: 100px;
  height: 100px;
}

.rotation-game-body .rotation-action-card {
  min-height: 148px;
  font-size: 15px;
}

.rotation-game-body .rotation-action-card svg {
  width: 62px;
  height: 62px;
}

.rotation-game-body .rotation-process-panel {
  min-height: 232px;
  grid-template-columns: 1fr 144px;
  padding: 18px 18px 18px 30px;
}

.rotation-game-body .rotation-step {
  min-height: 42px;
  font-size: 30px;
}

.rotation-game-body .rotation-step svg {
  width: 42px;
  height: 42px;
}

.rotation-game-body .click-panel {
  min-height: 194px;
}

.rotation-game-body .click-label {
  font-size: 14px;
}

.rotation-game-body .click-count {
  font-size: 38px;
}

.rotation-summary-grid {
  grid-template-columns: repeat(4, 1fr);
}

.hidden {
  display: none !important;
}

@media (max-width: 1050px) {
  .selection-panel {
    padding: 34px 26px;
  }

  .selection-row {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .selection-category {
    grid-template-columns: 64px 1fr;
    gap: 18px;
  }

  .category-icon {
    width: 64px;
    height: 64px;
  }

  .category-icon svg {
    width: 60px;
    height: 60px;
  }

  .selection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .slide-copy {
    font-size: 28px;
  }

  .rps-board,
  .game-body .rps-board {
    grid-template-columns: 150px 300px 150px;
    gap: 28px;
  }

  .game-body .avatar-ring {
    width: 160px;
    height: 160px;
  }

  .game-body .avatar {
    width: 128px;
    height: 128px;
  }

  .game-body .move-card {
    width: 132px;
    height: 160px;
  }

  .game-body .hand-mark {
    width: 108px;
    height: 108px;
  }

  .slide-arrow {
    position: static;
    transform: none;
  }

  .mobile-arrows {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
  }

  .rotation-work-board,
  .rotation-game-body .rotation-work-board {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 24px;
  }

  .rotation-game-body .rotation-comparison {
    width: min(430px, 100%);
  }

  .rotation-game-body .rotation-side {
    width: min(545px, 100%);
  }
}

@media (min-width: 1051px) {
  .mobile-arrows {
    display: none;
  }
}

@media (max-width: 760px) {
  .selection-screen {
    padding: 10px;
  }

  .selection-panel {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .selection-row {
    padding-bottom: 34px;
  }

  .selection-row + .selection-row {
    padding-top: 34px;
  }

  .selection-category h2 {
    font-size: 24px;
  }

  .selection-grid {
    grid-template-columns: 1fr;
  }

  .selection-button {
    min-height: 62px;
    font-size: 16px;
  }

  .detail-body {
    padding: 30px 24px 28px;
  }

  .task-icon.floating {
    right: 24px;
  }

  .detail-title {
    font-size: 27px;
  }

  .topbar {
    padding: 0 16px;
    gap: 10px;
  }

  .topbar-title,
  .topbar-tab {
    font-size: 15px;
  }

  .timer {
    min-width: 86px;
    font-size: 20px;
  }

  .slide-copy {
    font-size: 23px;
  }

  .rotation-slide-copy {
    font-size: 21px;
  }

  .rps-board,
  .sample-frame .rps-board,
  .game-body .rps-board {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .cards-and-keys {
    order: 2;
  }

  .understanding {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .understanding-copy,
  .understanding-title {
    white-space: normal;
  }

    .countdown-card,
    .result-card {
      padding: 34px 20px;
    }

  .sample-frame {
    padding: 24px 14px;
  }

  .rotation-countdown-card {
    padding-left: 14px;
    padding-right: 14px;
  }

  .rotation-sample-frame {
    overflow: hidden;
  }

  .rotation-sample-frame .rotation-work-board {
    transform: scale(0.76);
    margin: -34px -70px;
  }

  .game-header {
    grid-template-columns: 1fr;
    padding: 18px;
    text-align: center;
    gap: 10px;
  }

  .instruction::before {
    display: none;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .rotation-summary-grid {
    grid-template-columns: 1fr;
  }

  .rotation-game-body {
    padding: 26px 14px 32px;
  }

  .rotation-game-body .rotation-comparison,
  .rotation-comparison {
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
    width: 100%;
    min-height: 246px;
  }

  .rotation-game-body .rotation-pane,
  .rotation-pane {
    min-height: 246px;
    padding: 22px 8px 24px;
  }

  .rotation-game-body .rotation-arrow,
  .rotation-arrow {
    width: 44px;
    font-size: 42px;
  }

  .rotation-game-body .rotation-object-wrap,
  .rotation-object-wrap {
    width: 96px;
    height: 96px;
  }

  .rotation-game-body .rotation-letter,
  .rotation-letter {
    font-size: 68px;
  }

  .rotation-game-body .rotation-grid-shape,
  .rotation-grid-shape {
    width: 70px;
    height: 70px;
  }

  .rotation-side {
    width: 100%;
  }

  .rotation-action-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rotation-game-body .rotation-action-card,
  .rotation-action-card {
    min-height: 92px;
    font-size: 13px;
  }

  .rotation-game-body .rotation-action-card svg,
  .rotation-action-card svg {
    width: 42px;
    height: 42px;
  }

  .rotation-process-panel,
  .rotation-game-body .rotation-process-panel {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .rotation-step-grid {
    gap: 7px;
  }

  .rotation-game-body .rotation-step,
  .rotation-step {
    min-height: 38px;
    font-size: 24px;
  }

  .rotation-game-body .rotation-step svg,
  .rotation-step svg {
    width: 34px;
    height: 34px;
  }

  .click-panel,
  .rotation-game-body .click-panel {
    min-height: 118px;
  }

  .rotation-submit {
    width: min(260px, 100%);
  }

  .modal-actions {
    flex-direction: column;
  }

  .secondary-button,
  .dark-button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  .screen {
    min-height: 100dvh;
  }

  .selection-screen {
    place-items: stretch;
    padding: max(10px, env(safe-area-inset-top)) 10px max(16px, env(safe-area-inset-bottom));
  }

  .selection-panel {
    width: 100%;
    padding: 20px 14px;
    border-radius: 16px;
    box-shadow: none;
  }

  .selection-row {
    gap: 16px;
    padding-bottom: 28px;
  }

  .selection-row + .selection-row {
    padding-top: 28px;
  }

  .selection-category {
    grid-template-columns: 52px 1fr;
    gap: 14px;
  }

  .selection-category h2 {
    font-size: 22px;
  }

  .category-icon {
    width: 52px;
    height: 52px;
  }

  .category-icon svg,
  .category-icon.personality svg,
  .category-icon.interview svg {
    width: 50px;
    height: 50px;
  }

  .selection-grid {
    gap: 9px;
  }

  .selection-button {
    min-height: 54px;
    padding: 12px 14px;
    border-radius: 8px;
    text-align: left;
    font-size: 15px;
  }

  .detail-screen {
    place-items: start center;
    padding: max(10px, env(safe-area-inset-top)) 10px max(14px, env(safe-area-inset-bottom));
  }

  .detail-card {
    border-radius: 18px;
    box-shadow: none;
  }

  .detail-tabs {
    height: 56px;
    padding: 0 18px;
    gap: 18px;
    font-size: 15px;
  }

  .detail-body {
    padding: 24px 18px 22px;
  }

  .task-icon.floating {
    top: 22px;
    right: 18px;
    width: 50px;
    height: 50px;
  }

  .detail-title {
    margin: 0 64px 28px 0;
    font-size: 26px;
  }

  .meta-row {
    gap: 16px;
    margin-bottom: 14px;
    font-size: 15px;
  }

  .intro-art,
  .rotate-intro-art {
    height: 132px;
  }

  .mini-card.rock {
    left: 68px;
    top: 28px;
    width: 62px;
    height: 78px;
  }

  .mini-card.scissors {
    left: 170px;
    top: 20px;
    width: 50px;
    height: 64px;
  }

  .mini-card.paper {
    right: 48px;
    top: 42px;
    width: 56px;
    height: 70px;
  }

  .shape-bit.a {
    left: 22px;
    top: 28px;
    width: 22px;
    height: 28px;
  }

  .shape-bit.b {
    left: 42px;
    bottom: 18px;
    width: 30px;
    height: 36px;
  }

  .shape-bit.c {
    right: 22px;
    top: 42px;
    width: 24px;
    height: 32px;
  }

  .detail-copy {
    margin: 18px 0;
    font-size: 15px;
    line-height: 1.55;
  }

  .keyboard-pill {
    width: 100%;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    line-height: 1.35;
    gap: 8px;
  }

  .keyboard-pill.compact {
    width: auto;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
  }

  .primary-button {
    height: 56px;
    font-size: 16px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 62px;
    padding: 0 10px;
    background: rgba(247, 247, 248, 0.96);
    backdrop-filter: blur(12px);
  }

  .task-icon.small {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .topbar-title {
    max-width: 118px;
    padding-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  .topbar-tab {
    display: none;
  }

  .timer {
    min-width: 76px;
    height: 38px;
    font-size: 19px;
  }

  .close-button {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }

  .explain-content {
    min-height: auto;
    padding: 18px 12px 28px;
  }

  .slide-pill {
    min-width: 72px;
    height: 36px;
    margin-bottom: 16px;
    font-size: 15px;
  }

  .slide-copy,
  .rotation-slide-copy {
    font-size: 20px;
    line-height: 1.42;
  }

  .time-note {
    width: 100%;
    min-height: auto;
    margin-top: 16px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.45;
  }

  .lesson-stage,
  .rotation-lesson-stage {
    margin-top: 28px;
  }

  .stage-title {
    margin-bottom: 18px;
    font-size: 26px;
  }

  .slide-arrow {
    width: 50px;
    height: 50px;
    font-size: 32px;
  }

  .mobile-arrows {
    gap: 12px;
    margin-top: 16px;
  }

  .understanding {
    width: 100%;
    margin-top: 18px;
    padding: 14px;
    border-radius: 14px;
    gap: 10px;
  }

  .understanding-title {
    justify-content: center;
    font-size: 14px;
  }

  .understanding-copy {
    font-size: 13px;
  }

  .start-task-button {
    width: 100%;
    min-height: 48px;
  }

  .countdown-screen {
    place-items: start center;
    padding: max(12px, env(safe-area-inset-top)) 10px max(14px, env(safe-area-inset-bottom));
  }

  .countdown-card,
  .result-card {
    padding: 24px 14px;
    border-radius: 18px;
    box-shadow: none;
  }

  .countdown-title {
    flex-wrap: wrap;
    gap: 8px 10px;
    font-size: 24px;
    line-height: 1.25;
  }

  .countdown-copy {
    margin: 16px 0 22px;
    font-size: 14px;
    line-height: 1.5;
  }

  .sample-frame {
    padding: 18px 10px;
    border-radius: 14px;
  }

  .sample-frame .stage-title {
    margin-bottom: 16px;
    font-size: 23px;
  }

  .progress-track {
    height: 8px;
    margin-top: 20px;
  }

  .auto-text {
    font-size: 16px;
  }

  .play-page {
    place-items: start center;
    padding: max(10px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
  }

  .game-card {
    min-height: calc(100dvh - 22px);
    border-radius: 18px;
    box-shadow: none;
  }

  .game-header {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    min-height: 0;
    padding: 10px;
    gap: 8px;
    text-align: left;
  }

  .question-number {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #f3f6fb;
    font-size: 16px;
  }

  .instruction {
    font-size: 14px;
    line-height: 1.35;
  }

  .game-header .timer {
    min-width: 72px;
    height: 36px;
    font-size: 18px;
  }

  .game-body,
  .rotation-game-body {
    padding: 24px 12px 26px;
  }

  .game-body .stage-title {
    margin-bottom: 20px;
    font-size: 29px;
  }

  .rps-board,
  .sample-frame .rps-board,
  .game-body .rps-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px 12px;
    width: 100%;
  }

  .player-block {
    gap: 6px;
  }

  .rps-board > .player-block:first-child {
    order: 1;
  }

  .rps-board > .player-block:last-child {
    order: 2;
  }

  .cards-and-keys {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
  }

  .avatar-ring,
  .sample-frame .avatar-ring,
  .game-body .avatar-ring {
    width: 96px;
    height: 96px;
  }

  .avatar,
  .sample-frame .avatar,
  .game-body .avatar {
    width: 76px;
    height: 76px;
  }

  .player-name,
  .sample-frame .player-name,
  .game-body .player-name {
    font-size: 16px;
  }

  .cards-row {
    width: 100%;
    gap: 12px;
  }

  .move-card,
  .sample-frame .move-card,
  .game-body .move-card {
    width: min(40vw, 138px);
    height: auto;
    aspect-ratio: 5 / 6;
    border-width: 5px;
  }

  .move-card.unknown,
  .sample-frame .move-card.unknown,
  .game-body .move-card.unknown {
    font-size: 70px;
  }

  .hand-mark,
  .sample-frame .hand-mark,
  .game-body .hand-mark {
    width: 78%;
    height: 78%;
  }

  .keys-row {
    width: 100%;
    gap: 8px;
    margin-top: 18px;
  }

  .keys-row .key-wrap {
    flex: 1;
    min-width: 0;
  }

  .keycap,
  .sample-frame .keycap,
  .game-body .keycap {
    width: 100%;
    height: 58px;
    font-size: 28px;
  }

  .key-label,
  .game-body .key-label {
    font-size: 13px;
  }

  .status-strip {
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 20px;
    font-size: 13px;
  }

  .result-title {
    font-size: 28px;
  }

  .result-copy {
    font-size: 15px;
    line-height: 1.5;
  }

  .summary-item {
    padding: 18px 12px;
  }

  .summary-value {
    font-size: 25px;
  }

  .rotation-sample-frame {
    overflow: visible;
  }

  .rotation-sample-frame .rotation-work-board {
    width: 100%;
    margin: 0;
    transform: none;
  }

  .rotation-work-board,
  .rotation-game-body .rotation-work-board {
    width: 100%;
    gap: 18px;
  }

  .rotation-game-body .rotation-comparison,
  .rotation-comparison {
    min-height: 210px;
  }

  .rotation-game-body .rotation-pane,
  .rotation-pane {
    min-height: 210px;
    padding: 18px 8px 20px;
  }

  .rotation-game-body .rotation-object-wrap,
  .rotation-object-wrap {
    width: 82px;
    height: 82px;
  }

  .rotation-game-body .rotation-letter,
  .rotation-letter {
    font-size: 60px;
  }

  .rotation-game-body .rotation-grid-shape,
  .rotation-grid-shape {
    width: 62px;
    height: 62px;
  }

  .rotation-action-row {
    gap: 8px;
  }

  .rotation-game-body .rotation-action-card,
  .rotation-action-card {
    min-height: 82px;
    padding: 8px;
  }

  .rotation-game-body .rotation-action-card svg,
  .rotation-action-card svg {
    width: 38px;
    height: 38px;
  }

  .rotation-process-panel,
  .rotation-game-body .rotation-process-panel {
    gap: 10px;
    border-radius: 12px;
  }

  .rotation-step-grid {
    gap: 6px;
  }

  .rotation-game-body .rotation-step,
  .rotation-step {
    min-height: 34px;
    font-size: 20px;
  }

  .rotation-game-body .rotation-step svg,
  .rotation-step svg {
    width: 30px;
    height: 30px;
  }

  .click-panel,
  .rotation-game-body .click-panel {
    min-height: 96px;
  }

  .click-panel button,
  .rotation-game-body .click-panel button {
    min-height: 44px;
  }

  .rotation-submit {
    width: min(340px, 100%);
    height: 56px;
    margin-top: 18px;
  }

  .rotation-game-body .rotation-submit {
    position: sticky;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 3;
  }
}

@media (max-width: 430px) {
  .slide-copy,
  .rotation-slide-copy {
    font-size: 18px;
  }

  .game-body .stage-title {
    font-size: 26px;
  }

  .avatar-ring,
  .sample-frame .avatar-ring,
  .game-body .avatar-ring {
    width: 90px;
    height: 90px;
  }

  .avatar,
  .sample-frame .avatar,
  .game-body .avatar {
    width: 72px;
    height: 72px;
  }

  .move-card,
  .sample-frame .move-card,
  .game-body .move-card {
    width: min(42vw, 126px);
  }

  .keycap,
  .sample-frame .keycap,
  .game-body .keycap {
    height: 56px;
  }

  .rotation-game-body .rotation-comparison,
  .rotation-comparison {
    min-height: 196px;
  }

  .rotation-game-body .rotation-pane,
  .rotation-pane {
    min-height: 196px;
  }

  .rotation-action-card span {
    font-size: 12px;
  }
}
