:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #fcfbf8;
  background: #0c1813;
  --quiet: #b0aa9c;
  --accent: #ddc99d;
  --gold: #ebcf8b;
  --border: #394d45;
  --number: "Georgia", "Times New Roman", serif;
  --display: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { min-width: 280px; min-height: 100vh; margin: 0; }
button { color: inherit; font: inherit; }
button:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
p, h1, h2 { margin: 0; }
.symbols { position: absolute; width: 0; height: 0; pointer-events: none; }
.icon { width: 21px; height: 21px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

.app { width: min(100% - 88px, 1280px); margin: 0 auto; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 81px;
  border-bottom: 1px solid #375045a0;
}
.wordmark { display: flex; align-items: center; gap: 11px; font: 950 italic 1.29rem/.95 var(--number); letter-spacing: -.095em; }
.wordmark-pop { color: var(--accent); margin-left: 2px; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid #e2d0a9;
  border-radius: 9px;
  background: linear-gradient(145deg, #d4ba80, #59c698);
  box-shadow: 0 3px 19px #5ebb944d, inset 0 1px 1px #fff5;
  color: #10241c;
  font: 850 1.55rem/1 system-ui;
  letter-spacing: 0;
}
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-button, .help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 43px;
  height: 42px;
  border: 1px solid #405a4f;
  border-radius: 11px;
  background: #1b2b24bf;
  color: #eae4d5;
  cursor: pointer;
}
.help-button { padding: 0 13px; font-size: .875rem; font-weight: 650; }
.icon-button:hover, .help-button:hover { background: #334d42; border-color: #648c7b; }
.icon-button[aria-pressed="false"] { color: #aca79c; }
.help-button .icon { width: 18px; height: 18px; }

.cabinet {
  display: grid;
  grid-template-columns: minmax(0, 1.27fr) minmax(0, 1.88fr) minmax(0, .88fr);
  align-items: start;
  gap: clamp(16px, 2vw, 30px);
  padding-top: 30px;
}
.hero { position: relative; align-self: stretch; isolation: isolate; min-height: 557px; }
.hero-copy { position: relative; z-index: 2; padding-top: 14px; }
.genre { display: flex; align-items: center; gap: 9px; color: #e4d7b8; font-size: .9rem; font-weight: 750; letter-spacing: .23em; }
.genre span { width: 19px; height: 2px; border-radius: 2px; background: #e2d0a9; box-shadow: 0 0 13px #d9c391; }
.hero h1 {
  display: flex;
  flex-wrap: wrap;
  margin: 13px 0 0 -5px;
  font-size: clamp(3.2rem, 5.35vw, 5.38rem);
  line-height: 1.1;
  letter-spacing: -.11em;
  font-weight: 990;
  white-space: nowrap;
  transform: skewX(-6deg);
}
.hero h1 span { display: block; padding-right: .1em; color: #fbf9f5; text-shadow: 0 6px 32px #d5bd864d; }
.hero h1 span + span {
  color: #decb9f;
  background: linear-gradient(173deg, #fcfaf6 10%, #ece0c7 46%, #dbc594 72%, #ceb170 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 4px 14px #ceb17066);
}
.hero-art {
  position: absolute;
  inset: 13px -49px 10px -63px;
  overflow: hidden;
  z-index: -1;
  mask-image: linear-gradient(to bottom, transparent 1%, #000 25%, #000 79%, transparent 100%), linear-gradient(to right, transparent 1%, #000 12%, #000 85%, transparent 100%);
  mask-composite: intersect;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
@keyframes pulse { 30% { transform: scaleY(.66); } 85% { transform: scaleY(1.32); } }

.game { min-width: 0; }
.machine {
  padding: 0 11px;
  border: 1px solid #4d6e60;
  border-radius: 23px;
  background: linear-gradient(145deg, #273d34, #1c3028 62%, #21392f);
  box-shadow: inset 0 1px 1px #deceaa45, inset 0 -3px 0 #0d1d1663, 0 14px 37px #050d0a90;
}
.machine-head, .machine-foot { display: flex; align-items: center; min-height: 48px; }
.machine-head { justify-content: space-between; padding: 0 5px; }
.board-name { display: flex; align-items: center; gap: 9px; color: #faf6ef; font-size: .94rem; font-weight: 750; }
.board-size { color: #c3baa7; font: 750 .75rem/1 var(--number); letter-spacing: .045em; }
.board-mark { display: grid; grid-template-columns: 6px 6px; grid-template-rows: 6px 6px; gap: 2px; transform: rotate(-9deg); }
.board-mark i { background: #dfcca2; border-radius: 1px; box-shadow: 0 0 7px #dfcca265; }
.board-mark i:last-child { opacity: .48; }
.machine-state { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: #e1dbce; }
.machine-state i { width: 6px; height: 6px; background: #d8c8a4; border-radius: 50%; box-shadow: 0 0 8px #e6d7b6b0; }
.machine-state[data-mode="active"] i, .machine-state[data-mode="fever"] i { background: var(--gold); box-shadow: 0 0 11px #ebd08ec7; }
.machine-state[data-mode="fever"] { color: var(--gold); }
.machine-foot { justify-content: space-between; gap: 6px; min-height: 41px; }
.machine-foot p { color: #ebe5d8; font-size: .83rem; font-weight: 600; text-align: center; }

.board {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid #5b7f70;
  border-radius: 12px;
  background: radial-gradient(ellipse at 48% 48%, #1c382c 5%, #10221a 75%);
  box-shadow: inset 0 2px 13px #07120d, 0 1px #67928038;
  --board-inset: clamp(4px, .57vw, 8px);
}
.board.is-fever { border-color: #ebd08d; box-shadow: inset 0 0 17px #eacd8649, 0 0 31px #eacd8666; }
.cell-layer, .piece-layer, .reel-layer, .effect-layer { position: absolute; inset: var(--board-inset); pointer-events: none; }
.cell-layer { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); }
.cell { margin: clamp(1px, .18vw, 3px); border: 1px solid #4a665b82; border-radius: clamp(6px, .81vw, 12px); background: linear-gradient(155deg, #2c483c, #21372e); box-shadow: inset 0 1px 1px #e9dcc015, 0 2px 2px #09140f7a; transition: border-color .16s, background .16s, box-shadow .16s; }
.cell:nth-child(12n + 2), .cell:nth-child(12n + 4), .cell:nth-child(12n + 6), .cell:nth-child(12n + 7), .cell:nth-child(12n + 9), .cell:nth-child(12n + 11) { background: linear-gradient(155deg, #274035, #1e322a); }
.cell.is-lit { border-color: #ede3cc; background: linear-gradient(145deg, #486f5f, #3a574b); box-shadow: inset 0 0 13px #eadec268, 0 0 16px #d5bc8477; }
.piece {
  display: grid;
  place-items: center;
  position: absolute;
  top: calc(var(--row) * 100% / 6);
  left: calc(var(--col) * 100% / 6);
  width: calc(100% / 6);
  height: calc(100% / 6);
  transform-origin: center;
  will-change: transform;
}
.piece.is-matched { z-index: 2; }

.combo-callout {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  gap: 3px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  color: #fdfcfa;
  background: radial-gradient(ellipse at center, #13281fd9 0, #153f2d6b 30%, #11312400 65%);
  text-shadow: 0 2px 5px #0e291e, 0 0 24px #deca9e;
}
.combo-callout span { font-size: clamp(.96rem, 1.7vw, 1.22rem); font-weight: 900; letter-spacing: .13em; }
.combo-callout strong { font: 950 italic clamp(2.3rem, 5.4vw, 4.6rem)/1 var(--number); letter-spacing: -.09em; }
.particle {
  position: absolute;
  z-index: 3;
  top: var(--y);
  left: var(--x);
  width: var(--size);
  aspect-ratio: 1;
  background: var(--color);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--color);
}

.play-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 59px;
  margin-top: 14px;
  border: 1px solid #f5e8c9;
  border-radius: 13px;
  background: linear-gradient(180deg, #f0dba9, #e7c779 66%, #e1bb5d);
  box-shadow: inset 0 2px 0 #f6f0e3af, inset 0 -3px 0 #a2833670, 0 6px 0 #5a4b26, 0 11px 30px #e4bf6524;
  color: #292313;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s, background .18s, box-shadow .18s, opacity .18s;
  touch-action: manipulation;
}
.play-button:not([aria-disabled="true"]):hover { background: linear-gradient(180deg, #f6e9ca, #ecd191 66%, #e7c676); transform: translateY(-2px); box-shadow: inset 0 2px 0 #f6f0e3af, inset 0 -3px 0 #a2833670, 0 8px 0 #5a4b26, 0 13px 35px #e4bf6545; }
.play-button:not([aria-disabled="true"]):active { transform: translateY(4px); box-shadow: inset 0 2px 0 #f6f0e3af, inset 0 -3px 0 #a2833670, 0 2px 0 #5a4b26; }
.play-button[aria-disabled="true"] { opacity: .69; cursor: wait; }
.play-button-copy { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; letter-spacing: .075em; }
.play-button-copy .icon { width: 18px; height: 18px; stroke-width: 2.5; }
.key-hint { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); border: 1px solid #60502a69; border-bottom-width: 2px; border-radius: 5px; padding: 4px 6px; font: 800 .67rem/1 var(--number); letter-spacing: .055em; }



.footer { margin: 28px 0 20px; text-align: center; color: var(--quiet); font-size: .76rem; }
.rules {
  width: min(calc(100vw - 28px), 455px);
  max-height: calc(100vh - 28px);
  padding: 21px;
  border: 1px solid #699884;
  border-radius: 20px;
  background: linear-gradient(145deg, #2b483c, #1a2d25 70%);
  color: #fdfbf8;
  box-shadow: 0 20px 70px #07130e;
}
.rules::backdrop { background: #06110cbf; backdrop-filter: blur(5px); }
.rules-head { display: flex; justify-content: space-between; align-items: center; }
.rules h2 { font-size: 1.45rem; }
.rules-list { list-style: none; padding: 0; margin: 15px 0 20px; }
.rules-list li { padding: 10px 0; border-top: 1px solid #6288785d; }
.rules-list strong { color: #f7f3e9; font-size: .97rem; }
.rules-list p { color: #ded7c8; font-size: .9rem; line-height: 1.5; margin-top: 4px; }
.rules-done { min-height: 44px; width: 100%; border: 1px solid #f0e7d2; border-radius: 10px; color: #2c2617; background: var(--gold); font-weight: 800; cursor: pointer; }

@media (min-width: 1050px) and (max-height: 900px) {
  .app { max-width: min(1220px, calc((100dvh - 272px) * 2.13)); width: max(940px, calc(100% - 88px)); }
  .topbar { height: 68px; }
  .cabinet { padding-top: 24px; }
  .hero { min-height: 0; }
}
@media (max-width: 1100px) {
  .app { width: calc(100% - 48px); }
  .cabinet { grid-template-columns: minmax(0, 1.17fr) minmax(0, 1.9fr) minmax(0, .91fr); gap: 17px; }
  .hero h1 { font-size: clamp(2.7rem, 5.25vw, 4.4rem); }
  .hero { min-height: 0; }
  .hero-art { inset: 11px -26px 10px -41px; }
}
@media (max-width: 900px) {
  .app { width: min(100% - 44px, 650px); }
  .topbar { height: 64px; }
  .cabinet { grid-template-columns: minmax(0, 1fr) minmax(154px, .46fr); gap: 16px; padding-top: 0; }
  .hero { min-height: 139px; grid-column: 1 / -1; overflow: hidden; }
  .hero-copy { padding-top: 23px; }
  .hero h1 { font-size: clamp(3rem, 8vw, 4rem); }
  .hero-art { inset: -52px 0 -40px 42%; mask-image: linear-gradient(to right, transparent 0%, #000 25%, #000 83%, transparent 100%), linear-gradient(to bottom, transparent 2%, #000 32%, #000 80%, transparent 100%); }
  .hero-art img { object-position: center 50%; }
  .game { grid-column: 1; }
}
@media (max-width: 590px) {
  .app { width: min(100% - 24px, 455px); }
  .topbar { height: 56px; }
  .wordmark { font-size: 1.11rem; gap: 8px; }
  .brand-icon { width: 28px; border-radius: 7px; font-size: 1.3rem; }
  .topbar-actions { gap: 6px; }
  .help-button, .topbar .icon-button { min-width: 38px; height: 36px; }
  .help-button { padding: 0 9px; }
  .cabinet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hero { min-height: 100px; }
  .hero-copy { padding-top: 13px; }
  .genre { font-size: .75rem; letter-spacing: .15em; gap: 6px; }
  .genre span { width: 13px; }
  .hero h1 { margin-top: 6px; margin-left: -2px; font-size: clamp(2.43rem, 11vw, 3.2rem); }
  .hero-art { inset: -37px -14px -32px 47%; }
  .machine { padding: 0 7px; border-radius: 17px; }
  .machine-head { min-height: 40px; padding: 0 4px; }
  .machine-foot { min-height: 34px; }
  .machine-foot p { font-size: .77rem; }
  .board { border-radius: 9px; }
  .board-name { font-size: .86rem; }
  .play-button { min-height: 52px; margin-top: 8px; }
  .play-button-copy { font-size: 1.07rem; }
  .key-hint { display: none; }
    .footer { margin: 15px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

:root {
  background: #101b16;
  color: #f5ecd7;
  --quiet: #a8ada0;
  --accent: #e3bb74;
  --gold: #f1d396;
  --border: #526356;
}
.topbar { border-color: #8d8b5a55; }
.wordmark { font: 700 .94rem/1 var(--number); letter-spacing: .115em; }
.wordmark-pop { color: #d8b577; }
.brand-icon {
  width: 35px;
  border: 1px solid #e2bd78;
  border-radius: 9px;
  background: linear-gradient(145deg, #f7e3b1, #c19a59);
  color: #2d4233;
  font: 850 1.38rem/1 var(--display);
  box-shadow: 0 3px 15px #17130974, inset 0 1px 1px #ffffff85;
}
.hero-copy { padding-top: 18px; }
.genre { color: #debd85; gap: 11px; letter-spacing: .21em; }
.genre span { background: #c7a562; box-shadow: 0 0 10px #d9a95875; }
.hero h1 {
  margin-top: 17px;
  margin-left: -1px;
  letter-spacing: -.035em;
  font-family: var(--display);
  font-weight: 910;
  font-size: clamp(2.65rem, 4.65vw, 4.75rem);
  transform: none;
}
.hero h1 span { color: #fff6db; text-shadow: 0 5px 22px #121b13bf; padding-right: .061em; }
.hero h1 span + span {
  color: #f3d498;
  background: linear-gradient(173deg, #fbf1d0 5%, #f0cc89 58%, #c49750 100%);
  background-clip: text;
  filter: drop-shadow(0 3px 12px #221d11a1);
}
.hero-art {
  inset: 29px -37px 11px -59px;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 80%, transparent 100%), linear-gradient(to right, transparent 2%, #000 16%, #000 81%, transparent 99%);
}
.hero-art img { object-position: center 64%; }
.machine {
  border-color: #9b905f;
  background: linear-gradient(145deg, #334d3e, #20382d 60%, #304637);
  box-shadow: inset 0 1px 0 #ddc68e85, inset 0 -3px 0 #17261fa3, 0 16px 38px #0b130eb0;
}
.board-name { color: #f8eed3; }
.board-mark i { background: #dfbf83; box-shadow: 0 0 8px #e2b87952; }
.board-size { color: #c6ba94; font-size: .84rem; }
.machine-state { color: #dfdfc7; }
.machine-state i { background: #aeb8a1; box-shadow: 0 0 5px #c5d2aa82; }
.machine-state[data-mode="active"] i { background: #abebbc; box-shadow: 0 0 8px #abebbc; }
.machine-state[data-mode="anticipation"] { color: #ffdda1; }
.machine-state[data-mode="anticipation"] i { background: #ffd68d; box-shadow: 0 0 12px #ffd68d; animation: pulse .51s ease-in-out infinite alternate; }
.board {
  border-color: #71816a;
  background: radial-gradient(ellipse at 48% 42%, #2a4b3b, #142b22 84%);
  box-shadow: inset 0 3px 17px #0a1d16, 0 1px #aabb8b58;
}
.board.is-fever { border-color: #e1c180; box-shadow: inset 0 0 17px #efc46e59, 0 0 27px #dec28150; }
.cell,
.cell:nth-child(12n + 2), .cell:nth-child(12n + 4), .cell:nth-child(12n + 6),
.cell:nth-child(12n + 7), .cell:nth-child(12n + 9), .cell:nth-child(12n + 11) {
  background: linear-gradient(148deg, #244638, #1d392d);
  border-color: #54796349;
  box-shadow: 0 1px 2px #182a21, inset 0 1px 2px #9ebca01a;
}
.cell.is-lit { border-color: #d9f4b1; background: #688d60; box-shadow: inset 0 0 13px #dcffe6a0, 0 0 12px #c0f69a8c; }
.cell.is-near { border-color: #efcc8e; box-shadow: inset 0 0 12px #fad68aa0, 0 0 12px #fca96086; }
.piece.is-matched .mahjong-tile { filter: brightness(1.11) drop-shadow(0 0 9px #d5ffa58c); }
.combo-callout {
  z-index: 7;
  background: radial-gradient(ellipse at center, #102a21da 0, #22523c72 32%, transparent 67%);
  color: #fdf4da;
  text-shadow: 0 2px 6px #112b21, 0 0 18px #a0ffd788;
}
.combo-callout strong { font-weight: 850; font-style: normal; letter-spacing: -.065em; }
.play-button {
  border-color: #ffedbd;
  background: linear-gradient(180deg, #ffefc6, #edcf93 66%, #d9ae67);
  box-shadow: inset 0 2px 0 #ffffe7aa, inset 0 -3px 0 #a67d4070, 0 6px 0 #826438, 0 11px 25px #dab46c36;
  color: #2c3427;
}
.play-button:not([aria-disabled="true"]):hover { background: linear-gradient(180deg, #fff7d7, #f9dda4 66%, #e6bf7d); box-shadow: inset 0 2px 0 #ffffe7aa, inset 0 -3px 0 #a67d4070, 0 8px 0 #826438, 0 11px 30px #dab46c52; }
.play-button:not([aria-disabled="true"]):active { box-shadow: inset 0 2px 0 #ffffe7aa, inset 0 -3px 0 #a67d4070, 0 2px 0 #826438; }
.play-button-copy { gap: 12px; letter-spacing: .11em; }
.key-hint { color: #53432b; border-color: #87683e8c; font-family: system-ui, sans-serif; }

.reel-layer { z-index: 3; overflow: hidden; }
.reel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--col) * 100% / 6);
  width: calc(100% / 6);
  overflow: hidden;
  background: linear-gradient(90deg, #183328, #244535 47%, #1d382c);
  border-left: 2px solid #4269545c;
  border-right: 2px solid #12251d73;
}
.reel::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 18px 23px -12px #0a1d15, inset 0 -16px 21px -12px #0a1d15; }
.reel-strip {
  display: grid;
  grid-template-rows: repeat(12, minmax(0, 1fr));
  height: 200%;
  animation: reel-roll .28s linear infinite;
  filter: blur(.9px) saturate(.83);
}
.reel-item { display: grid; place-items: center; }
.reel.is-suspense {
  z-index: 1;
  border: 1px solid #ffe4a3;
  border-radius: 9px;
  background: linear-gradient(160deg, #75673e, #274b3b 46%, #6d5937);
  box-shadow: inset 0 0 13px #f6d483ad, 0 0 13px #f8c56b95;
}
.reel.is-suspense::after { background: linear-gradient(0deg, #eece8e65, transparent 33% 68%, #f7d87bb8); animation: reel-glint .5s ease-in-out infinite alternate; }
.reel.is-suspense .reel-strip { animation-duration: .34s; filter: blur(.7px) saturate(1.1); }
@keyframes reel-roll { from { transform: translateY(-50%); } to { transform: translateY(0); } }
@keyframes reel-glint { to { opacity: .46; } }

.effect-layer { z-index: 5; }
.special-banner {
  --bon-color: #f4d38d;
  --bon-ink: #30271a;
  position: absolute;
  z-index: 8;
  top: clamp(8px, 3.2%, 18px);
  left: 50%;
  display: grid;
  justify-items: center;
  width: max-content;
  min-width: min(10.5rem, calc(100% - 20px));
  max-width: calc(100% - 20px);
  gap: 3px;
  padding: 9px clamp(13px, 3.6vw, 23px) 10px;
  border: 1px solid var(--bon-color);
  border-radius: 12px;
  background: linear-gradient(155deg, var(--bon-ink), #121c15 90%);
  box-shadow: 0 0 19px color-mix(in srgb, var(--bon-color) 60%, transparent), 0 5px 18px #070f0ce6, inset 0 1px 0 #ffffff34;
  color: #fff6df;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
}
.special-name {
  color: var(--bon-color);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  font-weight: 850;
  line-height: 1.12;
}
.special-value {
  color: #fff8e5;
  font: 850 clamp(1.7rem, 7.2vw, 2.5rem)/1.04 system-ui, sans-serif;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
  text-shadow: 0 2px 10px #000a;
}
.special-detail {
  font-size: clamp(.86rem, 1.5vw, .98rem);
  font-weight: 800;
  line-height: 1.18;
}
.special-banner[data-type="prism"] { --bon-color: #bef5db; --bon-ink: #193c2e; }
.special-banner[data-type="beat"] { --bon-color: #ffe0d5; --bon-ink: #692a1b; }

@media (max-width: 1100px) and (min-width: 901px) {
  .hero-art { inset-inline: -38px -25px; }
}
@media (max-width: 900px) {
  .hero-copy { padding-top: 19px; }
  .hero h1 { margin-top: 7px; font-size: clamp(2.75rem, 7.4vw, 4.1rem); }
  .hero-art { inset: -57px 0 -30px 39%; mask-image: linear-gradient(to right, transparent 0%, #000 25%, #000 84%, transparent 99%), linear-gradient(to bottom, transparent 3%, #000 29%, #000 77%, transparent 99%); }
  .hero-art img { object-position: center 52%; }
}
@media (max-width: 590px) {
  .hero { min-height: 96px; }
  .hero-copy { padding-top: 12px; }
  .hero h1 { font-size: clamp(2.33rem, 10.25vw, 3.05rem); }
  .hero-art { inset: -41px -2px -32px 37%; }
  .brand-icon { width: 29px; }
  .wordmark { font-size: .79rem; }
}

/* The parlor surrounds a lacquered table and a brass-framed playing field. */
[hidden] { display: none !important; }
body { isolation: isolate; }
.room {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, #0b1511a0 0%, #0b171140 28%, #101e1670 70%, #0c1710ed 100%),
    radial-gradient(ellipse at 48% 43%, #0e211244, #0c16145e 59%, #12150f74),
    url("./assets/jade-parlor.webp") center 48% / cover no-repeat,
    #16251b;
}
.room::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 49% 50%, transparent 30%, #b7643255 100%), linear-gradient(100deg, #84282260, transparent 35% 72%, #b65a2470);
  opacity: 0;
  transition: opacity .55s ease;
}
.free-mode .room::after { opacity: 1; }
.app { position: relative; }
.topbar { border-color: #a877456b; }
.wordmark { text-shadow: 0 2px 6px #0d150c; }
.topbar-actions { gap: 11px; }
.credit {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 4px 12px 4px 9px;
  border: 1px solid #a989536e;
  border-radius: 9px;
  background: #142119de;
  color: #f6ddae;
  box-shadow: inset 0 1px 0 #fbe0a315, 0 4px 16px #0d160eb5;
}
.credit .icon { color: #eac17e; width: 24px; height: 24px; }
.credit-copy { display: grid; gap: 2px; }
.credit-label { color: #d2c6aa; font-size: .69rem; font-weight: 650; }
.credit strong { min-width: 5ch; font: 800 1.12rem/1 var(--number); font-variant-numeric: tabular-nums; }
.credit.is-paid { border-color: #e18c62; }
.credit.is-credited { border-color: #dcf49c; box-shadow: 0 0 18px #ccea7777; }
.icon-button, .help-button { background: #142219e6; border-color: #708066; color: #eee1c0; }
.icon-button:hover, .help-button:hover { background: #334c36; border-color: #c4b776; }
.cabinet { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1.94fr) minmax(0, .89fr); gap: clamp(17px, 2.15vw, 34px); }
.hero-copy { padding-top: 35px; }
.hero h1 {
  display: block;
  position: relative;
  font-family: var(--number);
  font-size: clamp(2.85rem, 5.38vw, 5.18rem);
  letter-spacing: -.063em;
  line-height: .82;
  margin: 18px 0 0 -3px;
  text-shadow: 0 7px 29px #0a140aec;
}
.hero h1 span { color: #fff3d3; padding: 0 .11em .06em 0; }
.hero h1 span + span {
  padding-right: .12em;
  font-style: italic;
  color: #dfb66e;
  background: linear-gradient(162deg, #fff0bf 12%, #e3bd78 58%, #c88c4b 100%);
  background-clip: text;
  filter: drop-shadow(0 3px 15px #22180bc9);
}
.hero-art {
  inset: 100px -50px 36px -47px;
  mask-image: linear-gradient(to bottom, #000 0 87%, transparent 100%);
  overflow: visible;
}
.hero-art img { object-fit: contain; object-position: center 64%; filter: drop-shadow(0 14px 27px #0b110ada); }
.feature-teaser {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 1px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 311px;
  min-height: 75px;
  padding: 10px 13px;
  border: 1px solid #b4854f8c;
  border-radius: 13px;
  background: linear-gradient(143deg, #3b2119dc, #251913e8 57%, #231e15e8);
  box-shadow: inset 0 1px 0 #f7e2ac36, 0 7px 24px #070e07b3;
}
.teaser-title { color: #efce91; font: 800 .94rem/1 var(--number); letter-spacing: .1em; }
.feature-teaser p { margin-top: 4px; color: #f0e0c4; font-size: .82rem; line-height: 1.26; }
.teaser-tiles { display: grid; grid-template-columns: repeat(3, 23px); align-items: center; gap: 2px; width: 73px; flex: none; }
.teaser-tiles .mahjong-tile { --tile-size: 100%; }
.teaser-tiles .mahjong-tile:nth-child(1) { rotate: -9deg; }
.teaser-tiles .mahjong-tile:nth-child(3) { rotate: 9deg; }
.machine {
  border-color: #b78d51;
  background:
    repeating-linear-gradient(123deg, #fbe9bd0a 0 1px, transparent 1px 9px),
    linear-gradient(145deg, #593c29, #2d2118 47%, #3a281b 78%, #57402a);
  box-shadow: inset 0 0 0 2px #2a1e15, inset 0 0 0 3px #bd925050, 0 16px 41px #09130cd9;
}
.machine-head { margin: 0 3px; min-height: 49px; }
.board-name { color: #f9e9bf; }
.board-mark i { background: #e1bb79; }
.board-size { color: #c8b38c; }
.machine-state { color: #d9ccab; }
.machine-state[data-mode="free"] { color: #ffe2a4; }
.machine-state[data-mode="free"] i { background: #ffbc62; box-shadow: 0 0 12px #ffe29ab7; }
.board {
  border-color: #af9261;
  background: radial-gradient(ellipse at 49% 42%, #294939, #152c21 79%);
  box-shadow: inset 0 0 16px #081913, 0 0 0 3px #211a13, 0 0 0 4px #aa7c475c;
}
.board.is-fever {
  border-color: #e2b671;
  background: radial-gradient(ellipse at 50% 43%, #594130, #3b2721 75%, #211914 100%);
  box-shadow: inset 0 0 22px #f4b67363, 0 0 0 3px #2a1e15, 0 0 0 4px #ead291, 0 0 32px #fcb9517d;
}
.board.is-fever .cell { border-color: #c18f5b71; background: linear-gradient(148deg, #533c2e, #3d2922); }
.board.is-fever .cell.is-lit { border-color: #ffebaf; background: #8b6642; box-shadow: inset 0 0 13px #ffd995aa, 0 0 16px #fada9e93; }
.board[data-impact="burst"] { animation: table-hit .31s ease-out; }
@keyframes table-hit { 18% { transform: translate(1px, 2px); } 33% { transform: translate(-2px, -1px); } 57% { transform: translate(1px, .5px); } }
.machine-foot { min-height: 49px; gap: 9px; padding: 5px 8px; justify-content: center; }
.machine-foot p { flex: 1; font-size: .91rem; line-height: 1.22; color: #fff1d7; }
.bonus-left {
  border: 1px solid #c0a46d68;
  border-radius: 5px;
  background: #2b2218ba;
  color: #f9db9d;
  padding: 4px 6px;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}
.controls { display: grid; grid-template-columns: minmax(0, 1.17fr) minmax(0, 1fr); gap: 9px; margin-top: 13px; align-items: stretch; }
.stake {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 7px 9px 9px;
  border: 1px solid #877452;
  border-radius: 12px;
  background: #20291fe8;
  box-shadow: inset 0 1px 0 #b8a57937, 0 4px 10px #101a11cb;
}
.stake-head { display: flex; justify-content: space-between; gap: 3px; color: #e4d6b7; font-size: .78rem; font-weight: 750; }
#stake-lock { color: #ebca88; }
.stake-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; }
.stake-options button {
  min-width: 0;
  min-height: 30px;
  padding: 2px;
  border: 1px solid #8878529a;
  border-radius: 6px;
  background: #344235;
  color: #f8e9c5;
  font: 700 .94rem/1 var(--number);
  cursor: pointer;
}
.stake-options button:hover:enabled { background: #5e5438; }
.stake-options button[aria-pressed="true"] { background: #d4b575; border-color: #fce7ab; color: #2f3325; }
.stake-options button:disabled { opacity: .55; cursor: default; }
.stake-options button:focus-visible { outline-offset: 2px; }
.controls .play-button { min-height: 63px; height: calc(100% - 4px); margin: 0; padding: 4px 14px; }
.play-button-copy { gap: 7px; letter-spacing: .018em; }
.play-button[data-mode="free"] { background: linear-gradient(180deg, #ffdfa2, #f0bb65 61%, #bf7939); box-shadow: inset 0 2px 0 #fff2c5, 0 6px 0 #905127, 0 8px 32px #ffc1618a; }
.play-button[data-mode="blocked"] { cursor: default; }
.special-banner[data-type="bridge"] { --bon-color: #c0e4ff; --bon-ink: #20394f; }
.special-banner[data-type="echo"] { --bon-color: #e6cffc; --bon-ink: #51376a; }
.special-banner[data-type="fortune"] { --bon-color: #f7c48e; --bon-ink: #7a2419; }
.reel.is-suspense .reel-strip { filter: blur(1.4px) saturate(1.17); }
.reel.is-suspense::after { background: linear-gradient(0deg, #fdd17e9c, transparent 33% 68%, #ffe1a5cc); }
.footer { color: #c0b79d; margin-top: 25px; }

@media (max-width: 1150px) {
  .key-hint { display: none; }
  .controls .play-button { padding-inline: 6px; }
}
@media (max-width: 900px) {
  .cabinet { grid-template-columns: minmax(0, 1fr) minmax(153px, .43fr); }
  .hero { min-height: 141px; }
  .hero-copy { padding-top: 21px; }
  .hero h1 { display: flex; font-size: clamp(3rem, 8vw, 4.2rem); margin-top: 8px; gap: .08em; }
  .hero-art { inset: -83px -20px -44px 43%; }
  .feature-teaser { display: none; }
  .room { background-position: 48% 43%; }
}
@media (max-width: 590px) {
  .topbar-actions { gap: 5px; }
  .credit { min-height: 36px; gap: 4px; padding: 3px 6px; }
  .credit .icon { width: 18px; height: 18px; }
  .credit-label { font-size: .61rem; }
  .credit strong { min-width: 4ch; font-size: .95rem; }
  .help-button { gap: 3px; padding: 0 6px; }
  .help-button .icon { width: 15px; height: 15px; }
  .wordmark { gap: 6px; font-size: .69rem; }
  .cabinet { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .hero { min-height: 95px; }
  .hero-copy { padding-top: 15px; }
  .hero h1 { font-size: clamp(2.41rem, 11vw, 3.35rem); gap: .08em; }
  .hero-art { inset: -31px -14px -22px 49%; }
  .machine-head { min-height: 38px; margin-inline: 1px; }
  .machine-foot { min-height: 44px; padding: 4px 6px; }
  .machine-foot p { font-size: .83rem; }
  .bonus-left { font-size: .72rem; }
  .controls { margin-top: 8px; gap: 7px; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
  .stake { padding: 5px 6px 7px; gap: 4px; }
  .stake-options button { min-height: 29px; }
  .controls .play-button { min-height: 51px; }
  .play-button-copy { font-size: 1.04rem; }
  .play-button-copy .icon { width: 14px; height: 14px; }
  .footer { margin: 16px 0; }
}
@media (max-width: 335px) {
  .wordmark > span:nth-child(2) { display: none; }
}

.cabinet {
  max-width: 1000px;
  margin-inline: auto;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(24px, 4.2vw, 64px);
}
.hero-art { inset: 70px -27px 52px -48px; }
.hero-copy { padding-top: 25px; }
.feature-teaser { bottom: 6px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.stake-head strong { margin-left: .26em; color: #ffe4a8; font-variant-numeric: tabular-nums; }
.stake-custom { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; }
.stake-custom input, .stake-custom button, .auto-options button, .auto-button {
  min-height: 30px;
  border: 1px solid #8c7855;
  border-radius: 6px;
  font-size: .79rem;
}
.stake-custom input {
  width: 100%;
  min-width: 0;
  padding: 2px 7px;
  background: #16211ae8;
  color: #faead0;
}
.stake-custom input::placeholder { color: #c5b998; }
.stake-custom input:focus-visible { outline: 2px solid #ffe6ad; outline-offset: 1px; }
.stake-custom button, .auto-options button, .auto-button {
  padding-inline: 9px;
  background: #374838;
  color: #f3e4c4;
  font-weight: 700;
  cursor: pointer;
}
.stake-custom button:hover:enabled, .auto-options button:hover:enabled, .auto-button:hover:enabled { background: #5a5037; }
.stake-custom button:disabled, .stake-custom input:disabled, .auto-options button:disabled, .auto-button:disabled { opacity: .55; cursor: default; }
.auto-options button { min-width: 34px; color: #eadbbc; font-variant-numeric: tabular-nums; }
.auto-options button[aria-pressed="true"] { border-color: #e4c484; background: #635637; color: #fff0ca; }
#auto-status { color: #d7c7a8; font-size: .75rem; line-height: 1.2; text-align: right; overflow-wrap: anywhere; }
.auto-button { min-width: 56px; border-color: #c5a875; color: #fff0c6; }
.auto-button[data-running="true"] { background: #74423a; border-color: #dfa093; color: #fff0df; }

@media (min-width: 901px) and (max-height: 840px) {
  .cabinet { max-width: clamp(685px, calc((100dvh - 348px) * 1.78 + 45px), 1000px); }
  .hero h1 { font-size: clamp(2.8rem, 5vw, 4.8rem); }
}
@media (max-width: 900px) {
  .cabinet { max-width: 565px; grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .hero { min-height: 105px; }
  .hero-copy { padding-top: 17px; }
  .hero h1 { font-size: clamp(2.35rem, 7vw, 3.7rem); }
  .hero-art { inset: -65px -15px -38px 58%; }
}
@media (max-width: 590px) {
  .hero { min-height: 68px; }
  .hero-copy { padding-top: 10px; }
  .hero h1 { margin-top: 7px; font-size: clamp(1.9rem, 9.2vw, 2.55rem); }
  .hero-art { inset: -28px -15px -19px 54%; }
  .genre { font-size: .64rem; }
  .stake-custom input, .stake-custom button, .auto-options button, .auto-button { min-height: 28px; }
  .stake-custom input { padding-inline: 5px; font-size: 1rem; }
  .auto-options button { min-width: 29px; padding-inline: 5px; }
  .auto-button { min-width: 46px; padding-inline: 6px; }
  #auto-status { max-width: 12ch; font-size: .65rem; }
  .footer { margin-top: 14px; }
}
