:root {
  --bg-top: #041120;
  --bg-bottom: #02060d;
  --panel: rgba(8, 19, 36, 0.9);
  --glass: rgba(11, 28, 52, 0.72);
  --line: rgba(83, 218, 255, 0.34);
  --line-strong: rgba(137, 235, 255, 0.68);
  --text-main: #e8f8ff;
  --text-soft: #96b8ce;
  --text-dim: #6f8da2;
  --primary: #3fd7ff;
  --primary-deep: #0e99d1;
  --danger: #ff7f9e;
  --ok: #71f5b7;
}

body.skin-2 {
  --bg-top: #eef7ff;
  --bg-bottom: #dceeff;
  --panel: rgba(255, 255, 255, 0.84);
  --glass: rgba(240, 247, 255, 0.82);
  --line: rgba(0, 127, 220, 0.28);
  --line-strong: rgba(0, 120, 215, 0.65);
  --text-main: #0f2740;
  --text-soft: #43617d;
  --text-dim: #55738e;
  --primary: #00a2d8;
  --primary-deep: #0072c7;
  --danger: #d95371;
  --ok: #20b87e;
}

body.skin-3 {
  --bg-top: #f4fbf3;
  --bg-bottom: #e7f4e3;
  --panel: #ffffff;
  --glass: #ffffff;
  --line: rgba(116, 173, 126, 0.3);
  --line-strong: rgba(82, 146, 93, 0.52);
  --text-main: #1f3324;
  --text-soft: #4d6b54;
  --text-dim: #6a866f;
  --primary: #7ecb8c;
  --primary-deep: #4d9f62;
  --danger: #be5e6e;
  --ok: #56ad71;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Exo 2", "Noto Sans KR", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 14% 18%, rgba(0, 164, 255, 0.2), transparent 42%),
    radial-gradient(circle at 84% 84%, rgba(0, 113, 221, 0.14), transparent 38%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(126, 205, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 205, 255, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
}

body.skin-2 {
  font-family: "Manrope", "Noto Sans KR", sans-serif;
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 157, 255, 0.12), transparent 42%),
    radial-gradient(circle at 86% 24%, rgba(0, 125, 227, 0.14), transparent 36%),
    linear-gradient(160deg, #f6fbff 0%, #e4f2ff 40%, #d8ecff 100%);
}

body.skin-2::before {
  opacity: 0.6;
  background-image:
    radial-gradient(circle at 82% 12%, rgba(0, 152, 237, 0.25), transparent 24%),
    radial-gradient(circle at 13% 86%, rgba(15, 139, 214, 0.18), transparent 26%),
    linear-gradient(rgba(36, 140, 212, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 140, 212, 0.08) 1px, transparent 1px);
}

body.skin-3 {
  font-family: "Noto Sans KR", "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f5fcf2 0%, #e6f4e1 100%);
}

body.skin-3::before {
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(108, 153, 116, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 153, 116, 0.2) 1px, transparent 1px);
}

.phone {
  width: min(100%, 430px);
  height: auto;
  min-height: calc(100dvh - 24px);
  border-radius: 34px;
  border: 1px solid rgba(133, 204, 255, 0.24);
  background: linear-gradient(180deg, rgba(9, 21, 40, 0.88), rgba(4, 12, 24, 0.94));
  box-shadow:
    0 36px 72px rgba(0, 0, 0, 0.58),
    inset 0 0 0 1px rgba(147, 219, 255, 0.16),
    inset 0 -24px 56px rgba(0, 28, 58, 0.32);
  display: flex;
  flex-direction: column;
  padding: 18px 16px 14px;
  position: relative;
  overflow: visible;
}

.phone::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% -8%, rgba(126, 236, 255, 0.22), transparent 44%),
    radial-gradient(circle at 88% 0%, rgba(41, 124, 255, 0.22), transparent 38%);
}

body.skin-2 .phone {
  border-color: rgba(77, 166, 235, 0.42);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 243, 255, 0.9));
  box-shadow:
    0 26px 62px rgba(38, 108, 161, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

body.skin-2 .phone::before {
  background:
    radial-gradient(circle at 17% -6%, rgba(0, 158, 233, 0.14), transparent 44%),
    radial-gradient(circle at 88% 2%, rgba(41, 124, 255, 0.14), transparent 38%);
}

body.skin-3 .phone {
  border-radius: 18px;
  border-color: rgba(156, 168, 179, 0.55);
  background: #fff;
  box-shadow: 0 12px 24px rgba(34, 48, 62, 0.14);
}

body.skin-3 .phone::before {
  background: none;
}

.phone-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-top: 4px;
}

.top-home-btn {
  position: absolute;
  right: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(14, 38, 68, 0.72);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.top-home-btn:hover,
.top-home-btn:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.top-home-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.top-back-btn {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(14, 38, 68, 0.72);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.top-back-btn:hover,
.top-back-btn:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.top-back-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.title {
  margin: 0;
  font-family: "Orbitron", "Exo 2", sans-serif;
  font-size: clamp(1.5rem, 4.6vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-shadow: 0 0 24px rgba(114, 225, 255, 0.42);
}

body.skin-2 .title {
  font-family: "Manrope", "Noto Sans KR", sans-serif;
  letter-spacing: 0.01em;
  text-shadow: none;
}

body.skin-3 .title {
  font-family: "Noto Sans KR", "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-shadow: none;
}

.title-quote {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.main-nav {
  position: relative;
  z-index: 1;
  margin: auto 0;
  display: grid;
  gap: 12px;
}

.main-nav-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.main-nav-row-single {
  grid-template-columns: minmax(0, 1fr);
}

.menu-button {
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(34, 196, 255, 0.2), rgba(0, 100, 186, 0.34));
  font-size: 1.02rem;
  font-weight: 700;
  backdrop-filter: blur(7px);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.menu-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.menu-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.menu-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-button::after {
  content: ">";
  font-family: "Orbitron", sans-serif;
  font-size: 1.2rem;
  opacity: 0.9;
}

.menu-button:hover,
.menu-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(74, 215, 255, 0.36), rgba(0, 135, 219, 0.42));
  outline: none;
}

.phone-footer {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  border-top: 1px solid rgba(130, 198, 255, 0.2);
  padding-top: 10px;
  color: var(--text-soft);
  font-size: 0.78rem;
  display: grid;
  gap: 8px;
}

.phone-footer a {
  color: #95deff;
  text-decoration: none;
}

.phone-footer a:hover,
.phone-footer a:focus-visible {
  color: #caf2ff;
  text-decoration: underline;
  outline: none;
}

.footer-meta {
  display: grid;
  justify-items: center;
  gap: 2px;
  line-height: 1.4;
}

.footer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.skin-nav {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 43, 77, 0.56);
  color: var(--text-main);
  font-size: 0.68rem;
  line-height: 1;
  padding: 6px 7px;
  cursor: pointer;
}

.skin-nav:hover,
.skin-nav:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.skin-label {
  min-width: 54px;
  text-align: center;
  color: var(--text-main);
  font-size: 0.72rem;
  font-weight: 700;
}

.footer-main-btn {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(18, 49, 86, 0.6);
  color: var(--text-main) !important;
  text-decoration: none;
  padding: 6px 10px;
  font-size: 0.73rem;
  font-weight: 600;
}

body.skin-2 .menu-button {
  background: linear-gradient(135deg, rgba(56, 179, 255, 0.16), rgba(0, 124, 222, 0.22));
}

body.skin-2 .menu-button:hover,
body.skin-2 .menu-button:focus-visible {
  background: linear-gradient(135deg, rgba(77, 188, 255, 0.28), rgba(0, 126, 214, 0.28));
}

body.skin-2 .phone-footer a {
  color: #0075c8;
}

body.skin-2 .skin-nav,
body.skin-2 .top-back-btn,
body.skin-2 .top-home-btn,
body.skin-2 .footer-main-btn {
  background: rgba(0, 132, 224, 0.1);
}

body.skin-3 .menu-button {
  background: #edf8ec;
  border-color: rgba(120, 172, 129, 0.45);
}

body.skin-3 .menu-button:hover,
body.skin-3 .menu-button:focus-visible {
  background: #e2f2df;
}

body.skin-3 .phone-footer a {
  color: #3f8050;
}

body.skin-3 .skin-nav,
body.skin-3 .top-back-btn,
body.skin-3 .top-home-btn,
body.skin-3 .footer-main-btn {
  background: #eaf6e8;
}

.sub-page {
  position: relative;
  z-index: 1;
  margin: auto 0;
  display: grid;
  gap: 10px;
}

.sub-page h2 {
  margin: 0;
  font-size: clamp(1.2rem, 4.4vw, 1.52rem);
}

.sub-page p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.back-link {
  margin-top: 10px;
  width: fit-content;
  text-decoration: none;
  color: var(--text-main);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(18, 45, 79, 0.48);
}

.back-link:hover,
.back-link:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.hidden {
  display: none !important;
}

.is-hidden {
  display: none !important;
}

.mock-root {
  gap: 10px;
}

.exam-content {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setup-panel {
  flex: 0 0 auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
  padding-right: 2px;
}

.setup-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  padding: 12px;
}

.setup-card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

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

.choice-button {
  border: 1px solid rgba(104, 201, 255, 0.34);
  border-radius: 12px;
  background: rgba(11, 31, 59, 0.76);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 6px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.choice-button:hover,
.choice-button:focus-visible {
  background: rgba(17, 48, 86, 0.86);
  border-color: var(--line-strong);
  outline: none;
  transform: translateY(-1px);
}

.choice-button.active {
  background: linear-gradient(145deg, rgba(45, 212, 255, 0.22), rgba(0, 116, 197, 0.38));
  border-color: var(--line-strong);
  box-shadow: inset 0 0 0 1px rgba(146, 234, 255, 0.25);
}

.choice-button:disabled,
.choice-button.disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

.start-wrap {
  margin-top: auto;
}

.start-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(130deg, rgba(64, 224, 255, 0.3), rgba(0, 122, 210, 0.38));
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 14px;
  cursor: pointer;
}

.start-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.exam-panel {
  flex: 0 0 auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.exam-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(7, 21, 39, 0.85);
}

.exam-label {
  font-size: 0.83rem;
  color: var(--text-soft);
}

.exam-back {
  border: 1px solid rgba(111, 198, 249, 0.42);
  background: rgba(19, 45, 79, 0.7);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.78rem;
  padding: 6px 8px;
  cursor: pointer;
}

.exam-dday {
  border: 1px solid rgba(111, 198, 249, 0.42);
  background: rgba(19, 45, 79, 0.7);
  border-radius: 10px;
  color: #d8f7ff;
  font-size: 0.78rem;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.03em;
  padding: 6px 8px;
  line-height: 1;
}

.ox-filter-traffic {
  gap: 9px;
}

.exam-top .ox-filter-traffic {
  margin-left: auto;
  margin-right: 2px;
}

.ox-question-panel,
.ox-option-panel {
  padding: 10px;
}

.ox-question-panel .question-stem {
  font-size: 0.85rem;
  min-height: 170px;
}

.ox-option-panel .ox-option-list {
  margin-top: 0;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: rgba(7, 18, 34, 0.92);
}

.status-cell {
  border: 1px solid rgba(83, 190, 255, 0.28);
  border-radius: 6px;
  background: rgba(14, 34, 64, 0.72);
  color: var(--text-soft);
  font-size: 0.65rem;
  font-family: "Orbitron", sans-serif;
  line-height: 1;
  padding: 6px 0;
  text-align: center;
  cursor: pointer;
}

.status-cell.current {
  border-color: var(--line-strong);
  color: #d8f7ff;
}

.status-cell.solved {
  background: linear-gradient(180deg, rgba(54, 226, 255, 0.22), rgba(0, 130, 205, 0.28));
  color: #edfbff;
}

.status-cell.correct {
  border-color: rgba(109, 248, 187, 0.76);
  background: linear-gradient(180deg, rgba(61, 225, 166, 0.28), rgba(24, 136, 92, 0.34));
  color: #ecfff5;
}

.status-cell.wrong {
  border-color: rgba(255, 136, 158, 0.74);
  background: linear-gradient(180deg, rgba(255, 129, 157, 0.24), rgba(170, 52, 80, 0.34));
  color: #ffeef2;
}

.question-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-height: 56px;
}

.question-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.question-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

#explain-close {
  margin-left: auto;
}

.question-no {
  margin: 0;
  font-size: 0.96rem;
}

.origin-no {
  color: var(--text-dim);
  font-size: 0.72rem;
}

.question-stem {
  margin: 0;
  line-height: 1.45;
  font-size: 0.84rem;
  color: var(--text-main);
  overflow: visible;
}

.rich-content {
  display: grid;
  gap: 6px;
}

.rich-line {
  white-space: pre-wrap;
  line-height: 1.45;
}

.rich-math {
  font-family: "Times New Roman", "Noto Serif KR", serif;
}

.rich-box {
  border: 1px solid rgba(132, 210, 255, 0.5);
  border-radius: 10px;
  background: rgba(8, 28, 50, 0.56);
  padding: 8px;
  display: grid;
  gap: 4px;
}

.rich-box-line {
  white-space: pre-wrap;
  line-height: 1.4;
}

.rich-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.rich-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  min-width: 260px;
}

.rich-table th,
.rich-table td {
  border: 1px solid rgba(124, 202, 255, 0.35);
  padding: 5px 6px;
  text-align: left;
  vertical-align: top;
  white-space: pre-wrap;
}

.rich-table th {
  background: rgba(21, 56, 94, 0.72);
  color: #dff5ff;
  font-weight: 700;
}

.question-stem .mjx-container,
.status-question-stem .mjx-container,
.option-text .mjx-container {
  margin: 0 !important;
  font-size: 1em !important;
}

.option-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 9px 10px 10px;
}

.option-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

.option-list {
  margin-top: 7px;
  display: grid;
  gap: 7px;
  overflow: visible;
}

.ox-option-list {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.option-panel > .ox-option-list {
  margin-top: 0;
}

.option-button {
  border: 1px solid rgba(91, 194, 255, 0.34);
  border-radius: 10px;
  background: rgba(11, 28, 52, 0.78);
  color: var(--text-main);
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
  text-align: left;
  padding: 8px 9px;
  cursor: pointer;
  font-family: inherit;
}

.ox-choice-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  grid-template-columns: none;
}

.option-button:hover,
.option-button:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.option-button.active {
  border-color: var(--ok);
  box-shadow: inset 0 0 0 1px rgba(113, 245, 183, 0.3);
}

.option-button.correct-choice {
  border-color: rgba(111, 247, 189, 0.8);
  box-shadow: inset 0 0 0 1px rgba(111, 247, 189, 0.34);
}

.option-button.wrong-choice {
  border-color: rgba(255, 135, 160, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 135, 160, 0.3);
}

.option-index {
  font-family: "Orbitron", sans-serif;
  color: #bcefff;
  font-size: 0.8rem;
  margin-top: 2px;
}

.option-text {
  line-height: 1.38;
  font-size: 0.79rem;
}

.exam-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.explain-button {
  border: 1px solid rgba(244, 188, 255, 0.34);
  border-radius: 10px;
  background: rgba(64, 26, 74, 0.64);
  color: #ffe7ff;
  font-family: inherit;
  font-size: 0.8rem;
  padding: 8px 12px;
  cursor: pointer;
}

.calc-action-btn {
  border: 1px solid rgba(117, 205, 255, 0.36);
  border-radius: 10px;
  background: rgba(19, 48, 80, 0.7);
  color: #e7f7ff;
  font-family: inherit;
  font-size: 0.8rem;
  padding: 8px 12px;
  cursor: pointer;
}

.calc-action-btn:hover,
.calc-action-btn:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.explain-popup {
  position: absolute;
  z-index: 40;
  border: 1px solid rgba(245, 186, 255, 0.38);
  border-radius: 14px;
  background: rgba(31, 13, 42, 0.95);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
  padding: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.explain-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.traffic-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.traffic-btn {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 0.18;
  filter: saturate(0.18) brightness(0.52);
  cursor: pointer;
  transition: opacity 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.traffic-btn.active {
  opacity: 1;
  filter: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

.traffic-red {
  background: #ff6589;
}

.traffic-yellow {
  background: #ffd35b;
}

.traffic-green {
  background: #71f5b7;
}

.traffic-gray {
  background: #5d646c;
}

.explain-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.note-open-btn,
.explain-close-btn,
.note-close-btn,
.note-save-btn,
.note-clear-btn {
  border: 1px solid rgba(139, 222, 255, 0.35);
  border-radius: 9px;
  background: rgba(25, 53, 88, 0.64);
  color: #ecfaff;
  font-family: inherit;
  font-size: 0.73rem;
  padding: 5px 8px;
  cursor: pointer;
}

.note-open-btn {
  width: 28px;
  height: 27px;
  padding: 0;
  font-size: 0.95rem;
}

.explain-popup-body {
  margin: 8px 0 0;
  white-space: pre-wrap;
  line-height: 1.42;
  font-size: 0.77rem;
  color: #ffeaff;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.ox-explain-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.note-popup {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 58%;
  z-index: 41;
  border: 1px solid rgba(145, 222, 255, 0.36);
  border-radius: 14px;
  background: rgba(8, 26, 49, 0.96);
  padding: 10px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

.note-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.note-popup-head strong {
  font-size: 0.86rem;
}

.note-textarea {
  width: 100%;
  resize: vertical;
  min-height: 90px;
  border-radius: 10px;
  border: 1px solid rgba(132, 212, 255, 0.34);
  background: rgba(13, 36, 64, 0.9);
  color: #e8f9ff;
  font-family: inherit;
  font-size: 0.78rem;
  padding: 8px;
}

.note-popup-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.calc-panel {
  position: absolute;
  left: 10px;
  top: 10px;
  transform: none;
  border: 1px solid rgba(125, 214, 255, 0.46);
  border-radius: 14px;
  background: rgba(8, 20, 39, 0.96);
  padding: 10px;
  z-index: 20;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.calc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  cursor: default;
}

.calc-head strong {
  font-size: 0.82rem;
}

.calc-close {
  border: 1px solid rgba(255, 170, 197, 0.3);
  background: rgba(87, 31, 47, 0.6);
  color: #ffdbe6;
  border-radius: 8px;
  font-size: 0.7rem;
  padding: 4px 6px;
  cursor: pointer;
}

.calc-display {
  width: 100%;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(126, 210, 255, 0.32);
  background: rgba(10, 33, 58, 0.92);
  color: #ecfbff;
  text-align: right;
  padding: 6px 8px;
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
}

.calc-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
}

.calc-btn {
  border: 1px solid rgba(103, 198, 255, 0.34);
  border-radius: 8px;
  background: rgba(15, 40, 71, 0.85);
  color: #e2f7ff;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 4px;
  cursor: pointer;
}

.calc-btn:hover,
.calc-btn:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.calc-btn.operator {
  background: rgba(16, 53, 91, 0.95);
}

.calc-btn.eval {
  background: rgba(11, 100, 160, 0.95);
}

.calc-btn.memory {
  background: rgba(49, 26, 92, 0.9);
}

.calc-btn.clear {
  background: rgba(91, 29, 43, 0.9);
  border-color: rgba(255, 142, 170, 0.36);
}

.setup-message {
  margin: 0;
  color: var(--danger);
  font-size: 0.76rem;
  min-height: 1.2em;
}

.wrong-note-page {
  margin-top: 2px;
}

.wrong-filter-inline {
  display: grid;
  grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.wrong-inline-subject {
  min-width: 0;
}

.wrong-keyword-wrap {
  position: relative;
  display: block;
}

.wrong-inline-keyword {
  padding-left: 10px;
}

.wrong-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wrong-result-head h2 {
  margin: 0;
}

.notice-board-card {
  display: grid;
  gap: 10px;
}

.notice-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-height: min(62vh, 620px);
  overflow-y: auto;
  padding-right: 4px;
}

.notice-item {
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(155, 225, 190, 0.4);
  background: rgba(9, 42, 28, 0.34);
}

.notice-disclosure {
  display: grid;
}

.notice-summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 10px 12px;
}

.notice-summary-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.notice-summary-text {
  min-width: 0;
}

.notice-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(155, 225, 190, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.notice-summary::-webkit-details-marker {
  display: none;
}

.notice-summary::after {
  content: "+";
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-sub);
}

.notice-disclosure[open] .notice-summary::after {
  content: "-";
}

.notice-title {
  margin: 0;
  font-size: 0.92rem;
  padding-right: 18px;
}

.notice-meta {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-sub);
}

.notice-body-text {
  margin: 0;
  padding: 0 12px 12px;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  border-top: 1px solid rgba(155, 225, 190, 0.2);
}

.notice-empty {
  padding: 14px 10px;
  border-radius: 10px;
  text-align: center;
  color: var(--text-sub);
  border: 1px dashed rgba(155, 225, 190, 0.35);
}

.notice-admin-card {
  display: grid;
  gap: 8px;
}

.notice-body {
  min-height: 180px;
  resize: vertical;
}

.notice-admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notice-publish-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.wrong-result-head .traffic-group {
  gap: 8px;
}

.wrong-input {
  width: 100%;
  border: 1px solid rgba(104, 201, 255, 0.34);
  border-radius: 10px;
  background: rgba(11, 31, 59, 0.76);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.84rem;
  padding: 8px 10px;
}

.wrong-result-card {
  min-height: 220px;
}

.wrong-result-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 48dvh;
  overflow-y: auto;
  padding-right: 2px;
}

.wrong-result-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: rgba(10, 28, 50, 0.55);
  display: grid;
  gap: 6px;
}

.wrong-result-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wrong-result-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
}

.wrong-result-trigger {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.wrong-result-link:hover,
.wrong-result-link:focus-visible,
.wrong-result-trigger:hover,
.wrong-result-trigger:focus-visible {
  color: #caf2ff;
  text-decoration: underline;
  outline: none;
}

.wrong-result-light {
  width: 14px;
  height: 14px;
  cursor: default;
  flex: 0 0 auto;
}

.wrong-result-light-none {
  border-color: rgba(150, 184, 206, 0.45);
  background: rgba(150, 184, 206, 0.22);
  opacity: 1;
}

.wrong-result-comment-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.wrong-result-comment {
  color: #ffdfee;
  font-size: 0.74rem;
  white-space: pre-wrap;
  flex: 1 1 auto;
}

.wrong-result-updated {
  color: var(--text-soft);
  font-size: 0.7rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.wrong-result-preview {
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.wrong-result-inline-explain {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(111, 198, 249, 0.2);
  background: rgba(14, 40, 70, 0.32);
}

.wrong-result-inline-answer {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-main);
}

.wrong-result-inline-body {
  font-size: 0.76rem;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--text-soft);
}

.wrong-result-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

body.skin-2 .setup-card,
body.skin-2 .question-panel,
body.skin-2 .option-panel,
body.skin-2 .status-grid,
body.skin-2 .status-question-stem,
body.skin-2 .exam-top,
body.skin-2 .option-button,
body.skin-2 .calc-panel,
body.skin-2 .calc-display {
  background: rgba(255, 255, 255, 0.86);
}

body.skin-2 .status-cell {
  background: rgba(235, 246, 255, 0.92);
}

body.skin-2 .status-cell.solved {
  background: linear-gradient(180deg, rgba(83, 201, 245, 0.3), rgba(45, 151, 228, 0.32));
  color: #0f2740;
}

body.skin-2 .calc-btn {
  background: rgba(218, 238, 255, 0.86);
  color: #21415d;
}

body.skin-2 .calc-btn.operator {
  background: rgba(198, 228, 255, 0.96);
}

body.skin-2 .calc-btn.eval {
  background: rgba(145, 209, 255, 0.96);
}

body.skin-2 .calc-btn.memory {
  background: rgba(208, 224, 255, 0.96);
}

body.skin-2 .calc-action-btn {
  background: rgba(186, 227, 255, 0.66);
  color: #1b3f5e;
}

body.skin-2 .rich-box {
  background: rgba(222, 243, 255, 0.72);
  border-color: rgba(89, 177, 241, 0.5);
}

body.skin-2 .wrong-input {
  background: rgba(255, 255, 255, 0.9);
  color: #23415d;
  border-color: rgba(104, 186, 244, 0.44);
}

body.skin-2 .wrong-result-item {
  background: rgba(255, 255, 255, 0.88);
}

body.skin-2 .wrong-result-comment {
  color: #8d3c56;
}

body.skin-2 .rich-table th {
  background: rgba(187, 227, 255, 0.78);
  color: #183b59;
}

body.skin-2 .rich-table td {
  border-color: rgba(104, 186, 244, 0.44);
}

body.skin-2 .explain-popup {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(105, 178, 241, 0.5);
}

body.skin-2 .explain-popup-body {
  color: #213f58;
}

body.skin-2 .note-popup {
  background: rgba(246, 252, 255, 0.98);
  border-color: rgba(109, 185, 241, 0.48);
}

body.skin-2 .note-textarea {
  background: #ffffff;
  color: #20415d;
}

body.skin-3 .setup-card,
body.skin-3 .question-panel,
body.skin-3 .option-panel,
body.skin-3 .status-grid,
body.skin-3 .status-question-stem,
body.skin-3 .exam-top,
body.skin-3 .option-button,
body.skin-3 .calc-panel,
body.skin-3 .calc-display {
  background: #ffffff;
  border-color: rgba(120, 172, 129, 0.4);
}

body.skin-3 .status-cell {
  background: #f2f9f0;
  border-color: rgba(120, 172, 129, 0.34);
}

body.skin-3 .status-cell.solved {
  background: #dcedd9;
  color: #1f3324;
}

body.skin-3 .calc-btn {
  background: #eef8ec;
  color: #2c4b33;
  border-color: rgba(120, 172, 129, 0.38);
}

body.skin-3 .calc-btn.operator,
body.skin-3 .calc-btn.eval,
body.skin-3 .calc-btn.memory,
body.skin-3 .calc-btn.clear {
  background: #e1f1df;
}

body.skin-3 .calc-action-btn {
  background: #e3f3e1;
  color: #2f5a3a;
  border-color: rgba(120, 172, 129, 0.38);
}

body.skin-3 .rich-box {
  background: #eff8ee;
  border-color: rgba(126, 178, 135, 0.5);
}

body.skin-3 .rich-table th {
  background: #e3f1e1;
  color: #2b4a33;
}

body.skin-3 .rich-table td {
  border-color: rgba(124, 172, 133, 0.45);
}

body.skin-3 .explain-popup {
  background: #ffffff;
  border-color: rgba(124, 172, 133, 0.45);
}

body.skin-3 .explain-popup-body {
  color: #274331;
}

body.skin-3 .note-popup {
  background: #ffffff;
  border-color: rgba(124, 172, 133, 0.45);
}

body.skin-3 .note-textarea {
  background: #ffffff;
  color: #2b4b34;
  border-color: rgba(120, 172, 129, 0.4);
}

body.skin-3 .wrong-input {
  background: #ffffff;
  color: #2b4b34;
  border-color: rgba(120, 172, 129, 0.4);
}

body.skin-3 .wrong-result-item {
  background: #ffffff;
  border-color: rgba(120, 172, 129, 0.4);
}

body.skin-3 .wrong-result-comment {
  color: #805c31;
}

.contact-email-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(18, 45, 79, 0.42);
}

.contact-email-link:hover,
.contact-email-link:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.contact-note {
  margin-top: 10px !important;
  font-size: 0.78rem;
}

.qa-page {
  gap: 12px;
}

.qa-form-grid {
  display: grid;
  gap: 8px;
}

.qa-form-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.qa-body-input {
  resize: vertical;
  min-height: 120px;
}

.qa-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.qa-list-head h2 {
  margin: 0;
}

.qa-list {
  display: grid;
  gap: 10px;
  max-height: 52dvh;
  overflow-y: auto;
  padding-right: 2px;
}

.qa-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  background: rgba(10, 28, 50, 0.55);
  overflow: hidden;
}

.qa-disclosure {
  display: grid;
}

.qa-summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 10px;
}

.qa-summary::-webkit-details-marker {
  display: none;
}

.qa-summary::after {
  content: "+";
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-soft);
}

.qa-disclosure[open] .qa-summary::after {
  content: "-";
}

.qa-content {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
  border-top: 1px solid rgba(111, 198, 249, 0.16);
}

.qa-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  padding-right: 18px;
}

.qa-meta,
.qa-answer-meta {
  color: var(--text-soft);
  font-size: 0.72rem;
  line-height: 1.4;
}

.qa-body,
.qa-answer-body {
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.qa-answer-list {
  display: grid;
  gap: 8px;
}

.qa-answer-item {
  border-radius: 12px;
  padding: 8px;
  border: 1px solid rgba(111, 198, 249, 0.26);
  background: rgba(14, 40, 70, 0.4);
  display: grid;
  gap: 5px;
}

.qa-answer-form {
  display: grid;
  gap: 8px;
}

.qa-answer-admin {
  border-color: rgba(100, 220, 150, 0.4);
  background: rgba(10, 50, 30, 0.5);
}

.qa-badge {
  display: inline-block;
  font-size: 0.7em;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  vertical-align: middle;
  margin-right: 2px;
}

.qa-badge-admin {
  background: rgba(100, 220, 150, 0.25);
  color: #7dffb0;
  border: 1px solid rgba(100, 220, 150, 0.4);
}

.qa-badge-closed {
  background: rgba(100, 180, 255, 0.2);
  color: #88ccff;
  border: 1px solid rgba(100, 180, 255, 0.35);
}

.qa-optional-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.qa-answer-input {
  resize: vertical;
  min-height: 72px;
}

.ox-review-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ox-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ox-review-head h2 {
  margin: 0;
}

.ox-review-list {
  display: grid;
  gap: 10px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding-right: 4px;
}

.ox-review-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 28, 50, 0.55);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.ox-review-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ox-review-title {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
}

.ox-review-meta {
  font-size: 0.76rem;
  color: var(--text-soft);
}

.ox-review-meta.is-wrong {
  color: #ffb7c7;
}

.ox-review-body {
  font-size: 0.8rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ox-review-traffic {
  flex-shrink: 0;
  gap: 8px;
}

.qa-empty,
.qa-answer-empty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--text-soft);
  font-size: 0.76rem;
}

body.skin-2 .contact-email-link,
body.skin-2 .qa-item,
body.skin-2 .qa-answer-item {
  background: rgba(255, 255, 255, 0.88);
}

body.skin-3 .contact-email-link,
body.skin-3 .qa-item,
body.skin-3 .qa-answer-item {
  background: #ffffff;
  border-color: rgba(120, 172, 129, 0.4);
}

@media (max-width: 520px) {
  .wrong-result-head {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  body {
    padding: 0;
  }

  .phone {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }
}

.game-page-shell {
  overflow: hidden;
}

.game-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  margin-top: 12px;
}

.game-stage {
  position: relative;
  width: 100%;
  height: min(820px, calc(100dvh - 132px));
  min-height: 740px;
  border-radius: 28px;
  border: 1px solid rgba(112, 217, 255, 0.22);
  background:
    radial-gradient(circle at 50% 42%, rgba(49, 210, 255, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(2, 12, 26, 0.94), rgba(1, 8, 19, 0.96));
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(117, 226, 255, 0.08),
    inset 0 -80px 120px rgba(2, 18, 36, 0.62);
}

.game-stage::before,
.game-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.game-stage::before {
  background-image:
    linear-gradient(rgba(87, 193, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 193, 255, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.45;
}

.game-stage::after {
  background:
    radial-gradient(circle at 10% 8%, rgba(42, 214, 255, 0.14), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(36, 114, 255, 0.14), transparent 24%),
    linear-gradient(180deg, transparent 0%, transparent 74%, rgba(2, 6, 16, 0.8) 100%);
}

.game-topbar {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
  padding: 16px 16px 0;
}

.game-subject-box {
  display: grid;
  gap: 6px;
}

.game-label {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.game-select {
  min-width: 140px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(109, 214, 255, 0.26);
  background: rgba(7, 28, 52, 0.86);
  color: var(--text-main);
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 700;
}

.game-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.game-control-icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(119, 224, 255, 0.26);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(47, 210, 255, 0.3), rgba(4, 128, 214, 0.35));
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(2, 12, 28, 0.22);
}

.game-control-icon-btn:hover,
.game-control-icon-btn:focus-visible {
  outline: none;
  border-color: var(--line-strong);
}

.game-reset-icon-btn {
  background: rgba(8, 25, 47, 0.74);
}

.game-icon {
  width: 19px;
  height: 19px;
  fill: currentColor;
  display: block;
}

.game-icon-pause {
  display: none;
}

.game-toggle-btn.is-pause .game-icon-play {
  display: none;
}

.game-toggle-btn.is-pause .game-icon-pause {
  display: block;
}

.game-action-btn {
  height: 38px;
  border: 1px solid rgba(119, 224, 255, 0.26);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(47, 210, 255, 0.3), rgba(4, 128, 214, 0.35));
  color: var(--text-main);
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(2, 12, 28, 0.22);
}

.game-action-btn:hover,
.game-action-btn:focus-visible,
.game-select:focus-visible {
  outline: none;
  border-color: var(--line-strong);
}

.game-action-btn:disabled {
  cursor: default;
  opacity: 0.6;
}

.game-action-btn-secondary {
  background: rgba(8, 25, 47, 0.74);
}

.game-status {
  display: none;
}

.game-arena {
  position: relative;
  z-index: 2;
  margin: 14px 14px 0;
  height: 600px;
  border-radius: 24px;
  border: 1px solid rgba(110, 220, 255, 0.2);
  background:
    radial-gradient(circle at 50% 38%, rgba(70, 248, 255, 0.1), transparent 20%),
    linear-gradient(180deg, rgba(3, 16, 34, 0.78), rgba(2, 9, 20, 0.9));
  overflow: hidden;
  touch-action: manipulation;
  box-shadow:
    inset 0 0 0 1px rgba(121, 222, 255, 0.05),
    inset 0 -60px 100px rgba(0, 0, 0, 0.36);
}

.game-arena.combo-on .brain-lobe,
.game-arena.combo-on .brain-core,
.game-arena.combo-on .brain-node,
.game-arena.combo-on .brain-stream {
  filter: brightness(1.45);
}

.game-brain-backdrop {
  position: absolute;
  inset: 20px 12px 78px;
  pointer-events: none;
}

.brain-lobe,
.brain-core {
  position: absolute;
  border: 4px solid rgba(76, 231, 255, 0.62);
  box-shadow:
    0 0 22px rgba(74, 232, 255, 0.22),
    inset 0 0 18px rgba(74, 232, 255, 0.1);
}

.brain-lobe {
  top: 22%;
  width: 34%;
  height: 34%;
  border-radius: 52% 48% 46% 54% / 48% 46% 54% 52%;
}

.brain-lobe-left {
  left: 15%;
}

.brain-lobe-right {
  right: 15%;
}

.brain-core {
  top: 26%;
  left: 50%;
  width: 10%;
  height: 26%;
  transform: translateX(-50%);
  border-radius: 18px;
}

.brain-node,
.brain-stream {
  position: absolute;
  display: block;
}

.brain-node {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(118, 247, 255, 0.88);
  box-shadow: 0 0 18px rgba(118, 247, 255, 0.5);
  animation: floatPulse 2.8s ease-in-out infinite;
}

.brain-stream {
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(102, 226, 255, 0.56), transparent);
  animation: dataRain 2.4s linear infinite;
}

.node-1 {
  top: 20%;
  left: 26%;
}

.node-2 {
  top: 27%;
  right: 28%;
  animation-delay: 0.35s;
}

.node-3 {
  top: 48%;
  left: 34%;
  animation-delay: 0.7s;
}

.node-4 {
  top: 52%;
  right: 35%;
  animation-delay: 1s;
}

.stream-1 {
  top: 4%;
  left: 18%;
  height: 56px;
}

.stream-2 {
  top: 8%;
  right: 22%;
  height: 78px;
  animation-delay: 0.65s;
}

.stream-3 {
  top: 12%;
  left: 52%;
  height: 64px;
  animation-delay: 1.1s;
}

.game-empty,
.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.game-empty {
  z-index: 3;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  color: var(--text-soft);
}

.game-empty.is-hidden,
.game-overlay.is-hidden {
  display: none;
}

.game-empty-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
}

.game-empty-text {
  max-width: 240px;
  font-size: 0.76rem;
  line-height: 1.5;
}

.game-overlay {
  background: rgba(2, 7, 16, 0.48);
  backdrop-filter: blur(4px);
}

.game-overlay-card {
  width: min(100%, 276px);
  border-radius: 20px;
  border: 1px solid rgba(121, 220, 255, 0.24);
  background: linear-gradient(180deg, rgba(10, 28, 50, 0.9), rgba(4, 14, 28, 0.95));
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(134, 232, 255, 0.08);
  padding: 18px;
  text-align: center;
}

.game-overlay-eyebrow {
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.game-overlay-card h2 {
  margin: 8px 0 0;
  font-size: 1.1rem;
}

.game-overlay-card p {
  margin: 10px 0 16px;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.55;
}

.game-overlay-actions {
  display: grid;
  gap: 8px;
}

.game-flash,
.game-milestone {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.game-flash {
  top: 18%;
  z-index: 8;
  font-family: "Orbitron", "Exo 2", sans-serif;
  font-size: 5.4rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.22);
}

.game-flash.is-visible {
  opacity: 0.34;
  transform: translateX(-50%) scale(1.08);
}

.game-flash.is-good {
  color: rgba(158, 255, 218, 0.92);
}

.game-flash.is-bad {
  color: rgba(255, 132, 154, 0.92);
}

.game-milestone {
  top: 8%;
  z-index: 8;
  max-width: calc(100% - 48px);
  border-radius: 14px;
  border: 1px solid rgba(124, 231, 255, 0.28);
  background: rgba(8, 28, 52, 0.88);
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.game-milestone.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(6px);
}

.game-side-hint {
  position: absolute;
  top: 48%;
  z-index: 1;
  transform: translateY(-50%);
  font-family: "Orbitron", "Exo 2", sans-serif;
  font-size: clamp(4.2rem, 16vw, 6rem);
  font-weight: 800;
  line-height: 1;
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 0 24px rgba(132, 238, 255, 0.18);
}

.game-side-hint-left {
  left: 18px;
  color: rgba(133, 255, 213, 0.9);
}

.game-side-hint-right {
  right: 18px;
  color: rgba(255, 150, 169, 0.9);
}

.falling-block {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 118px;
  padding: 12px 14px;
  border: 1px solid rgba(144, 228, 255, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(94, 188, 255, 0.16), rgba(33, 78, 127, 0.22)),
    rgba(18, 42, 76, 0.78);
  color: #f3fbff;
  text-align: left;
  cursor: pointer;
  box-shadow:
    0 12px 24px rgba(4, 8, 18, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -10px 18px rgba(0, 0, 0, 0.18);
  transform: translate3d(0, 0, 0);
  transition: box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.falling-block:hover,
.falling-block:focus-visible {
  outline: none;
  border-color: rgba(182, 242, 255, 0.7);
  box-shadow:
    0 14px 26px rgba(4, 8, 18, 0.4),
    0 0 18px rgba(98, 224, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.falling-block.is-burst {
  animation: blockBurst 0.26s ease forwards;
}

.falling-block.is-wrong {
  animation: blockWrong 0.18s linear 2;
}

.falling-block.is-dragging {
  border-color: rgba(132, 238, 255, 0.82);
  box-shadow:
    0 14px 26px rgba(4, 8, 18, 0.4),
    0 0 22px rgba(98, 224, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.falling-block-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  text-align: center;
  width: 100%;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.42;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.game-character {
  position: absolute;
  left: 50%;
  bottom: 54px;
  z-index: 4;
  width: 92px;
  height: 120px;
  transform: translateX(-50%);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.game-character.is-panic {
  animation: characterPanic 0.7s ease;
}

.game-character.is-cheer {
  animation: characterCheer 0.5s ease;
}

.game-character.is-down {
  transform: translateX(-50%) rotate(90deg) translateY(14px);
  filter: grayscale(0.2);
}

.character-glow {
  position: absolute;
  inset: auto 10px 2px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 232, 255, 0.42), transparent 70%);
}

.game-character-figure {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28));
}

.game-character-sweat {
  opacity: 0;
  transition: opacity 0.12s ease;
}

.game-character.is-panic .game-character-sweat {
  opacity: 1;
}

.character-head {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 54px;
  height: 58px;
  transform: translateX(-50%);
  border-radius: 44% 44% 48% 48%;
  background: #f0d6c2;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.06);
}

.character-hair {
  position: absolute;
  inset: -3px 2px auto;
  height: 18px;
  border-radius: 48% 52% 28% 32%;
  background: #162133;
}

.character-eye,
.character-glasses {
  position: absolute;
}

.character-eye {
  top: 24px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #162133;
  z-index: 2;
}

.character-eye.left,
.character-glasses.left {
  left: 14px;
}

.character-eye.right,
.character-glasses.right {
  right: 14px;
}

.character-glasses {
  top: 18px;
  width: 18px;
  height: 14px;
  border-radius: 5px;
  border: 2px solid #263850;
}

.character-bridge {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 8px;
  height: 2px;
  transform: translateX(-50%);
  background: #263850;
}

.character-mouth {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 14px;
  height: 6px;
  transform: translateX(-50%);
  border-bottom: 2px solid #7a5143;
  border-radius: 0 0 12px 12px;
}

.character-sweat {
  position: absolute;
  top: 16px;
  right: 6px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 8px solid rgba(124, 244, 255, 0.9);
  opacity: 0;
}

.game-character.is-panic .character-sweat {
  opacity: 1;
}

.character-body {
  position: absolute;
  top: 62px;
  left: 50%;
  width: 74px;
  height: 72px;
  transform: translateX(-50%);
  border-radius: 22px 22px 18px 18px;
  background: linear-gradient(180deg, #607da2, #3d5f86);
}

.character-hood {
  position: absolute;
  top: 0;
  left: 50%;
  width: 32px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 0 0 18px 18px;
  border: 2px solid rgba(235, 247, 255, 0.4);
  border-top: 0;
}

.character-arm,
.character-leg {
  position: absolute;
  background: #4b6e94;
  border-radius: 999px;
}

.character-arm {
  top: 74px;
  width: 12px;
  height: 44px;
}

.character-arm.left {
  left: 16px;
  transform: rotate(24deg);
}

.character-arm.right {
  right: 14px;
  transform: rotate(-18deg);
}

.character-pen {
  position: absolute;
  top: 76px;
  left: 14px;
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: #20252d;
  transform: rotate(-24deg);
}

.character-book {
  position: absolute;
  right: -8px;
  top: 72px;
  width: 54px;
  height: 64px;
  border-radius: 8px;
  background: linear-gradient(180deg, #7f6442, #5b432c);
  color: #f8edd8;
  font-size: 0.52rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 8px 6px;
  writing-mode: vertical-rl;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.character-leg {
  bottom: 18px;
  width: 14px;
  height: 40px;
}

.character-leg.left {
  left: 44px;
}

.character-leg.right {
  right: 44px;
}

.game-floor {
  position: absolute;
  inset: auto 0 0;
  height: 88px;
  background:
    radial-gradient(circle at 50% 20%, rgba(79, 238, 255, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(2, 14, 30, 0), rgba(2, 10, 22, 0.96));
  border-top: 1px solid rgba(121, 232, 255, 0.16);
  z-index: 2;
}

.game-floor::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(71, 241, 255, 0.7), transparent);
  box-shadow: 0 0 16px rgba(71, 241, 255, 0.24);
}

.game-hud {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 16px;
}

.game-score-panel,
.game-combo-panel {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(114, 217, 255, 0.16);
  background: rgba(6, 22, 40, 0.62);
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #f5fcff;
}

.game-score-panel {
  font-family: "Press Start 2P", "Orbitron", monospace;
  font-size: 0.7rem;
  line-height: 1.4;
}

.game-combo-panel {
  font-family: "Orbitron", "Exo 2", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
}

.game-lives-panel {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(114, 217, 255, 0.16);
  background: rgba(6, 22, 40, 0.62);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
}

.game-review-panel {
  position: absolute;
  z-index: 9;
  left: 14px;
  right: 14px;
  top: 124px;
  bottom: 78px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(110, 220, 255, 0.2);
  background: rgba(4, 14, 30, 0.94);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(134, 232, 255, 0.06);
}

.game-review-panel.is-hidden {
  display: none;
}

.game-review-head h2 {
  margin: 0;
  font-size: 0.96rem;
}

.game-review-close-btn {
  height: 30px;
  border: 1px solid rgba(119, 224, 255, 0.24);
  border-radius: 10px;
  background: rgba(8, 25, 47, 0.74);
  color: var(--text-main);
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.game-review-close-btn:hover,
.game-review-close-btn:focus-visible {
  outline: none;
  border-color: var(--line-strong);
}

.game-review-summary {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.76rem;
}

.game-review-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 4px;
}

.game-review-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(111, 198, 249, 0.18);
  background: rgba(14, 40, 70, 0.36);
}

.game-review-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.game-review-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
}

.game-review-meta {
  font-size: 0.74rem;
  color: var(--text-soft);
}

.game-review-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.game-review-meta.is-wrong {
  color: #ffb7c7;
}

.game-review-traffic {
  flex-shrink: 0;
  gap: 8px;
}

.game-review-body {
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.game-heart {
  color: #ff5f7e;
  font-size: 1.2rem;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 95, 126, 0.26);
  transition: opacity 0.16s ease, transform 0.16s ease, filter 0.16s ease;
}

.game-heart.is-empty {
  opacity: 0.24;
  filter: grayscale(0.8);
  transform: scale(0.92);
}

body.skin-2 .game-stage,
body.skin-2 .game-overlay-card,
body.skin-2 .game-score-panel,
body.skin-2 .game-combo-panel,
body.skin-2 .game-lives-panel,
body.skin-2 .game-status,
body.skin-2 .game-control-icon-btn {
  background: rgba(255, 255, 255, 0.9);
}

body.skin-2 .falling-block,
body.skin-3 .falling-block {
  color: var(--text-main);
}

@keyframes blockBurst {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
    filter: brightness(1.45);
  }
}

@keyframes blockWrong {
  0%,
  100% {
    background: rgba(18, 42, 76, 0.78);
  }
  50% {
    background: rgba(126, 18, 34, 0.82);
  }
}

@keyframes blockSkip {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
}

@keyframes floatPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.78;
  }
  50% {
    transform: scale(1.24);
    opacity: 1;
  }
}

@keyframes dataRain {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  20%,
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(24px);
  }
}

@keyframes characterPanic {
  0%,
  100% {
    transform: translateX(-50%);
  }
  20% {
    transform: translateX(calc(-50% - 4px)) rotate(-4deg);
  }
  40% {
    transform: translateX(calc(-50% + 5px)) rotate(5deg);
  }
  60% {
    transform: translateX(calc(-50% - 3px)) rotate(-3deg);
  }
}

@keyframes characterCheer {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-12px);
  }
}

@media (max-width: 520px) {
  .game-stage {
    height: min(780px, calc(100dvh - 96px));
    min-height: 720px;
    border-radius: 0;
  }

  .game-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .game-actions {
    width: 100%;
    justify-content: stretch;
  }

  .game-control-icon-btn,
  .game-action-btn {
    flex: 1 1 0;
  }

  .game-action-btn {
    padding: 0 10px;
  }

  .game-arena {
    margin-left: 10px;
    margin-right: 10px;
    height: 560px;
  }

  .game-hud {
    grid-template-columns: 1fr;
  }

  .game-score-panel,
  .game-combo-panel,
  .game-lives-panel {
    justify-content: center;
  }
}
