/* ============================================================
   合成姜友军 · MERGE MR. JIANG
   ============================================================ */

:root {
  --ink: #142235;
  --ink-deep: #0a1320;
  --navy: #0d1929;
  --navy-2: #16263d;
  --navy-3: #1e3350;
  --cream: #f7eedb;
  --cream-soft: #f3e6cb;
  --paper: #efe1c4;
  --paper-deep: #e2cfa9;
  --gold: #f2c14e;
  --gold-light: #ffdd7c;
  --gold-deep: #b77b1d;
  --red: #e3523d;
  --red-deep: #a62d21;
  --red-dark: #7d1f17;
  --teal: #3b9b84;
  --blue: #528ac9;
  --muted: rgba(247, 238, 219, 0.58);
  --line: rgba(247, 238, 219, 0.14);
  --font-ui: 'Nunito', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', sans-serif;
  --font-display: 'ZCOOL QingKe', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --font-latin: 'Lilita One', 'Nunito', 'Arial Black', sans-serif;
  --radius: 16px;
  --shadow-hard: 0 5px 0 rgba(4, 9, 16, 0.36);
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--navy);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 300px;
  min-height: 100dvh;
  overflow-x: clip;
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  background:
    radial-gradient(circle at 12% 8%, rgba(242, 193, 78, 0.16), transparent 27rem),
    radial-gradient(circle at 88% 30%, rgba(190, 63, 45, 0.15), transparent 30rem),
    radial-gradient(circle at 50% 110%, rgba(45, 95, 135, 0.24), transparent 42rem),
    linear-gradient(155deg, #0e1b2d 0%, #0a1422 52%, #101f32 100%);
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.26;
  background-image: radial-gradient(rgba(247, 238, 219, 0.22) 0.65px, transparent 0.8px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
}

::selection {
  color: var(--ink);
  background: var(--gold);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  border: 0;
  cursor: pointer;
}

button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================== AMBIENT ============================== */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient::after {
  content: '★';
  position: absolute;
  right: -12vw;
  bottom: -34vh;
  color: rgba(247, 238, 219, 0.025);
  font-family: var(--font-latin);
  font-size: 92vw;
  line-height: 1;
  transform: rotate(-13deg);
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.6;
}

.ambient-glow--a {
  top: -22vh;
  left: 52%;
  width: 54vw;
  height: 54vw;
  background: radial-gradient(circle, rgba(242, 193, 78, 0.16), transparent 65%);
}

.ambient-glow--b {
  right: -10vw;
  top: 42vh;
  width: 36vw;
  height: 36vw;
  background: radial-gradient(circle, rgba(204, 62, 44, 0.12), transparent 66%);
}

.ambient-stars {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 12% 24%, rgba(255, 231, 169, 0.9) 0 1.4px, transparent 1.8px),
    radial-gradient(circle at 82% 12%, rgba(255, 231, 169, 0.55) 0 1px, transparent 1.5px),
    radial-gradient(circle at 73% 76%, rgba(255, 231, 169, 0.45) 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 24% 88%, rgba(255, 231, 169, 0.6) 0 1px, transparent 1.4px);
  background-size: 380px 380px, 290px 290px, 420px 420px, 330px 330px;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image:
    linear-gradient(rgba(247, 238, 219, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 238, 219, 0.4) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(ellipse at 50% 38%, #000 0 10%, transparent 68%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 38%, #000 0 10%, transparent 68%);
}

/* ============================== BUTTONS ============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 13px;
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-gold {
  color: #252016;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 46%, #dfa737 100%);
  box-shadow: 0 6px 0 var(--gold-deep), 0 10px 24px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--gold-deep), 0 14px 26px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.btn-gold:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--gold-deep), 0 6px 12px rgba(0, 0, 0, 0.24);
}

.btn-ghost {
  color: var(--cream);
  border-color: rgba(247, 238, 219, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  border-color: rgba(247, 238, 219, 0.62);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn-hero {
  position: relative;
  min-width: 265px;
  min-height: 68px;
  padding: 9px 15px 9px 10px;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
}

.btn-hero::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -35%;
  width: 36%;
  height: 220%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: rotate(17deg);
  transition: left 550ms ease;
}

.btn-hero:hover::after {
  left: 130%;
}

.btn-hero__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  color: var(--gold-light);
  background: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-hero__icon svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
  stroke: none;
  margin-left: 2px;
}

.btn-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.btn-hero__copy b {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.07em;
  line-height: 1.15;
}

.btn-hero__copy small {
  color: rgba(37, 32, 22, 0.58);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.btn-hero__arrow {
  margin-left: auto;
  padding: 0 3px;
  font-family: var(--font-latin);
  font-size: 25px;
  line-height: 1;
  transition: transform 160ms ease;
}

.btn-hero:hover .btn-hero__arrow {
  transform: translateX(4px);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(12px);
  transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.icon-btn:hover {
  border-color: rgba(247, 238, 219, 0.38);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 21px;
  height: 21px;
}

.sound-btn svg path:first-child {
  fill: currentColor;
  stroke: none;
}

.icon-sound-off {
  display: none;
}

body.is-muted .icon-sound-on {
  display: none;
}

body.is-muted .icon-sound-off {
  display: block;
}

/* ============================== HOME TOP ============================== */

.screen {
  position: relative;
  z-index: 1;
  overflow-x: clip;
}

.screen-home {
  width: 100%;
  max-width: 1440px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 20px clamp(18px, 4vw, 58px) 34px;
}

.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-top: max(0px, env(safe-area-inset-top));
}

.brandmark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(247, 238, 219, 0.68);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.19em;
}

.brandmark__star {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(242, 193, 78, 0.48);
  border-radius: 50%;
  color: var(--gold);
  font-size: 15px;
  background: rgba(242, 193, 78, 0.08);
}

.home-top__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.best-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.best-pill b {
  color: var(--gold-light);
  font-family: var(--font-latin);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ============================== HOME HERO ============================== */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.94fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  width: 100%;
  max-width: 1220px;
  min-height: min(645px, calc(100dvh - 120px));
  margin: 0 auto;
  padding: clamp(22px, 5vh, 56px) 0 20px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(242, 193, 78, 0.32);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(242, 193, 78, 0.065);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1.2;
}

.eyebrow__spark {
  color: var(--gold);
  font-size: 12px;
}

.eyebrow--dark {
  color: var(--red-deep);
  border-color: rgba(166, 45, 33, 0.24);
  background: rgba(166, 45, 33, 0.055);
}

.eyebrow--dark .eyebrow__spark {
  color: var(--red);
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 25px 0 0;
  line-height: 0.8;
}

.logo__small {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin-left: 7px;
  padding: 4px 16px 6px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  color: var(--cream);
  background: var(--red);
  box-shadow: 4px 4px 0 rgba(4, 9, 16, 0.5);
  font-family: var(--font-display);
  font-size: clamp(25px, 3.4vw, 38px);
  font-weight: 400;
  letter-spacing: 0.11em;
  transform: rotate(-3deg);
  text-shadow: 0 2px 0 rgba(89, 16, 10, 0.45);
}

.logo__main {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: clamp(70px, 9.6vw, 132px);
  font-weight: 400;
  letter-spacing: 0.045em;
  white-space: nowrap;
  -webkit-text-stroke: 2.5px var(--ink);
  paint-order: stroke fill;
  text-shadow:
    0 5px 0 #bd7e1b,
    0 10px 0 var(--ink),
    0 20px 36px rgba(0, 0, 0, 0.38);
}

.logo__en {
  display: block;
  margin-top: 18px;
  margin-left: 5px;
  color: rgba(247, 238, 219, 0.55);
  font-family: var(--font-ui);
  font-size: clamp(9px, 0.9vw, 11px);
  font-weight: 900;
  letter-spacing: 0.38em;
}

.tagline {
  margin: 22px 0 27px;
  color: rgba(247, 238, 219, 0.74);
  font-size: clamp(13px, 1.15vw, 16px);
  font-weight: 600;
  line-height: 1.85;
  letter-spacing: 0.02em;
}

.tagline span {
  color: var(--gold-light);
  text-decoration: underline;
  text-decoration-color: rgba(242, 193, 78, 0.35);
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.hero-actions .btn-ghost {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 13px;
  font-size: 13px;
}

.mini-stats {
  display: flex;
  align-items: stretch;
  gap: clamp(18px, 3vw, 34px);
  margin-top: 32px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  max-width: 440px;
}

.mini-stats div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mini-stats b {
  color: var(--cream);
  font-family: var(--font-latin);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.mini-stats b em {
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.mini-stats span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

/* ============================== HERO VISUAL ============================== */

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 580px;
  isolation: isolate;
}

.hero-rays {
  position: absolute;
  z-index: -2;
  width: min(720px, 72vw);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.22;
  background: repeating-conic-gradient(from 4deg, rgba(242, 193, 78, 0.56) 0 4deg, transparent 4deg 16deg);
  mask-image: radial-gradient(circle, #000 0 12%, rgba(0, 0, 0, 0.6) 40%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle, #000 0 12%, rgba(0, 0, 0, 0.6) 40%, transparent 70%);
  animation: spin 80s linear infinite;
}

.hero-halo {
  position: absolute;
  z-index: -1;
  width: min(590px, 62vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 193, 78, 0.22), rgba(215, 111, 59, 0.08) 50%, transparent 70%);
  filter: blur(18px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  width: min(435px, 90%);
  padding: 11px 11px 10px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  color: var(--ink);
  background: linear-gradient(160deg, #fbf2df, #ebd9b8);
  box-shadow:
    0 13px 0 rgba(3, 8, 14, 0.42),
    0 34px 64px rgba(0, 0, 0, 0.42),
    inset 0 0 0 2px rgba(255, 255, 255, 0.48);
  transform: rotate(2.2deg);
  animation: posterFloat 7.5s ease-in-out infinite;
}

.hero-poster::before {
  content: '';
  position: absolute;
  inset: 7px;
  z-index: 0;
  border: 1px solid rgba(20, 34, 53, 0.16);
  border-radius: 17px;
  pointer-events: none;
}

.poster-top,
.poster-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 5px 8px;
  color: rgba(20, 34, 53, 0.58);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.17em;
  line-height: 1.1;
}

.poster-top {
  border-bottom: 1px dashed rgba(20, 34, 53, 0.24);
}

.poster-top__star {
  color: var(--red);
  font-size: 11px;
}

.poster-foot {
  padding: 8px 5px 3px;
  border-top: 1px dashed rgba(20, 34, 53, 0.2);
  font-size: 7px;
}

.poster-art {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(20, 34, 53, 0.2);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 252, 242, 0.98), rgba(243, 226, 194, 0.98) 68%),
    var(--paper);
}

.poster-art::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(20, 34, 53, 0.12) 0.6px, transparent 0.9px);
  background-size: 5px 5px;
  opacity: 0.25;
  mix-blend-mode: multiply;
}

.poster-art img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.02);
}

.sticker {
  position: absolute;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  border: 3px solid var(--ink);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.34);
  line-height: 0.86;
  letter-spacing: 0.07em;
}

.sticker--pieces {
  top: 22px;
  left: max(8px, 6%);
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: var(--red);
  transform: rotate(-10deg);
  text-shadow: 0 2px 0 rgba(83, 15, 10, 0.35);
}

.sticker--pieces b {
  font-family: var(--font-latin);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0;
}

.sticker--pieces span {
  margin-top: 4px;
  font-size: 9px;
  font-weight: 900;
}

.sticker--time {
  right: max(3px, 4%);
  bottom: 53px;
  min-width: 92px;
  padding: 12px 13px 14px;
  border-radius: 12px;
  color: var(--ink);
  background: var(--gold);
  transform: rotate(7deg);
  text-shadow: none;
}

.sticker--time span {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.sticker--time b {
  margin-top: 3px;
  font-family: var(--font-latin);
  font-size: 35px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.sticker--time b em {
  font-family: var(--font-ui);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.float-piece {
  position: absolute;
  z-index: 5;
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.float-piece--one {
  top: 110px;
  right: max(0px, -1%);
  transform: rotate(12deg);
  animation: pieceFloat 5.8s ease-in-out infinite;
}

.float-piece--two {
  left: max(0px, 1%);
  bottom: 128px;
  width: 57px;
  height: 57px;
  transform: rotate(-8deg);
  animation: pieceFloatAlt 6.4s ease-in-out infinite;
}

.hero-spark {
  position: absolute;
  z-index: 3;
  color: var(--gold-light);
  font-family: var(--font-latin);
  text-shadow: 0 0 20px rgba(242, 193, 78, 0.5);
  animation: twinkle 3.4s ease-in-out infinite;
}

.hero-spark--one {
  top: 16%;
  right: 4%;
  font-size: 28px;
}

.hero-spark--two {
  bottom: 11%;
  left: 6%;
  color: var(--red);
  font-size: 23px;
  animation-delay: 0.9s;
}

.hero-spark--three {
  top: 45%;
  left: 1%;
  font-size: 17px;
  animation-delay: 1.7s;
}

.hero-tape {
  position: absolute;
  z-index: 3;
  width: 97px;
  height: 25px;
  background: rgba(246, 219, 160, 0.47);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.hero-tape--one {
  top: 45px;
  right: 18%;
  transform: rotate(34deg);
}

.hero-tape--two {
  left: 12%;
  bottom: 60px;
  transform: rotate(-23deg);
}

/* ============================== HOME RULES ============================== */

.home-rules,
.gallery-section {
  position: relative;
  width: 100%;
  max-width: 1220px;
  margin: clamp(54px, 9vh, 100px) auto 0;
}

.home-rules {
  overflow: hidden;
  padding: clamp(24px, 4vw, 46px);
  border: 2px solid rgba(20, 34, 53, 0.9);
  border-radius: 28px;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 0%, rgba(242, 193, 78, 0.38), transparent 26%),
    linear-gradient(150deg, #faf3e3 0%, #f1e3c8 100%);
  box-shadow:
    0 10px 0 rgba(4, 9, 16, 0.25),
    0 30px 70px rgba(0, 0, 0, 0.26),
    inset 0 0 0 2px rgba(255, 255, 255, 0.36);
}

.home-rules::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.38;
  background-image: radial-gradient(rgba(20, 34, 53, 0.17) 0.7px, transparent 1px);
  background-size: 9px 9px;
  mask-image: linear-gradient(120deg, transparent 24%, #000 80%);
  -webkit-mask-image: linear-gradient(120deg, transparent 24%, #000 80%);
}

.section-head,
.gallery-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.section-head h2,
.gallery-heading h2 {
  margin: 11px 0 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(29px, 3.5vw, 45px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.06em;
}

.section-head > p,
.gallery-heading > p {
  margin: 0 0 3px;
  color: rgba(20, 34, 53, 0.55);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  text-align: right;
}

.rule-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 28px;
}

.rule-card {
  position: relative;
  min-height: 218px;
  padding: 18px 17px 15px;
  border: 1px solid rgba(20, 34, 53, 0.15);
  border-radius: 15px;
  background: rgba(255, 250, 239, 0.68);
  box-shadow: 0 3px 0 rgba(20, 34, 53, 0.06);
  overflow: hidden;
  transition: transform 180ms ease, background-color 180ms ease;
}

.rule-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 252, 245, 0.92);
}

.rule-card__num {
  position: absolute;
  top: 12px;
  right: 14px;
  color: rgba(20, 34, 53, 0.13);
  font-family: var(--font-latin);
  font-size: 27px;
  line-height: 1;
}

.rule-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 22px;
  border: 1px solid rgba(20, 34, 53, 0.18);
  border-radius: 11px;
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 3px 0 rgba(20, 34, 53, 0.15);
}

.rule-card:nth-child(2) .rule-card__icon {
  background: #e56a50;
}

.rule-card:nth-child(3) .rule-card__icon {
  background: #75b7a5;
}

.rule-card:nth-child(4) .rule-card__icon {
  background: #f0a13c;
}

.rule-card__icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.2;
}

.rule-card h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.rule-card p {
  margin: 0;
  color: rgba(20, 34, 53, 0.62);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.72;
}

.rule-card__tag {
  display: block;
  margin-top: 15px;
  color: rgba(20, 34, 53, 0.32);
  font-family: var(--font-ui);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

/* ============================== GALLERY ============================== */

.gallery-section {
  padding: clamp(4px, 1vw, 10px) 0;
}

.gallery-heading {
  margin-bottom: 22px;
}

.gallery-heading h2 {
  color: var(--cream);
}

.gallery-heading > p {
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 11px;
}

.gallery-area {
  padding: 15px;
  border: 1px solid rgba(247, 238, 219, 0.14);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.gallery-area__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(247, 238, 219, 0.13);
}

.gallery-area__title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--cream);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.gallery-area__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--area-color, var(--gold));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--area-color, var(--gold)) 18%, transparent);
}

.gallery-area__count {
  color: var(--muted);
  font-family: var(--font-latin);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.gallery-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
  gap: 7px;
}

.gallery-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 5px 3px 4px;
  border: 1px solid rgba(247, 238, 219, 0.11);
  border-radius: 9px;
  background: rgba(247, 238, 219, 0.065);
  transition: transform 160ms ease, background-color 160ms ease;
}

.gallery-item:hover {
  transform: translateY(-2px);
  background: rgba(247, 238, 219, 0.12);
}

.gallery-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.23));
}

.gallery-item span {
  max-width: 100%;
  overflow: hidden;
  color: rgba(247, 238, 219, 0.68);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gallery-item b {
  position: absolute;
  top: 3px;
  left: 4px;
  color: rgba(247, 238, 219, 0.25);
  font-family: var(--font-latin);
  font-size: 8px;
  font-weight: 400;
  line-height: 1;
}

.home-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 1220px;
  margin: 46px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: rgba(247, 238, 219, 0.34);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.home-footer span {
  color: rgba(242, 193, 78, 0.48);
}

.home-footer p {
  margin: 0;
}

/* ============================== GAME SHELL ============================== */

.screen-game {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100dvh;
  padding: 10px clamp(12px, 2.6vw, 28px) 8px;
}

.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: 1000px;
  min-height: 48px;
  margin: 0 auto;
  flex: 0 0 auto;
  padding-top: max(0px, env(safe-area-inset-top));
}

.game-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.game-brand__star {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border: 1px solid rgba(242, 193, 78, 0.46);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(242, 193, 78, 0.08);
  font-size: 13px;
}

.game-brand__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1;
}

.game-brand__copy b {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.game-brand__copy small {
  margin-top: 4px;
  color: rgba(247, 238, 219, 0.36);
  font-size: 6.5px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.game-top__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.best-mini {
  display: flex;
  align-items: baseline;
  gap: 6px;
  height: 33px;
  padding: 0 11px;
  border: 1px solid rgba(247, 238, 219, 0.1);
  border-radius: 99px;
  color: rgba(247, 238, 219, 0.4);
  background: rgba(255, 255, 255, 0.025);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.best-mini b {
  color: var(--gold-light);
  font-family: var(--font-latin);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.game-top .icon-btn {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.game-top .icon-btn svg {
  width: 18px;
  height: 18px;
}

.game-shell {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
  width: 100%;
  max-width: 960px;
  margin: 7px auto 0;
  flex: 1 1 auto;
}

.play-column {
  display: flex;
  flex-direction: column;
  width: min(100%, clamp(320px, calc((100dvh - 260px) * 0.75), 540px));
  min-width: 0;
  flex: 0 0 auto;
}

/* ============================== HUD ============================== */

.game-hud {
  display: grid;
  grid-template-columns: 1.15fr 1.25fr 1fr;
  gap: 7px;
  width: 100%;
  margin-bottom: 9px;
  flex: 0 0 auto;
}

.hud-card {
  position: relative;
  min-width: 0;
  min-height: 72px;
  padding: 9px 12px 8px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  background: linear-gradient(165deg, #fbf3e3, #efdfc1);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.27),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hud-card::after {
  content: '';
  position: absolute;
  right: -14px;
  bottom: -22px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(20, 34, 53, 0.04);
}

.hud-label {
  display: block;
  color: rgba(20, 34, 53, 0.48);
  font-size: 8.5px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.13em;
}

.score-card > b {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: clamp(23px, 2.7vw, 28px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.score-card.bump > b {
  animation: scoreBump 280ms ease;
}

.score-gain {
  position: absolute;
  right: 8px;
  top: 8px;
  color: var(--red);
  font-family: var(--font-latin);
  font-size: 11px;
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
}

.score-gain.show {
  animation: scoreGain 800ms ease-out;
}

.progress-card {
  background: linear-gradient(165deg, #fef8eb, #f2e4cb);
}

.hud-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  color: rgba(20, 34, 53, 0.56);
  font-size: clamp(9px, 1vw, 10.5px);
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.hud-progress-top b {
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.hud-progress-top em {
  font-style: normal;
  font-size: 9px;
  opacity: 0.55;
}

.progress-track {
  height: 5px;
  margin: 5px 0 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(20, 34, 53, 0.12);
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transition: width 300ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.hud-next {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: rgba(20, 34, 53, 0.4);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.hud-next b {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
}

.hud-next i {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--area-color, var(--gold));
}

.timer-card {
  color: var(--cream);
  border-color: #07101c;
  background:
    radial-gradient(circle at 100% 0%, rgba(242, 193, 78, 0.17), transparent 55%),
    linear-gradient(165deg, #1b2e48, #101e32);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.33),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.timer-card .hud-label {
  color: rgba(242, 193, 78, 0.72);
}

.timer-card > b {
  display: block;
  margin-top: 2px;
  color: var(--cream);
  font-family: var(--font-latin);
  font-size: clamp(24px, 3vw, 29px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.timer-note {
  display: block;
  overflow: hidden;
  margin-top: 0;
  color: rgba(247, 238, 219, 0.55);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.timer-card.live {
  border-color: #31200e;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 224, 133, 0.24), transparent 55%),
    linear-gradient(165deg, #7e2a1e, #4b1813);
}

.timer-card.live .hud-label {
  color: rgba(255, 225, 166, 0.8);
}

.timer-card.live .timer-note {
  color: rgba(255, 238, 203, 0.66);
}

.timer-card.urgent {
  animation: timerPulse 900ms ease-in-out infinite;
}

.timer-card.urgent > b {
  color: #ffe290;
}

/* ============================== BOARD ============================== */

.board-shell {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
}

.board-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 3px solid #060d17;
  border-radius: 20px;
  background: #0b1523;
  box-shadow:
    0 7px 0 rgba(0, 0, 0, 0.42),
    0 22px 40px rgba(0, 0, 0, 0.27),
    inset 0 0 0 2px rgba(242, 193, 78, 0.26);
  isolation: isolate;
  transition: box-shadow 200ms ease;
}

.board-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 16px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 247, 229, 0.1);
}

.board-frame.merged {
  box-shadow:
    0 7px 0 rgba(0, 0, 0, 0.42),
    0 0 0 3px var(--gold-light),
    0 0 40px rgba(242, 193, 78, 0.4),
    0 22px 40px rgba(0, 0, 0, 0.27);
}

.board-frame.warning {
  box-shadow:
    0 7px 0 rgba(0, 0, 0, 0.42),
    0 0 0 2px rgba(227, 82, 61, 0.8),
    0 0 34px rgba(227, 82, 61, 0.28),
    0 22px 40px rgba(0, 0, 0, 0.27);
}

.board-frame.shaking {
  animation: boardShake 650ms cubic-bezier(0.36, 0.07, 0.19, 0.97);
  will-change: transform;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  touch-action: none;
  cursor: crosshair;
  -webkit-tap-highlight-color: transparent;
}

#gameCanvas.is-dropping {
  cursor: default;
}

.toast-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 21%;
  pointer-events: none;
}

.game-toast {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  max-width: 82%;
  padding: 8px 16px 9px;
  border: 1.5px solid rgba(242, 193, 78, 0.52);
  border-radius: 11px;
  color: var(--cream);
  background: rgba(11, 20, 33, 0.93);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.32);
  text-align: center;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.3, 1);
  backdrop-filter: blur(6px);
}

.game-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.game-toast.is-red {
  border-color: rgba(227, 82, 61, 0.72);
  background: rgba(75, 20, 15, 0.93);
}

.game-toast.is-gold {
  border-color: rgba(242, 193, 78, 0.75);
}

.toast-eyebrow {
  color: var(--gold-light);
  font-size: 6.5px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.toast-title {
  font-family: var(--font-display);
  font-size: clamp(17px, 3vw, 23px);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.15;
}

.toast-sub {
  color: rgba(247, 238, 219, 0.6);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ============================== UNDER BOARD ============================== */

.board-under {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 9px;
  flex: 0 0 auto;
}

.peek-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 49px;
  padding: 6px 10px;
  border: 1px solid rgba(247, 238, 219, 0.14);
  border-radius: 11px;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  transition: background-color 150ms ease, border-color 150ms ease;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  flex: 0 0 auto;
}

.peek-btn:hover {
  border-color: rgba(247, 238, 219, 0.32);
  background: rgba(255, 255, 255, 0.075);
}

.peek-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--gold-light);
}

.peek-btn span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.peek-btn b {
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
}

.peek-btn small {
  margin-top: 3px;
  color: rgba(247, 238, 219, 0.38);
  font-size: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.play-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  color: rgba(247, 238, 219, 0.36);
  font-size: 8px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.play-tip__mark {
  color: var(--gold);
  flex: 0 0 auto;
  font-size: 10px;
}

.play-tip p {
  margin: 0;
}

.shake-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.charge-bar {
  position: absolute;
  left: 9px;
  right: 9px;
  top: -5px;
  z-index: 4;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 247, 229, 0.18);
  opacity: 0;
  transition: opacity 120ms ease;
}

.charge-bar i {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #fff2bc);
  transition: width 60ms linear;
}

.shake-wrap.is-charging .charge-bar {
  opacity: 1;
}

.shake-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 49px;
  padding: 6px 12px 6px 8px;
  overflow: hidden;
  border: 2px solid #2a0d0a;
  border-radius: 12px;
  color: #fff8ea;
  background:
    radial-gradient(circle at 25% 0%, rgba(255, 212, 155, 0.29), transparent 45%),
    linear-gradient(160deg, #ea6248, #c53727 78%);
  box-shadow: 0 5px 0 var(--red-dark), 0 8px 18px rgba(0, 0, 0, 0.24);
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.shake-btn::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -25%;
  width: 23%;
  height: 180%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  pointer-events: none;
  transition: left 400ms ease;
}

.shake-btn:hover::after {
  left: 118%;
}

.shake-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 0 var(--red-dark), 0 10px 22px rgba(0, 0, 0, 0.27);
}

.shake-wrap.is-charging .shake-btn {
  transform: translateY(2px) scale(0.985);
  box-shadow: 0 2px 0 var(--red-dark), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.shake-btn__icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border: 1px solid rgba(255, 247, 229, 0.22);
  border-radius: 7px;
  background: rgba(42, 13, 10, 0.23);
}

.shake-btn__icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.shake-btn__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
  text-align: left;
}

.shake-btn__copy b {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.shake-btn__copy small {
  margin-top: 3px;
  color: rgba(255, 245, 231, 0.6);
  font-size: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.shake-btn__streak {
  position: absolute;
  right: -4px;
  top: 3px;
  width: 10px;
  height: 30px;
  border-top: 1px solid rgba(255, 239, 196, 0.6);
  border-bottom: 1px solid rgba(255, 239, 196, 0.55);
  transform: rotate(23deg);
  opacity: 0.6;
}

.shake-btn.is-shaking {
  animation: shakeButton 560ms ease-in-out;
}

.game-hints {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  min-height: 24px;
  padding-top: 7px;
  color: rgba(247, 238, 219, 0.33);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.game-hints span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.game-hints__soft {
  color: rgba(242, 193, 78, 0.48);
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 1px solid rgba(247, 238, 219, 0.15);
  border-radius: 4px;
  color: rgba(247, 238, 219, 0.54);
  background: rgba(255, 255, 255, 0.045);
  font-family: var(--font-ui);
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
}

.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 960px;
  min-height: 25px;
  margin: 2px auto 0;
  padding: 3px 2px max(2px, env(safe-area-inset-bottom));
  color: rgba(247, 238, 219, 0.46);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex: 0 0 auto;
}

.game-footer p {
  margin: 0;
}

.game-footer span {
  color: rgba(242, 193, 78, 0.4);
  letter-spacing: 0.18em;
  white-space: nowrap;
}

/* ============================== SIDE PANEL ============================== */

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 248px;
  flex: 0 0 248px;
  padding-top: 0;
}

.side-card {
  position: relative;
  padding: 13px;
  overflow: hidden;
  border: 1px solid rgba(247, 238, 219, 0.13);
  border-radius: 15px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  box-shadow:
    0 5px 0 rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(12px);
}

.side-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(247, 238, 219, 0.13);
  color: rgba(242, 193, 78, 0.66);
  font-size: 6.5px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.14em;
}

.side-label span:last-child {
  color: rgba(247, 238, 219, 0.26);
  letter-spacing: 0.07em;
}

.side-next__body {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 11px;
}

.side-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  overflow: hidden;
  border: 1px solid rgba(247, 238, 219, 0.15);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 250, 240, 0.98), rgba(234, 216, 184, 0.97));
}

.side-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(20, 34, 53, 0.2) 0.5px, transparent 0.7px);
  background-size: 4px 4px;
  opacity: 0.35;
}

.side-thumb img {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.18));
  transition: transform 180ms ease;
}

.side-next__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.side-next__copy b {
  overflow: hidden;
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-next__copy span {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--area-color, var(--gold-light));
  background: color-mix(in srgb, var(--area-color, var(--gold)) 12%, transparent);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.side-next__copy small {
  margin-top: 7px;
  color: rgba(247, 238, 219, 0.37);
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1.35;
}

.area-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 10px;
}

.area-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 8px;
  align-items: center;
}

.area-row__name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(247, 238, 219, 0.62);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
}

.area-row__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--area-color);
}

.area-row__count {
  color: rgba(247, 238, 219, 0.32);
  font-family: var(--font-latin);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.area-row__count b {
  color: var(--cream);
  font-weight: 400;
}

.area-pips {
  grid-column: 1 / -1;
  display: flex;
  gap: 3px;
}

.area-pips i {
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: rgba(247, 238, 219, 0.11);
  transition: background-color 240ms ease, box-shadow 240ms ease;
}

.area-pips i.filled {
  background: var(--area-color);
  box-shadow: 0 0 7px color-mix(in srgb, var(--area-color) 55%, transparent);
}

.area-row.is-complete .area-row__name {
  color: var(--area-color);
}

.quick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.quick-list li {
  display: flex;
  gap: 7px;
  align-items: flex-start;
}

.quick-icon {
  width: 17px;
  flex: 0 0 17px;
  color: rgba(242, 193, 78, 0.65);
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.quick-list p {
  margin: 0;
  color: rgba(247, 238, 219, 0.38);
  font-size: 7.5px;
  font-weight: 600;
  line-height: 1.45;
}

.quick-list b {
  color: rgba(247, 238, 219, 0.75);
  font-weight: 900;
}

/* ============================== PEEK OVERLAY ============================== */

.peek-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  background: rgba(4, 9, 16, 0.65);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 150ms ease;
}

.peek-overlay.show {
  opacity: 1;
}

.peek-card {
  width: min(390px, 88vw);
  padding: 9px;
  border: 2px solid var(--ink);
  border-radius: 17px;
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transform: scale(0.96) translateY(7px);
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.peek-overlay.show .peek-card {
  transform: scale(1) translateY(0);
}

.peek-card__head,
.peek-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px 7px;
  color: rgba(20, 34, 53, 0.58);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.peek-card__head {
  border-bottom: 1px dashed rgba(20, 34, 53, 0.2);
}

.peek-card__foot {
  justify-content: center;
  padding-top: 7px;
  border-top: 1px dashed rgba(20, 34, 53, 0.2);
  color: rgba(20, 34, 53, 0.38);
}

.peek-card__art {
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: hidden;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 26%, #fffaf0, #ead8b8 75%);
}

.peek-card__art img {
  width: 100%;
  max-height: min(62dvh, 570px);
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(20, 34, 53, 0.13));
}

/* ============================== RESULT OVERLAY ============================== */

.result-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 22px;
  background: rgba(5, 10, 18, 0.82);
  backdrop-filter: blur(16px);
}

.result-card {
  position: relative;
  z-index: 2;
  width: min(820px, 95vw);
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 27px;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(242, 193, 78, 0.22), transparent 30%),
    linear-gradient(145deg, #fbf4e5 0%, #efe1c6 100%);
  box-shadow:
    0 12px 0 rgba(0, 0, 0, 0.3),
    0 40px 100px rgba(0, 0, 0, 0.5),
    inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  animation: resultPop 460ms cubic-bezier(0.18, 0.89, 0.32, 1.18);
}

.result-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(rgba(20, 34, 53, 0.22) 0.7px, transparent 1px);
  background-size: 8px 8px;
  mask-image: linear-gradient(140deg, transparent 15%, #000 80%);
  -webkit-mask-image: linear-gradient(140deg, transparent 15%, #000 80%);
}

.result-rays {
  position: absolute;
  top: -45%;
  right: -34%;
  width: 95%;
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.13;
  background: repeating-conic-gradient(from 10deg, var(--red) 0 4deg, transparent 4deg 17deg);
  mask-image: radial-gradient(circle, #000 0 10%, transparent 65%);
  -webkit-mask-image: radial-gradient(circle, #000 0 10%, transparent 65%);
}

.result-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(230px, 0.88fr) minmax(300px, 1.12fr);
  gap: clamp(18px, 3vw, 34px);
  padding: clamp(18px, 3vw, 30px);
}

.result-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 19px;
  background:
    radial-gradient(circle at 50% 25%, #294263 0%, #132138 58%, #0b1624 100%);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(242, 193, 78, 0.18);
}

.result-art::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(242, 193, 78, 0.22);
  border-radius: 13px;
  pointer-events: none;
}

.result-art img {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  max-height: 440px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.38));
}

.result-stamp {
  position: absolute;
  z-index: 2;
  right: -9px;
  bottom: 34px;
  padding: 8px 15px 9px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  color: var(--cream);
  background: var(--red);
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.3);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
  transform: rotate(-6deg);
  text-shadow: 0 2px 0 rgba(87, 14, 9, 0.35);
}

.result-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 5px 4px;
}

.result-title {
  margin: 12px 0 9px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 400;
  letter-spacing: 0.055em;
  line-height: 0.98;
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 rgba(20, 34, 53, 0.13);
}

.result-desc {
  max-width: 340px;
  margin: 0;
  color: rgba(20, 34, 53, 0.58);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.7;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.result-stats > div {
  min-width: 0;
  padding: 10px 9px;
  border: 1px solid rgba(20, 34, 53, 0.14);
  border-radius: 10px;
  background: rgba(255, 250, 240, 0.55);
}

.result-stats span {
  display: block;
  color: rgba(20, 34, 53, 0.44);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.result-stats b {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--ink);
  font-family: var(--font-latin);
  font-size: clamp(19px, 2.6vw, 26px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
}

.result-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.btn-result {
  flex: 1;
  min-width: 145px;
  min-height: 48px;
  justify-content: space-between;
  font-size: 14px;
}

.btn-result span:last-child {
  font-family: var(--font-latin);
  font-size: 20px;
  font-weight: 400;
}

.btn-result-ghost {
  min-height: 48px;
  border-color: rgba(20, 34, 53, 0.22);
  color: rgba(20, 34, 53, 0.65);
  background: rgba(20, 34, 53, 0.03);
}

.btn-result-ghost:hover {
  border-color: rgba(20, 34, 53, 0.38);
  background: rgba(20, 34, 53, 0.07);
}

.result-note {
  min-height: 14px;
  margin: 12px 0 0;
  color: var(--red);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.result-card.is-lose .result-art {
  background: linear-gradient(150deg, #607080, #273544 70%);
}

.result-card.is-lose .result-art img {
  filter: grayscale(1) contrast(0.9) brightness(0.82);
  opacity: 0.72;
}

.result-card.is-lose .result-stamp {
  background: #334253;
  font-size: 17px;
}

.result-card.is-lose .result-title {
  color: var(--ink);
}

.result-card.is-lose .result-rays {
  opacity: 0.05;
}

.result-card.is-lose .result-actions .btn-gold {
  background: linear-gradient(180deg, #e8d8b9, #d4bd93);
  box-shadow: 0 6px 0 #98805a, 0 10px 20px rgba(0, 0, 0, 0.16);
}

.result-card.is-lose .result-note {
  color: rgba(20, 34, 53, 0.42);
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -12%;
  left: var(--x);
  width: var(--w);
  height: var(--h);
  border-radius: var(--r);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
  background: var(--c);
  opacity: 0;
  animation: confettiFall var(--duration) cubic-bezier(0.2, 0.7, 0.4, 1) var(--delay) infinite;
}

/* ============================== RESPONSIVE ============================== */

@media (max-width: 1120px) {
  .home-hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: 28px;
  }

  .hero-poster {
    width: min(390px, 92%);
  }

  .hero-visual {
    min-height: 520px;
  }

  .sticker--pieces {
    left: 4%;
  }

  .rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rule-card {
    min-height: 190px;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .side-panel {
    display: none;
  }

  .game-shell {
    max-width: 620px;
    flex: 0 0 auto;
  }

  .game-footer {
    justify-content: center;
    min-height: 22px;
    margin-top: 8px;
    font-size: 9px;
    color: rgba(247, 238, 219, 0.55);
  }

  .game-footer span {
    display: none;
  }

  .play-column {
    width: min(100%, clamp(310px, calc((100dvh - 250px) * 0.75), 540px));
  }

  .game-top {
    max-width: 620px;
  }

  .game-footer {
    max-width: 620px;
  }
}

@media (max-width: 860px) {
  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 12px;
    padding-top: 32px;
    text-align: center;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 690px;
    margin: 0 auto;
  }

  .logo {
    align-items: center;
  }

  .logo__main {
    font-size: clamp(64px, 13vw, 100px);
  }

  .logo__small {
    margin-left: 0;
  }

  .logo__en {
    margin-left: 0;
  }

  .tagline {
    margin: 20px 0 22px;
  }

  .hero-actions {
    justify-content: center;
  }

  .mini-stats {
    justify-content: center;
    width: 100%;
    margin-top: 26px;
  }

  .hero-visual {
    order: 2;
    min-height: 430px;
    margin-top: 8px;
  }

  .hero-poster {
    width: min(330px, 82vw);
  }

  .sticker--pieces {
    top: 8px;
    left: 10%;
    width: 78px;
    height: 78px;
  }

  .sticker--pieces b {
    font-size: 33px;
  }

  .sticker--time {
    right: 8%;
    bottom: 30px;
    min-width: 78px;
    padding: 9px 10px 11px;
  }

  .sticker--time b {
    font-size: 29px;
  }

  .float-piece {
    width: 58px;
    height: 58px;
  }

  .float-piece--one {
    top: 26px;
    right: 1%;
  }

  .float-piece--two {
    bottom: 35px;
    left: 2%;
    width: 48px;
    height: 48px;
  }

  .hero-spark--one {
    right: 8%;
    top: 7%;
  }

  .hero-spark--two {
    bottom: 3%;
    left: 12%;
  }

  .home-rules {
    margin-top: 40px;
  }

  .gallery-section {
    margin-top: 52px;
  }

  .section-head h2,
  .gallery-heading h2 {
    font-size: clamp(28px, 5vw, 38px);
  }
}

@media (max-width: 720px) {
  .screen-home {
    padding: 15px 15px 28px;
  }

  .brandmark {
    font-size: 7px;
    letter-spacing: 0.15em;
  }

  .brandmark__star {
    width: 29px;
    height: 29px;
    font-size: 12px;
  }

  .best-pill {
    height: 30px;
    padding: 0 10px;
  }

  .best-pill b {
    font-size: 14px;
  }

  .home-top__actions {
    gap: 7px;
  }

  .home-top .icon-btn {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .home-hero {
    padding-top: 24px;
  }

  .logo__main {
    font-size: clamp(57px, 15vw, 84px);
    -webkit-text-stroke-width: 2px;
    text-shadow:
      0 4px 0 #bd7e1b,
      0 7px 0 var(--ink),
      0 13px 24px rgba(0, 0, 0, 0.34);
  }

  .logo__small {
    font-size: 23px;
    padding: 4px 13px 5px;
  }

  .logo__en {
    margin-top: 12px;
    font-size: 8px;
    letter-spacing: 0.3em;
  }

  .tagline {
    font-size: 13px;
    line-height: 1.75;
    margin: 16px 0 20px;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .btn-hero {
    width: 100%;
    min-width: 0;
    max-width: 340px;
  }

  .hero-actions .btn-ghost {
    min-height: 42px;
    max-width: 340px;
    width: 100%;
  }

  .mini-stats {
    gap: 22px;
    margin-top: 22px;
    padding-top: 15px;
  }

  .mini-stats b {
    font-size: 21px;
  }

  .mini-stats span {
    font-size: 8px;
  }

  .hero-visual {
    min-height: 345px;
    margin-top: 10px;
  }

  .hero-poster {
    width: min(280px, 78vw);
    padding: 9px;
    border-radius: 19px;
  }

  .poster-top,
  .poster-foot {
    font-size: 6.5px;
  }

  .poster-art {
    border-radius: 11px;
  }

  .sticker--pieces {
    left: 4%;
    top: 2px;
    width: 65px;
    height: 65px;
    border-width: 2px;
  }

  .sticker--pieces b {
    font-size: 27px;
  }

  .sticker--pieces span {
    font-size: 7px;
  }

  .sticker--time {
    right: 3%;
    bottom: 13px;
    min-width: 67px;
    padding: 8px 8px 9px;
    border-width: 2px;
  }

  .sticker--time b {
    font-size: 24px;
  }

  .sticker--time span {
    font-size: 6.5px;
  }

  .float-piece {
    width: 48px;
    height: 48px;
  }

  .float-piece--one {
    top: 20px;
    right: 2%;
  }

  .float-piece--two {
    bottom: 12px;
    left: 4%;
    width: 40px;
    height: 40px;
  }

  .hero-spark--one {
    display: none;
  }

  .hero-rays {
    width: min(480px, 96vw);
  }

  .home-rules {
    margin-top: 32px;
    padding: 20px 16px;
    border-radius: 20px;
  }

  .section-head,
  .gallery-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-head > p,
  .gallery-heading > p {
    display: none;
  }

  .section-head h2,
  .gallery-heading h2 {
    font-size: 29px;
    margin-top: 8px;
  }

  .rule-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 17px;
  }

  .rule-card {
    min-height: 0;
    padding: 14px 14px 13px 62px;
  }

  .rule-card__icon {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 36px;
    height: 36px;
    margin: 0;
  }

  .rule-card__num {
    font-size: 22px;
    top: 9px;
  }

  .rule-card h3 {
    font-size: 13px;
  }

  .rule-card p {
    font-size: 10px;
    line-height: 1.65;
  }

  .rule-card__tag {
    display: none;
  }

  .gallery-section {
    margin-top: 42px;
  }

  .gallery-heading {
    margin-bottom: 15px;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .gallery-area {
    padding: 12px;
  }

  .gallery-area__head {
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .gallery-items {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .gallery-item {
    padding: 4px 2px;
  }

  .gallery-item img {
    width: 43px;
    height: 43px;
  }

  .gallery-item span {
    font-size: 7px;
  }

  .home-footer {
    margin-top: 30px;
    font-size: 7.5px;
  }

  .screen-game {
    padding: 7px 10px 5px;
  }

  .game-top {
    min-height: 43px;
    gap: 8px;
  }

  .game-brand__star {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    font-size: 11px;
  }

  .game-brand__copy b {
    font-size: 19px;
  }

  .game-brand__copy small {
    margin-top: 3px;
    font-size: 5.5px;
  }

  .game-top__actions {
    gap: 5px;
  }

  .best-mini {
    display: none;
  }

  .game-top .icon-btn {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .game-top > .icon-btn {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .game-shell {
    margin-top: 5px;
  }

  .play-column {
    width: min(100%, clamp(300px, calc((100dvh - 225px) * 0.75), 540px));
  }

  .game-hud {
    gap: 5px;
    margin-bottom: 7px;
  }

  .hud-card {
    min-height: 63px;
    border-width: 1.5px;
    border-radius: 10px;
    padding: 7px 8px 6px;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
  }

  .hud-label {
    font-size: 7px;
    letter-spacing: 0.08em;
  }

  .score-card > b {
    font-size: 24px;
  }

  .hud-progress-top {
    font-size: 7.8px;
    gap: 3px;
  }

  .hud-progress-top b {
    font-size: 12px;
  }

  .hud-progress-top em {
    font-size: 8px;
  }

  .hud-next {
    font-size: 7.4px;
    gap: 3px;
  }

  .hud-next b {
    font-size: 9px;
  }

  .progress-track {
    margin: 4px 0 3px;
    height: 4px;
  }

  .timer-card > b {
    font-size: 21px;
  }

  .timer-note {
    font-size: 7px;
  }

  .board-frame {
    border-width: 2px;
    border-radius: 15px;
    box-shadow:
      0 5px 0 rgba(0, 0, 0, 0.38),
      0 15px 28px rgba(0, 0, 0, 0.23),
      inset 0 0 0 1px rgba(242, 193, 78, 0.25);
  }

  #gameCanvas {
    border-radius: 12px;
  }

  .board-under {
    gap: 6px;
    margin-top: 7px;
  }

  .peek-btn {
    min-height: 43px;
    padding: 5px 8px;
    gap: 5px;
    border-radius: 9px;
  }

  .peek-btn svg {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .peek-btn b {
    font-size: 8.5px;
  }

  .peek-btn small {
    font-size: 6.3px;
  }

  .play-tip {
    display: none;
  }

  .shake-wrap {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  .shake-btn {
    width: 100%;
    max-width: 210px;
    min-height: 43px;
    padding: 5px 10px 5px 7px;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 4px 0 var(--red-dark), 0 7px 14px rgba(0, 0, 0, 0.2);
  }

  .shake-btn__icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .shake-btn__icon svg {
    width: 16px;
    height: 16px;
  }

  .shake-btn__copy b {
    font-size: 11px;
  }

  .shake-btn__copy small {
    font-size: 6.3px;
  }

  .game-hints {
    display: none;
  }

  .game-footer {
    min-height: 19px;
    padding-top: 1px;
    font-size: 7px;
  }

  .game-footer span {
    display: none;
  }

  .toast-layer {
    padding-top: 18%;
  }

  .game-toast {
    padding: 6px 11px 7px;
    border-radius: 8px;
  }

  .toast-eyebrow {
    font-size: 5.5px;
  }

  .toast-title {
    font-size: 17px;
  }

  .toast-sub {
    font-size: 7px;
  }

  .peek-card {
    width: min(320px, 82vw);
  }

  .peek-card__art {
    padding: 6px;
  }

  .result-overlay {
    padding: 12px;
  }

  .result-card {
    width: min(540px, 96vw);
    border-width: 2px;
    border-radius: 21px;
    max-height: none;
  }

  .result-inner {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
  }

  .result-art {
    min-height: 0;
    padding: 12px;
    border-radius: 14px;
  }

  .result-art img {
    width: min(75%, 230px);
    max-height: 250px;
  }

  .result-stamp {
    right: 8px;
    bottom: 12px;
    font-size: 16px;
    padding: 6px 11px 7px;
  }

  .result-copy {
    padding: 2px;
  }

  .result-title {
    margin: 8px 0 7px;
    font-size: clamp(34px, 10vw, 46px);
  }

  .result-desc {
    max-width: none;
    font-size: 10px;
  }

  .result-stats {
    margin: 12px 0;
    gap: 5px;
  }

  .result-stats > div {
    padding: 8px 7px;
  }

  .result-stats b {
    font-size: 20px;
  }

  .result-actions {
    gap: 7px;
  }

  .btn-result {
    min-height: 44px;
    font-size: 13px;
  }

  .btn-result-ghost {
    min-height: 44px;
    flex: 0 0 auto;
  }
}

@media (max-width: 400px) {
  .logo__main {
    font-size: clamp(50px, 15.2vw, 66px);
    letter-spacing: 0.02em;
  }

  .logo__small {
    font-size: 21px;
  }

  .game-brand__copy b {
    font-size: 17px;
  }

  .game-brand__copy small {
    display: none;
  }

  .game-brand {
    gap: 6px;
  }

  .game-brand__star {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    font-size: 10px;
  }

  .hud-card {
    padding: 6px;
  }

  .hud-progress-top {
    font-size: 6.6px;
  }

  .hud-progress-top b {
    font-size: 11px;
  }

  .score-gain {
    display: none;
  }

  .shake-btn__copy small {
    display: none;
  }

  .shake-btn {
    max-width: 160px;
  }

  .peek-btn small {
    display: none;
  }

  .result-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================== KEYFRAMES ============================== */

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes posterFloat {
  0%, 100% { transform: rotate(2.2deg) translateY(0); }
  50% { transform: rotate(1.6deg) translateY(-12px); }
}

@keyframes pieceFloat {
  0%, 100% { transform: rotate(12deg) translateY(0); }
  50% { transform: rotate(17deg) translateY(-13px); }
}

@keyframes pieceFloatAlt {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(-13deg) translateY(10px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.86) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.1) rotate(18deg); }
}

@keyframes scoreBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); color: var(--red); }
  100% { transform: scale(1); }
}

@keyframes scoreGain {
  0% { opacity: 0; transform: translateY(7px); }
  18% { opacity: 1; transform: translateY(0); }
  72% { opacity: 1; transform: translateY(-7px); }
  100% { opacity: 0; transform: translateY(-13px); }
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

@keyframes boardShake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  10% { transform: translate(-5px, 1px) rotate(-0.55deg); }
  24% { transform: translate(5px, -2px) rotate(0.55deg); }
  38% { transform: translate(-4px, 1px) rotate(-0.35deg); }
  52% { transform: translate(3px, -1px) rotate(0.3deg); }
  68% { transform: translate(-2px, 0) rotate(-0.18deg); }
  84% { transform: translate(1px, 1px) rotate(0.1deg); }
}

@keyframes shakeButton {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  20% { transform: translate(-2px, 0) rotate(-1.2deg); }
  40% { transform: translate(2px, -1px) rotate(1.2deg); }
  60% { transform: translate(-1px, 1px) rotate(-0.8deg); }
  80% { transform: translate(1px, 0) rotate(0.4deg); }
}

@keyframes resultPop {
  0% { opacity: 0; transform: translateY(26px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes confettiFall {
  0% { opacity: 0; transform: translate3d(0, -4vh, 0) rotate(0deg); }
  8% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), 112vh, 0) rotate(var(--spin)); }
}

/* ============================== SMALL ADDITIONS ============================== */

.btn[disabled] {
  opacity: 0.62;
  cursor: wait;
  transform: none !important;
  box-shadow: 0 4px 0 rgba(139, 94, 19, 0.55);
}

.game-quote {
  position: absolute;
  top: 3.4%;
  right: 2.7%;
  left: auto;
  z-index: 8;
  max-width: 180px;
  padding: 5px 9px 6px;
  overflow: hidden;
  border: 1px solid rgba(242, 193, 78, 0.48);
  border-radius: 6px;
  color: #ffe7ab;
  background: rgba(8, 16, 27, 0.91);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.26);
  font-family: var(--font-ui);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  transform-origin: right top;
  transition: opacity 160ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.3, 1);
}

.game-quote::before {
  content: 'VOICE';
  display: inline-block;
  margin-right: 5px;
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--ink);
  background: var(--gold);
  font-size: 5.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
  vertical-align: 1px;
}

.game-quote.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.shake-btn.is-max-charged {
  box-shadow:
    0 5px 0 var(--red-dark),
    0 0 0 3px rgba(255, 220, 137, 0.22),
    0 0 26px rgba(255, 206, 105, 0.35);
}

.shake-btn.is-max-charged .charge-bar i {
  background: linear-gradient(90deg, var(--gold-light), #fff8d1);
}

@media (max-width: 720px) {
  .game-quote {
    top: 1.5%;
    right: 2.2%;
    left: auto;
    max-width: 145px;
    padding: 4px 7px;
    font-size: 7px;
  }

  .game-quote::before {
    font-size: 5px;
    padding: 1px 3px;
  }
}

