/* S2048's cream canvas and orange / navy actions, adapted to the buffet. */
.play-screen{position:relative;isolation:isolate;display:flex;flex-direction:column;width:100%;height:100%;min-height:0}
.phone[data-screen]:not([data-screen="play"]){background:#faf6ef}
.shell-screen{height:100%;width:100%;overflow-y:auto;overscroll-behavior:contain;padding:var(--safe-top) 18px max(14px,env(safe-area-inset-bottom));color:var(--navy);background:radial-gradient(ellipse at 20% 12%,#fff 0%,transparent 52%),linear-gradient(155deg,#fffdf7,#f8f0e3 75%,#f0e3ca);scrollbar-width:thin;touch-action:pan-y}
.shell-screen button{font-weight:850}.shell-screen h2:focus{outline:none}
.shell-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px;padding:12px 0 8px;flex:none}
.shell-header img{display:block;width:117px;height:auto;object-fit:contain}
.home-screen{display:flex;flex-direction:column}
.home-hero{text-align:center;flex:1;min-height:340px;display:flex;flex-direction:column;justify-content:center;position:relative}
.hero-kicker{font-size:14px;line-height:1.5;font-weight:800;color:#796043;letter-spacing:.06em}
.home-hero h1{font-weight:950;line-height:1.05;letter-spacing:-.04em;position:relative;z-index:2;margin:8px 0 0}
.home-hero h1 span{display:block;font-size:27px;letter-spacing:-.025em}
.home-hero h1 strong{display:block;font-size:49px;line-height:1.2;color:var(--navy);text-shadow:0 3px 0 #fff}
.hero-stage{aspect-ratio:1/.95;flex:none;position:relative;isolation:isolate;max-width:354px;width:100%;margin:7px auto 0;pointer-events:none}
.hero-feast{display:block;position:absolute;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 9px 8px #71491c19);transform-origin:center 70%}
.hero-tagline{font-size:16px;font-weight:800;margin:0 0 12px;color:#79512c}
.home-controls{flex:none;text-align:center;padding-bottom:2px}
.freeplay-line{font-size:14px;font-weight:750;margin:0 0 10px;line-height:1.5}.freeplay-line b{color:#a65a0e}
.shell-button{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:54px;border:0;border-radius:18px;font-size:18px;font-weight:850;padding:12px;line-height:1.25;transition:transform .15s;box-sizing:border-box}
.shell-button:active{transform:scale(.975)}.shell-button:disabled{opacity:.6}
.shell-primary{background:var(--orange);color:var(--navy);box-shadow:0 5px 14px #c57c3026,inset 0 1px 0 #ffbd6c}
.shell-primary>span{font-size:26px;line-height:.8}.shell-blue{background:var(--navy);color:#fff}.shell-outline{background:#ffffffa6;border:2px solid var(--navy);color:var(--navy)}
.start-button{flex-direction:column;gap:3px;min-height:79px;margin-bottom:12px}.start-button strong{font-size:25px}.start-button strong span{margin-left:9px}.start-button small{font-size:14px;font-weight:650}
.shell-actions{display:grid;grid-template-columns:1fr 1fr;gap:11px}.home-controls .shell-actions .shell-button{min-height:65px}

.shell-link{display:inline-block;border:0;background:transparent;text-decoration:underline;text-underline-offset:3px;color:#6d655b;font-size:14px;min-height:40px;padding:8px 4px}
#quitGame{display:block;margin:10px auto 0}.shell-note{font-size:14px;line-height:1.5;color:#756e63;text-align:center}
.result-screen{display:flex;flex-direction:column;text-align:center}
.result-content{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:0}
.result-mascot{height:196px;display:flex;justify-content:center;align-items:center;flex:none}.result-mascot img{display:block;width:min(100%,294px);height:196px;object-fit:contain}
.result-summary{font-size:14px;font-weight:750;color:#7d643f;line-height:1.5;margin-top:5px}
.result-screen h2{font-size:25px;font-weight:850;margin:7px 0 2px;line-height:1.3}
.result-screen .final-score{color:#b76511;font-size:clamp(48px,16vw,70px);line-height:1.1;letter-spacing:-.045em;margin:0 0 14px}
.result-records{display:grid;grid-template-columns:1fr;background:#fffdf7;border:1px solid #e1d2ba;border-radius:17px;margin:0 0 14px;padding:13px 5px;gap:0}
.result-records>div+div{border-left:1px solid #e5d9c8}.result-records dt{font-size:14px;line-height:1.4;color:#696356;font-weight:700;white-space:nowrap}.result-records dd{font-size:25px;font-weight:850;line-height:1.2;margin:5px 0 0;font-variant-numeric:tabular-nums}
.result-foods{text-align:left;padding:0 4px}.result-foods h3{font-size:14px;font-weight:750;color:#756744;margin:0 0 6px}
.result-screen #resultFavorites{border:0;background:none;margin:0 0 12px;padding:0}
.result-screen #resultFavorites>div{padding:8px 0;align-items:center;border-color:#dccfbb}.result-screen #resultFavorites dt{display:flex;align-items:center;gap:7px;color:var(--navy)}
.result-screen #resultFavorites .food-thumbnail{width:34px;height:34px;flex:none}.result-screen #resultFavorites dd{font-size:18px}
.result-footer{flex:none;padding:5px 0 0}.result-footer>.shell-button{margin-bottom:10px}.result-footer .shell-note{margin-top:10px}
.shell-back{background:none;border:0;padding:7px 0;min-height:40px;font-size:16px}
.leaderboard-screen{display:flex;flex-direction:column}.leader-content{flex:1}.leader-content>.hero-kicker{text-align:center;margin-top:20px}.leader-content h2{text-align:center;font-size:32px;letter-spacing:-.035em;margin:5px 0 20px}
.leader-round{text-align:center;background:var(--navy);color:#fff6df;border-radius:20px;padding:16px 12px;margin-bottom:15px}.leader-round>span{font-size:14px}.leader-round strong{display:block;font-size:43px;font-weight:900;color:var(--yellow);font-variant-numeric:tabular-nums}.leader-round p{font-size:14px;line-height:1.5}
.leader-personal{display:grid;grid-template-columns:.8fr 1.2fr;background:#fffaf0;border:1px solid #dfcdb1;border-radius:15px;padding:14px 0;text-align:center}.leader-personal>div+div{border-left:1px solid #deceb6}.leader-personal span{display:block;font-size:14px;font-weight:650;color:#726450}.leader-personal b{font-size:24px;font-weight:900;display:block;margin-top:4px}
.leader-note{font-size:14px;line-height:1.55;color:#71685b;text-align:center;margin:14px 0}
.leader-table-wrap{border:1px solid #deceb8;border-radius:16px;overflow:hidden;background:#fffdf8}.leader-table{width:100%;border-collapse:collapse;text-align:center;font-size:14px}.leader-table thead{background:#eadecb}.leader-table th{padding:12px 5px;font-weight:850}.leader-table td{padding:10px}.leader-empty{padding:23px 0}.leader-empty>span{display:block;font-size:38px;margin-bottom:12px}.leader-empty strong{font-size:16px}.leader-empty p{margin-top:7px;color:#71685b;line-height:1.5;font-size:14px}
.leader-footer{padding-top:18px;flex:none}.leader-footer .shell-note{margin-top:10px}
.shell-dialog{color:var(--navy);width:min(calc(100% - 28px),390px);max-height:calc(100dvh - 36px);border:1px solid #ddc9a5;border-radius:24px;background:#fffaf0;padding:0;overflow:auto;box-shadow:0 24px 70px #102c4266}.shell-dialog::backdrop{background:#102c42a8;backdrop-filter:blur(4px)}.shell-dialog-inner{position:relative;padding:34px 22px 22px;text-align:center}.shell-dialog h2{font-size:25px;margin:7px 0 12px}.shell-dialog h3{font-size:20px;margin:0 0 8px}.shell-dialog p{font-size:14px;line-height:1.7;margin:10px 0}.shell-dialog .shell-button{margin-top:12px}.shell-close{position:absolute;right:9px;top:7px;width:38px;height:38px;border:0;background:transparent;font-size:28px}.campaign-symbol{font-size:50px;margin:15px auto}.campaign-rules{text-align:left;border-block:1px solid #e5d6c0;padding:2px 0;margin:16px 0}.shell-dialog .shell-note{color:#766448}
@media (prefers-reduced-motion:no-preference){.home-screen:not([hidden]) .hero-feast{animation:feast-float 4.8s ease-in-out infinite}@keyframes feast-float{50%{transform:translateY(-4px)}}}
@media (max-height:740px){.home-hero h1 strong{font-size:44px}.home-hero h1 span{font-size:26px}.result-mascot{height:146px}.result-mascot img{width:min(100%,219px);height:146px}.result-content{flex:none}.result-screen .final-score{font-size:54px}.shell-header{min-height:50px}.home-controls .shell-actions .shell-button{min-height:54px}.result-records{padding-block:10px;margin-bottom:10px}.result-records dd{font-size:22px}.result-screen h2{font-size:23px}}
@media (max-width:360px){.shell-screen{padding-inline:14px}.home-hero h1 strong{font-size:44px}.home-hero h1 span{font-size:26px}.result-records dt{font-size:14px;white-space:normal;min-height:39px;display:grid;place-items:center}.shell-button{font-size:16px}.result-records dd{font-size:22px}.result-screen #resultFavorites dd{font-size:16px}.result-screen #resultFavorites dt{font-size:14px}.shell-actions{gap:9px}}
/* Keep short viewports scrollable without compressing the hero into its neighbours. */
.home-hero{flex:1 0 auto;min-height:0}
.result-content{flex:1 0 auto}
.result-records>div,.leader-personal>div{min-width:0}
.result-records.long-values,.leader-personal.long-values{grid-template-columns:1fr}
.result-records.long-values>div+div,.leader-personal.long-values>div+div{border-left:0;border-top:1px solid #e5d9c8;margin-top:10px;padding-top:10px}
.result-records.long-values dt{min-height:0}

.home-terms {
  margin: 0;
  color: #624731;
  font-size: 10px;
  line-height: 1.4;
}
.home-terms .shell-link {
  min-height: 24px;
  padding: 0;
  color: inherit;
  font-size: inherit;
  vertical-align: baseline;
}

.guide-page { margin: 14px 0; }
.guide-page h3 { margin: 6px 0; font-size: 21px; }
.guide-page p:not(.eyebrow) { margin: 0 auto 12px; line-height: 1.5; font-size: 15px; }
.guide-page img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 50dvh;
  margin: 0 auto;
  border-radius: 10px;
}
.guide-nav {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-self: flex-end;
  max-width: 100%;
  gap: 8px;
}
.guide-nav .shell-button { width: auto; min-height: 44px; padding: 8px 14px; }
.guide-trophy {
  padding: 20px;
  margin-bottom: 16px;
  border-radius: 14px;
  color: white;
  background: var(--navy);
  font-size: 42px;
}
.guide-trophy strong { display: block; font-size: 21px; }
#inGameRules { margin-top: 12px; }
#inGameRules summary { cursor: pointer; padding: 8px; }

.shell-screen.home-screen {
  display: block;
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
  background: #ffe7c8;
  scrollbar-width: none;
}
.home-viewport {
  height: 100%;
  container-type: size;
}
.home-art {
  position: relative;
  container-type: inline-size;
  width: 100%;
  /* Fit the portrait artwork inside the visible, safe viewport. */
  width: min(100%, calc(100cqh * 984 / 1599));
  margin-inline: auto;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (orientation: landscape) {
  /* Allow vertical scrolling when fitting would make the controls too small. */
  .home-art { min-width: min(100%, 300px); }
}
.home-art-image { display: block; width: 100%; height: auto; }
.home-layout { display: contents; }
.home-right-edge { display: none; }

@media (max-width: 549px) and (orientation: portrait) {
  .phone[data-screen="home"] { width: 100%; }
  .home-screen .home-period, .home-screen .home-period-visual { font-size: 2.31cqw; }
}

/* Extend the same floor below the controls in the desktop phone frame too. */
@media (orientation: portrait), (min-width: 550px) and (min-height: 510px) {
  .shell-screen.home-screen { padding: 0; }
  .home-layout {
    --home-top: var(--safe-top);
    --home-bottom: env(safe-area-inset-bottom, 0px);
    --home-side-inset: max(env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    --home-available-height: max(0px, calc(100cqh - var(--home-top) - var(--home-bottom)));
    --home-fit-width: max(0px, min(
      calc(100cqw - 2 * var(--home-side-inset)),
      calc(var(--home-available-height) * 984 / 1599)
    ));
    --home-side: calc((100cqw - var(--home-fit-width)) / 2);
    /* Keep the 984 × 1599 homepage artwork at its native aspect ratio. */
    --home-art-height: min(var(--home-available-height), calc(var(--home-fit-width) * 1599 / 984));
    --home-head: calc(var(--home-top) + (var(--home-available-height) - var(--home-art-height)) / 3);
    --home-tail: max(0px, calc(100cqh - var(--home-head) - var(--home-art-height)));
    display: block;
    position: relative;
    height: 100%;
    padding-top: var(--home-head);
    overflow: hidden;
    background:
      linear-gradient(160deg, #fcc16e, #f9b769 48%, #ffd297) bottom / 100% var(--home-tail) no-repeat,
      linear-gradient(#fce8d2, #fed4a4 60%, #fcc16e);
  }
  .home-layout::before, .home-layout::after {
    content: "";
    position: absolute;
    pointer-events: none;
  }
  /* Extend the edge of the scenery outside the fixed-proportion composition. */
  .home-layout::before {
    inset: 0 0 var(--home-tail);
    border-image: url("assets/home-ui-editable-bg.png") 1 1 0 1 /
      var(--home-head) calc(var(--home-side) + 1px) 0 stretch;
  }
  .home-layout::after {
    inset: auto var(--home-side) 0;
    height: var(--home-tail);
    border-image: url("assets/home-nav-raised-icons.png") 343 62 0 0 fill / 0;
    mask-image: linear-gradient(#000, transparent 14px);
  }
  .home-art {
    z-index: 1;
    width: var(--home-fit-width);
    height: var(--home-art-height);
  }
  .home-art-image { height: 100%; }
  .ui-art-color.home-right-edge {
    display: block;
    inset: var(--home-head) 0 var(--home-tail) auto;
    width: calc(var(--home-side) + 1px);
    mask-image: linear-gradient(90deg, #000 15%, transparent);
  }
}
@media (min-width: 550px) {
  .home-layout { --home-bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
}

@font-face {
  font-family: "GenSen Rounded Display";
  src: url("assets/gensen-rounded-tw-display.otf?v=2") format("opentype");
  font-weight: 900;
  font-display: swap;
}

.home-banner-title,
.home-energy, .home-points, .home-bites, .home-challenge, .home-free {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}
.home-banner-title,
.home-energy, .home-points, .home-bites, .home-challenge, .home-free,
.home-start-title, .home-start-cost, .home-nav-label, .reward-title,
.leader-banner h2, .gold-dialog .gold-dialog-heading h2 {
  font-family: "GenSen Rounded Display", "PingFang TC", sans-serif;
  font-weight: 900;
}
.home-banner-title {
  inset: 10.05% auto auto 8.8%;
  height: 7.9%;
  color: #fff6df;
  font-size: 5.64cqw;
  font-style: italic;
  letter-spacing: -.025em;
  transform: rotate(-4deg);
  -webkit-text-stroke: .71cqw #562705;
  paint-order: stroke fill;
  text-shadow: 0 .76cqw #793907;
}
.home-period,
.home-period-visual {
  position: absolute;
  /* Match the cream opening from the clock's right edge to the ribbon notch. */
  left: 24.8%;
  right: 17.3%;
  top: 17.2%;
  height: 3.8%;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: .7cqw;
  margin: 0;
  background: transparent;
  color: #174e73;
  font-family: "GenSen Rounded Display", "PingFang TC", sans-serif;
  font-size: 2.64cqw;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -.025em;
  text-align: center;
  white-space: nowrap;
  -webkit-text-stroke: .055cqw #fff7df;
  paint-order: stroke fill;
  text-shadow:
    0 .15cqw 0 #fff0cc,
    0 .3cqw .28cqw rgba(123, 33, 12, .32);
}
.home-period { opacity: 0; pointer-events: none; }
.home-period-visual {
  gap: 0;
  pointer-events: none;
  user-select: none;
}
.home-energy, .home-points {
  height: 2.95%;
  color: #fff8e6;
  font-size: 3.32cqw;
  font-variant-numeric: tabular-nums;
}
/* Center the visible numeral shapes in the blue space beside each icon. */
.home-energy { top: 2.39%; left: 60.05%; width: 9.1%; }
.home-points { top: 2.31%; left: 81%; width: 14.1%; }
.home-bites {
  inset: 49.95% 29.15% auto 51%;
  height: 3.5%;
  color: #fff9e8;
  font-size: 3.55cqw;
}
.home-challenge {
  inset: 56.6% 35.8% auto 42.65%;
  height: 4.5%;
  color: #572802;
  font-size: 4.04cqw;
}
.home-free {
  inset: 67.45% 31.8% auto 39%;
  height: 3.85%;
  flex-direction: column;
  color: #6e330a;
  font-size: 2.45cqw;
  line-height: 1.1;
  text-align: center;
}
.home-free > span:last-child:not(:has(b:not([hidden]))) { display: none; }
.home-free b { color: #bc4f04; font-size: 1.08em; }
.home-screen .home-terms {
  position: absolute;
  inset: 87.55% 8% auto;
  transform: translateY(-50%);
  text-align: center;
  font-size: min(10px, 2.55cqw);
}

.reward-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(calc(62.5vw - 7.5px), calc((100dvh - 20px) * .40125), 281.25px);
  translate: .15% -.192%;
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--navy);
  box-shadow: none;
}

.reward-dialog::backdrop { background: #091d35b3; backdrop-filter: blur(2px); }
.reward-sheet {
  position: relative;
  width: 100%;
  aspect-ratio: 1005 / 1565;
  container-type: inline-size;
}
.reward-sheet-art {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 26px #07182a8c);
  user-select: none;
  -webkit-user-drag: none;
}
.reward-title,.reward-tiers,.reward-copy,.reward-close { z-index: 2; }
.reward-close {
  position: absolute;
  top: 25%;
  right: 5.35%;
  width: 12.2%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.reward-close:focus-visible { outline: none; transform: scale(.94); }

@media (prefers-reduced-motion: no-preference) {
  .reward-dialog[open] { animation: reward-appear 180ms ease-out; }
  @keyframes reward-appear {
    from { opacity: 0; transform: scale(.96); }
  }
}

.leaderboard-dialog:not([open]) { display: none; }
.leaderboard-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(calc(100vw - 18px),414px);
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: #65320f;
}
.leaderboard-dialog::backdrop { background:#091d35a3; backdrop-filter:blur(5px); }
.leader-popup {
  position: relative;
  display: flex;
  flex-direction: column;
  height: min(94dvh,790px);
  max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: 98px 13px 14px;
  border: 4px solid #ffb611;
  border-radius: 38px;
  background:
    radial-gradient(circle at 50% 7%,#fffdf4 0 18%,transparent 42%),
    linear-gradient(160deg,#fff9ee,#ffeed5 72%,#ffe5c0);
  box-shadow: inset 0 0 0 3px #fff7df,0 6px 0 #b75a0c,0 24px 50px #06182b99;
  overflow: visible;
}
.leader-mascot {
  position: absolute;
  z-index: 1;
  top: -13px;
  left: 50%;
  width: 178px;
  height: 151px;
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
}
.leader-mascot img { position:absolute; z-index:1; top:0; left:0; width:100%; height:auto; filter:drop-shadow(0 7px 6px #8f410f55); }
.leader-mascot i { position:absolute; z-index:2; width:18px; height:18px; background:linear-gradient(145deg,#fff7b2 10%,#ffc321 55%,#ff9216); clip-path:polygon(50% 0,63% 36%,100% 50%,63% 64%,50% 100%,37% 64%,0 50%,37% 36%); filter:drop-shadow(0 2px 1px #b3570c); }
.leader-mascot i:nth-child(1){left:1px;top:27px}.leader-mascot i:nth-child(2){right:3px;top:45px;width:23px;height:23px}.leader-mascot i:nth-child(3){right:22px;top:13px;width:13px;height:13px}
.leader-close {
  position: absolute;
  z-index: 5;
  top: 105px;
  right: 11px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0 0 3px;
  border: 3px solid #fff2c1;
  border-radius: 50%;
  background: linear-gradient(145deg,#ff9a35,#e55a0d);
  color: #fff9e7;
  box-shadow: 0 4px 0 #a74408,inset 0 2px 0 #ffc877,0 6px 12px #8f3d0d42;
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px #a33d08;
}
.leader-close:focus-visible { outline:3px solid #102c42; outline-offset:3px; }
.leader-content { display:flex; flex:1; min-height:0; flex-direction:column; padding:0 3px; }
.leader-banner {
  position: relative;
  z-index: 2;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 35px 10px;
  padding: 11px 20px 14px;
  border: 0;
  border-radius: 25px 25px 31px 31px;
  background:
    linear-gradient(180deg,#ff9c2c 0,#f56c12 72%,#dc4e06 100%);
  box-shadow: inset 0 2px 0 #ffc57c,0 5px 0 #a53c08,0 9px 15px #74320e4d;
  text-align: center;
}
.leader-banner::before,.leader-banner::after { content:""; position:absolute; z-index:-1; top:25px; width:58px; height:42px; background:linear-gradient(145deg,#ffc12a,#f4950c); box-shadow:0 3px 0 #b35b08; }
.leader-banner::before { left:-34px; border-radius:22px 4px 4px 22px; transform:skewY(-10deg); }
.leader-banner::after { right:-34px; border-radius:4px 22px 22px 4px; transform:skewY(10deg); }
.leader-banner h2 { margin:0; color:#fff5db; font-size:40px; line-height:1.05; letter-spacing:-.04em; text-shadow:0 3px 0 #a74408,0 5px 8px #6d26073d; }
.leader-round {
  margin: 0 0 10px;
  padding: 12px;
  border: 2px solid #f1c353;
  border-radius: 18px;
  background: linear-gradient(150deg,#254b65,#102c42);
  box-shadow: inset 0 1px 0 #fff6df3d,0 3px 0 #8c5625;
}
.leader-round strong { font-size: 35px; }
.leader-stats {
  display:grid;
  grid-template-columns:1.24fr .88fr .88fr;
  flex:none;
  min-height:66px;
  margin:0 3px 9px;
  border:2px solid #f1bc58;
  border-radius:25px;
  background:linear-gradient(110deg,#fff8df,#ffe9b9 54%,#fff1d3);
  box-shadow:inset 0 2px 0 #fffdf2,0 3px 0 #c8751c55,0 7px 13px #95420a1f;
  overflow:hidden;
}
.leader-stats > strong,.leader-stats > span { display:flex; align-items:center; justify-content:center; min-width:0; padding:8px 6px; text-align:center; }
.leader-stats > strong { font-size:15px; line-height:1.15; white-space:nowrap; }
.leader-stats > span { position:relative; flex-direction:column; }
.leader-stats > span::before { content:""; position:absolute; left:0; top:16%; bottom:16%; width:2px; border-radius:2px; background:#f3a740; box-shadow:1px 0 #fff7dc; }
.leader-stats small { color:#704018; font-size:12px; font-weight:850; line-height:1; }
.leader-stats b { margin-top:5px; color:#73330b; font-size:23px; line-height:.75; font-variant-numeric:tabular-nums; }
.leader-note {
  flex:none;
  margin:9px 7px 0;
  padding:0;
  border:0;
  background:transparent;
  color:#6a3512;
  font-size:11px;
  font-weight:800;
  line-height:1.35;
  text-align: center;
}
.leader-note span { display:block; }
.leader-table-wrap { display:flex; flex:1; min-height:190px; flex-direction:column; overflow:hidden; border:2px solid #eba83f; border-radius:23px; background:#fffaf0; box-shadow:0 3px 0 #a95f1c4d,0 6px 13px #8c3b0d1f; }
.leader-table-scroll {
  flex:1;
  min-height:0;
  overflow-y: scroll;
  overscroll-behavior: contain;
  /* Keep the scrolling body and fixed header on the same column grid. */
  scrollbar-width: none;
}
.leader-table-scroll::-webkit-scrollbar { display: none; }
.leader-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: #5d3414;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}
.leader-rank-col { width: 27%; }
.leader-score-col { width: 27%; }
.leader-column-row th {
  padding:10px 4px 9px;
  border-bottom:1px solid #d85d0b;
  background:linear-gradient(#ff9d28,#eb6a0d);
  color: #fff6df;
  font-size:14px;
  text-shadow:0 2px #a23f08;
}
.leader-table tbody th,.leader-table tbody td {
  height:44px;
  padding:7px 5px;
  border-bottom: 1px solid #efd5aa;
  background:#fffaf0;
  font-variant-numeric:tabular-nums;
}
.leader-table tbody tr:nth-child(even) th,.leader-table tbody tr:nth-child(even) td { background:#fff2d8; }
.leader-table tbody th { color:#8b430f; font-size:16px; font-weight:900; }
.leader-table tbody td { overflow:hidden; text-overflow:ellipsis; }
.leader-table tbody td:nth-child(2) { font-weight:750; }
.leader-table tbody td:last-child { color:#71320d; font-size:15px; font-weight:900; }
.leader-load-status { margin:0; padding:10px 8px 12px; color:#7c5937; font-size:11px; font-weight:750; text-align:center; }
.leader-footer { flex:none; padding:10px 0 0; text-align:center; }
.leader-footer .shell-primary {
  width:64%;
  min-height:44px;
  padding:8px 18px;
  border: 2px solid #ffdc89;
  border-radius: 999px;
  background: linear-gradient(#ffc154,#ff921c 65%,#eb7111);
  box-shadow:inset 0 2px 0 #fff0b5,0 4px 0 #8f410f,0 8px 15px #71320d42;
  color:#4b2604;
  font-size:18px;
  text-shadow: 0 1px #ffe8a9;
}
.leader-footer .shell-primary > span { color:#fff4bd; font-size:21px; text-shadow:0 2px #a34a0c; }
@media (max-width:360px) {
  .leader-popup { padding:86px 9px 10px; border-radius:31px; }
  .leader-mascot { width:158px; height:136px; }
  .leader-close { top:91px; right:7px; width:43px; height:43px; }
  .leader-banner { min-height:72px; margin-inline:30px; }
  .leader-banner h2 { font-size:34px; }
  .leader-stats { min-height:58px; }
  .leader-stats > strong { font-size:13px; }
  .leader-table tbody th,.leader-table tbody td { height:40px; padding-block:5px; }
  .leader-note { font-size:10px; }
}
@media (max-height:700px) {
  .leader-popup { padding-top:75px; }
  .leader-mascot { top:-19px; width:150px; height:124px; }
  .leader-close { top:78px; }
  .leader-banner { min-height:64px; margin-bottom:7px; }
  .leader-banner h2 { font-size:32px; }
  .leader-stats { min-height:54px; margin-bottom:7px; }
  .leader-note { margin-top:6px; font-size:9.5px; }
  .leader-footer { padding-top:7px; }
  .leader-footer .shell-primary { min-height:40px; font-size:16px; }
}

/* Exact v5 leaderboard skin. The generated artwork supplies the decorative
   shell while the ranking viewport remains live, selectable HTML. */
.leader-popup {
  container-type:inline-size;
  position:relative;
  display:block;
  width:100%;
  height:auto;
  max-height:none;
  aspect-ratio:1005 / 1565;
  padding:0;
  border:0;
  border-radius:4.1cqw;
  background: transparent;
  isolation: isolate;
  box-shadow:none;
  overflow:visible;
}
.leader-mascot { display:none; }
.leader-banner {
  position: absolute;
  z-index: 1;
  inset: 11.25% 20.15% auto 20.15%;
  min-height: 0;
  height: 11%;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: .65cqw solid #ffc86b;
  border-radius: 6.4cqw;
  background: linear-gradient(#ffad38, #fa8104 40%, #e76102);
  box-shadow: inset 0 .45cqw #ffe8a3, inset 0 -.8cqw #c8511159, 0 .65cqw 0 #b9530d;
}
.leader-banner::before,.leader-banner::after { display: none; }
.leader-banner h2 {
  margin: 0;
  color: #fff3d1;
  font-size: min(35px, 10.95cqw);
  letter-spacing: .035em;
  line-height: 1.08;
  white-space: nowrap;
  text-shadow: 0 2px #a73f0b;
}
.leader-close {
  top:9.4%;
  right:6.55%;
  width:12.2%;
  height:auto;
  aspect-ratio:1;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  color:transparent;
  text-shadow:none;
}
.leader-close:focus-visible { outline:3px solid #74320e; outline-offset:2px; }
.leader-content { position:static; display:block; min-height:0; padding:0; }
.leader-stats {
  position: absolute;
  inset: 22.1% 6.5% auto;
  height: 7.1%;
  min-height: 0;
  grid-template-columns: 36.35% 31.65% 32%;
  margin: 0;
  border: 1px solid #ffc362;
  border-radius: 4.15cqw;
  background: linear-gradient(#fff2d1, #ffdfa0);
  box-shadow: inset 0 1px #fff9e7, 0 1px 2px #be7a3c55;
}
.leader-stats > strong, .leader-stats > span { padding: 0; }
.leader-stats > strong, .leader-stats small {
  color: #71330d;
  font-size: clamp(10px, 3.05cqw, 13px);
  font-weight: 850;
}
.leader-stats b {
  margin-top: .65cqw;
  color: #71330d;
  font-size: 4.1cqw;
  line-height: 1;
}
.leader-table-wrap {
  position:absolute;
  top:30.15%;
  left:6.45%;
  right:6.45%;
  height:44.55%;
  min-height:0;
  display:block;
  border:0.45cqw solid #efaa3b;
  border-radius:3.9cqw;
  background:#fff9ed;
  box-shadow:0 .8cqw 0 #aa5a1945;
  overflow:hidden;
}
.leader-table { font-size:3.5cqw; }
.leader-table-head { height:7.25cqw; }
.leader-column-row th {
  height:7.25cqw;
  padding:0;
  border:0;
  background:linear-gradient(#ff9d28,#eb6a0d);
  font-size:3.55cqw;
  line-height:1;
  text-shadow:0 .45cqw #a23f08;
}
.leader-table-scroll {
  position:absolute;
  inset:7.25cqw 0 0;
  display:block;
  min-height:0;
  overflow-y:scroll;
}
.leader-table tbody th,.leader-table tbody td {
  height:6.1cqw;
  padding:.35cqw 1.2cqw;
  border-bottom:.25cqw solid #efd5aa;
  font-size:3.55cqw;
  line-height:1;
}
.leader-table tbody th { font-size:3.65cqw; }
.leader-table tbody td:last-child { font-size:3.65cqw; }
.leader-load-status {
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  overflow:hidden;
  white-space:nowrap;
}
.leader-note {
  position: absolute;
  inset: 76.25% 6.5% auto;
  min-height: 6.6%;
  display: grid;
  align-content: center;
  gap: 2px;
  margin: 0;
  padding: 2px 3px;
  border-radius: 10px;
  background: #fce9d0;
  color: #753714;
  font-size: clamp(10px, 2.75cqw, 12px);
  line-height: 1.18;
}
.leader-footer {
  position:absolute;
  top:83.75%;
  left:25.3%;
  width:49.4%;
  height:7.4%;
  padding:0;
}
.leader-footer .shell-primary {
  width:100%;
  height:100%;
  min-height:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  color:transparent;
  text-shadow:none;
  opacity:0;
}
.leader-footer .shell-primary:focus-visible { opacity:.16; outline:3px solid #6f3009; outline-offset:2px; }

@media (max-height:620px) {
  .leaderboard-dialog { width:min(calc(100vw - 18px),calc((100dvh - 12px) * .6422)); }
}

#helpDialog .popup-inner {
  /* The mask SVG has a viewBox but no intrinsic dimensions. Size it to
     the full 1004 × 1566 artwork, including when only one end is visible. */
  --guide-art-size: 100% calc(100cqw * 1566 / 1004);
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  height: var(--guide-viewport-height);
  max-height: var(--guide-viewport-height);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#helpDialog.guide-dialog {
  --guide-viewport-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
  width: min(calc(100% - 18px), 414px);
  max-height: var(--guide-viewport-height);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
#helpDialog.guide-dialog::backdrop { background: #091d35a3; backdrop-filter: blur(5px); }
.guide-frame-header, .guide-frame-base, .guide-frame-body .guide-nav { flex: none; }
.guide-frame-header {
  position: relative;
  z-index: 1;
  height: 34.26cqw;
  isolation: isolate;
}
.guide-frame-header::before, .guide-frame-header::after,
.guide-frame-base::before, .guide-frame-base::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Keep the illustrated header and base at their original proportions. */
.guide-frame-header::before, .guide-frame-header::after {
  background: var(--illustrated-frame-art) center top / var(--guide-art-size) no-repeat;
  mask: var(--illustrated-frame-mask) center top / var(--guide-art-size) no-repeat;
}
.guide-frame-header::before { z-index: -2; }
.guide-frame-header::after { clip-path: inset(17.55cqw 0 0); }
.guide-frame-header .leader-custom-mascot { top: -3.6cqw; }
.guide-frame-header .leader-banner { top: 17.55cqw; height: 17.15cqw; }
.guide-frame-header .leader-close { top: 14.66cqw; }
#helpTitle:focus { outline: none; }
.guide-frame-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin-inline: 1.69cqw 1.99cqw;
  /* Underpaint both joins at fractional device pixel ratios. */
  margin-block: -1px;
  padding: 9px 4.6cqw 2px;
  background: linear-gradient(#fce8d0, #fbe6d0);
}
.guide-frame-body::before, .guide-frame-body::after {
  content: "";
  position: absolute;
  inset-block: 0;
  pointer-events: none;
  border-image-source: var(--illustrated-frame-art);
  border-image-width: 0;
}
.guide-frame-body::before { left: 0; width: 4.08cqw; border-image-slice: 344 946 174 17 fill; }
.guide-frame-body::after { right: 0; width: 3.98cqw; border-image-slice: 344 20 174 944 fill; }
.guide-frame-base { position: relative; height: 17.33cqw; }
.guide-frame-base::before {
  background: #fbe6d0;
  mask: var(--illustrated-frame-mask) center bottom / var(--guide-art-size) no-repeat;
}
.guide-frame-base::after {
  background: var(--illustrated-frame-art) center bottom / var(--guide-art-size) no-repeat;
  mask: var(--illustrated-frame-mask) center bottom / var(--guide-art-size) no-repeat,
    radial-gradient(ellipse 43% 48% at 50% 0%, transparent 76%, #000 94%);
  mask-composite: intersect;
}
#helpDialog .guide-page { background: #fffdf7; border: 1px solid #ebcb91; border-radius: 18px; padding: 13px; }
#helpDialog .guide-frame-body .guide-page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin: 0 0 6px;
  overflow: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
#helpDialog .guide-page::-webkit-scrollbar { display: none; }
#helpDialog .guide-frame-body .guide-tools-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
}
#guideToolsScroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
#guideToolsScroll::-webkit-scrollbar { display: none; }
.guide-tools-content { padding: 13px; }
.scroll-slider {
  position: absolute;
  top: 13px;
  right: 0;
  width: 20px;
  height: calc(100% - 26px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  writing-mode: vertical-lr;
  direction: ltr;
  touch-action: none;
  cursor: pointer;
  --guide-rail: #f3deb9;
  --guide-thumb: #bb5e0a;
}
#leaderSlider {
  top: calc(7.25cqw + 4px);
  height: calc(100% - 7.25cqw - 8px);
}
.scroll-slider::-webkit-slider-runnable-track {
  width: 5px;
  height: 100%;
  border-radius: 5px;
  background: var(--guide-rail);
}
.scroll-slider::-moz-range-track {
  width: 5px;
  height: 100%;
  border-radius: 5px;
  background: var(--guide-rail);
}
.scroll-slider::-webkit-slider-thumb {
  appearance: none;
  width: 5px;
  height: 32px;
  border-radius: 5px;
  background: var(--guide-thumb);
}
.scroll-slider::-moz-range-thumb {
  width: 5px;
  height: 32px;
  border: 0;
  border-radius: 5px;
  background: var(--guide-thumb);
}
#helpDialog #inGameRules { flex: none; max-height: 25dvh; overflow-y: auto; }
#helpDialog .guide-page .eyebrow { color: #8d4700; }
#helpDialog .guide-page > .guide-demo {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: none;
  object-fit: contain;
}
#helpDialog .guide-page .eyebrow { flex: none; margin: 0; }
#helpDialog .guide-page h3 { flex: none; margin: 4px 0; font-size: 20px; line-height: 1.2; }
#helpDialog .guide-page p:not(.eyebrow) { flex: none; margin-bottom: 8px; font-size: 14px; line-height: 1.42; }
.guide-frame-body > .guide-nav {
  align-self: stretch;
  margin-top: auto;
  padding: 0 3px 3px;
}
.guide-nav .shell-primary { background: linear-gradient(#ffbd50,#ff961d); border: 1px solid #f4ba63; }

.guide-trophy img { width: 80px; height: 48px; margin: 0 auto 6px; }

/* Buffet counter, scorecard and service tray */
.play-screen .counter, .play-screen .dock {
  --card-cream: #fff6de;
  --card-face: #fffbee;
  --card-rim: #e9b864;
  --card-divider: #ead9b7;
  --card-highlight: #ffdfa0;
  --card-label: #775028;
  background: var(--card-cream);
  border-color: var(--card-rim);
  color: var(--navy);
}
.play-screen .brandline { background: var(--card-cream); border-bottom: 2px solid var(--card-rim); }
.play-screen .shift-strip { background: var(--card-face); border: 0; }
.play-screen .moves-badge:not(.low) { border-radius: 13px; background: var(--card-cream); color: var(--navy); box-shadow: inset 0 0 0 1px var(--card-divider); }
.play-screen .moves-badge.low { background: var(--card-highlight); color: #553917; box-shadow: inset 0 0 0 2px var(--card-label); }
.play-screen .moves-badge.low strong { color: #553917; }
.play-screen .hand-strip { background: var(--card-cream); border-color: var(--card-divider); }
.play-screen .hand-stat + .hand-stat, .play-screen .personal-record { border-color: var(--card-divider); }
.play-screen .round-heading, .play-screen .title-challenge { color: var(--navy); border-color: var(--card-divider); }
.play-screen .title-challenge, .play-screen .top-score span, .play-screen .personal-record span { color: var(--card-label); }
.play-screen .top-score strong, .play-screen .personal-record b, .play-screen .hand-stat strong { color: var(--navy); }
.play-screen .hand-stat small { color: #4f5f60; }
.play-screen .favorite-card { background: #fff6de; border: 2px solid #e9b864; border-radius: 14px; }
.play-screen .board-shell { border-color: #e7b052; box-shadow: 0 0 0 2px #f9d998,0 4px 0 #96662c; }
.play-screen .guidance span { background: #fff4d9; border-color: #d6a35a; }
.play-screen .dock { border-top: 2px solid var(--card-rim); gap: 5px; padding-inline: 7px; }
.play-screen .dock-btn { border: 1px solid var(--card-divider); border-radius: 14px; background: var(--card-face); color: var(--navy); }
.play-screen .tool-name { color: var(--navy); }
.play-screen .dock-btn[aria-pressed=true] { background: var(--card-highlight); border-color: var(--card-label); }
.play-screen .orb { background: var(--card-cream); border-color: var(--card-rim); }
.play-screen .tool-count { background: var(--card-highlight); color: #553917; border-color: var(--card-rim); }
.play-screen .dock-btn.spent { background: var(--card-cream); }
.play-screen .dock-btn.spent .tool-name { color: #4f5f60; }
.play-screen .dock-btn.spent .orb { background: var(--card-face); opacity: 1; filter: none; }
.play-screen .dock-btn.spent .tool-count { background: var(--card-divider); color: #4f5f60; }

.terms-body { padding: 0 12px 12px; }
.terms-body section { padding: 12px 14px; background: #fffdf6; border-inline: 1px solid #e7ca98; }
.terms-body section:first-child { border-radius: 16px 16px 0 0; border-top: 1px solid #e7ca98; }
.terms-body section + section { border-top: 1px solid #efdfc3; }
.terms-body section:last-of-type { border-bottom: 1px solid #e7ca98; border-radius: 0 0 16px 16px; }
.terms-body h3 { font-size: 16px; margin: 0; }
.terms-body p { margin: 4px 0 0; line-height: 1.55; }


.leader-popup, #helpDialog .popup-inner {
  --illustrated-frame-art: url("assets/leaderboard-ui-v8-no-mascot.png");
  /* Inline the shared shape so file previews never need a separate SVG mask request. */
  --illustrated-frame-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1004 1566' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M17 315 C17 231 65 152 159 152 H814 Q836 152 851 157 C884 138 918 153 933 186 C964 217 984 259 984 315 V1392 C984 1484 937 1548 850 1548 H154 C67 1548 17 1484 17 1392 Z'/%3E%3C/svg%3E");
}
.leader-popup::before,
.leader-popup::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--illustrated-frame-art) center / 100% 100% no-repeat;
  mask: var(--illustrated-frame-mask) center / 100% 100% no-repeat;
}
.leader-popup::before {
  z-index: -2;
}
.leader-popup::after {
  z-index: 0;
  clip-path: inset(11.25% 0 0);
}
.leader-custom-mascot {
  position:absolute;
  z-index:-1;
  top:-4.55%;
  left:50%;
  width:50%;
  height:auto;
  transform:translateX(-50%);
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none;
}
.leader-close,.leader-stats,.leader-table-wrap,.leader-note,.leader-footer { z-index:2; }

/* Warm controls use the homepage challenge button's orange face and gold highlight. */
:root {
  --action-orange: #fc8102;
  --action-gold: #ffc45a;
  --action-ink: #512300;
  --action-rim: #ffd46f;
  --action-face: linear-gradient(#ffb139, #ff9708 30%, var(--action-orange) 72%, #f97500);
  --action-banner: linear-gradient(#ffac2e, #fc8102 52%, #e96100);
  --action-inset: inset 0 1px #fff0a6, inset 0 -2px #bd460933;
}
/* Place live labels on the illustrated homepage controls. */
.home-art-action {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
}
.home-art-action:focus-visible {
  outline: 2px solid #623007;
  outline-offset: -4px;
}
.home-start {
  left: 11%;
  top: 71.65%;
  width: 78%;
  height: 14.7%;
  border-radius: 999px;
}
.home-start-title,
.home-start-cost,
.home-nav-label {
  position: absolute;
  line-height: 1;
  white-space: nowrap;
}
.home-start-title {
  inset: 20% 0 auto;
  color: #fff9e8;
  font-size: 9.75cqw;
  letter-spacing: .02em;
  -webkit-text-stroke: .84cqw #5b2506;
  paint-order: stroke fill;
  text-shadow: 0 .76cqw #7a2a05;
}
.home-start-cost {
  top: 65%;
  left: 44.9%;
  color: #fff5dd;
  font-size: 4.2cqw;
  text-shadow: 0 .28cqw #a8460b;
}
.home-nav-label {
  inset: 81% 0 auto;
  transform: translateY(-50%);
  color: #11354d;
  font-size: 4.275cqw;
  text-align: center;
}
.home-nav .home-art-action {
  top: 88.55%;
  width: 30.2%;
  height: 10.65%;
  border-radius: 4.65cqw;
}
.home-rewards { left: 3.7%; }
.home-leaderboard { left: 34.9%; }
.home-rules { left: 66.1%; }
.ui-color-filters { position: absolute; pointer-events: none; }
.ui-art-color,
.ui-art-color > span {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.ui-art-color > .home-brand-art {
  --brand-shift: 3.45cqw;
  background-image: url("assets/home-ui-editable-bg.png");
  background-position: var(--brand-shift) 0;
  mask-image:
    linear-gradient(90deg, #000 27%, transparent 31%),
    linear-gradient(transparent, #000 2.12%, #000 5.13%, transparent 6.08%);
  mask-composite: intersect;
}
.home-brand-art::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--brand-shift);
  /* Extend the cream artwork into the space left by moving the logo. */
  border-image: url("assets/home-ui-editable-bg.png") 0 980 0 0 fill / 0;
}
.ui-art-color > .home-points-art {
  background-image: url("assets/home-ui-editable-bg.png");
  background-position: 1cqw 0;
  /* Move the coin and the left cap while keeping the right end of the pill aligned. */
  mask-image:
    linear-gradient(90deg, transparent 72%, #000 73.4%, #000 81.3%, transparent 84%),
    linear-gradient(transparent 1.1%, #000 1.6%, #000 5.95%, transparent 6.3%);
  mask-composite: intersect;
}
.ui-art-color > .home-marquee-art {
  --home-layer-image: url("assets/home-marquee-orange.png");
  background-image: var(--home-layer-image);
  background-size: 102.4% 100%;
  /* Blend between the counters and marquee, and between the ribbon and board. */
  mask-image: linear-gradient(transparent 5.8%, #000 6.15%, #000 21.4%, transparent 21.9%);
}
.ui-art-color > .home-footer-art,
.ui-art-color > .home-free-tone,
.ui-art-color > .home-nav-art {
  /* Align the illustrated controls with the homepage midpoint. */
  background-size: 104.2% 100%;
}
.home-footer-art {
  --home-layer-image: url("assets/home-footer-continuous-v2.png");
  background-image: var(--home-layer-image);
  /* Join above the free-play badge to keep the whole controls area continuous. */
  mask-image: linear-gradient(transparent 64.9%, #000 65.65%);
}
/* The cost is live text. Sample the neighboring orange face over the baked-in coin. */
.home-art .home-footer-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  background-position-x: -8cqw;
  mask-image:
    linear-gradient(90deg, transparent 35.5%, #000 36.8% 41.2%, transparent 42.4%),
    linear-gradient(transparent 80.4%, #000 81.5% 84.3%, transparent 85.3%);
  mask-composite: intersect;
}
.home-free-tone {
  background-image: url("assets/home-footer-continuous-v2.png");
  mask-image: linear-gradient(transparent 65.4%, #000 66.1%, #000 71.4%, transparent 72%);
  filter: url(#ui-green-to-orange);
}
.home-screen.is-no-free .home-footer-art {
  --home-layer-image: url("assets/home-footer-not-started-v1.png");
  background-image: var(--home-layer-image);
}
.home-screen.is-no-free .home-free-tone { display: none; }
.ui-art-color > .home-nav-art {
  inset: auto 0 0;
  height: 13.78%;
  --home-layer-image: url("assets/home-nav-raised-icons.png");
  background-image: var(--home-layer-image);
  /* Blend into the open floor above the raised icons. */
  mask-image: linear-gradient(transparent, #000 16%);
}
/* Sample the visible rightmost column of each enlarged artwork layer. */
.ui-art-color.home-right-edge > span {
  background-image: none;
  border-image-source: var(--home-layer-image);
  border-image-width: 0;
}
.home-right-edge > .home-marquee-art { border-image-slice: 0 23 0 960 fill; }
.home-right-edge > .home-footer-art { border-image-slice: 0 39 0 944 fill; }
.home-right-edge > .home-nav-art { border-image-slice: 0 62 0 1473 fill; }
.result-footer .shell-button,
.leader-footer .shell-primary,
.guide-nav .shell-button,
#quitDialog .shell-button,
.wake-skip,
.preview-wake {
  color: var(--action-ink);
  background: var(--action-face);
  border: 1px solid var(--action-rim);
  box-shadow: var(--action-inset);
}
.leader-footer {
  top: 83.7%;
  left: 25.2%;
  width: 49.7%;
  height: 6.95%;
}
.leader-footer .shell-primary {
  opacity: 1;
  font-size: 4.65cqw;
}
.shell-button.gold-pill {
  color: #fff;
  border-radius: 999px;
  border-width: 2px;
  text-shadow: 0 1px #8a320a, 0 -1px #963b0c;
  box-shadow: var(--action-inset), 0 2px 0 #bb510d;
}
.leader-footer .shell-primary:focus-visible { opacity: 1; }
.leader-footer .shell-primary:active { transform: none; }
.home-terms .shell-link, #quitGame { color: #8e400b; }

.result-footer .shell-button { color: #fff; }
.result-footer .shell-outline,
#quitDialog .shell-outline {
  background: linear-gradient(var(--action-gold), #ff9b22);
}
.result-footer .shell-button:active,
.guide-nav .shell-button:active {
  background: linear-gradient(#f77600,#ffad30);
  box-shadow: inset 0 2px 4px #a23d1550;
}
.guide-trophy,
.leader-column-row th {
  background: var(--action-banner);
  border-color: var(--action-rim);
  color: var(--action-ink);
}
.guide-trophy strong,
.leader-column-row th {
  color: #fff9e6;
  text-shadow: 0 1px 1px #662600, 0 2px #9c3700;
}
.play-screen .dock-btn:focus-visible {
  outline: 2px solid var(--action-ink);
  outline-offset: 2px;
}
.wake-skip:focus-visible {
  outline: 2px solid var(--action-ink);
  outline-offset: -3px;
}

/* Illustrated frame for campaign terms. */
#campaignDialog.gold-dialog {
  box-sizing: border-box;
  width: min(calc(100% - 18px), 414px);
  max-height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
  padding: 0;
  border: 6px solid transparent;
  border-radius: 30px;
  background:
    linear-gradient(#fff8e8, #ffeed4) padding-box,
    linear-gradient(#fff6ad 1%, #ffd34f 17%, #ffa71d 68%, #e4690a) border-box;
  box-shadow: inset 0 0 0 1px #fff9d9, inset 0 0 0 3px #f9d388,
    0 4px 0 #9d4709, 0 16px 40px #43210c66;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.gold-dialog::backdrop { background: #091d35a3; backdrop-filter: blur(5px); }
.gold-dialog-heading {
  position: relative;
  container-type: inline-size;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 3px;
  min-height: 55px;
  margin: 10px 12px 12px;
  padding: 3px 5px;
  border: 2px solid var(--action-rim);
  border-radius: 19px;
  background: linear-gradient(#ffad38, #fa8104 40%, #e76102);
  box-shadow: inset 0 1px #ffe8a3, inset 0 -2px #c8511159, 0 2px 0 #b9530d;
  text-align: center;
}
.gold-dialog .gold-dialog-heading h2 {
  grid-column: 2;
  margin: 0;
  color: #fff3d1;
  font-size: 35px;
  line-height: 1.08;
  letter-spacing: .035em;
  white-space: nowrap;
  text-shadow: 0 2px #a73f0b;
}
.gold-dialog .gold-dialog-heading #campaignTitle {
  /* The two side columns and gaps leave the center column for seven full-width glyphs. */
  font-size: min(35px, calc((100cqw - 90px) / 7.4));
}
.gold-dialog-close {
  grid-column: 3;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  border: 2px solid #ffdf7d;
  border-radius: 50%;
  background: linear-gradient(#ffb941, #fb7900 66%, #e56209);
  box-shadow: inset 0 1px #fff0b3, 0 2px 0 #a64b13;
  color: #fff3d2;
  font: 900 27px/1 var(--font);
  text-shadow: 0 1px #a4440a;
}
.gold-dialog-close:focus-visible {
  outline: 2px solid #71330d;
  outline-offset: 2px;
}

/* Keep the existing reward artwork as the frame. Its small copy is real text. */
.reward-title {
  position: absolute;
  inset: 25.65% 15% auto;
  height: 11.3%;
  display: grid;
  place-items: center;
  margin: 0;
  color: #fff3d1;
  font-size: 35px;
  letter-spacing: .09em;
  line-height: 1;
  text-shadow: 0 .9cqw #a73f0b;
}
.reward-tiers {
  position: absolute;
  inset: 39.75% 8% 17.3%;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 1.45cqw;
  padding: 0;
  margin: 0;
  list-style: none;
}
.reward-tiers li {
  display: grid;
  grid-template-columns: 1.05fr 2.1fr 1.65fr;
  align-items: center;
  gap: 1.1cqw;
  padding-inline: 2cqw;
  border: 1px solid #f1c47c;
  border-radius: 6cqw;
  background: linear-gradient(#fff3d9, #ffdda1);
  box-shadow: inset 0 1px #fff9ea, 0 2px 0 #b87830a8;
  color: #71330d;
  font-size: clamp(10px, 5.35cqw, 14px);
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}
.reward-tier-icon {
  justify-self: center;
  width: 15.5cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: url("assets/reward-popup-clean-footer.png") -11.45cqw -63.3cqw / 100cqw auto no-repeat;
  box-shadow: 0 1px 2px #95561866;
}
.reward-tier-points {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 8.8cqw;
  padding-inline: 1cqw;
  border: 1px solid #ffbd67;
  border-radius: 999px;
  background: var(--action-face);
  color: #fff;
  text-shadow: 0 1px #8a320a;
}
.reward-copy {
  position: absolute;
  inset: 84% 8.5% auto;
  min-height: 8.25%;
  display: grid;
  align-content: center;
  margin: 0;
  padding: 0 1px;
  color: #71330d;
  text-align: center;
  font-size: clamp(9px, 4.33cqw, 12px);
  line-height: 1.25;
  font-weight: 750;
  white-space: nowrap;
}

.guide-still {
  position: relative;
  flex: 1 1 auto;
  align-self: center;
  width: auto;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 492 / 494;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 10px;
}
.guide-still-pair { aspect-ratio: 830 / 433; max-width: 100%; }
.guide-page .guide-still img {
  position: absolute;
  inset: -53.85% 0 auto;
  width: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
}
.guide-page .guide-still-pair img { top: -55.56%; }
/* Board bounds in the 492 × 950 reduced-motion capture. */
.guide-still-tools { aspect-ratio: 466 / 482; }
.guide-page .guide-still-tools img {
  inset: calc(-100% * 272 / 482) auto auto calc(-100% * 13 / 466);
  width: calc(100% * 492 / 466);
}
#helpDialog .guide-tools-demo { max-height: none; margin-inline: auto; }
#helpDialog .tools-guide-rules { margin: 6px 0 0; font-size: 12px; line-height: 1.35; }
.guide-demo-board {
  position: relative;
  /* Allow for the illustrated frame, captions and fixed navigation on short phones. */
  --guide-controls-height: 224px;
  width: min(100%, 40dvh, max(145px, calc(var(--guide-viewport-height) - 51.59cqw - var(--guide-controls-height))));
  margin-inline: auto;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--board-matte);
}
.guide-demo-board .board {
  pointer-events: none;
  touch-action: auto;
  border-radius: inherit;
}
.guide-tile-focus {
  position: absolute;
  inset: 1px;
  z-index: 6;
  display: grid;
  place-items: center;
  border: 2px solid #ffdc81;
  border-radius: 6px;
  box-shadow: 0 0 0 100vmax #102c4266;
  color: #fff;
  font: 900 25px/1 var(--font);
  text-shadow: 0 1px 2px #102c42, 0 -1px 2px #102c42;
}
.guide-touch {
  position: absolute;
  z-index: 7;
  width: 7%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 2px solid white;
  border-radius: 50%;
  background: #f88505cb;
  box-shadow: 0 0 0 4px #ffe09b9c;
}
.guide-tools-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 7px;
  font-size: 13px;
  font-weight: 850;
}
.guide-tools-bar button {
  min-height: 32px;
  padding: 3px 10px;
  border: 1px solid var(--action-rim);
  border-radius: 999px;
  background: #fff1d1;
  color: var(--action-ink);
}
.guide-tools-bar button[aria-pressed="true"] {
  background: var(--action-face);
  box-shadow: var(--action-inset);
}
.guide-tools-bar b, .guide-moves { font-variant-numeric: tabular-nums; }
.guide-tools-bar button b {
  display: inline-grid;
  place-items: center;
  min-width: 1.35em;
  border-radius: 50%;
  background: #fff7e5;
}
.guide-moves { white-space: nowrap; }
#toolsGuide .guide-tool-caption {
  display: grid;
  place-items: center;
  min-height: 2.8em;
  margin: 3px 0 5px;
  color: #71330d;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

@media (max-width: 350px) {
  .guide-demo-board { --guide-controls-height: 248px; }
  .play-screen .dock-btn { gap: 4px; }
  .play-screen .tool-name { font-size: 13px; white-space: nowrap; }
}

/* SDK boot, entry and submission states share the visual language of the home artwork. */
.sdk-loading-screen,
.sdk-progress-screen {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: max(18px, var(--safe-top)) 22px max(18px, env(safe-area-inset-bottom));
  color: #fff7df;
  text-align: center;
  background:
    radial-gradient(circle at 50% 36%, #ffd889 0 13%, transparent 42%),
    linear-gradient(168deg, #ffca74 0%, #f7943e 42%, #e56524 72%, #bd431b 100%);
}
.sdk-loading-screen {
  --loading-progress: 12%;
  grid-template-rows: auto minmax(210px, 1fr) auto;
  gap: 6px;
}
.sdk-loading-screen::before,
.sdk-loading-screen::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.sdk-loading-screen::before {
  inset: 0;
  opacity: .23;
  background: url("assets/buffet-room.svg") center / cover no-repeat;
  mix-blend-mode: soft-light;
}
.sdk-loading-screen::after {
  inset: auto -20% -12% -20%;
  height: 31%;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, #8d3019, #5d241d);
  box-shadow: inset 0 8px 0 #f7bf63, inset 0 12px 0 #9b3b1c;
}
.sdk-loading-ambience { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sdk-loading-ambience i {
  position: absolute;
  width: 13px;
  aspect-ratio: 1;
  rotate: 45deg;
  border-radius: 3px;
  background: #fff2ae;
  box-shadow: 0 0 0 5px #fff1a31f, 0 0 22px #fff2b0;
  animation: sdk-sparkle 2.8s ease-in-out infinite;
}
.sdk-loading-ambience i:nth-child(1) { left: 12%; top: 26%; }
.sdk-loading-ambience i:nth-child(2) { right: 12%; top: 18%; scale: .65; animation-delay: -.8s; }
.sdk-loading-ambience i:nth-child(3) { right: 9%; top: 50%; scale: .45; animation-delay: -1.7s; }
.sdk-loading-header {
  z-index: 5;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  align-self: start;
}
.sdk-loading-brand {
  width: min(37%, 144px);
  height: auto;
  filter: drop-shadow(0 3px 2px #7e2d1766);
}
.sdk-loading-game-label {
  padding: 5px 9px 4px;
  border: 1px solid #ffe2a6a8;
  border-radius: 999px;
  color: #fff5d9;
  background: #a83d1d5c;
  box-shadow: inset 0 1px #ffffff38;
  font: 850 11px/1 ui-rounded, "Arial Rounded MT Bold", sans-serif;
  letter-spacing: .12em;
}
.sdk-loading-stage {
  z-index: 2;
  position: relative;
  align-self: stretch;
  width: min(100%, 390px);
  min-height: 210px;
  margin: auto;
}
.sdk-loading-rays {
  position: absolute;
  left: 50%;
  top: 49%;
  width: min(90cqw, 360px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  opacity: .68;
  background: repeating-conic-gradient(from -8deg, #fff6cf 0 9deg, transparent 9deg 24deg);
  mask-image: radial-gradient(circle, #0000 0 18%, #000 47%, #0000 72%);
  animation: sdk-rays 18s linear infinite;
}
.sdk-loading-mascot {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: -1%;
  width: min(76%, 300px);
  aspect-ratio: 1;
  translate: -50% 0;
  transform-origin: 50% 92%;
  animation: sdk-mascot 2.6s ease-in-out infinite;
}
.sdk-loading-mascot img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 14px #7b35194d); }
.sdk-loading-shadow {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 2%;
  width: 49%;
  height: 8%;
  translate: -50%;
  border-radius: 50%;
  background: #6d281d70;
  filter: blur(4px);
  animation: sdk-shadow 2.6s ease-in-out infinite;
}
.sdk-loading-token {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: clamp(48px, 16cqw, 66px);
  aspect-ratio: 1;
  border: 3px solid #fff3c9;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff4d2, #ffc76e);
  box-shadow: 0 7px 0 #a4421c, 0 12px 22px #7b2c2066, inset 0 2px #fff;
  animation: sdk-token 2.3s ease-in-out infinite;
}
.sdk-loading-token img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 3px 2px #6b281b45); }
.token-chicken { left: 3%; top: 30%; rotate: -12deg; }
.token-gold { right: 2%; top: 22%; rotate: 11deg; animation-delay: -.7s; }
.token-dumpling { right: 8%; bottom: 9%; rotate: 7deg; animation-delay: -1.4s; }
.sdk-loading-board {
  position: absolute;
  z-index: 3;
  left: 5%;
  bottom: 5%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 78px;
  padding: 5px;
  rotate: -10deg;
  border: 3px solid #183b4e;
  border-radius: 13px;
  background: #315465;
  box-shadow: 0 8px 0 #762b1c, 0 13px 18px #6b271b55;
}
.sdk-loading-board i { aspect-ratio: 1; border-radius: 5px; background: #ffc665; box-shadow: inset 0 0 0 2px #fff4d37a; }
.sdk-loading-board i:nth-child(3n+2), .sdk-loading-board i:nth-child(7) { background: #f48046; }
.sdk-loading-board i:nth-child(4), .sdk-loading-board i:nth-child(8) { background: #ffe5a2; }
.sdk-loading-copy {
  z-index: 5;
  align-self: end;
  display: grid;
  width: min(100%, 370px);
  justify-items: center;
  gap: 8px;
  padding: 15px 16px 13px;
  border: 1px solid #ffe3b074;
  border-radius: 22px;
  background: linear-gradient(180deg, #7c2a1bc9, #54221be6);
  box-shadow: 0 12px 30px #5c221b6b, inset 0 1px #ffffff38;
  backdrop-filter: blur(7px);
}
.sdk-loading-kicker { color: #ffd68b; font-size: 12px !important; letter-spacing: .08em; }
.sdk-loading-copy h1 {
  margin: 0;
  font-family: "GenSen Rounded Display", "PingFang TC", sans-serif;
  font-size: clamp(25px, 7.2vw, 33px);
  line-height: 1.15;
  color: #fff6df;
  text-shadow: 0 3px 0 #9a3c13, 0 5px 12px #2d130d88;
}
.sdk-loading-copy p { margin: 0; font-weight: 800; }
#sdkLoadingMessage { min-height: 1.5em; color: #fff7df; font-size: 15px; line-height: 1.5; }
.sdk-loading-copy .shell-button { width: min(100%, 280px); color: var(--navy); }
.sdk-loading-progress {
  width: 100%;
  height: 12px;
  padding: 2px;
  overflow: hidden;
  border: 1px solid #ffd88c6b;
  border-radius: 999px;
  background: #321713aa;
  box-shadow: inset 0 2px 3px #1c0c0a80;
}
.sdk-loading-progress span {
  display: block;
  width: var(--loading-progress);
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, #f18a2b, #ffd361 72%, #fff0a7);
  box-shadow: 0 0 12px #ffcf65c7;
  transition: width .45s ease;
}
.sdk-loading-progress i { display: block; width: 38%; height: 100%; background: linear-gradient(90deg, transparent, #ffffffa8, transparent); animation: sdk-shimmer 1.2s linear infinite; }
.sdk-loading-tip { color: #f6c98f; font-size: 12px; line-height: 1.4; }
.sdk-loading-tip b { margin-right: 5px; color: #fff7df; }
.sdk-loading-screen[data-failed="true"] .sdk-loading-progress span { background: #f2b663; }

.sdk-progress-screen {
  z-index: 70;
  background: #102c42b8;
  backdrop-filter: blur(7px);
}
.sdk-progress-card {
  width: min(100%, 310px);
  padding: 28px 22px 25px;
  border: 2px solid #f2c472;
  border-radius: 24px;
  background: linear-gradient(160deg, #fffaf0, #f8e8cb);
  box-shadow: 0 24px 64px #07182580, inset 0 1px #fff;
  color: var(--navy);
}
.sdk-progress-card h2 { margin: 13px 0 8px; font-size: 24px; }
.sdk-progress-card p { min-height: 1.5em; margin: 0; color: #745d3e; font-size: 15px; line-height: 1.5; font-weight: 750; }
.sdk-progress-spinner {
  display: block;
  width: 48px;
  height: 48px;
  margin: auto;
  border: 6px solid #f2c98c;
  border-top-color: #ef7f20;
  border-radius: 50%;
  animation: sdk-spin .8s linear infinite;
}
.sdk-error-symbol {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border: 3px solid #f4bd5c;
  border-radius: 50%;
  background: #fff0c9;
  color: #a43c18;
  font: 950 35px/1 "GenSen Rounded Display", sans-serif;
}
.sdk-error-dialog .shell-dialog-inner { padding-top: 25px; }
.sdk-error-dialog #sdkErrorMessage { white-space: pre-line; }
.home-art-action:disabled { cursor: default; filter: grayscale(.72) saturate(.45); opacity: .55; }
.home-terms .shell-link:disabled { cursor: default; opacity: .45; text-decoration: none; }
.home-art-action[aria-busy="true"] { pointer-events: none; }

@keyframes sdk-spin { to { rotate: 360deg; } }
@keyframes sdk-rays { to { rotate: 360deg; } }
@keyframes sdk-mascot { 50% { transform: translateY(-5px) rotate(1deg); } }
@keyframes sdk-shadow { 50% { scale: .88; opacity: .72; } }
@keyframes sdk-token { 50% { translate: 0 -7px; rotate: 3deg; } }
@keyframes sdk-sparkle { 50% { opacity: .2; scale: .45; rotate: 135deg; } }
@keyframes sdk-shimmer { from { translate: -110% 0; } to { translate: 330% 0; } }
@media (prefers-reduced-motion: reduce) {
  .sdk-loading-rays, .sdk-loading-mascot, .sdk-loading-shadow, .sdk-loading-token,
  .sdk-loading-ambience i, .sdk-loading-progress i, .sdk-progress-spinner { animation: none; }
}
@media (max-height: 650px) {
  .sdk-loading-screen { grid-template-rows: auto minmax(160px, 1fr) auto; }
  .sdk-loading-stage { min-height: 160px; }
  .sdk-loading-mascot { width: min(59%, 230px); }
  .sdk-loading-token { width: 48px; border-radius: 14px; }
  .sdk-loading-copy { gap: 5px; padding-block: 11px; }
  .sdk-loading-copy h1 { font-size: 24px; }
  .sdk-loading-tip, .sdk-loading-kicker { display: none; }
}
@media (max-height: 540px) {
  .sdk-loading-stage { display: none; }
  .sdk-loading-screen { grid-template-rows: auto 1fr; }
  .sdk-loading-copy { align-self: center; }
}

/* Homepage-backed loading poster, composed like a compact mobile game splash. */
.sdk-loading-screen {
  display: block;
  padding: 0;
  color: #fff8e7;
  background: #f8b65f;
}
.sdk-loading-screen::before,
.sdk-loading-screen::after,
.sdk-loading-ambience,
.sdk-loading-header,
.sdk-loading-stage { display: none; }
.sdk-loading-homepage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 84%, #ffc77c 0%, transparent 58%),
    linear-gradient(180deg, #ffd09a 0%, #f7b678 100%);
}
.sdk-loading-banner {
  position: absolute;
  z-index: 3;
  top: max(1.8%, var(--safe-top));
  left: 2.5%;
  width: 95%;
  pointer-events: none;
  filter: drop-shadow(0 5px 7px #8f3d1a59);
}
.sdk-loading-banner img {
  display: block;
  width: 100%;
  height: auto;
}
.sdk-loading-homepage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 35%, transparent 55%, #d95d1617 100%);
  pointer-events: none;
}
.sdk-loading-homepage > img {
  display: block;
  width: 100%;
  height: auto;
}
.sdk-loading-energy-skeleton,
.sdk-loading-balance-skeleton {
  position: absolute;
  z-index: 1;
  top: 3.15%;
  height: 2.3%;
  min-height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #fff2c153;
}
.sdk-loading-energy-skeleton { left: 61%; width: 7%; }
.sdk-loading-balance-skeleton { left: 82%; width: 10%; }
.sdk-loading-energy-skeleton::after,
.sdk-loading-balance-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #fff8dccc, transparent);
  animation: sdk-skeleton 1.35s ease-in-out infinite;
}
.sdk-loading-title-lockup {
  position: absolute;
  z-index: 3;
  left: 8%;
  right: 8%;
  top: 9.4%;
  display: grid;
  justify-items: center;
  text-align: center;
  pointer-events: none;
}
.sdk-loading-title-lockup > span {
  margin-bottom: .2em;
  color: #ffd574;
  font: 900 clamp(9px, 2.5cqw, 12px)/1 ui-rounded, "Arial Rounded MT Bold", sans-serif;
  letter-spacing: .18em;
  text-shadow: 0 2px 2px #3e160b;
}
.sdk-loading-title-lockup h1 {
  margin: 0;
  color: #fff7df;
  font-family: "GenSen Rounded Display", "PingFang TC", sans-serif;
  font-size: clamp(25px, 7.1cqw, 34px);
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -.035em;
  -webkit-text-stroke: clamp(2px, .65cqw, 3.4px) #572407;
  paint-order: stroke fill;
  text-shadow: 0 .12em 0 #9b4512, 0 .22em .32em #44150766;
}
.sdk-loading-title-lockup p {
  margin: .72em 0 0;
  padding: .35em 1em .3em;
  border-radius: 999px;
  color: #fff7e8;
  background: #0c446dcc;
  box-shadow: 0 2px 0 #f2a534, inset 0 1px #ffffff40;
  font-size: clamp(11px, 3.1cqw, 15px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: .04em;
}
.sdk-loading-screen .sdk-loading-copy {
  position: absolute;
  z-index: 4;
  inset: 73% 22% auto;
  transform: translateY(-50%);
  display: grid;
  width: auto;
  justify-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.sdk-loading-label {
  color: #fff8e7;
  font: 900 clamp(11px, 3cqw, 13px)/1 ui-rounded, "Arial Rounded MT Bold", sans-serif;
  letter-spacing: .16em;
  text-shadow: 0 2px 0 #5b2514, 0 3px 8px #35130bd9;
}
.sdk-loading-screen:not([data-failed="true"]) #sdkLoadingMessage {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.sdk-loading-screen[data-failed="true"] .sdk-loading-label { display: none; }
.sdk-loading-screen #sdkLoadingMessage {
  min-height: 1.3em;
  color: #fff8e9;
  font: 900 clamp(13px, 3.6cqw, 16px)/1.3 ui-rounded, "Arial Rounded MT Bold", "PingFang TC", sans-serif;
  letter-spacing: .04em;
  text-shadow: 0 2px 0 #5b2514, 0 3px 8px #33120bd9;
}
.sdk-loading-screen .sdk-loading-progress {
  width: 100%;
  height: clamp(15px, 4cqw, 18px);
  padding: 3px;
  border: 3px solid #201a1b;
  border-radius: 999px;
  background: #fffdf6;
  box-shadow: 0 3px 0 #fff1c782, 0 6px 13px #35130947, inset 0 1px 3px #8c5a2f38;
}
.sdk-loading-screen .sdk-loading-progress span {
  background: linear-gradient(180deg, #ffe67d, #f9a928 68%, #e87715);
  box-shadow: inset 0 1px #fffbd4, 0 0 8px #ffd75c94;
}
.sdk-loading-screen .sdk-loading-tip {
  color: #fff6e3;
  font-size: clamp(12px, 3.15cqw, 14px);
  font-weight: 800;
  line-height: 1.35;
  text-shadow: 0 2px 0 #642714, 0 2px 7px #35130bd1;
}
.sdk-loading-screen .sdk-loading-copy .shell-button {
  width: min(100%, 260px);
  min-height: 46px;
  margin-top: 2px;
  box-shadow: 0 4px 0 #8c3b15, 0 8px 20px #3e150c66, inset 0 1px #fff5ba;
}
@keyframes sdk-skeleton { from { translate: -130% 0; } to { translate: 130% 0; } }
@media (prefers-reduced-motion: reduce) {
  .sdk-loading-energy-skeleton::after,
  .sdk-loading-balance-skeleton::after { animation: none; }
}
@media (max-height: 650px) {
  .sdk-loading-title-lockup { top: 8.4%; }
  .sdk-loading-title-lockup p { margin-top: .48em; }
  .sdk-loading-screen .sdk-loading-copy { top: 75%; gap: 5px; }
}
@media (max-height: 540px) {
  .sdk-loading-title-lockup { top: 7%; }
  .sdk-loading-title-lockup p { display: none; }
  .sdk-loading-screen .sdk-loading-copy { inset-inline: 22%; }
}

/* Landing splash: reuse the homepage marquee, board and Storellet mascot. */
.sdk-loading-screen {
  background: linear-gradient(180deg, #ffd4a7 0%, #f8b777 72%, #ef9453 100%);
}
.sdk-loading-homepage {
  background:
    radial-gradient(ellipse at 50% 37%, #fff4ce 0 18%, transparent 51%),
    linear-gradient(180deg, #ffd4a7 0%, #f8b777 72%, #ef9453 100%);
}
.sdk-loading-homepage::after {
  background:
    radial-gradient(ellipse at 50% 49%, transparent 48%, #b64a1724 100%),
    linear-gradient(180deg, transparent 62%, #7b2b1024 100%);
}
.sdk-loading-homepage > img {
  width: 100%;
  height: auto;
  object-fit: initial;
}
.sdk-loading-banner {
  top: max(1.8%, var(--safe-top));
  left: 2.5%;
  width: 95%;
  height: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 5px 7px #8f3d1a59);
}
.sdk-loading-banner img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  transform: none;
  filter: none;
}
.sdk-loading-title-lockup { display: none; }
.sdk-loading-title-lockup > span {
  margin-bottom: .35em;
  color: #ffeaa6;
  font-size: clamp(9px, 2.45cqw, 11px);
  letter-spacing: .16em;
}
.sdk-loading-title-lockup h1 {
  color: #fff9e7;
  font-size: clamp(24px, 6.7cqw, 32px);
  -webkit-text-stroke: clamp(1.5px, .48cqw, 2.4px) #642504;
  text-shadow: 0 .12em 0 #9b4512, 0 .22em .3em #44150766;
}
.sdk-loading-title-lockup p {
  margin-top: .65em;
  color: #fff5d8;
  background: #102c42e6;
  box-shadow: 0 2px 0 #f2a534, inset 0 1px #ffffff40;
}
.sdk-loading-screen .sdk-loading-copy {
  inset: 67% 8% auto;
  transform: none;
  gap: 7px;
  padding: 17px 18px 15px;
  border: 3px solid #f5a627;
  border-radius: 26px;
  background: linear-gradient(165deg, #fffdf5 0%, #fff2d5 58%, #ffe1ae 100%);
  box-shadow:
    inset 0 0 0 3px #fff1b4,
    0 6px 0 #b94e0c,
    0 18px 32px #7a2d1652;
}
.sdk-loading-label {
  color: #102c42;
  font-family: "GenSen Rounded Display", "PingFang TC", sans-serif;
  font-size: clamp(16px, 4.4cqw, 20px);
  letter-spacing: .04em;
  text-shadow: 0 2px #fff;
}
.sdk-loading-screen:not([data-failed="true"]) #sdkLoadingMessage {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  white-space: normal;
}
.sdk-loading-screen #sdkLoadingMessage {
  min-height: 1.3em;
  color: #78502e;
  font-size: clamp(13px, 3.45cqw, 15px);
  letter-spacing: 0;
  text-shadow: none;
}
.sdk-loading-screen .sdk-loading-progress {
  height: clamp(17px, 4.5cqw, 20px);
  border-color: #7b310c;
  background: #fffdf6;
  box-shadow: 0 3px 0 #d47016, inset 0 1px 3px #8c5a2f38;
}
.sdk-loading-screen .sdk-loading-tip {
  color: #8c4b1c;
  font-size: clamp(12px, 3.1cqw, 14px);
  text-shadow: none;
}
@media (max-height: 720px) {
  .sdk-loading-banner { height: auto; }
  .sdk-loading-title-lockup { top: calc(max(1.4%, var(--safe-top)) + 2.7%); }
  .sdk-loading-title-lockup p { margin-top: .4em; }
  .sdk-loading-screen .sdk-loading-copy { top: 58%; gap: 4px; padding: 11px 15px 10px; }
}
@media (max-height: 650px) {
  .sdk-loading-banner { height: auto; }
  .sdk-loading-title-lockup { top: calc(max(1.4%, var(--safe-top)) + 2.7%); }
  .sdk-loading-title-lockup p { display: block; margin-top: .4em; }
  .sdk-loading-screen .sdk-loading-copy { top: 56%; gap: 4px; padding: 10px 15px 9px; }
  .sdk-loading-tip { display: block; }
}
@media (max-height: 540px) {
  .sdk-loading-banner { height: auto; }
  .sdk-loading-title-lockup { top: calc(max(1.4%, var(--safe-top)) + 2%); }
  .sdk-loading-title-lockup p { display: none; }
  .sdk-loading-screen .sdk-loading-copy { inset: 53% 10% auto; }
}

/* Exact user-supplied loading artwork. All overrides stay inside the loading screen. */
.reference-loading {
  background: #f6a07b;
}
.reference-loading .sdk-loading-banner { display: none; }
.reference-loading .sdk-loading-homepage {
  inset: 0;
  background: #f6a07b;
}
.reference-loading .sdk-loading-homepage::after { display: none; }
.reference-loading .sdk-loading-homepage > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.reference-loading .sdk-loading-copy {
  inset: 82.05% 21.1% auto;
  transform: none;
  display: block;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.reference-loading .sdk-loading-label,
.reference-loading .sdk-loading-tip { display: none; }
.reference-loading:not([data-failed="true"]) #sdkLoadingMessage {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.reference-loading .sdk-loading-progress {
  width: 100%;
  height: clamp(23px, 3.15dvh, 29px);
  padding: 3px;
  border: 3px solid #7e3509;
  border-radius: 999px;
  background: #082f62;
  box-shadow:
    0 0 0 2px #ffbd1e,
    0 3px 0 #b6490b,
    0 0 15px #ffbb2d8c,
    inset 0 2px 4px #001d43;
}
.reference-loading .sdk-loading-progress span {
  background: linear-gradient(180deg, #fff77b 0%, #ffc917 45%, #ff7500 100%);
  box-shadow: inset 0 1px #fffbd0, 0 0 8px #ffb300;
}
.reference-loading[data-failed="true"] .sdk-loading-copy {
  inset: auto 8% max(5%, env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 14px 16px;
  border: 3px solid #f5a627;
  border-radius: 22px;
  background: linear-gradient(#fffdf5, #ffe7bd);
  box-shadow: 0 5px 0 #b94e0c, 0 14px 28px #7a2d1652;
}
.reference-loading[data-failed="true"] #sdkLoadingMessage {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  color: #71320d;
  text-shadow: none;
  white-space: normal;
}
.reference-loading[data-failed="true"] .sdk-loading-progress { width: min(100%, 260px); }
.reference-loading[data-failed="true"] .sdk-loading-copy .shell-button { margin-top: 2px; }
@media (max-height: 720px) {
  .reference-loading .sdk-loading-copy { inset: 82.05% 21.1% auto; }
}
@media (max-height: 540px) {
  .reference-loading .sdk-loading-copy { inset: 82.05% 21.1% auto; }
}

/* Live homepage states and the in-game exit affordance. */
.home-start.is-free .home-start-title {
  top: 50%;
  transform: translateY(-50%);
}
.home-start.is-not-started .home-start-title {
  top: 50%;
  transform: translateY(-50%);
}
.home-start:not(.is-free):not(.is-status) .home-start-cost {
  inset-inline: 8%;
  text-align: center;
}
.home-start.is-status:disabled {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8cqw;
  padding: 0 14%;
  box-sizing: border-box;
  filter: none;
  opacity: 1;
}
.home-start.is-status .home-start-title {
  position: static;
  inset: auto;
  width: 100%;
  color: #fff9e8;
  font-size: 3.39cqw;
  line-height: 1.12;
  white-space: normal;
  text-align: center;
  -webkit-text-stroke: .3cqw #5b2506;
  text-shadow: 0 .27cqw #7a2a05;
}
.home-start.is-status .home-start-cost {
  position: static;
  inset: auto;
  width: 100%;
  color: #fff8e7;
  font-size: 2.11cqw;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
}
.home-start.is-ended .home-start-cost { white-space: nowrap; }
.play-close {
  display: grid;
  place-items: center;
  flex: none;
  margin-inline-start: auto;
  width: 30px;
  height: 30px;
  padding: 0 0 2px;
  border: 2px solid #f1c353;
  border-radius: 50%;
  background: #102c42e8;
  color: #fff6df;
  box-shadow: inset 0 -1px 0 #071b2a;
  font-size: 25px;
  font-weight: 850;
  line-height: 1;
}
.play-close:focus-visible { outline: 2px solid #f1c353; outline-offset: 1px; }

/* Keep the quit decision in the homepage's warm, playful visual language. */
#quitDialog.quit-dialog {
  width: min(calc(100% - 48px), 344px);
  max-height: calc(100dvh - 28px);
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
#quitDialog.quit-dialog::backdrop {
  background: #102c42b8;
  backdrop-filter: blur(6px) saturate(.8);
}
.quit-dialog-card {
  position: relative;
  isolation: isolate;
  padding: 25px 20px 20px;
  border: 3px solid #f7a31a;
  border-radius: 32px;
  overflow: visible;
  color: var(--navy);
  background:
    radial-gradient(circle at 14% 16%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 88% 22%, #fff7d9 0 3px, transparent 4px),
    linear-gradient(165deg, #fffdf5 0%, #fff4da 54%, #ffe6bc 100%);
  box-shadow:
    inset 0 0 0 3px #fff1ba,
    0 6px 0 #bd520d,
    0 20px 45px #071b2a70;
  text-align: center;
}
.quit-dialog-mascot {
  position: absolute;
  z-index: -1;
  top: -122px;
  left: 50%;
  width: 166px;
  height: 166px;
  object-fit: contain;
  transform: translateX(-50%) rotate(-2deg);
  filter: drop-shadow(0 7px 5px #94451240);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.quit-dialog-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  margin: 0 0 6px !important;
  padding: 2px 13px;
  border: 1px solid #f3ad35;
  border-radius: 999px;
  color: #9b470e;
  background: #fff4cc;
  box-shadow: inset 0 1px #fff;
  font-size: 13px !important;
  font-weight: 900;
  line-height: 1.2 !important;
}
#quitDialog .quit-dialog-card h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 27px;
  font-weight: 950;
  letter-spacing: -.045em;
  line-height: 1.2;
}
#quitDialog .quit-dialog-card > p:last-of-type {
  margin: 0 0 16px;
  color: #6f543b;
  font-size: 14px;
  line-height: 1.65;
}
#quitDialog .quit-dialog-card > p strong { color: #a9430a; font-weight: 900; }
.quit-dialog-actions { display: grid; gap: 11px; }
#quitDialog .quit-dialog-actions .shell-button {
  min-height: 54px;
  margin: 0;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 950;
}
#quitDialog #quitCancel {
  border: 3px solid #ffd36d;
  color: #fffaf0;
  background: linear-gradient(#ffb832, #ff8a00 55%, #f56d00);
  box-shadow: inset 0 2px #fff0a2, inset 0 -2px #c7470738, 0 4px 0 #b74306;
  text-shadow: 0 2px #9a3907;
}
#quitDialog #quitConfirm {
  border: 2px solid #f0ad3c;
  color: #7d3b0c;
  background: linear-gradient(#fffdf3, #ffe8b6);
  box-shadow: inset 0 2px #fff, 0 3px 0 #d47818;
}
#quitDialog #quitCancel:active,
#quitDialog #quitConfirm:active {
  transform: translateY(3px) scale(.985);
  box-shadow: inset 0 2px 4px #a23d1540, 0 1px 0 #ae480a;
}
@media (max-height: 620px) {
  .quit-dialog-card { padding-top: 20px; }
  .quit-dialog-mascot { top: -99px; width: 137px; height: 137px; }
  #quitDialog .quit-dialog-card h2 { font-size: 24px; }
  #quitDialog .quit-dialog-card > p:last-of-type { margin-bottom: 12px; line-height: 1.5; }
  #quitDialog .quit-dialog-actions .shell-button { min-height: 48px; }
}

#entryDialog.entry-dialog {
  width: min(calc(100% - 48px), 344px);
  max-height: calc(100dvh - 28px);
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
#entryDialog.entry-dialog::backdrop { background: #102c42b8; backdrop-filter: blur(6px) saturate(.8); }
.entry-dialog-card {
  position: relative;
  isolation: isolate;
  padding: 25px 20px 20px;
  border: 3px solid #f7a31a;
  border-radius: 32px;
  overflow: visible;
  color: var(--navy);
  background:
    radial-gradient(circle at 14% 16%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 88% 22%, #fff7d9 0 3px, transparent 4px),
    linear-gradient(165deg, #fffdf5 0%, #fff4da 54%, #ffe6bc 100%);
  box-shadow:
    inset 0 0 0 3px #fff1ba,
    0 6px 0 #bd520d,
    0 20px 45px #071b2a70;
  text-align: center;
}
.entry-dialog-mascot {
  position: absolute;
  z-index: -1;
  top: -122px;
  left: 50%;
  width: 166px;
  height: 166px;
  object-fit: contain;
  transform: translateX(-50%) rotate(2deg);
  filter: drop-shadow(0 7px 5px #94451240);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.entry-dialog-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  margin: 0 0 6px !important;
  padding: 2px 13px;
  border: 1px solid #f3ad35;
  border-radius: 999px;
  color: #9b470e;
  background: #fff4cc;
  box-shadow: inset 0 1px #fff;
  font-size: 13px !important;
  font-weight: 900;
  line-height: 1.2 !important;
}
#entryDialog h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 27px;
  font-weight: 950;
  letter-spacing: -.045em;
  line-height: 1.2;
}
#entryDialog #entryMessage {
  margin: 0 0 16px;
  color: #6f543b;
  font-size: 14px;
  line-height: 1.65;
}
#entryDialog #entryMessage strong { color: #a9430a; font-weight: 950; }
.entry-dialog-actions { display: grid; grid-template-columns: 1fr; gap: 11px; }
.entry-dialog[data-mode="insufficient"] .entry-dialog-actions { grid-template-columns: 1fr; }
#entryDialog .entry-dialog-actions .shell-button {
  min-height: 54px;
  margin: 0;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 950;
}
#entryDialog #entryCancel {
  border: 2px solid #f0ad3c;
  color: #7d3b0c;
  background: linear-gradient(#fffdf3, #ffe8b6);
  box-shadow: inset 0 2px #fff, 0 3px 0 #d47818;
}
#entryDialog #entryConfirm {
  border: 3px solid #ffd36d;
  color: #fffaf0;
  background: linear-gradient(#ffb832, #ff8a00 55%, #f56d00);
  box-shadow: inset 0 2px #fff0a2, inset 0 -2px #c7470738, 0 4px 0 #b74306;
  text-shadow: 0 2px #9a3907;
}
#entryDialog .entry-dialog-actions .shell-button:active {
  transform: translateY(3px) scale(.985);
  box-shadow: inset 0 2px 4px #a23d1540, 0 1px 0 #ae480a;
}
@media (max-height: 620px) {
  .entry-dialog-card { padding-top: 20px; }
  .entry-dialog-mascot { top: -99px; width: 137px; height: 137px; }
  #entryDialog h2 { font-size: 24px; }
  #entryDialog #entryMessage { margin-bottom: 12px; line-height: 1.5; }
  #entryDialog .entry-dialog-actions .shell-button { min-height: 48px; }
}

/* Bring the score summary into the homepage's illustrated gold-orange system. */
.result-screen {
  position: relative;
  padding: max(12px, var(--safe-top)) 12px max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse at 50% 9%, #fff4ce 0 12%, transparent 34%),
    linear-gradient(155deg, #ffd691, #f7a64d 62%, #ee8534);
}
.result-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  padding: 12px 14px 15px;
  border: 3px solid #f1a025;
  border-radius: 31px;
  background: linear-gradient(165deg, #fffdf5 0%, #fff6df 58%, #ffe8bd 100%);
  box-shadow:
    inset 0 0 0 3px #fff1b4,
    0 6px 0 #b94e0c,
    0 18px 34px #7c310c2e;
}
.result-panel .shell-header {
  min-height: 42px;
  padding: 2px 2px 4px;
}
.result-panel .shell-header img { width: 112px; }
.result-panel .result-content {
  flex: 1;
  justify-content: center;
}
.result-panel .result-mascot {
  height: clamp(142px, 21dvh, 184px);
  margin: -2px 0 0;
}
.result-panel .result-mascot img {
  width: min(100%, 282px);
  height: 100%;
  filter: drop-shadow(0 7px 5px #9c4e1830);
}
.result-score-card {
  position: relative;
  padding: 0 10px 2px;
}
.result-score-card::before,
.result-score-card::after {
  content: "";
  position: absolute;
  top: 53%;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #ffc83d;
  box-shadow: 0 0 0 3px #fff4b8, 0 0 12px #f5a400;
  transform: rotate(45deg);
}
.result-score-card::before { left: 13%; }
.result-score-card::after { right: 13%; width: 7px; height: 7px; }
.result-panel .result-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  margin: 0 0 5px;
  padding: 2px 14px;
  border: 1px solid #f2aa2e;
  border-radius: 999px;
  color: #8a3f0c;
  background: linear-gradient(#fff9dc, #ffe6a7);
  box-shadow: inset 0 1px #fff;
  font-size: 13px;
  font-weight: 900;
}
.result-panel .result-screen h2,
.result-panel h2 {
  margin: 0 0 1px;
  color: var(--navy);
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -.035em;
  line-height: 1.2;
}
.result-panel .final-score {
  display: block;
  margin: 0 0 9px;
  color: #bd5008;
  font-size: clamp(52px, 16vw, 68px);
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: -.045em;
  text-shadow: 0 3px #fff5d3;
}
.result-panel .result-records {
  margin: 0 0 10px;
  padding: 9px 8px 10px;
  border: 2px solid #efad3e;
  border-radius: 20px;
  background: linear-gradient(110deg, #fffdf4, #ffe9bc 58%, #fff6dc);
  box-shadow: inset 0 2px #fff, 0 3px 0 #c8751c55;
}
.result-panel .result-records dt {
  color: #7d5734;
  font-size: 13px;
  font-weight: 850;
}
.result-panel .result-records dd {
  margin-top: 3px;
  color: var(--navy);
  font-size: 25px;
  font-weight: 950;
}
.result-panel .result-foods {
  margin-bottom: 10px;
  padding: 10px 12px 5px;
  border: 2px solid #efad3e;
  border-radius: 20px;
  background: #fffaf0;
  box-shadow: inset 0 2px #fff, 0 3px 0 #c8751c3d;
  text-align: left;
}
.result-panel .result-foods h3 {
  margin: 0 0 3px;
  color: #8b430f;
  font-size: 13px;
  font-weight: 900;
}
.result-panel #resultFavorites { margin-bottom: 0; }
.result-panel #resultFavorites > div {
  min-height: 43px;
  padding: 5px 0;
  border-color: #efd5aa;
}
.result-panel #resultFavorites .food-thumbnail { width: 31px; height: 31px; }
.result-panel #resultFavorites dt { color: var(--navy); font-size: 14px; font-weight: 850; }
.result-panel #resultFavorites dd { color: #73330b; font-size: 17px; font-weight: 950; }
.result-panel .result-footer { padding-top: 0; }
.result-panel .result-footer > .shell-button { margin-bottom: 9px; }
.result-panel .result-footer .shell-button {
  min-height: 50px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 950;
}
.result-panel #resultLeaderboard,
.result-panel #resultAction {
  border: 3px solid #ffd36d;
  color: #fffaf0;
  background: linear-gradient(#ffb832, #ff8a00 55%, #f56d00);
  box-shadow: inset 0 2px #fff0a2, inset 0 -2px #c7470738, 0 4px 0 #b74306;
  text-shadow: 0 2px #9a3907;
}
.result-panel #resultLeaderboard > span { color: #fff5c9; font-size: 24px; }
.result-panel #resultHome {
  border: 2px solid #f0ad3c;
  color: #7d3b0c;
  background: linear-gradient(#fffdf3, #ffe8b6);
  box-shadow: inset 0 2px #fff, 0 3px 0 #d47818;
}
.result-panel .result-footer .shell-button:active {
  transform: translateY(3px) scale(.985);
  box-shadow: inset 0 2px 4px #a23d1540, 0 1px 0 #ae480a;
}
@media (max-height: 730px) {
  .result-panel { padding-block: 9px 12px; }
  .result-panel .result-mascot { height: 126px; }
  .result-panel .result-summary { min-height: 22px; margin-bottom: 3px; }
  .result-panel .final-score { margin-bottom: 6px; font-size: 50px; }
  .result-panel .result-records { margin-bottom: 7px; padding-block: 6px 7px; }
  .result-panel .result-foods { margin-bottom: 7px; padding-block: 7px 3px; }
  .result-panel #resultFavorites > div { min-height: 36px; padding-block: 2px; }
  .result-panel .result-footer .shell-button { min-height: 44px; }
}

/* The fetched-at time sits with the leaderboard rules without reducing the table viewport. */
.leader-note {
  inset: 75.55% 6.5% auto;
  min-height: 7.7%;
  gap: 1px;
  font-size: clamp(9px, 2.45cqw, 11px);
  line-height: 1.12;
}
#leaderUpdated { color: #9a4b13; font-weight: 900; }
