html.landscape #app.frontier { --ls-pad: 4px; --ls-aspect: 1.2; --ls-strip: 38px; --chip-band: 4px; }
#app.frontier { --reel-frame: url("../art/kits/savanna/frame.webp"); }
#frontier-pots > span, #frontier-status { --frontier-plate: #261508; --frontier-plate-light: #4c2d12; }
.frontier .reel { height: calc(4 * var(--ls-cell-h)); background: linear-gradient(#352313,#624025 50%,#302014); }
.frontier .cell { height: var(--ls-cell-h); }
.frontier .cell.letter { font-size: calc(var(--ls-cell-h) * .7); }
.frontier .sym-img { max-height: var(--ls-cell-h); }
.frontier-sign:not([hidden]) {
  position: relative; isolation: isolate; display: grid; align-items: center; justify-items: center;
  grid-template-columns: minmax(0,1fr) var(--ls-reels-w) minmax(0,1fr);
  grid-template-rows: var(--ls-strip) 1fr;
  color: var(--gold-light); text-align: center; text-shadow: 0 2px 3px #201003;
  text-transform: uppercase; letter-spacing: .04em; --wheel: min(16vw,29vh);
}
html.landscape .frontier-sign:not([hidden]) {
  margin: 0 calc(-1 * var(--ls-r)) 0 calc(-1 * var(--ls-l));
  padding: 0 var(--ls-r) 4px var(--ls-l);
}
.frontier-scenery { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #442912; }
.frontier-scenery > [data-parallax] { position: absolute; inset: calc(-1 * var(--parallax-bleed)); }
.frontier-scenery i { position: absolute; inset: -5%; background-size: cover; background-position: center; }
.frontier-distance { background-image: linear-gradient(#25150e44,#26170b99),url("../art/kits/savanna/scene.webp"); animation: frontier-drift 32s ease-in-out infinite alternate; }
.frontier-sun { background: radial-gradient(ellipse at 20% 10%,#ffe7a95c,transparent 55%); animation: frontier-drift 17s ease-in-out infinite alternate-reverse; }
.frontier-scenery .frontier-flowers { inset: auto -2% -12% auto; height: 48%; width: 25%; opacity: .65; background: url("../art/kits/savanna/decor-protea-bloom.webp") right bottom / contain no-repeat; animation: frontier-drift 9s ease-in-out infinite alternate; }
@keyframes frontier-drift { to { transform: translateX(3%) scale(1.02); } }
@media (prefers-reduced-motion: reduce) { .frontier-scenery .machine-scene-motion { animation: none; } }
.frontier-brand, .frontier-bonus { grid-row: 1 / 3; display: grid; justify-items: center; align-content: center; gap: 5px; padding: 3px; min-width: 0; }
.frontier-brand { grid-column: 1; }
.frontier-brand > strong {
  font: clamp(18px,2.6vw,32px)/1 var(--display); white-space: nowrap; text-shadow: none;
  background-image: var(--gold-bevel); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 var(--gold-deep)) drop-shadow(0 2px 1px rgba(0, 0, 0, 0.7));
}
#frontier-pots { display: grid; gap: 2px; width: 100%; font-size: clamp(11px,1.7vw,16px); }
#frontier-pots > span {
  position: relative; padding: 1px 6px; font-family: var(--display); letter-spacing: .03em;
  border: 2px solid var(--gold); border-radius: 6px;
  background: linear-gradient(var(--frontier-plate-light), var(--frontier-plate));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 4px rgba(0, 0, 0, 0.5);
}
#frontier-pots > .grand { border-color: var(--jp-grand); }
#frontier-pots > .major { border-color: var(--jp-major); }
#frontier-pots > .minor { border-color: var(--jp-minor); }
#frontier-pots > .mini { border-color: var(--jp-mini); }
.frontier-prize-name { font-family: var(--display); text-shadow: var(--jp-outline); }
.grand > .frontier-prize-name { color: var(--jp-grand); }
.major > .frontier-prize-name { color: var(--jp-major); }
.minor > .frontier-prize-name { color: var(--jp-minor); }
.mini > .frontier-prize-name { color: var(--jp-mini); }
.frontier-bank { grid-column: 2; grid-row: 1; width: 96%; font: 13px/1 var(--display); color: var(--text); text-shadow: 0 1px 0 #000; }
#frontier-meter { display: grid; grid-template-columns: repeat(15,1fr); gap: 2px; }
#frontier-meter i { height: 7px; border: 1px solid #cfab63; border-radius: 2px; background: #372612; }
#frontier-meter .banked { background: #ffca52; box-shadow: 0 0 4px gold; }
.frontier-bonus { grid-column: 3; }
.frontier-pointer { position: relative; width: var(--wheel); aspect-ratio: 1; }
.frontier-flapper { position: absolute; z-index: 2; top: -8px; left: 50%; width: 16px; height: 14px; transform: translateX(-50%); transform-origin: 50% 0; background: linear-gradient(#fff6c8,#e7a93c); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 1px 2px #201003); }
#frontier-disc { position: absolute; inset: 0; border-radius: 50%; border: 3px ridge #ffd674; box-shadow: 0 3px 9px #261509; }
#frontier-disc span {
  position: absolute; top: 50%; left: 50%; transform-origin: 0 0; white-space: nowrap;
  transform: rotate(var(--wedge)) translateX(calc(var(--wheel) * .275)) rotate(var(--flip, 0deg)) translate(-50%, -50%);
  font: clamp(11px,1.4vw,13px)/1 var(--display); letter-spacing: .02em; color: var(--text); text-shadow: 0 1px 0 #000, 0 0 2px #000;
}
#frontier-disc span.hit { color: #fff3a6; text-shadow: 0 0 6px #ffca52, 0 0 14px #ff9d2e; }
#frontier-meter .milestone { border-color: #fff1ae; box-shadow: inset 0 0 0 1px #ffca52; }
#frontier-meter .milestone.banked { box-shadow: 0 0 7px 2px #ffca52; }
.frontier-jackpot { transition: transform .2s ease-out; }
.frontier-jackpot.flare, .frontier-jackpot.handpay { animation: frontier-flare .9s ease-out; }
@keyframes frontier-flare { 0% { transform: scale(1); } 30% { transform: scale(1.12); box-shadow: 0 0 16px 4px #ffca52; } 100% { transform: scale(1); } }
.frontier .cell.frontier-morph { animation: frontier-morph .65s ease-out; }
@keyframes frontier-morph { 0% { filter: brightness(2.6) saturate(1.6); transform: scale(1.14); } 100% { filter: none; transform: scale(1); } }
.frontier-show { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: max(20px, var(--safe-top)) 20px max(20px, var(--safe-bottom)); z-index: 25; background: #1d0f04d9; }
.frontier-show.show { display: flex; }
.frontier-show-panel { width: min(100%, 380px); max-height: 100%; overflow-y: auto; padding: 20px 16px; text-align: center; color: var(--text); }
.frontier-show-panel h2 { margin: 0 0 12px; font: 30px/1.1 var(--display); letter-spacing: .04em; color: #ffe8aa; text-shadow: 0 2px 3px #201003; }
.frontier-show-hero { display: block; width: 112px; height: 112px; margin: 0 auto 12px; object-fit: contain; filter: drop-shadow(0 0 24px #ff9d2e); }
.frontier-show-main { font: 42px/1.2 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; color: #ffca52; }
.frontier-show-sub { margin: 14px auto 20px; max-width: 290px; font: 500 15px/1.35 var(--body); color: var(--text); }
.frontier-show-panel button { display: block; width: min(100%, 240px); min-height: 56px; margin: 0 auto 4px; padding: 8px 20px; color: #311b07; border: 2px solid #9e6b20; border-radius: 8px; background: linear-gradient(#fff2b2,#e7a93c); font: 20px/1 var(--display); letter-spacing: .08em; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .frontier .cell.frontier-morph, .frontier-jackpot.flare, .frontier-jackpot.handpay { animation: none; } }
html.landscape .frontier-show-panel { display: grid; grid-template-columns: auto 1fr; align-items: center; width: min(100%, 560px); padding: 10px 16px; }
html.landscape .frontier-show-panel > h2 { grid-column: 2; margin: 0 0 6px; font-size: 26px; }
html.landscape .frontier-show-hero { grid-row: 1 / span 4; width: 120px; height: 120px; margin: 0 14px 0 0; }
html.landscape .frontier-show-main { grid-column: 2; font-size: 36px; }
html.landscape .frontier-show-sub { grid-column: 2; margin: 4px 0 10px; }
html.landscape .frontier-show-panel > button { grid-column: 2; width: 100%; margin: 0; }
#frontier-status {
  max-width: 100%; padding: 3px 8px; font: clamp(12px,1.7vw,15px)/1.1 var(--display); text-wrap: balance;
  color: var(--text); text-shadow: 0 1px 0 #000;
  border: 1px solid var(--gold-deep); border-radius: 6px;
  background: linear-gradient(var(--frontier-plate-light), var(--frontier-plate));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 4px rgba(0, 0, 0, 0.5);
}
#frontier-turn { min-height: 44px; padding: 4px 6px; font-family: var(--display); font-size: var(--type-key); line-height: 1.1; text-transform: uppercase; letter-spacing: .03em; color: #311b07; background: linear-gradient(#fff2b2,#e7a93c); border: 2px solid #9e6b20; border-radius: 8px; cursor: pointer; }
.pt-frontier-pays .pt-row { grid-template-columns: 1.5fr repeat(3, 1fr); }

html:not(.landscape) #app.frontier {
  --ls-cell-h: min(var(--cell), calc((100dvh - var(--safe-top) - var(--safe-bottom) - 408px) / 4));
}
html:not(.landscape) .frontier-sign:not([hidden]) {
  --wheel: clamp(96px, 14vh, 120px);
  flex: 1; min-height: 126px; grid-template-columns: minmax(0,1.2fr) var(--wheel) minmax(0,1fr);
  grid-template-rows: 1fr auto auto 1fr 28px; column-gap: 6px; margin: 3px 0 20px;
}
html:not(.landscape) .frontier-brand { grid-row: 1 / 5; }
html:not(.landscape) .frontier-brand > strong { white-space: normal; text-wrap: balance; }
html:not(.landscape) .frontier-bank { grid-column: 1 / -1; grid-row: 5; }
html:not(.landscape) .frontier-bonus { display: contents; }
html:not(.landscape) .frontier-pointer { grid-column: 2; grid-row: 1 / 5; }
html:not(.landscape) #frontier-status { grid-column: 3; grid-row: 2; }
html:not(.landscape) #frontier-turn { grid-column: 3; grid-row: 3; margin-top: 6px; min-height: 48px; }
