:root {
  --block-size: clamp(22px, 3.55vh, 34px);
  --panel-bg: #071421;
  --text-color: #edf7ff;
  --accent: #26d9ff;
  --accent-soft: #7feaff;
  --line: rgba(69, 188, 239, 0.42);
  --panel: rgba(5, 24, 43, 0.88);
  --panel-deep: rgba(4, 16, 30, 0.95);
  --amber: #ffc928;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  min-width: 1024px;
  color: var(--text-color);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: #020913 url("../assets/images/tetris-space-theme-space-station.png") center / cover no-repeat fixed;
  user-select: none;
}

button,
kbd {
  font: inherit;
}

button {
  color: inherit;
}

.space-game-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 690px;
  background:
    linear-gradient(180deg, rgba(0, 8, 22, 0.3), transparent 24%),
    radial-gradient(circle at 50% 58%, transparent 0 23%, rgba(0, 8, 20, 0.2) 73%, rgba(0, 5, 13, 0.48) 100%);
}

.review-content {
  position: relative;
  z-index: 5;
  min-height: 420px;
  padding: 72px 24px 88px;
  border-top: 1px solid rgba(65, 197, 243, 0.3);
  background:
    radial-gradient(circle at 50% 0, rgba(26, 170, 222, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(2, 12, 25, 0.97), rgba(2, 8, 18, 0.99));
  box-shadow: inset 0 18px 50px rgba(0, 4, 13, 0.48);
  user-select: text;
}

.review-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 30px clamp(20px, 4vw, 44px) 38px;
  border: 1px solid rgba(66, 185, 232, 0.34);
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(7, 30, 50, 0.94), rgba(3, 15, 29, 0.97));
  box-shadow: inset 0 1px rgba(173, 231, 255, 0.08), 0 24px 60px rgba(0, 5, 16, 0.48);
}

.review-heading {
  margin-bottom: 24px;
  text-align: center;
}

.review-eyebrow {
  color: #53dcff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.24em;
}

.review-heading h2 {
  margin: 8px 0 7px;
  color: #f1fbff;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0.08em;
  text-shadow: 0 0 20px rgba(48, 215, 255, 0.28);
}

.review-heading p,
.comment-status {
  margin: 0;
  color: #89a8bd;
  font-size: 14px;
  line-height: 1.7;
}

.comment-status {
  padding: 22px;
  text-align: center;
}

.review-content,
.review-content * {
  user-select: text;
  -webkit-user-select: text;
}

#tcomment {
  color: #dceefa;
}

#tcomment .tk-comments-container,
#tcomment .tk-submit,
#tcomment .tk-comment {
  color: #dceefa;
}

#tcomment .el-textarea__inner,
#tcomment .el-input__inner {
  border-color: rgba(75, 177, 220, 0.42);
  background: rgba(2, 15, 29, 0.82);
  color: #eaf8ff;
}

#tcomment .el-textarea__inner:focus,
#tcomment .el-input__inner:focus {
  border-color: #41dcff;
  box-shadow: 0 0 0 2px rgba(45, 207, 244, 0.12);
}

#tcomment .tk-content,
#tcomment .tk-nick,
#tcomment .tk-time,
#tcomment .tk-action {
  color: inherit;
}

#tcomment a {
  color: #54ddff;
}

.command-header {
  position: relative;
  z-index: 20;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(42px, 6.2vw, 104px);
  background: linear-gradient(180deg, rgba(2, 13, 29, 0.94), rgba(5, 17, 35, 0.78) 70%, rgba(5, 17, 35, 0.18));
  border-bottom: 1px solid rgba(71, 163, 227, 0.24);
  box-shadow: 0 14px 30px rgba(0, 6, 18, 0.32);
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #f4f8ff;
  text-decoration: none;
  font-size: clamp(20px, 1.65vw, 28px);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgba(108, 181, 255, 0.3);
}

.brand b {
  color: #69d8ff;
  font-size: 1.14em;
}

.brand-mark {
  position: relative;
  width: 31px;
  height: 31px;
  display: block;
}

.brand-mark i {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.55), 0 0 9px currentColor;
}

.brand-mark i:nth-child(1) { left: 0; top: 0; color: #2e8cff; background: #2e8cff; }
.brand-mark i:nth-child(2) { left: 0; top: 13px; color: #ffca20; background: #ffca20; }
.brand-mark i:nth-child(3) { left: 13px; top: 13px; color: #ffca20; background: #ffca20; }

.mode-tabs {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: clamp(28px, 4.4vw, 74px);
}

.mode-tab {
  position: relative;
  min-width: 92px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #a8bdd8;
  font-size: clamp(16px, 1.25vw, 21px);
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.mode-tab::after {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 10px;
  height: 3px;
  border-radius: 3px;
  background: transparent;
}

.mode-tab:hover,
.mode-tab.is-active {
  color: #e4fbff;
  text-shadow: 0 0 13px rgba(40, 221, 255, 0.9);
}

.mode-tab.is-active::after {
  background: #31e5ff;
  box-shadow: 0 0 4px #fff, 0 0 13px #25d6ff, 0 0 22px #25d6ff;
}

.header-actions {
  justify-self: end;
  display: flex;
  gap: 7px;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #c9def5;
  cursor: pointer;
  transition: 160ms ease;
}

.icon-button:hover {
  color: #fff;
  background: rgba(39, 194, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(71, 215, 255, 0.28), 0 0 18px rgba(0, 190, 255, 0.16);
}

.icon-button .material-icons {
  font-size: 30px;
}

.language-button {
  color: #79eaff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.game-stage {
  position: absolute;
  z-index: 4;
  top: 76px;
  left: 50%;
  bottom: 102px;
  transform: translateX(-50%);
  width: min(1010px, 74vw);
  display: grid;
  grid-template-columns: 224px auto 224px;
  justify-content: center;
  align-items: center;
  gap: clamp(38px, 4.4vw, 74px);
}

.left-rail,
.right-rail {
  width: 224px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.left-rail {
  align-self: start;
  margin-top: 32px;
}

.right-rail {
  align-self: start;
  margin-top: 20px;
}

.hud-panel {
  position: relative;
  border: 1px solid rgba(60, 202, 255, 0.56);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(5, 19, 35, 0.96), rgba(15, 48, 77, 0.88)),
    rgba(5, 24, 43, 0.9);
  box-shadow:
    inset 0 1px rgba(199, 240, 255, 0.14),
    inset 0 -22px 40px rgba(17, 69, 108, 0.16),
    0 16px 40px rgba(0, 8, 22, 0.28);
  backdrop-filter: blur(8px);
}

.hud-panel::before,
.hud-panel::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 13px;
  pointer-events: none;
}

.hud-panel::before {
  left: -1px;
  top: -1px;
  border-top: 2px solid #6fe8ff;
  border-left: 2px solid #6fe8ff;
  border-radius: 15px 0 0;
}

.hud-panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid #35cfff;
  border-bottom: 2px solid #35cfff;
  border-radius: 0 0 15px;
}

.stats-panel { padding: 16px; }

.score-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 123px;
  padding: 15px 15px 13px;
  overflow: hidden;
  border: 1px solid rgba(72, 195, 241, 0.36);
  border-radius: 11px;
  background: radial-gradient(circle at 88% 20%, rgba(33, 194, 255, 0.18), transparent 38%), linear-gradient(145deg, rgba(8, 40, 66, 0.74), rgba(2, 16, 30, 0.76));
  box-shadow: inset 0 0 24px rgba(22, 132, 185, 0.12);
}

.score-hero::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -30px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(83, 223, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 16px rgba(64, 203, 255, 0.035), 0 0 0 32px rgba(64, 203, 255, 0.02);
}

.score-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #b7d4e9;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.score-icon { color: #4ce6ff; font-size: 14px; text-shadow: 0 0 9px #29d8ff; }

.score-hero > strong {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 37px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.055em;
  text-shadow: 0 0 19px rgba(86, 211, 255, 0.3);
}

.score-scale { display: flex; gap: 5px; margin-top: 2px; }
.score-scale i { width: 24px; height: 3px; border-radius: 3px; background: rgba(62, 215, 255, 0.22); }
.score-scale i:first-child { background: #51e5ff; box-shadow: 0 0 8px #24d9ff; }

.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

.stat-card {
  position: relative;
  min-width: 0;
  height: 92px;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid rgba(70, 174, 222, 0.34);
  border-radius: 10px;
  background: linear-gradient(155deg, rgba(8, 36, 58, 0.72), rgba(3, 18, 34, 0.88));
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -14px;
  bottom: -17px;
  width: 48px;
  height: 48px;
  transform: rotate(45deg);
  border: 1px solid rgba(58, 205, 255, 0.13);
}

.stat-card span { display: block; color: #9fbdd4; font-size: 14px; font-weight: 600; }
.stat-card strong { display: block; margin-top: 3px; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card small { position: absolute; right: 8px; top: 10px; color: rgba(102, 209, 244, 0.42); font-size: 8px; font-weight: 800; letter-spacing: 0.12em; writing-mode: vertical-rl; }
.level-card strong { color: #6feaff; text-shadow: 0 0 12px rgba(55, 220, 255, 0.48); }
.lines-card strong { color: #ffd762; text-shadow: 0 0 12px rgba(255, 194, 48, 0.26); }

.telemetry-row {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.telemetry-item {
  min-width: 0;
  height: 48px;
  padding: 6px 9px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1px;
  border: 1px solid rgba(65, 164, 207, 0.25);
  border-radius: 8px;
  background: rgba(3, 18, 33, 0.6);
}

.telemetry-item span {
  color: #7699b2;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.telemetry-item strong {
  min-width: 0;
  overflow: hidden;
  color: #d9efff;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telemetry-item:last-child strong { color: #69e7ff; }

.hud-panel h2 {
  margin: 0;
  color: #b9d1eb;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.hold-panel,
.next-panel {
  padding: 16px 18px 18px;
}

.hold-panel h2,
.next-panel h2 {
  margin: 0 0 11px 7px;
}

.mini-screen {
  display: grid;
  place-items: center;
  border: 1px solid rgba(71, 149, 204, 0.65);
  border-radius: 9px;
  background: linear-gradient(150deg, rgba(1, 10, 20, 0.96), rgba(7, 29, 50, 0.9));
  box-shadow: inset 0 0 22px rgba(22, 97, 150, 0.18), 0 8px 15px rgba(0, 8, 18, 0.24);
}

.hold-screen {
  height: 113px;
}

.hold-key {
  display: flex;
  justify-content: center;
  margin-top: -6px;
}

kbd {
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(172, 220, 255, 0.78);
  border-radius: 6px;
  color: #eff8ff;
  background: linear-gradient(180deg, rgba(17, 38, 60, 0.94), rgba(4, 19, 35, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 3px 0 rgba(0, 6, 16, 0.75);
  font-weight: 800;
}

.hold-key kbd {
  width: 33px;
  min-width: 33px;
  height: 30px;
  font-size: 16px;
}

#nextCanvas,
#holdCanvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.board-column {
  align-self: center;
  transform: translateY(-20px);
}

.board-frame {
  position: relative;
  padding: 21px 27px 22px;
  border: 3px solid #526b82;
  border-radius: 15px;
  background:
    linear-gradient(90deg, #162737 0 9px, #4c6479 10px 12px, #0b1825 13px calc(100% - 13px), #4c6479 calc(100% - 12px) calc(100% - 10px), #162737 calc(100% - 9px)),
    #101d2a;
  box-shadow:
    inset 0 0 0 2px #9cb2c5,
    inset 0 0 0 8px #162331,
    0 0 0 2px rgba(3, 10, 18, 0.9),
    0 24px 46px rgba(0, 8, 19, 0.58),
    0 0 25px rgba(35, 184, 255, 0.2);
}

.board-frame::before,
.board-frame::after {
  content: "";
  position: absolute;
  left: 29px;
  right: 29px;
  height: 7px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #6d8291 0 28px, #182a38 28px 34px);
  box-shadow: 0 0 0 1px #b8c4ce, 0 0 10px rgba(70, 198, 255, 0.3);
}

.board-frame::before { top: 8px; }
.board-frame::after { bottom: 8px; }

.frame-light {
  position: absolute;
  z-index: 3;
  top: 43px;
  bottom: 43px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, transparent, #49ddff 9%, #31bdff 46%, #63e7ff 88%, transparent);
  box-shadow: 0 0 6px #3fd7ff, 0 0 15px rgba(31, 196, 255, 0.74);
}

.left-light { left: 11px; }
.right-light { right: 11px; }

.canvas-container {
  position: relative;
  overflow: hidden;
  border: 5px solid #030911;
  border-radius: 4px;
  background: #071421;
  box-shadow: inset 0 0 0 2px #23394d, inset 0 0 28px rgba(1, 8, 17, 0.82), 0 0 0 2px #27394a;
}

#gameCanvas {
  width: calc(var(--block-size) * 10);
  height: calc(var(--block-size) * 20);
  display: block;
  background-color: #071421 !important;
  background-image:
    linear-gradient(rgba(55, 93, 124, 0.48) 1px, transparent 1px),
    linear-gradient(90deg, rgba(55, 93, 124, 0.48) 1px, transparent 1px);
  background-size: var(--block-size) var(--block-size);
}

.pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(1, 8, 18, 0.68);
  backdrop-filter: blur(7px);
}

.pause-card {
  position: relative;
  width: 82%;
  padding: 26px 18px 22px;
  overflow: hidden;
  border: 1px solid rgba(89, 226, 255, 0.68);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(8, 41, 66, 0.96), rgba(2, 15, 29, 0.98));
  box-shadow: inset 0 0 30px rgba(25, 159, 215, 0.12), 0 0 26px rgba(29, 211, 255, 0.2);
}

.pause-card::before,
.pause-card::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 2px;
  top: 12px;
  background: #42ddff;
  box-shadow: 0 0 8px #22d7ff;
}

.pause-card::before { left: 12px; }
.pause-card::after { right: 12px; }

.pause-status {
  color: #64e8ff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.pause-glyph {
  width: 62px;
  height: 62px;
  margin: 15px auto 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(83, 225, 255, 0.58);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(48, 206, 246, 0.16), transparent 67%);
  box-shadow: inset 0 0 16px rgba(39, 213, 255, 0.12), 0 0 17px rgba(32, 214, 255, 0.24);
}

.pause-glyph i {
  width: 7px;
  height: 25px;
  border-radius: 2px;
  background: #bff7ff;
  box-shadow: 0 0 8px #44e0ff;
}

.pause-card h2 {
  margin: 0;
  color: #fff;
  font-size: 25px;
  letter-spacing: 0.05em;
}

.pause-card p {
  margin: 7px 0 18px;
  color: #8fb4ca;
  font-size: 12px;
}

.pause-card button {
  width: 100%;
  height: 41px;
  border: 1px solid #6deaff;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(17, 112, 145, 0.82), rgba(5, 60, 91, 0.88));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 0 14px rgba(43, 223, 255, 0.22), 0 0 12px rgba(34, 213, 255, 0.23);
}

.pause-card button kbd {
  min-width: 23px;
  height: 23px;
  margin-left: 7px;
  font-size: 11px;
}

.mode-start-overlay {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  text-align: center;
  background: radial-gradient(circle at 50% 45%, rgba(9, 73, 107, 0.38), transparent 52%), rgba(1, 8, 18, 0.86);
  backdrop-filter: blur(8px);
}

.mode-start-overlay.is-visible { display: grid; }

.mode-start-card {
  width: 100%;
  padding: 27px 18px 22px;
  border: 1px solid rgba(89, 226, 255, 0.68);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(8, 41, 66, 0.97), rgba(2, 15, 29, 0.98));
  box-shadow: inset 0 0 30px rgba(25, 159, 215, 0.12), 0 0 26px rgba(29, 211, 255, 0.2);
}

.mode-start-card h2 {
  margin: 10px 0 6px;
  color: #fff;
  font-size: 24px;
}

.mode-start-card p {
  margin: 0 0 17px;
  color: #8fb4ca;
  font-size: 12px;
}

.mode-start-actions {
  display: grid;
  gap: 8px;
}

.mode-start-actions button {
  min-height: 40px;
  border: 1px solid rgba(80, 188, 229, 0.55);
  border-radius: 7px;
  background: rgba(5, 35, 57, 0.85);
  color: #cdeaff;
  font-weight: 800;
  cursor: pointer;
}

.mode-start-actions button:hover,
.mode-start-actions button:first-child {
  border-color: #68e9ff;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 102, 137, 0.86), rgba(5, 53, 80, 0.9));
  box-shadow: inset 0 0 13px rgba(43, 223, 255, 0.18), 0 0 10px rgba(34, 213, 255, 0.16);
}

.clear-feedback {
  --clear-color: #67edff;
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 48%;
  width: 82%;
  min-height: 156px;
  padding: 28px 20px 21px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.72);
  color: var(--clear-color);
  pointer-events: none;
  text-align: center;
  filter: blur(8px);
}

.clear-feedback[data-tier="tetris"] { --clear-color: #ffd158; }
.clear-feedback[data-tier="combo"] { --clear-color: #b78cff; }
.clear-feedback.is-showing { visibility: visible; animation: clear-feedback-in 1.42s cubic-bezier(.16,.78,.22,1) both; }

.clear-feedback::before,
.clear-feedback::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
}

.clear-feedback::before {
  width: 120%;
  height: 1px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, var(--clear-color) 22%, #fff 50%, var(--clear-color) 78%, transparent);
  box-shadow: 0 0 12px var(--clear-color), 0 0 32px var(--clear-color);
  animation: clear-scan 1.1s ease-out both;
}

.clear-feedback::after {
  width: 86%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.35);
  border: 1px solid color-mix(in srgb, var(--clear-color) 70%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--clear-color) 8%, transparent), inset 0 0 28px color-mix(in srgb, var(--clear-color) 14%, transparent);
  animation: clear-ring 1.1s ease-out both;
}

.clear-energy {
  position: absolute;
  inset: 7px 0;
  overflow: hidden;
  border-block: 1px solid color-mix(in srgb, var(--clear-color) 42%, transparent);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--clear-color) 8%, transparent), transparent);
  clip-path: polygon(9% 0, 91% 0, 100% 50%, 91% 100%, 9% 100%, 0 50%);
}

.clear-energy i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  transform: skewX(-22deg) translateX(-230%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--clear-color) 30%, transparent), transparent);
  animation: energy-sweep .9s ease-out both;
}

.clear-energy i:nth-child(2) { animation-delay: .1s; opacity: .65; }
.clear-energy i:nth-child(3) { animation-delay: .22s; opacity: .35; }

.clear-feedback-label {
  position: relative;
  z-index: 2;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .3em;
  text-shadow: 0 0 12px currentColor;
}

.clear-feedback > strong {
  position: relative;
  z-index: 2;
  margin: 3px 0 5px;
  color: #fff;
  font-size: clamp(40px, 5.3vh, 58px);
  line-height: 1;
  letter-spacing: .02em;
  text-shadow: 0 0 8px #fff, 0 0 24px var(--clear-color), 0 0 44px var(--clear-color);
}

.clear-feedback-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  color: color-mix(in srgb, var(--clear-color) 78%, #fff);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
}

.clear-feedback-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; }

.clear-particles { position: absolute; inset: 0; }
.clear-particles i { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; border-radius: 1px; background: var(--clear-color); box-shadow: 0 0 8px var(--clear-color); opacity: 0; }
.clear-feedback.is-showing .clear-particles i { animation: clear-particle 1s ease-out both; }
.clear-particles i:nth-child(1) { --px: -112px; --py: -55px; animation-delay: .04s !important; }
.clear-particles i:nth-child(2) { --px: 104px; --py: -68px; animation-delay: .1s !important; }
.clear-particles i:nth-child(3) { --px: -125px; --py: 28px; animation-delay: .16s !important; }
.clear-particles i:nth-child(4) { --px: 118px; --py: 34px; animation-delay: .06s !important; }
.clear-particles i:nth-child(5) { --px: -76px; --py: 73px; animation-delay: .22s !important; }
.clear-particles i:nth-child(6) { --px: 73px; --py: 76px; animation-delay: .18s !important; }
.clear-particles i:nth-child(7) { --px: -31px; --py: -82px; animation-delay: .12s !important; }
.clear-particles i:nth-child(8) { --px: 38px; --py: -88px; animation-delay: .2s !important; }

@keyframes clear-feedback-in {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.72); filter: blur(8px); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); filter: blur(0); }
  24% { transform: translate(-50%, -50%) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -54%) scale(1); filter: blur(0); }
  100% { opacity: 0; transform: translate(-50%, -68%) scale(.94); filter: blur(3px); }
}

@keyframes clear-scan { 0% { opacity: 0; transform: translate(-50%, -50%) scaleX(.05); } 18% { opacity: 1; } 72%, 100% { opacity: 0; transform: translate(-50%, -50%) scaleX(1); } }
@keyframes clear-ring { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.22); } 18% { opacity: .8; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2); } }
@keyframes energy-sweep { from { transform: skewX(-22deg) translateX(-230%); } to { transform: skewX(-22deg) translateX(750%); } }
@keyframes clear-particle { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0); } 18% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--px)), calc(-50% + var(--py))) scale(.8) rotate(135deg); } }

.next-panel {
  padding-bottom: 17px;
}

.next-stack {
  display: grid;
  gap: 0;
}

.next-stack .mini-screen {
  height: 132px;
}

.primary-next {
  height: 132px !important;
}

.action-panel {
  padding: 16px 14px 13px;
}

.pause-button,
.restart-button {
  width: 100%;
  height: 51px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  transition: 160ms ease;
}

.pause-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  border: 1px solid #79efff;
  background: linear-gradient(180deg, rgba(13, 86, 122, 0.72), rgba(6, 42, 73, 0.82));
  color: #eafeff;
  box-shadow: inset 0 0 16px rgba(27, 230, 255, 0.35), 0 0 8px #15d6ff, 0 0 22px rgba(21, 214, 255, 0.43);
}

.pause-button .material-icons {
  display: none;
}

.pause-button:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 18px rgba(27, 230, 255, 0.45), 0 0 12px #15d6ff, 0 0 30px rgba(21, 214, 255, 0.48);
}

.restart-button {
  height: 44px;
  margin-top: 10px;
  border: 1px solid rgba(73, 147, 202, 0.72);
  background: rgba(2, 21, 39, 0.64);
  color: #bdd6ed;
  font-size: 16px;
}

.restart-button:hover {
  color: white;
  border-color: #51ccf8;
}

.timer-block {
  padding: 12px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.timer-block span {
  color: #a8c1d9;
  font-size: 14px;
}

.timer-block strong {
  color: #fff;
  font-size: 24px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.combo-readout {
  position: relative;
  width: 224px;
  min-height: 76px;
  margin-left: -60px;
  padding: 11px 13px 10px 51px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  overflow: hidden;
  border: 1px solid rgba(64, 171, 213, 0.2);
  border-radius: 11px;
  background: linear-gradient(110deg, rgba(5, 30, 49, 0.72), rgba(2, 16, 29, 0.34));
  box-shadow: inset 0 0 22px rgba(28, 157, 208, 0.05);
  opacity: .62;
  transition: opacity 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.combo-readout::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-110%);
  background: linear-gradient(95deg, transparent 20%, rgba(111, 233, 255, .16), transparent 72%);
}

.combo-readout.is-active {
  opacity: 1;
  border-color: rgba(76, 222, 255, .5);
  box-shadow: inset 0 0 25px rgba(41, 196, 234, .1), 0 0 18px rgba(26, 202, 244, .12);
}

.combo-readout.is-hot {
  border-color: rgba(190, 137, 255, .64);
  background: linear-gradient(110deg, rgba(42, 20, 76, .82), rgba(4, 20, 37, .44));
  box-shadow: inset 0 0 26px rgba(161, 89, 255, .12), 0 0 22px rgba(145, 70, 255, .16);
}

.combo-readout.is-pulsing { animation: combo-card-pulse .62s cubic-bezier(.16,.78,.22,1); }
.combo-readout.is-pulsing::after { animation: combo-sheen .62s ease-out; }

.combo-beacon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 27px;
  height: 27px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 1px solid rgba(87, 220, 248, .42);
  border-radius: 50%;
  color: #5ce9ff;
  box-shadow: inset 0 0 11px rgba(64, 220, 249, .12);
}

.combo-beacon::before,
.combo-beacon::after,
.combo-beacon i {
  content: "";
  position: absolute;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.combo-beacon::before { inset: 5px; opacity: .7; }
.combo-beacon::after { inset: 10px; background: currentColor; box-shadow: 0 0 8px currentColor; }
.combo-beacon i { inset: -5px; opacity: 0; }
.combo-readout.is-active .combo-beacon i { animation: beacon-wave 1.25s ease-out infinite; }
.combo-readout.is-hot .combo-beacon { color: #bd8dff; border-color: rgba(190, 141, 255, .54); }

.combo-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.combo-copy small { color: #557b94; font-size: 7px; font-weight: 900; letter-spacing: .16em; }
.combo-readout.is-active .combo-copy small { color: #72b7cf; }

.combo-readout strong {
  color: #7fa9bb;
  font-size: 17px;
  line-height: 1;
  font-style: italic;
  white-space: nowrap;
  text-shadow: 0 0 10px currentColor;
}

.combo-readout.is-active strong { color: #5be9ff; }
.combo-readout.is-hot strong { color: #c69bff; }

.combo-readout > span:last-child {
  min-width: 53px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--amber);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px currentColor;
}

.combo-readout > span:last-child small { margin-top: 3px; color: #806e37; font-size: 7px; letter-spacing: .13em; }
.combo-readout.is-active > span:last-child small { color: #bca14a; }

.board-frame.line-clear-pulse { animation: board-clear-pulse .72s ease-out; }
.board-frame.tetris-pulse { animation: board-tetris-pulse 1s ease-out; }

@keyframes combo-card-pulse { 0% { transform: scale(.94); } 38% { transform: scale(1.045); } 100% { transform: scale(1); } }
@keyframes combo-sheen { to { transform: translateX(110%); } }
@keyframes beacon-wave { 0% { opacity: .7; transform: scale(.45); } 100% { opacity: 0; transform: scale(1.45); } }
@keyframes board-clear-pulse { 0%, 100% { filter: brightness(1); } 24% { filter: brightness(1.42) saturate(1.3); box-shadow: inset 0 0 0 2px #bff8ff, inset 0 0 0 8px #163648, 0 0 0 2px rgba(3,10,18,.9), 0 0 46px #22d9ff, 0 0 90px rgba(34,217,255,.42); } }
@keyframes board-tetris-pulse { 0%, 100% { filter: brightness(1); } 20% { filter: brightness(1.55) saturate(1.45); box-shadow: inset 0 0 0 2px #fff1b2, inset 0 0 0 8px #3c3216, 0 0 0 2px rgba(3,10,18,.9), 0 0 50px #ffd158, 0 0 110px rgba(255,193,49,.48); } }

.control-dock {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(1040px, 78vw);
  height: 70px;
  padding: 8px;
  display: grid;
  grid-template-columns: 1.2fr 0.82fr 0.9fr 1.2fr 0.84fr 0.9fr;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(53, 112, 164, 0.48);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(6, 23, 43, 0.93), rgba(3, 15, 30, 0.96));
  box-shadow: inset 0 1px rgba(158, 220, 255, 0.08), 0 15px 34px rgba(0, 4, 14, 0.42);
  backdrop-filter: blur(12px);
}

.control-card {
  height: 52px;
  min-width: 0;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(61, 125, 172, 0.3);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(12, 39, 62, 0.66), rgba(4, 20, 36, 0.76));
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease;
}

.control-card:hover {
  border-color: rgba(75, 207, 245, 0.56);
  background: linear-gradient(145deg, rgba(13, 54, 81, 0.76), rgba(4, 25, 44, 0.86));
}

.control-card kbd {
  min-width: 33px;
  height: 33px;
  flex: 0 0 auto;
  border-color: rgba(139, 207, 240, 0.62);
  border-radius: 6px;
  color: #e9f7ff;
  background: linear-gradient(180deg, rgba(22, 49, 72, 0.98), rgba(5, 22, 39, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 2px 0 rgba(0, 5, 14, 0.85);
  font-size: 15px;
}

.key-pair {
  display: flex;
  gap: 4px;
}

.control-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.control-copy b {
  color: #d3e5f2;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 700;
}

.control-copy small {
  color: #5f89a8;
  font-size: 8px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.primary-control {
  border-color: rgba(61, 214, 249, 0.56);
  background: linear-gradient(145deg, rgba(12, 75, 103, 0.74), rgba(4, 34, 55, 0.88));
  box-shadow: inset 0 0 16px rgba(38, 208, 245, 0.1), 0 0 15px rgba(24, 196, 238, 0.08);
}

.primary-control kbd {
  min-width: 74px;
  color: #fff;
  border-color: rgba(112, 233, 255, 0.82);
  box-shadow: inset 0 0 11px rgba(51, 218, 249, 0.12), 0 2px 0 rgba(0, 5, 14, 0.85), 0 0 8px rgba(32, 204, 243, 0.12);
}

.pause-control kbd { color: #9edcff; }

.mobile-controls-area {
  display: none;
}

.rank-panel {
  position: fixed;
  z-index: 70;
  top: 82px;
  right: 24px;
  width: min(560px, calc(100vw - 48px));
  padding: 21px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  border: 1px solid rgba(72, 215, 255, 0.68);
  border-radius: 16px;
  background: radial-gradient(circle at 100% 0, rgba(33, 167, 219, 0.16), transparent 38%), linear-gradient(150deg, rgba(6, 29, 49, 0.98), rgba(2, 13, 27, 0.99));
  box-shadow: inset 0 0 36px rgba(29, 151, 205, 0.09), 0 20px 48px rgba(0, 5, 17, 0.62), 0 0 28px rgba(20, 196, 255, 0.13);
  backdrop-filter: blur(16px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.rank-panel.is-open { visibility: visible; opacity: 1; transform: translateY(0) scale(1); }
.rank-panel-head { display: flex; align-items: flex-start; justify-content: space-between; }
.rank-panel-head h2 { margin: 5px 0 0; font-size: 24px; }

.rank-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(95, 178, 218, 0.4);
  border-radius: 8px;
  background: rgba(4, 27, 45, 0.72);
  color: #9dc7de;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.rank-status { min-height: 18px; margin: 10px 0 12px; color: #7fa9bf; font-size: 12px; }
.rank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }

.rank-card {
  min-width: 0;
  padding: 13px 12px 11px;
  border: 1px solid rgba(62, 161, 207, 0.34);
  border-radius: 11px;
  background: linear-gradient(155deg, rgba(9, 44, 69, 0.72), rgba(3, 18, 32, 0.85));
}

.rank-kicker { color: #80a7bd; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
.rank-card > strong { display: block; margin: 8px 0 11px; color: #69eaff; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 0 0 13px rgba(50, 218, 255, 0.32); }
.global-rank > strong { color: #ffd763; }
.region-rank > strong { color: #b493ff; }
.rank-card dl { margin: 0; }
.rank-card dl div { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; }
.rank-card dt { color: #668aa3; font-size: 9px; }
.rank-card dd { min-width: 0; margin: 0; overflow: hidden; color: #c8deeb; font-size: 10px; font-weight: 800; text-overflow: ellipsis; }

.rank-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.rank-actions button,
.rank-actions a { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(77, 186, 229, 0.46); border-radius: 8px; background: rgba(5, 35, 57, 0.72); color: #cbe8f8; font-size: 12px; font-weight: 800; text-decoration: none; cursor: pointer; }
.rank-actions .material-icons { font-size: 17px; }
.rank-actions button:hover,
.rank-actions a:hover { border-color: #63e7ff; color: #fff; }

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(0, 6, 16, 0.72);
  backdrop-filter: blur(9px);
}

.modal[style*="display: block"] {
  display: grid !important;
}

.modal-card {
  position: relative;
  width: min(440px, 88vw);
  padding: 31px 30px 28px;
  overflow: hidden;
  border: 1px solid rgba(81, 221, 255, 0.72);
  border-radius: 20px;
  background: radial-gradient(circle at 50% 0, rgba(34, 156, 204, 0.18), transparent 42%), linear-gradient(150deg, rgba(7, 30, 50, 0.99), rgba(2, 12, 25, 0.99));
  box-shadow: inset 0 0 44px rgba(39, 170, 226, 0.1), 0 0 0 5px rgba(5, 22, 38, 0.75), 0 0 46px rgba(20, 196, 255, 0.28);
  text-align: center;
}

.modal-card::before,
.modal-card::after {
  content: "";
  position: absolute;
  top: 0;
  width: 92px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #5ee9ff);
  box-shadow: 0 0 9px #29d9ff;
}

.modal-card::before { left: 0; }
.modal-card::after { right: 0; transform: scaleX(-1); }

.eyebrow {
  color: #70ddf3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.end-glyph {
  position: relative;
  width: 66px;
  height: 66px;
  margin: 14px auto 10px;
  border: 1px solid rgba(255, 103, 112, 0.76);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 70, 81, 0.16), transparent 64%);
  box-shadow: inset 0 0 18px rgba(255, 69, 82, 0.12), 0 0 18px rgba(255, 66, 80, 0.22);
}

.end-glyph::before,
.end-glyph::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 31px;
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: #ff8a91;
  box-shadow: 0 0 8px #ff4f5c;
}

.end-glyph::before { transform: rotate(45deg); }
.end-glyph::after { transform: rotate(-45deg); }

.end-glyph span {
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(255, 120, 128, 0.28);
  border-radius: 50%;
}

.modal-card h2 {
  margin: 0 0 17px;
  color: #f8fbff !important;
  font-size: 29px;
  letter-spacing: 0.08em;
}

.final-score-block {
  padding: 14px 12px 13px;
  margin-bottom: 11px;
  border: 1px solid rgba(68, 197, 239, 0.38);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(8, 48, 75, 0.74), rgba(3, 20, 36, 0.78));
}

.final-score-block span,
.final-score-block strong {
  display: block;
}

.final-score-block span {
  color: #91b8ce;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.final-score-block strong {
  margin-top: 3px;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(73, 219, 255, 0.35);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.result-grid div {
  padding: 11px 6px;
  border: 1px solid rgba(65, 145, 200, 0.35);
  border-radius: 9px;
  background: rgba(3, 17, 31, 0.62);
}

.result-grid span,
.result-grid strong {
  display: block;
}

.result-grid span {
  color: #96b7ce;
  font-size: 11px;
}

.result-grid strong {
  margin-top: 5px;
  color: white;
  font-size: 19px;
}

.result-records {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.result-records > div {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(62, 146, 196, 0.26);
  border-radius: 8px;
  background: rgba(3, 17, 31, 0.48);
}

.result-records span { color: #789db5; font-size: 10px; }
.result-records strong { color: #72e8ff; font-size: 14px; font-variant-numeric: tabular-nums; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
  height: 45px;
  border: 1px solid rgba(74, 204, 248, 0.68);
  border-radius: 8px;
  background: rgba(5, 31, 51, 0.84);
  color: #b8d2e5;
  font-weight: 800;
  cursor: pointer;
}

.modal-actions .primary-action {
  border-color: #6ceaff;
  background: linear-gradient(180deg, rgba(16, 112, 145, 0.88), rgba(4, 58, 87, 0.94));
  color: #fff;
  box-shadow: inset 0 0 16px rgba(36, 219, 255, 0.2), 0 0 13px rgba(29, 207, 255, 0.2);
}

.modal-actions button:hover { border-color: #a1f3ff; color: #fff; }

.revive-layer {
  align-items: center;
  justify-content: center;
  background: rgba(0, 6, 16, 0.8);
}

.revive-card,
.reward-card {
  width: min(430px, 90vw);
  padding: 29px 30px 27px;
}

.revive-orb {
  position: relative;
  width: 70px;
  height: 70px;
  margin: 15px auto 11px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(70, 228, 255, 0.7);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 213, 255, 0.2), transparent 66%);
  box-shadow: inset 0 0 20px rgba(33, 211, 255, 0.14), 0 0 21px rgba(28, 206, 255, 0.22);
}

.revive-orb::before,
.revive-orb::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(85, 232, 255, 0.28);
  border-radius: 50%;
}

.revive-orb::after {
  inset: -5px;
  border-style: solid;
  border-color: transparent rgba(82, 229, 255, 0.35);
  transform: rotate(28deg);
}

.revive-orb > span {
  color: #d8fbff;
  font-size: 34px;
  font-weight: 500;
  text-shadow: 0 0 11px #3fddff;
}

.revive-orb.success {
  border-color: rgba(76, 255, 174, 0.72);
  background: radial-gradient(circle, rgba(52, 238, 154, 0.2), transparent 66%);
  box-shadow: inset 0 0 20px rgba(51, 234, 151, 0.14), 0 0 21px rgba(42, 232, 155, 0.22);
}

.revive-orb.success::before { border-color: rgba(100, 255, 189, 0.28); }
.revive-orb.success::after { border-color: transparent rgba(92, 255, 183, 0.35); }
.revive-orb.success > span { color: #caffea; text-shadow: 0 0 11px #45efa2; }

.revive-copy {
  max-width: 330px;
  margin: -8px auto 18px;
  color: #92b5ca;
  font-size: 13px;
  line-height: 1.7;
}

.revive-benefits {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  text-align: left;
}

.revive-benefits > div {
  min-height: 38px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(60, 158, 207, 0.28);
  border-radius: 8px;
  background: rgba(4, 26, 44, 0.64);
  color: #c1d9e9;
  font-size: 13px;
}

.revive-benefits.compact {
  grid-template-columns: 1fr 1fr;
}

.revive-benefits.compact > div {
  justify-content: center;
  padding-inline: 7px;
}

.benefit-symbol {
  width: 23px;
  height: 23px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(74, 215, 251, 0.46);
  border-radius: 6px;
  color: #6feaff;
  background: rgba(31, 153, 198, 0.12);
  font-size: 14px;
  text-shadow: 0 0 8px #27d9ff;
}

.revive-count-row {
  margin-bottom: 15px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(77, 177, 219, 0.25);
  border-bottom: 1px solid rgba(77, 177, 219, 0.25);
  color: #9ebed2;
  font-size: 13px;
}

.revive-count-row strong {
  min-width: 31px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 204, 78, 0.62);
  border-radius: 6px;
  color: #ffda68;
  background: rgba(255, 190, 42, 0.08);
  font-size: 17px;
  box-shadow: 0 0 10px rgba(255, 193, 44, 0.12);
}

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

.revive-primary,
.revive-decline {
  width: 100%;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.revive-primary {
  min-height: 48px;
  padding: 8px 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #6ceaff;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 118, 151, 0.9), rgba(3, 59, 89, 0.96));
  box-shadow: inset 0 0 17px rgba(39, 222, 255, 0.22), 0 0 14px rgba(27, 205, 255, 0.2);
}

.revive-primary:hover {
  transform: translateY(-1px);
  border-color: #b7f8ff;
  box-shadow: inset 0 0 20px rgba(39, 222, 255, 0.3), 0 0 20px rgba(27, 205, 255, 0.29);
}

.revive-primary .material-icons { font-size: 21px; }

.revive-primary kbd,
.revive-decline kbd {
  min-width: 44px;
  height: 25px;
  margin-left: auto;
  font-size: 10px;
}

.reward-card > .revive-primary {
  margin-top: 17px;
}

.revive-decline {
  height: 39px;
  border: 1px solid rgba(93, 143, 177, 0.5);
  color: #91adbf;
  background: rgba(3, 20, 35, 0.8);
}

.revive-decline:hover {
  color: #fff;
  border-color: rgba(150, 211, 239, 0.72);
}

@media (max-height: 760px) {
  .revive-card,
  .reward-card { padding: 20px 25px; }
  .revive-orb { width: 54px; height: 54px; margin: 10px auto 7px; }
  .revive-orb > span { font-size: 27px; }
  .revive-card h2,
  .reward-card h2 { margin-bottom: 12px; font-size: 24px; }
  .revive-copy { margin-bottom: 11px; line-height: 1.45; }
  .revive-benefits { gap: 6px; margin-bottom: 9px; }
  .revive-benefits > div { min-height: 33px; padding-block: 6px; }
  .revive-count-row { margin-bottom: 10px; padding-block: 6px; }
}

.score-animation {
  display: none !important;
}

.score-animation-combo { display: none; }

.score-roll {
  position: relative;
  overflow: hidden;
}

.score-roll-item {
  display: block;
}

.score-roll-old {
  position: absolute;
  opacity: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-height: 820px) {
  :root { --block-size: clamp(21px, 3.2vh, 27px); }
  .command-header { height: 62px; }
  .game-stage { top: 64px; bottom: 80px; }
  .control-dock { height: 58px; bottom: 7px; padding: 6px; }
  .control-card { height: 44px; padding: 5px 7px; gap: 7px; }
  .control-card kbd { min-width: 29px; height: 29px; font-size: 13px; }
  .primary-control kbd { min-width: 62px; }
  .control-copy b { font-size: 12px; }
  .stats-panel { padding: 11px; }
  .score-hero { min-height: 100px; padding: 11px 12px; }
  .score-hero > strong { font-size: 31px; }
  .stat-card { height: 73px; padding: 8px 10px; }
  .stat-card strong { font-size: 23px; }
  .hold-screen { height: 88px; }
  .next-stack .mini-screen { height: 102px; }
  .primary-next { height: 102px !important; }
  .action-panel { padding-top: 11px; }
  .pause-button { height: 43px; }
  .restart-button { height: 36px; margin-top: 7px; }
  .timer-block { padding-top: 7px; }
  .timer-block strong { font-size: 21px; }
  .combo-readout { display: none; }
}

@media (max-width: 1180px) {
  body { min-width: 0; overflow: auto; }
  .space-game-shell { min-width: 1000px; }
  .game-stage { width: 930px; grid-template-columns: 205px auto 205px; gap: 32px; }
  .left-rail, .right-rail { width: 205px; }
  .command-header { padding-inline: 40px; }
  .control-dock { width: 850px; }
}

@media (max-width: 720px) {
  html,
  body { overflow: auto; }
  body { min-width: 0; background-attachment: scroll; }
  .space-game-shell { min-width: 0; min-height: 1180px; }
  .command-header { height: auto; min-height: 72px; grid-template-columns: 1fr; padding: 10px 16px 8px; }
  .brand { grid-column: 1; grid-row: 1; justify-self: center; font-size: 20px; white-space: nowrap; }
  .mode-tabs { grid-column: 1; grid-row: 3; width: 100%; height: 50px; justify-content: center; gap: 4px; }
  .mode-tab { min-width: 0; flex: 1; font-size: 15px; }
  .header-actions { grid-column: 1; grid-row: 2; justify-self: center; margin-top: 3px; }
  .rank-panel { top: 12px; right: 10px; width: calc(100vw - 20px); padding: 17px; }
  .game-stage {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 18px 14px 126px;
  }
  .board-column { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .board-column { transform: none; }
  .left-rail, .right-rail { width: 100%; align-self: start; gap: 14px; margin-top: 0; }
  .stats-panel, .hold-panel, .next-panel, .action-panel { border-radius: 12px; }
  .control-dock { display: none; }
  .mobile-controls-area {
    position: fixed;
    z-index: 40;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(70, 195, 240, 0.5);
    border-radius: 12px;
    background: rgba(2, 15, 29, 0.92);
    backdrop-filter: blur(12px);
  }
  .mobile-controls-area button {
    min-height: 48px;
    border: 1px solid rgba(108, 203, 244, 0.62);
    border-radius: 8px;
    background: rgba(12, 54, 82, 0.88);
    color: white;
    font-weight: 800;
  }
  .combo-readout { margin-left: 0; align-items: center; }
}

.release-announcement {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 5, 14, 0.84);
  backdrop-filter: blur(12px);
}

.release-announcement.is-visible { display: flex; }

html.release-announcement-open,
html.release-announcement-open body {
  overflow: hidden;
}

.release-announcement-card {
  width: min(680px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  border: 1px solid rgba(91, 222, 255, 0.46);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(8, 29, 50, 0.98), rgba(3, 13, 27, 0.99));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 80px rgba(29, 189, 255, 0.26);
  animation: release-arrival 420ms cubic-bezier(0.2, 0.9, 0.25, 1);
  scrollbar-width: thin;
  scrollbar-color: #56e4ff rgba(2, 14, 28, 0.78);
  overscroll-behavior: contain;
}

.release-announcement-card::-webkit-scrollbar { width: 9px; }

.release-announcement-card::-webkit-scrollbar-track {
  margin: 18px 0;
  border: 1px solid rgba(91, 222, 255, 0.12);
  border-radius: 999px;
  background: rgba(2, 14, 28, 0.78);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.58);
}

.release-announcement-card::-webkit-scrollbar-thumb {
  min-height: 54px;
  border: 2px solid #071726;
  border-radius: 999px;
  background: linear-gradient(180deg, #74ecff 0%, #22d3ee 48%, #1d70d8 100%);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.48);
}

.release-announcement-card::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #b1f5ff 0%, #44dcf4 50%, #3588ea 100%);
}

@keyframes release-arrival {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.release-announcement-header {
  display: flex;
  gap: 16px;
  padding: 26px 28px 22px;
  border-bottom: 1px solid rgba(91, 222, 255, 0.18);
  background: linear-gradient(105deg, rgba(29, 207, 255, 0.15), transparent 72%);
}

.release-announcement-icon {
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  height: 52px;
  border: 1px solid rgba(91, 222, 255, 0.42);
  border-radius: 16px;
  background: rgba(36, 208, 255, 0.09);
  font-size: 27px;
}

.release-announcement-version {
  color: #6de8ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.release-announcement h2 {
  margin: 6px 0 7px;
  color: #fff;
  font-size: clamp(23px, 4vw, 32px);
  line-height: 1.08;
}

.release-announcement p,
.release-announcement-grid span {
  color: #a9bfd3;
  line-height: 1.55;
}

.release-announcement p { margin: 0; }

.release-announcement-preview {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid rgba(91, 222, 255, 0.18);
  background: #020b16;
}

.release-announcement-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.release-announcement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 20px 28px;
}

.release-announcement-grid > div {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.release-announcement-grid strong,
.release-announcement-grid span { display: block; }
.release-announcement-grid strong { margin-bottom: 5px; color: #6de8ff; font-size: 13px; }
.release-announcement-grid span { font-size: 12px; }

.release-announcement-actions {
  display: flex;
  gap: 10px;
  padding: 0 28px 24px;
}

.release-announcement-actions button,
.release-announcement-actions a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  color: #d9e9f6;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.release-announcement-actions .release-primary {
  flex: 1;
  border-color: #63e6ff;
  color: #02111e;
  background: #63e6ff;
  box-shadow: 0 0 24px rgba(39, 205, 255, 0.26);
}

.release-announcement-actions button:focus-visible,
.release-announcement-actions a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .release-announcement { padding: 14px; }
  .release-announcement-header { padding: 20px; }
  .release-announcement-grid { grid-template-columns: 1fr; padding: 16px 20px; }
  .release-announcement-actions { flex-direction: column; padding: 0 20px 20px; }
}
