:root {
  color-scheme: dark;
  --mint: #a3ffdd;
  --ink: #071d26;
  --pearl: #eff9f5;
  --muted: #b0c8cc;
  --pink: #efb8ed;
  --board-size: min(calc(100svh - 230px), 58vw, 820px);
  --px: 0;
  --py: 0;
  --energy: 0;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
}
body {
  font:
    14px/1.5 'Avenir Next',
    'Trebuchet MS',
    system-ui,
    sans-serif;
  color: var(--pearl);
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 5px;
}
button {
  border: 1px solid #b8fff632;
  background: #092832b8;
  border-radius: 12px;
  transition:
    background 0.25s,
    border-color 0.25s,
    transform 0.25s;
}
button:hover:not(:disabled) {
  background: #215348c9;
  border-color: #a3ffdd80;
  transform: translateY(-2px);
}
a {
  color: inherit;
  text-decoration: none;
}
.world {
  position: fixed;
  inset: -3%;
  pointer-events: none;
  overflow: hidden;
}
.world-image {
  position: absolute;
  inset: 0;
  background: url('assets/background.webp') center/cover;
  transform: translate3d(calc(var(--px)*-9px), calc(var(--py)*-7px), 0)
    scale(1.03);
  transition:
    transform 1.2s cubic-bezier(0.2, 0.7, 0.3, 1),
    filter 2s;
  filter: saturate(0.9) brightness(0.66);
}
.world:after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, #051e2633 20%, #05121a80 85%),
    linear-gradient(#071d2655, transparent 30%, #06101ad9);
}
.world-night {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 40% 30%,
    #bb48d75c,
    #321c6570 45%,
    transparent 80%
  );
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 2s;
}
.is-night .world-night {
  opacity: 1;
}
.is-night .world-image {
  filter: saturate(1.2) brightness(0.72);
}
.aurora {
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 40deg at 50% 20%,
    transparent 0 26%,
    #90ffc914 32%,
    transparent 40% 75%,
    #d997ff15 82%,
    transparent 92%
  );
  animation: aurora-drift 22s ease-in-out infinite;
  mix-blend-mode: screen;
}
.orbit {
  position: absolute;
  border: 1px solid #a1ffee20;
  border-radius: 50%;
  width: 130vw;
  height: 65vw;
  left: -15vw;
  top: -44vw;
  transform: rotate(-16deg);
  box-shadow: 0 0 12px #b6ffe30a;
}
.orbit-two {
  transform: rotate(21deg);
  top: -41vw;
  border-color: #ebc1ff18;
}
.topbar {
  height: 70px;
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  background: linear-gradient(#071722d9, transparent);
}
.back {
  font-size: 12px;
  letter-spacing: 0.12em;
  border-bottom: 1px solid #b9fff352;
  padding: 9px 0;
}
.wordmark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: 0.36em;
  line-height: 1.1;
  text-shadow: 0 0 28px #a1ffe65c;
}
.wordmark span {
  display: block;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.3em;
  margin-top: 8px;
}
.topbar nav {
  display: flex;
  gap: 7px;
  align-items: center;
}
.topbar button {
  min-width: 40px;
  height: 38px;
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 0 11px;
  background: #09212a70;
}
.topbar button[aria-pressed='true'] {
  color: var(--mint);
  border-color: #a3ffdd75;
}
.garden {
  height: calc(100svh - 175px);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) var(--board-size) minmax(180px, 1fr);
  align-items: center;
  gap: 24px;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 30px;
  position: relative;
  z-index: 3;
}
.play-area {
  width: var(--board-size);
  position: relative;
  align-self: center;
}
.board-caption,
.board-under {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #c6e0db;
  padding: 0 18px;
}
.board-caption {
  height: 30px;
}
.board-caption #mode-label {
  color: var(--mint);
  white-space: nowrap;
  font-weight: 600;
}
.board-caption #round-status {
  text-align: right;
  font-size: 10px;
  letter-spacing: 0;
  opacity: 0.8;
}
.board-under {
  height: 25px;
  color: #b4d2d0;
  font-size: 9px;
}
.board-space {
  height: var(--board-size);
  width: var(--board-size);
  perspective: 1400px;
  position: relative;
}
.board-halo {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(#a8ffdd10, transparent 70%);
  filter: blur(35px);
  animation: halo-breathe 7s ease-in-out infinite;
}
.board {
  position: relative;
  width: 100%;
  height: 100%;
  transform: rotateX(calc(var(--py)*-1.3deg)) rotateY(calc(var(--px)*1.4deg));
  transition: transform 0.5s ease;
  isolation: isolate;
}
.board-ring {
  position: absolute;
  inset: 0;
  border: 1px solid #a2ffe329;
  clip-path: polygon(
    5% 0,
    95% 0,
    100% 5%,
    100% 95%,
    95% 100%,
    5% 100%,
    0 95%,
    0 5%
  );
  background: linear-gradient(145deg, #14354382, #06192485 55%, #1e4a4d40);
  box-shadow: inset 0 0 75px #65ffdc07;
}
.cells {
  position: absolute;
  inset: 2.5%;
  overflow: hidden;
  clip-path: inset(-1.2% round 12px);
}
.cell {
  position: absolute;
  width: var(--cw);
  height: var(--ch);
  left: var(--x);
  top: var(--y);
  transform: translateZ(0);
}
.hex {
  position: absolute;
  inset: 2.5%;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: linear-gradient(
    150deg,
    #9cffed38,
    #10334388 28%,
    #0c263973 70%,
    #48a88c23
  );
  transition: background 0.4s;
  filter: drop-shadow(0 2px 4px #000);
}
.hex:after {
  content: '';
  position: absolute;
  inset: 1px;
  clip-path: inherit;
  background: radial-gradient(ellipse at 50% 20%, #3b738027, #071e32a8 65%);
  border-radius: 20px;
}
.hex:before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 10%,
    #dbffff20 30%,
    transparent 50%
  );
  transform: translateX(-110%);
  animation: glass-sweep 8s ease-in-out infinite;
  animation-delay: var(--delay);
}
.sprite-shell {
  position: absolute;
  inset: 10%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  pointer-events: none;
}
.sprite {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 4px #0006);
  animation: seed-float 5.3s ease-in-out infinite;
  animation-delay: var(--delay);
  transform-origin: 50% 60%;
}
.cell[data-symbol='fern'] .sprite {
  animation-name: fern-sway;
  animation-duration: 6.2s;
}
.cell[data-symbol='mushroom'] .sprite {
  animation-name: cap-breathe;
  animation-duration: 4.7s;
}
.cell[data-symbol='koi'] .sprite {
  animation-name: koi-swim;
  animation-duration: 4.4s;
}
.cell[data-symbol='fruit'] .sprite {
  animation-name: fruit-orbit;
  animation-duration: 6s;
}
.cell[data-symbol='shell'] .sprite {
  animation-name: shell-turn;
  animation-duration: 8s;
}
.cell[data-symbol='orchid'] .sprite {
  animation-name: orchid-open;
  animation-duration: 5s;
}
.cell[data-symbol='portal'] .sprite {
  animation-name: portal-spin;
  animation-duration: 14s;
  filter: drop-shadow(0 0 10px #a3ffdd48);
}
.cell.winning .hex {
  background: radial-gradient(
    ellipse at center,
    var(--symbol-color),
    #b4ffe463 65%,
    transparent
  );
  filter: drop-shadow(0 0 16px var(--symbol-color));
}
.cell.winning .sprite {
  animation-play-state: paused;
  filter: drop-shadow(0 0 9px var(--symbol-color));
}
.cell.hovering .sprite-shell {
  transform: scale(1.1) rotate(-4deg);
}
.cell .hex,
.sprite-shell {
  transition: transform 0.3s ease;
}
.cell.spinning .sprite {
  animation: none;
  filter: blur(2px) drop-shadow(0 0 8px var(--symbol-color));
}
.board-sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(transparent 40%, #a4ffe91a 50%, transparent 60%);
  opacity: 0;
}
.is-spinning .board-sweep {
  opacity: 1;
  animation: board-scan 1.1s ease-in-out infinite;
}
#connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}
#cluster-labels {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}
.cluster-label {
  position: absolute;
  padding: 4px 12px;
  border: 1px solid #c3ffec8a;
  border-radius: 30px;
  background: #092a36df;
  color: #e5fff4;
  text-shadow: 0 0 10px #71ffdd;
  font-weight: 600;
  font-size: clamp(12px, 1.2vw, 20px);
  white-space: nowrap;
  box-shadow: 0 0 30px #65ffb430;
  transform: translate(-50%, -50%);
}
.caretaker-area {
  text-align: center;
  align-self: center;
  min-width: 0;
  padding-top: 20px;
}
.lumi-stage {
  position: relative;
  width: min(100%, 310px);
  height: 320px;
  margin: 0 auto;
  cursor: pointer;
  outline: none;
  perspective: 700px;
}
.lumi-hover {
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  left: 0;
  top: 50%;
  margin-top: -50%;
  animation: lumi-hover 7s ease-in-out infinite;
  transform-style: preserve-3d;
}
.lumi-body {
  position: absolute;
  width: 56%;
  height: auto;
  left: 22%;
  top: 10%;
  filter: drop-shadow(0 0 16px #c5ffde22);
  z-index: 3;
  animation: lumi-breathe 5.4s ease-in-out infinite;
}
.lumi-wing {
  position: absolute;
  width: 40%;
  height: auto;
  top: 16.4%;
  left: 2%;
  transform-origin: 94% 85%;
  filter: drop-shadow(0 0 8px #abffe029);
}
.wing-left {
  transform: rotate(-9deg) rotateY(12deg);
  animation: wing-flap 3.1s ease-in-out infinite;
}
.wing-right {
  transform: rotate(-9deg) rotateY(12deg);
  animation: wing-flap 3.1s ease-in-out infinite;
}
.wing-right-mirror {
  position: absolute;
  inset: 0;
  transform: scaleX(-1);
  transform-style: preserve-3d;
  pointer-events: none;
}
.lumi-signal {
  position: absolute;
  left: 43%;
  top: 56%;
  width: 14%;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(#e4ffdd99, #a3ffdd20, transparent 72%);
  z-index: 4;
  opacity: calc(0.35 + var(--energy)*0.65);
  transform: scale(calc(1 + var(--energy)*0.8));
  transition:
    opacity 0.05s,
    transform 0.05s;
  pointer-events: none;
}
.lumi-scan {
  position: absolute;
  left: 37%;
  top: 30%;
  width: 26%;
  height: 2px;
  background: #b6ffe888;
  filter: blur(3px);
  z-index: 4;
  animation: lumi-blink 6s ease-in-out infinite;
}
.lumi-shadow {
  position: absolute;
  bottom: 0;
  left: 15%;
  width: 70%;
  height: 25px;
  border-radius: 50%;
  background: #72ffda25;
  filter: blur(17px);
  animation: shadow-breathe 7s ease-in-out infinite;
}
.orbit-dots {
  position: absolute;
  inset: 12%;
  border: 1px solid #b3ffe91a;
  border-radius: 50%;
  animation: orbit-rotate 25s linear infinite;
  pointer-events: none;
}
.orbit-dots i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c0ffee;
  box-shadow: 0 0 12px #c0ffee;
  left: 50%;
  top: -2px;
}
.orbit-dots i:nth-child(2) {
  left: 2%;
  top: 64%;
  background: #dfb9ff;
}
.orbit-dots i:nth-child(3) {
  left: 94%;
  top: 72%;
  background: #ffca9e;
}
.caretaker-name {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #dbfff1;
}
.caretaker-name span {
  display: block;
  font-size: 8px;
  letter-spacing: 0.17em;
  color: #a8c5c7;
  margin-top: 6px;
}
.lumi-caption {
  font-size: 12px;
  line-height: 1.7;
  color: #cde5df;
  max-width: 210px;
  min-height: 42px;
  margin: 18px auto 0;
}
.lumi-stage.reacting .wing-left {
  animation-duration: 0.65s;
}
.lumi-stage.reacting .wing-right {
  animation-duration: 0.65s;
}
.lumi-stage.reacting .lumi-hover {
  animation: lumi-celebrate 0.75s ease-in-out 2;
}
.lumi-stage.speaking .lumi-body {
  filter: drop-shadow(0 0 20px #b3ffe960);
}
.resonance-area {
  text-align: center;
  max-width: 250px;
  justify-self: center;
  min-width: 0;
}
.resonance-head {
  font-size: 12px;
  letter-spacing: 0.16em;
}
.resonance-head span {
  display: block;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: #abc5ca;
  margin-top: 8px;
}
.reactor {
  width: 200px;
  height: 200px;
  position: relative;
  margin: 24px auto;
  perspective: 600px;
}
.reactor-orbit {
  position: absolute;
  inset: 9%;
  border: 1px solid #b0ffe378;
  border-radius: 50%;
  box-shadow:
    0 0 20px #c2ffee0c,
    inset 0 0 12px #adffdf13;
}
.reactor-orbit:after {
  content: '';
  position: absolute;
  left: 45%;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c4fff0;
  box-shadow: 0 0 15px #96ffda;
}
.r-one {
  animation: reactor-one 11s linear infinite;
}
.r-two {
  inset: 18%;
  border-color: #e8b4ff7a;
  animation: reactor-two 8s linear infinite;
}
.r-three {
  inset: 29%;
  border-color: #ffcdaf68;
  animation: reactor-three 6s linear infinite;
}
.reactor-core {
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  background: radial-gradient(#94ffd72b, #073038b3 55%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: core-breathe 4s ease-in-out infinite;
}
.reactor-core > span {
  font-size: 46px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.08em;
  color: var(--mint);
  text-shadow: 0 0 25px #a3ffdd5c;
}
.reactor-core small {
  font-size: 7px;
  letter-spacing: 0.11em;
  margin-top: 7px;
  color: #c5ded9;
}
.reactor.charged {
  animation: reactor-hit 0.7s ease-in-out;
}
.portal-meter > div {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px;
}
.portal-meter i {
  height: 10px;
  width: 10px;
  border: 1px solid #c5f2df68;
  border-radius: 3px;
  transform: rotate(45deg);
  transition:
    background 0.5s,
    box-shadow 0.5s;
}
.portal-meter i.on {
  background: #c7fff1;
  box-shadow: 0 0 14px #a3ffdd;
  animation: seed-pulse 2s ease-in-out infinite;
}
.portal-meter span {
  font-size: 9px;
  letter-spacing: 0.09em;
  color: #d4e9e3;
}
.feature-detail {
  font-size: 11px;
  line-height: 1.8;
  color: #a8c5ca;
  margin-top: 20px;
}
.resonance-area #showcase {
  font-size: 9px;
  padding: 10px;
  margin-top: 15px;
}
.is-night .reactor-core > span {
  color: #fac0ff;
  text-shadow: 0 0 24px #d98cff;
}
.is-night .board-ring {
  border-color: #d9a0ff60;
  box-shadow: inset 0 0 50px #de93ff13;
}
.is-night #mode-label {
  color: #fac7ff;
}
.is-night .board-halo {
  background: radial-gradient(#dbb2ff33, transparent 70%);
}
.console {
  height: 96px;
  position: relative;
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 180px minmax(
      140px,
      1fr
    ) 82px 72px 154px;
  gap: 20px;
  align-items: center;
  padding: 12px 24px;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid #9afee43f;
  border-bottom: 1px solid #9afee415;
  background: linear-gradient(120deg, #122e3ad4, #071a27e8 60%, #18484299);
  border-radius: 20px;
  box-shadow: 0 12px 35px #0004;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}
.readout > span,
.bet-control > span {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #aac5c9;
  display: block;
}
.readout strong {
  font-size: 25px;
  font-weight: 500;
  line-height: 1.3;
  display: block;
  font-variant-numeric: tabular-nums;
}
.round-win strong {
  color: var(--mint);
  text-shadow: 0 0 15px #a3ffdd23;
}
.bet-control {
  text-align: center;
}
.bet-control > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.bet-control strong {
  min-width: 40px;
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.bet-control button {
  width: 32px;
  height: 32px;
  font-size: 20px;
  padding: 0;
  border-radius: 9px;
}
.console .secondary {
  font-size: 9px;
  height: 40px;
  letter-spacing: 0.05em;
}
.console .secondary.active {
  background: #477d696b;
  color: var(--mint);
  border-color: #a3ffdd80;
}
.spin {
  height: 64px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  padding: 0 22px;
  background: linear-gradient(115deg, #a7ffdf, #d8ffe4);
  color: #103239;
  border: 1px solid #c9ffed;
  box-shadow:
    0 0 30px #9affdb26,
    inset 0 0 20px #fff4;
  border-radius: 32px;
  isolation: isolate;
}
.spin:hover:not(:disabled) {
  background: #d1fff0;
  color: #103239;
  box-shadow: 0 0 35px #a3ffdd50;
  transform: translateY(-3px);
}
.spin-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  z-index: 1;
}
.spin-arrow {
  font-size: 24px;
  z-index: 1;
}
.spin-orbit {
  position: absolute;
  width: 150px;
  height: 150px;
  left: -120px;
  top: -80px;
  border: 12px solid #86cfc036;
  border-radius: 50%;
  animation: spin-orbit 5s ease-in-out infinite;
}
.is-spinning .spin-orbit {
  animation: orbit-rotate 1s linear infinite;
  left: 50px;
  border-color: #73b7a14a;
}
.is-spinning .spin-arrow {
  animation: arrow-rotate 1.2s ease-in-out infinite;
}
.console #demo-label {
  position: absolute;
  font-size: 8px;
  color: #ffdac2;
  letter-spacing: 0.08em;
  bottom: -19px;
  left: 24px;
}
.toast {
  position: fixed;
  z-index: 65;
  left: 50%;
  bottom: 125px;
  transform: translate(-50%, 10px);
  border: 1px solid #a3ffdd5c;
  border-radius: 14px;
  padding: 12px 20px;
  background: #082632eb;
  max-width: 90vw;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#atmosphere {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}
.modal-shade {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #04151ac4;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modal-in 0.35s ease;
}
.modal {
  position: relative;
  max-width: 620px;
  width: 100%;
  max-height: calc(100svh - 40px);
  overflow: auto;
  border: 1px solid #bdffed54;
  border-radius: 28px;
  background: linear-gradient(150deg, #204047ed, #0a202fee 70%);
  padding: 30px;
  box-shadow: 0 25px 100px #0009;
}
.modal h2 {
  margin: 0 40px 15px 0;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.modal p {
  color: #c2d8d5;
  line-height: 1.75;
}
.modal .close-modal {
  position: absolute;
  right: 15px;
  top: 15px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 22px;
}
.modal .primary {
  padding: 12px 25px;
  background: #b4ffdf;
  color: #13383b;
  font-weight: 600;
  border-radius: 22px;
  border: 0;
  min-height: 44px;
}
.modal .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
}
.modal .actions > button,
.modal .actions > a {
  padding: 12px 22px;
  border: 1px solid #a3ffdd47;
  border-radius: 22px;
  min-height: 44px;
}
.modal .actions a {
  background: #102f37;
}
.symbol-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.symbol-table > div {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid #a3ffdd22;
  border-radius: 12px;
  padding: 8px;
  font-size: 11px;
  background: #0a232944;
}
.symbol-table img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.symbol-table small {
  display: block;
  color: #a8d2c8;
}
.feature-modal {
  text-align: center;
  max-width: 480px;
  overflow: hidden;
  padding: 30px;
}
.feature-modal .portal-art {
  width: 140px;
  height: 140px;
  object-fit: contain;
  animation: portal-spin 18s linear infinite;
  filter: drop-shadow(0 0 20px #efa2ff60);
  margin: 5px auto 15px;
}
.feature-modal h2 {
  margin: 0;
  font-size: 28px;
  color: #ffd6ff;
}
.feature-modal .feature-count {
  font-size: 65px;
  font-weight: 400;
  line-height: 1;
  margin: 15px;
  color: #c9ffec;
}
.feature-modal .feature-count small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  margin-top: 10px;
}
.celebration {
  text-align: center;
  max-width: 530px;
  background: radial-gradient(ellipse at center, #255957f2, #071b29f2);
}
.celebration h2 {
  margin: 0 0 10px;
  font-size: 30px;
}
.celebration .award {
  font-size: clamp(38px, 7vw, 85px);
  font-weight: 500;
  color: #c8ffde;
  letter-spacing: -0.05em;
  text-shadow: 0 0 50px #a3ffdd4d;
  line-height: 1.3;
}
.celebration img {
  width: 90px;
  display: block;
  margin: 0 auto 16px;
  animation: orchid-open 4s ease-in-out infinite;
}
.loading {
  position: fixed;
  inset: 0;
  background: #081c27;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s;
  gap: 5px;
}
.loading.gone {
  opacity: 0;
  pointer-events: none;
}
.loading img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  animation: seed-float 3s ease-in-out infinite;
}
.loading h1 {
  font-size: 32px;
  letter-spacing: 0.4em;
  font-weight: 400;
  margin: 12px 0;
}
.loading p {
  font-size: 12px;
  color: #b7d3d2;
}
.loading-line {
  height: 2px;
  width: 160px;
  background: #183f44;
  overflow: hidden;
}
.loading-line:after {
  content: '';
  display: block;
  height: 2px;
  width: 70px;
  background: var(--mint);
  animation: loading-line 1s ease-in-out infinite;
}
.board.moving-in {
  animation: board-arrive 0.9s cubic-bezier(0.12, 0.65, 0.28, 1);
}
.is-hidden * {
  animation-play-state: paused !important;
}
@keyframes seed-float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-5%) rotate(3deg);
  }
}
@keyframes fern-sway {
  0%,
  100% {
    transform: rotate(-4deg) translateY(1%);
  }
  50% {
    transform: rotate(5deg) translateY(-4%);
  }
}
@keyframes cap-breathe {
  0%,
  100% {
    transform: scale(0.97, 1) translateY(1%);
  }
  50% {
    transform: scale(1.04, 0.98) translateY(-4%);
  }
}
@keyframes koi-swim {
  0%,
  100% {
    transform: translate(-2%, 2%) rotate(-5deg);
  }
  35% {
    transform: translate(4%, -3%) rotate(4deg);
  }
  70% {
    transform: translate(-1%, -5%) rotate(-2deg);
  }
}
@keyframes fruit-orbit {
  0%,
  100% {
    transform: rotate(-3deg) translateY(1%);
  }
  50% {
    transform: rotate(7deg) translateY(-5%);
  }
}
@keyframes shell-turn {
  0%,
  100% {
    transform: rotate(-8deg) scale(0.97);
  }
  50% {
    transform: rotate(9deg) scale(1.02);
  }
}
@keyframes orchid-open {
  0%,
  100% {
    transform: scale(0.95) rotate(-2deg);
  }
  50% {
    transform: scale(1.06) rotate(3deg);
  }
}
@keyframes portal-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes glass-sweep {
  0%,
  70%,
  100% {
    transform: translateX(-110%);
  }
  85% {
    transform: translateX(110%);
  }
}
@keyframes halo-breathe {
  50% {
    opacity: 0.5;
    transform: scale(1.12);
  }
}
@keyframes aurora-drift {
  50% {
    transform: rotate(7deg) scale(1.07);
  }
}
@keyframes lumi-hover {
  0%,
  100% {
    transform: translate(0, 0) rotate(-2deg);
  }
  33% {
    transform: translate(6px, -14px) rotate(3deg);
  }
  67% {
    transform: translate(-5px, -7px) rotate(-1deg);
  }
}
@keyframes lumi-breathe {
  50% {
    transform: scale(1.016) rotate(0.6deg);
  }
}
@keyframes wing-flap {
  0%,
  100% {
    transform: rotate(-9deg) rotateY(12deg);
  }
  50% {
    transform: rotate(7deg) rotateY(44deg);
  }
}
@keyframes lumi-blink {
  0%,
  42%,
  48%,
  100% {
    opacity: 0;
    transform: scaleY(0.2);
  }
  45% {
    opacity: 1;
    transform: scaleY(3);
  }
}
@keyframes shadow-breathe {
  50% {
    transform: scale(0.8);
    opacity: 0.35;
  }
}
@keyframes orbit-rotate {
  to {
    transform: rotate(360deg);
  }
}
@keyframes lumi-celebrate {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  30% {
    transform: translateY(-22px) rotate(-8deg);
  }
  70% {
    transform: translateY(-12px) rotate(8deg);
  }
}
@keyframes reactor-one {
  to {
    transform: rotateX(60deg) rotateZ(360deg);
  }
}
@keyframes reactor-two {
  to {
    transform: rotateY(60deg) rotateZ(-360deg);
  }
}
@keyframes reactor-three {
  to {
    transform: rotateX(-30deg) rotateZ(360deg);
  }
}
@keyframes core-breathe {
  50% {
    transform: scale(1.05);
    filter: brightness(1.1);
  }
}
@keyframes reactor-hit {
  40% {
    transform: scale(1.12) rotate(9deg);
    filter: brightness(1.25);
  }
}
@keyframes seed-pulse {
  50% {
    box-shadow: 0 0 24px #d9fff1;
    opacity: 0.7;
  }
}
@keyframes board-scan {
  from {
    transform: translateY(-40%);
  }
  to {
    transform: translateY(40%);
  }
}
@keyframes spin-orbit {
  50% {
    transform: translateX(160px) rotate(150deg);
  }
}
@keyframes arrow-rotate {
  50% {
    transform: rotate(180deg);
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes loading-line {
  to {
    transform: translateX(160px);
  }
}
@keyframes board-arrive {
  from {
    opacity: 0;
    transform: translateY(35px) rotateX(6deg) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}
@media (min-width: 1600px) {
  .caretaker-area {
    padding-left: 20px;
  }
  .resonance-area {
    padding-right: 20px;
  }
  .lumi-stage {
    height: 360px;
  }
}
@media (max-width: 1200px) {
  :root {
    --board-size: min(calc(100svh - 230px), 64vw, 820px);
  }
  .garden {
    grid-template-columns: 120px var(--board-size) 120px;
    justify-content: center;
    gap: 10px;
    padding: 0 10px;
  }
  .lumi-stage {
    height: 220px;
  }
  .reactor {
    width: 120px;
    height: 120px;
  }
  .reactor-core > span {
    font-size: 30px;
  }
  .reactor-core small {
    font-size: 6px;
  }
  .resonance-head {
    font-size: 10px;
  }
  .resonance-head span,
  .feature-detail {
    display: none;
  }
  .portal-meter > div {
    gap: 8px;
    margin: 15px 0;
  }
  .portal-meter span {
    font-size: 8px;
  }
  .lumi-caption {
    font-size: 10px;
  }
  .console {
    max-width: calc(100vw - 30px);
    gap: 12px;
    grid-template-columns: minmax(90px, 1fr) 150px minmax(
        90px,
        1fr
      ) 66px 60px 132px;
    padding: 10px 15px;
  }
}
@media (max-width: 950px), (max-height: 600px) {
  :root {
    --board-size: min(calc(100svh - 170px), 82vw, 660px);
  }
  .caretaker-area,
  .resonance-area {
    display: none;
  }
  .garden {
    display: flex;
    justify-content: center;
    height: calc(100svh - 170px);
    padding: 0 10px;
  }
  .topbar {
    height: 54px;
    padding: 7px 14px;
  }
  .wordmark {
    font-size: 22px;
    letter-spacing: 0.3em;
  }
  .wordmark span {
    font-size: 7px;
    letter-spacing: 0.18em;
    margin-top: 4px;
  }
  .topbar button {
    min-width: 32px;
    height: 32px;
    font-size: 8px;
    padding: 0 8px;
  }
  .topbar #motion-toggle {
    font-size: 0;
    width: 32px;
  }
  .topbar #motion-toggle:after {
    content: '≈';
    font-size: 18px;
  }
  .back {
    font-size: 9px;
  }
  .console {
    height: 100px;
    gap: 10px;
    grid-template-columns: 1fr 130px 1fr 58px 52px 110px;
    padding: 10px;
  }
  .readout strong {
    font-size: 21px;
  }
  .readout > span,
  .bet-control > span {
    font-size: 8px;
  }
  .bet-control > div {
    gap: 9px;
  }
  .spin {
    height: 60px;
    padding: 0 14px;
  }
  .spin-label {
    font-size: 10px;
  }
  .console .secondary {
    font-size: 8px;
  }
  .toast {
    bottom: 125px;
  }
}
@media (max-width: 650px) and (orientation: portrait) {
  :root {
    --board-size: min(calc(100svh - 260px), 94vw, 540px);
  }
  .topbar {
    height: 56px;
    padding: 8px 10px;
  }
  .topbar nav {
    gap: 4px;
  }
  .topbar #audio-toggle {
    font-size: 0;
    width: 32px;
  }
  .topbar #audio-toggle:after {
    content: '♪';
    font-size: 19px;
  }
  .wordmark {
    font-size: 20px;
  }
  .wordmark span {
    font-size: 6px;
  }
  .garden {
    height: calc(100svh - 231px);
    padding: 0 8px;
  }
  .board-caption {
    padding: 0 10px;
    gap: 6px;
    font-size: 8px;
    height: 30px;
  }
  .board-caption #round-status {
    font-size: 8px;
    max-width: 55%;
  }
  .board-under {
    font-size: 8px;
    padding: 0 10px;
  }
  .console {
    height: 156px;
    margin: 0 8px;
    max-width: none;
    grid-template-columns: minmax(70px, 1fr) minmax(90px, 1.1fr) 104px;
    grid-template-rows: 54px 54px;
    grid-template-areas: 'balance win spin' 'bet mode spin';
    padding: 12px;
    gap: 9px 10px;
    border-radius: 18px;
  }
  .balance {
    grid-area: balance;
  }
  .round-win {
    grid-area: win;
  }
  .bet-control {
    grid-area: bet;
  }
  .bet-control strong {
    font-size: 18px;
    min-width: 30px;
  }
  .bet-control > div {
    gap: 6px;
  }
  .bet-control button {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
  .console .readout strong {
    font-size: 21px;
  }
  .console .readout > span {
    font-size: 7px;
    letter-spacing: 0.06em;
  }
  .spin {
    grid-area: spin;
    height: 104px;
    width: 104px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
  }
  .spin-arrow {
    font-size: 27px;
  }
  .spin-label {
    font-size: 10px;
  }
  .console #speed {
    grid-area: mode;
    align-self: start;
    height: 30px;
  }
  .console #auto {
    grid-area: mode;
    align-self: end;
    height: 30px;
    margin-bottom: -8px;
  }
  .console #demo-label {
    left: 12px;
    font-size: 7px;
    bottom: -17px;
  }
  .toast {
    bottom: 185px;
    font-size: 11px;
  }
  .modal {
    padding: 23px;
    border-radius: 20px;
  }
  .modal h2 {
    font-size: 21px;
  }
  .modal p {
    font-size: 12px;
  }
  .symbol-table {
    grid-template-columns: 1fr;
  }
  .feature-modal .portal-art {
    width: 105px;
    height: 105px;
  }
  .feature-modal .feature-count {
    font-size: 52px;
  }
}
@media (max-height: 600px) and (orientation: landscape) {
  :root {
    --board-size: min(calc(100svh - 150px), 62vw, 560px);
  }
  .topbar {
    height: 40px;
    padding: 4px 12px;
  }
  .topbar button {
    height: 28px;
    min-width: 28px;
  }
  .wordmark {
    font-size: 18px;
  }
  .wordmark span {
    font-size: 6px;
    margin-top: 3px;
  }
  .garden {
    height: calc(100svh - 116px);
    padding: 0 8px;
  }
  .board-caption {
    height: 20px;
    font-size: 8px;
    padding: 0 10px;
  }
  .board-caption #round-status {
    font-size: 8px;
  }
  .board-under {
    height: 15px;
    font-size: 7px;
  }
  .console {
    height: 66px;
    max-width: calc(100vw - 20px);
    border-radius: 14px;
    padding: 5px 12px;
    gap: 12px;
    grid-template-columns: minmax(70px, 1fr) 116px minmax(
        70px,
        1fr
      ) 58px 50px 110px;
  }
  .spin {
    height: 50px;
  }
  .readout strong {
    font-size: 21px;
  }
  .readout > span,
  .bet-control > span {
    font-size: 7px;
  }
  .bet-control > div {
    gap: 6px;
  }
  .bet-control button {
    width: 26px;
    height: 26px;
  }
  .bet-control strong {
    font-size: 17px;
    min-width: 28px;
  }
  .console .secondary {
    height: 32px;
  }
  .console #demo-label {
    bottom: -12px;
    font-size: 6px;
  }
  .toast {
    bottom: 85px;
  }
  .modal {
    max-height: calc(100svh - 20px);
    padding: 20px;
  }
  .feature-modal .portal-art {
    width: 65px;
    height: 65px;
    margin: 0 auto 5px;
  }
  .feature-modal h2 {
    font-size: 23px;
  }
  .feature-modal .feature-count {
    font-size: 42px;
    margin: 8px;
  }
  .feature-modal p {
    margin: 8px;
  }
  .feature-modal .actions {
    margin-top: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.motion-on) *,
  body:not(.motion-on) *:before,
  body:not(.motion-on) *:after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  body:not(.motion-on) .board,
  body:not(.motion-on) .world-image {
    transform: none !important;
  }
}
.reduced-motion *,
.reduced-motion *:before,
.reduced-motion *:after {
  animation: none !important;
  transition-duration: 0.01ms !important;
}
.reduced-motion .board,
.reduced-motion .world-image {
  transform: none !important;
}

@media (max-width: 650px) and (orientation: portrait) and (min-height: 780px) {
  .caretaker-area {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    padding: 0;
  }
  .caretaker-area .lumi-stage {
    height: 100px;
    width: 100px;
  }
  .caretaker-name,
  .lumi-caption {
    display: none;
  }
  .lumi-shadow {
    height: 10px;
  }
  .orbit-dots {
    border-color: #b3ffe90a;
  }
  .orbit-dots i {
    width: 2px;
    height: 2px;
  }
}

/* Phone power budget: static background; native caretaker animations remain active. */
@media(pointer:coarse), (max-width:800px), (max-height:600px){
 .aurora,.board-halo,.hex:before,.cell .sprite,.lumi-shadow,.reactor-orbit,.reactor-core,.spin-orbit,.portal-meter i{animation:none!important}
 .board-halo,.lumi-shadow{display:none}
 .cell .sprite,.cell.spinning .sprite{filter:none}
 .sprite-shell{will-change:auto}.cell.spinning .sprite-shell{will-change:transform}
 .world-image,.is-night .world-image{transform:none;transition:none;filter:brightness(.72)}
 .world-night,.aurora{mix-blend-mode:normal}
 .console,.modal,.toast{backdrop-filter:none;-webkit-backdrop-filter:none}
}

/* Keep the authored caretaker visible in the editor and visitor portrait layout. */
@media (max-width: 650px) and (orientation: portrait) {
  html[data-largo-lumen-design] .caretaker-area {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    padding: 0;
  }
  html[data-largo-lumen-design] .caretaker-area .lumi-stage {
    height: 100px;
    width: 100px;
  }
  html[data-largo-lumen-design] .caretaker-name,
  html[data-largo-lumen-design] .lumi-caption {
    display: none;
  }
  html[data-largo-lumen-design] .lumi-shadow {
    height: 10px;
  }
  html[data-largo-lumen-design] .orbit-dots {
    border-color: #b3ffe90a;
  }
  html[data-largo-lumen-design] .orbit-dots i {
    width: 2px;
    height: 2px;
  }
}

/* Restore the native information widgets without moving the authored controls. */
@media (max-width: 650px) and (orientation: portrait) {
  html[data-largo-lumen-design] .resonance-area {
    position: absolute; left: 8px; right: 8px; bottom: 0;
    display: grid; grid-template-columns: 90px minmax(0,1fr) 90px;
    grid-template-rows: 26px 65px 35px; gap: 0 4px;
    width: auto; height: 126px; max-width: none; z-index: 4;
    pointer-events: none;
  }
  html[data-largo-lumen-design] .resonance-area > * {pointer-events: auto;}
  html[data-largo-lumen-design] .resonance-head {grid-column:1;grid-row:1;font-size:8px;letter-spacing:.08em;}
  html[data-largo-lumen-design] .resonance-head span {display:block;font-size:5px;margin-top:2px;letter-spacing:.03em;}
  html[data-largo-lumen-design] .reactor {grid-column:1;grid-row:2;width:64px;height:64px;margin:0 auto;}
  html[data-largo-lumen-design] .reactor-core > span {font-size:24px;}
  html[data-largo-lumen-design] .reactor-core small {font-size:5px;margin-top:3px;}
  html[data-largo-lumen-design] .portal-meter {grid-column:3;grid-row:1 / 3;align-self:start;}
  html[data-largo-lumen-design] .portal-meter > div {gap:8px;margin:10px 0 7px;}
  html[data-largo-lumen-design] .portal-meter i {width:8px;height:8px;}
  html[data-largo-lumen-design] .portal-meter span {font-size:6px;letter-spacing:.03em;line-height:1.4;}
  html[data-largo-lumen-design] .feature-detail {display:block;grid-column:3;grid-row:3;align-self:end;font-size:7px;line-height:1.3;margin:0;}
  html[data-largo-lumen-design] .resonance-area #showcase {grid-column:1;grid-row:3;font-size:6px;padding:3px;margin:0;}
  html[data-largo-lumen-design] .lumen-mobile-caption {grid-column:2;grid-row:3;align-self:end;}
  html[data-largo-lumen-design] .lumen-mobile-caption .caretaker-name {display:block;font-size:7px;letter-spacing:.1em;margin:0;line-height:1.2;}
  html[data-largo-lumen-design] .lumen-mobile-caption .caretaker-name span {display:inline;font-size:5px;margin:0;letter-spacing:.02em;}
  html[data-largo-lumen-design] .lumen-mobile-caption .lumi-caption {display:block;font-size:7px;line-height:1.2;min-height:0;max-width:none;margin:2px 0 0;}
}

/* Keep the restored information beside the caretaker on compact portraits. */
@media (max-width: 650px) and (orientation: portrait) and (max-height: 860px) {
  html[data-largo-lumen-design] {--board-size:min(94vw,calc(100svh - 454px));}
  html[data-largo-lumen-design] .caretaker-area {top:min(0px,calc((100svh - 912px) * .36));}
  html[data-largo-lumen-design] .resonance-area {height:96px;grid-template-rows:18px 52px 26px;}
  html[data-largo-lumen-design] .reactor {width:52px;height:52px;}
  html[data-largo-lumen-design] .reactor-core > span {font-size:21px;}
  html[data-largo-lumen-design] .reactor-core small {font-size:4px;}
  html[data-largo-lumen-design] .feature-detail {font-size:6px;}
}

/* Separate static labels remain typographically identical to their original text. */
.lumen-text-part,.lumen-movable-text {display:inline-block!important;}
:is(.wordmark,.caretaker-name,.resonance-head) > .lumen-text-part {
 font:inherit!important;letter-spacing:inherit!important;line-height:inherit!important;margin:0!important;
}
:is(.wordmark,.resonance-head) > .lumen-text-part {display:block!important;}
html[data-largo-lumen-editor] #feature-rounds:empty::before {content:'[Ночные раунды]';opacity:.6;}
html[data-largo-lumen-editor] #showcase[hidden] {display:block;opacity:.6;}

.lumen-spin-art-clip{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;z-index:0}
