﻿/* Gameplay responsive â€” Apong 2026 */

@media (max-width: 1023px) and (orientation: portrait) {
  .device.is-playing {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(220px, 1fr) auto auto auto;
    grid-template-areas:
      "top"
      "play"
      "dock"
      "hist"
      "fun";
  }

  .device.is-playing .playfield {
    grid-template-rows: minmax(180px, 42vh) auto auto;
    padding: 0 8px;
  }

  .device.is-playing .playfield .stage {
    width: min(88vw, 340px);
    height: min(38vh, 280px);
  }

  .device.is-playing .history {
    margin: 0 max(8px, var(--safe-r)) 4px max(8px, var(--safe-l));
    width: auto;
    max-width: none;
    max-height: 120px;
  }

  .device.is-playing .hist-inner {
    padding: 10px 12px;
  }

  .device.is-playing .hist-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding-bottom: 4px;
  }

  .device.is-playing .history-slot {
    flex: 0 0 auto;
  }

  .device.is-playing .hist-foot {
    display: none;
  }

  .device.is-playing .bet-dock {
    margin: 0 max(8px, var(--safe-r)) 4px max(8px, var(--safe-l));
    max-height: none;
  }

  .device.is-playing .bet-inner {
    padding: 10px 12px;
  }

  .device.is-playing .faces-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .device.is-playing .amounts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .device.is-playing .actions {
    flex-direction: row;
  }

  .device.is-playing .btn-place,
  .device.is-playing .btn-clear {
    flex: 1;
  }

  .device.is-playing .panel-frame-img {
    object-fit: fill;
  }
}

@media (max-width: 430px) and (orientation: portrait) {
  .bank-chip {
    font-size: 11px;
    padding: 5px 8px;
  }

  .hud-lang-label {
    display: none;
  }

  .device.is-playing .playfield .stage {
    height: min(27vh, 190px);
  }

  .device.is-playing .playfield {
    grid-template-rows: minmax(128px, 1fr) auto auto;
  }

  .face-bet .face-die {
    width: 32px;
    height: 32px;
  }

  .spin-hint {
    font-size: 10px;
  }
}

@media (min-width: 1024px) {
  .device.is-playing {
    grid-template-columns: minmax(124px, 12vw) minmax(0, 1fr) minmax(270px, 18vw);
  }

  .device.is-playing .history,
  .device.is-playing .bet-dock {
    align-self: stretch;
  }

  .playfield .stage {
    width: min(62vw, 560px);
    height: min(48vh, 360px);
  }
}

@media (min-width: 1366px) {
  .device.is-playing {
    grid-template-columns: minmax(128px, 10vw) minmax(0, 1fr) minmax(288px, 16vw);
  }

  .playfield .stage {
    width: min(56vw, 620px);
    height: min(50vh, 380px);
  }
}

@media (min-width: 1920px) {
  .device.is-playing {
    grid-template-columns: 160px minmax(0, 1fr) 320px;
  }

  .lock-km {
    font-size: 28px;
  }
}

@media (orientation: landscape) and (max-height: 900px) {
  .device.is-playing {
    grid-template-rows: auto minmax(0, 1fr) minmax(24px, auto);
  }

  .device.is-playing .hud-top {
    padding-top: max(6px, var(--safe-t));
    padding-bottom: 4px;
  }

  .device.is-playing .playfield {
    align-content: center;
    grid-template-rows: minmax(0, 1fr) auto auto;
    padding-top: 0;
    padding-bottom: 0;
  }

  .device.is-playing .playfield .stage {
    height: min(42vh, 320px);
  }

  .device.is-playing .bet-inner {
    gap: 7px;
    padding: 10px 9px;
  }

  .device.is-playing .history-slot {
    min-height: 44px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .spin-hint,
  .game-fun small {
    display: none;
  }

  .playfield .stage {
    height: min(34vh, 210px);
  }

  .hist-time {
    display: none;
  }

  .face-bet .face-die {
    width: 28px;
    height: 28px;
  }
}

/* Home screen responsive (kept) */
@media (max-width: 400px) {
  .orb {
    width: 58px;
    min-height: 58px;
  }

  .orb-label {
    font-size: 8px;
  }

  .home-menu {
    gap: 8px;
  }

  .play-cta,
  .menu-row {
    padding: 8px 10px;
  }
}

@media (min-width: 1366px) {
  .device.is-home .menu-hero {
    left: 38%;
    width: min(34vw, 420px);
    height: min(38vw, 340px);
  }
}

@media (min-width: 1920px) {
  .home-title-km {
    font-size: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tiger,
  .dust,
  .cover {
    animation: none !important;
    transition: none !important;
  }
}

/* Premium home lobby */
.device.is-home .menu-hero {
  display: none;
}

.device.is-night-theme .bg-art {
  filter: saturate(0.9) contrast(1.12) brightness(0.72) hue-rotate(8deg);
}

.device.is-night-theme .godrays {
  opacity: 0.36;
}

.home-screen.is-on {
  display: grid;
  grid-template-columns: clamp(190px, 18vw, 274px) minmax(320px, 1fr) clamp(280px, 27vw, 430px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "top top top"
    "history brand menu"
    "history center menu"
    "foot foot foot";
  column-gap: clamp(14px, 2vw, 34px);
  row-gap: clamp(5px, 1vh, 12px);
  width: 100%;
  height: 100%;
  padding: max(16px, var(--safe-t)) max(20px, var(--safe-r)) max(14px, var(--safe-b)) max(20px, var(--safe-l));
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(4, 2, 2, 0.62), transparent 28%, transparent 68%, rgba(4, 2, 2, 0.62)),
    linear-gradient(180deg, rgba(4, 1, 2, 0.12), transparent 54%, rgba(4, 1, 2, 0.64));
  pointer-events: none;
}

.home-topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  pointer-events: auto;
}

.home-gear,
.home-balance,
.home-alert {
  min-height: 46px;
  border: 1px solid rgba(243, 196, 70, 0.72);
  background: linear-gradient(180deg, rgba(31, 20, 12, 0.94), rgba(8, 6, 5, 0.94));
  color: #ffe99d;
  box-shadow: inset 0 0 0 1px rgba(255, 235, 161, 0.08), 0 8px 22px rgba(0, 0, 0, 0.3);
}

.home-gear {
  position: static;
  justify-self: auto;
  align-self: auto;
  border-radius: 24px;
  padding: 7px 17px 7px 8px;
  gap: 9px;
  font-size: 13px;
}

.home-gear-icon {
  display: grid;
  place-items: center;
  width: 32px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 227, 120, 0.7);
  border-radius: 50%;
  font-size: 20px;
}

.home-account {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-balance {
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 24px;
  padding: 7px 18px 7px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.home-balance img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  object-position: center;
}

.home-balance b {
  margin-left: 5px;
  font-family: var(--font-display);
  font-size: 18px;
  color: #fff3bd;
}

.home-alert {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  border-radius: 50%;
}

.home-alert::before {
  content: "";
  width: 14px;
  height: 18px;
  border-radius: 9px 9px 5px 5px;
  background: #f7d56d;
  box-shadow: 0 3px 0 #9e6513;
}

.home-alert span {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #d62820;
  font-size: 8px;
}

.home-brand {
  grid-area: brand;
  align-self: start;
  justify-self: center;
  width: min(100%, 600px);
  max-width: none;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}

.home-crest {
  width: min(78%, 420px);
  max-height: clamp(54px, 9vh, 96px);
  margin: 0 auto -6px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.72)) drop-shadow(0 0 8px rgba(255, 199, 67, 0.26));
}

.home-title-km {
  font-size: clamp(2.35rem, 7vh, 5.4rem);
  line-height: 0.94;
  font-weight: 700;
  color: #f6c84f;
  text-shadow: 0 2px 0 #4a2305, 0 4px 0 #7e430c, 0 9px 15px rgba(0, 0, 0, 0.72), 0 0 18px rgba(255, 188, 47, 0.22);
}

.home-title-en {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 2.3vh, 1.35rem);
  font-weight: 700;
  color: #ffe8a0;
  letter-spacing: 0.18em;
  text-shadow: 0 3px 8px #000;
}

.home-title-en span {
  color: #e7ae2c;
}

.home-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 34px 0;
  border-top: 1px solid rgba(240, 192, 64, 0.54);
  color: #f3d384;
  font-size: clamp(0.68rem, 1.7vh, 0.9rem);
  text-shadow: 0 2px 5px #000;
}

.home-history {
  grid-area: history;
  align-self: stretch;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 7px;
  padding: clamp(18px, 2.5vh, 28px) clamp(14px, 1.4vw, 22px);
  background:
    url("../assets/img/panel-frame.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(20, 13, 8, 0.94), rgba(8, 7, 6, 0.94));
  filter: drop-shadow(0 13px 20px rgba(0, 0, 0, 0.48));
  pointer-events: auto;
}

.home-history h2 {
  margin: 0;
  font-size: clamp(0.9rem, 2.2vh, 1.2rem);
  line-height: 1.25;
  color: #ffe398;
  text-align: center;
}

.home-history-list {
  display: grid;
  grid-template-rows: repeat(6, minmax(0, 1fr));
  min-height: 0;
}

.home-history-slot {
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(40px, 4vw, 58px) 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 8px;
  padding: 3px 2px;
  border-bottom: 1px solid rgba(239, 192, 73, 0.24);
}

.home-history-slot .hist-row {
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  gap: 9px;
}

.home-history-slot .hist-die {
  width: clamp(36px, 4vw, 52px);
  height: clamp(36px, 4vw, 52px);
  object-fit: contain;
  object-position: center;
}

.home-history-slot .hist-num {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vh, 1.4rem);
  color: #ffe8a3;
}

.home-history-slot .hist-time {
  grid-column: 2;
  align-self: start;
  font-size: 10px;
  color: #d9bb70;
}

.home-history-slot.is-empty::before {
  content: "â€”";
  grid-row: 1 / 3;
  place-self: center;
  color: rgba(255, 225, 142, 0.38);
  font-size: 22px;
}

.history-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  color: #f4d67e;
  border: 1px solid rgba(238, 187, 58, 0.58);
  background: rgba(42, 26, 12, 0.8);
  transition: transform 150ms ease, filter 150ms ease;
}

.history-link img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  object-position: center;
}

.home-center {
  grid-area: center;
  align-self: stretch;
  justify-self: stretch;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: clamp(2px, 1vh, 10px);
  pointer-events: auto;
  z-index: 1;
}

.home-bowl {
  position: relative;
  align-self: stretch;
  width: min(100%, 650px);
  min-height: 0;
  margin: 0 auto;
}

.home-bowl-aura {
  position: absolute;
  left: 50%;
  bottom: 3%;
  width: 86%;
  aspect-ratio: 2.8;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 185, 42, 0.45), rgba(255, 170, 30, 0.08) 46%, transparent 72%);
  filter: blur(8px);
}

.home-plate,
.home-cover {
  position: absolute;
  left: 50%;
  height: auto;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.home-plate {
  bottom: -2%;
  width: min(100%, 640px);
  max-height: 88%;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 15px rgba(0, 0, 0, 0.56));
}

.home-cover {
  bottom: 15%;
  width: min(72%, 460px);
  max-height: 88%;
  transform: translateX(-50%);
  filter: drop-shadow(0 16px 12px rgba(28, 8, 2, 0.48));
  animation: home-cover-breathe 5s ease-in-out infinite;
}

@keyframes home-cover-breathe {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

.home-play {
  position: relative;
  width: min(86%, 460px);
  min-height: clamp(70px, 10vh, 100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 10px 32px;
  background:
    url("../assets/img/btn-spin-frame.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, #a82b1d, #68130e);
  color: #fff0b6;
  border-radius: 38px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.52)) drop-shadow(0 0 10px rgba(255, 180, 43, 0.26));
  transition: transform 150ms ease, filter 150ms ease;
}

.home-play-km {
  max-width: 100%;
  font-size: clamp(1.05rem, 3vh, 1.6rem);
  line-height: 1.18;
  font-weight: 700;
  text-align: center;
}

.home-play-en {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.home-menu {
  grid-area: menu;
  align-self: center;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  display: grid;
  gap: clamp(7px, 1.25vh, 13px);
  pointer-events: auto;
}

.menu-row {
  position: relative;
  display: grid;
  grid-template-columns: clamp(42px, 4.2vw, 58px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(10px, 1.2vw, 18px);
  min-height: clamp(56px, 8.6vh, 82px);
  padding: 8px clamp(16px, 1.8vw, 28px);
  border: 0;
  border-radius: 7px;
  background:
    url("../assets/img/btn-dark-frame.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(24, 17, 11, 0.96), rgba(8, 7, 6, 0.96));
  color: #ffe6a0;
  text-align: left;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  transition: transform 160ms ease, filter 160ms ease;
}

.menu-row.is-featured {
  background:
    url("../assets/img/btn-gold-frame.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(70, 38, 12, 0.97), rgba(19, 11, 7, 0.97));
}

.menu-row .menu-ico {
  width: clamp(36px, 4vw, 54px);
  height: clamp(36px, 4vw, 54px);
  object-fit: contain;
  object-position: center;
  filter: sepia(0.8) saturate(1.4) drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
}

.menu-row > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu-row b {
  overflow-wrap: anywhere;
  font-size: clamp(0.88rem, 2.1vh, 1.2rem);
  line-height: 1.2;
}

.menu-row small {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: clamp(0.58rem, 1.35vh, 0.76rem);
  letter-spacing: 0.08em;
  color: #ddb75d;
  opacity: 1;
}

.menu-row em {
  position: absolute;
  top: -7px;
  right: 12px;
  padding: 2px 8px;
  border: 1px solid #ffd26b;
  border-radius: 11px;
  background: #9f2418;
  color: #fff4c5;
  font-family: var(--font-display);
  font-size: 9px;
  font-style: normal;
}

.menu-row:hover,
.history-link:hover,
.home-control:hover,
.home-social button:hover {
  transform: translateY(-2px);
  filter: brightness(1.16) drop-shadow(0 0 7px rgba(244, 188, 54, 0.3));
}

.menu-row:active,
.history-link:active,
.home-play:active,
.home-control:active,
.home-social button:active {
  transform: scale(0.97);
}

.home-play:hover {
  transform: translateY(-2px) scale(1.015);
  filter: brightness(1.12) drop-shadow(0 12px 16px rgba(0, 0, 0, 0.52)) drop-shadow(0 0 14px rgba(255, 185, 48, 0.42));
}

.home-foot {
  grid-area: foot;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(170px, 1fr);
  align-items: end;
  gap: 14px;
  pointer-events: auto;
}

.fun-only {
  justify-self: start;
  max-width: 270px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid rgba(233, 183, 54, 0.42);
  background: rgba(8, 7, 5, 0.72);
  color: #eacb79;
  font-size: 10px;
}

.fun-only img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  object-position: center;
}

.fun-only span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fun-only b {
  font-weight: 600;
  line-height: 1.35;
}

.fun-only small {
  margin-top: 2px;
  color: #f2cf6a;
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.home-controls {
  display: flex;
  justify-content: center;
  gap: clamp(7px, 1vw, 13px);
}

.home-control {
  width: clamp(52px, 6.5vh, 72px);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(241, 193, 69, 0.62);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(34, 22, 12, 0.95), rgba(8, 7, 6, 0.94));
  color: #f6d67c;
  transition: transform 150ms ease, filter 150ms ease;
}

.home-control.is-on {
  box-shadow: inset 0 0 12px rgba(241, 189, 56, 0.12), 0 0 12px rgba(241, 189, 56, 0.18);
}

.home-control img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  object-position: center;
}

.home-control span {
  max-width: 88%;
  overflow-wrap: anywhere;
  font-size: 8px;
  line-height: 1.1;
  text-align: center;
}

.home-social {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 13px;
  border: 1px solid rgba(233, 183, 54, 0.42);
  background: rgba(8, 7, 5, 0.72);
  color: #e8c76e;
  font-size: 10px;
}

.home-social button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(241, 193, 69, 0.62);
  border-radius: 50%;
  color: #f7d875;
  font-family: var(--font-display);
  font-weight: 700;
  transition: transform 150ms ease, filter 150ms ease;
}

.home-history.is-pulse {
  animation: home-history-pulse 0.7s ease 2;
}

@keyframes home-history-pulse {
  50% { filter: brightness(1.25) drop-shadow(0 0 18px rgba(255, 200, 63, 0.65)); }
}

@media (max-width: 1100px) and (orientation: landscape) {
  .home-screen.is-on {
    grid-template-columns: 190px minmax(300px, 1fr) 278px;
    column-gap: 12px;
    padding-left: max(12px, var(--safe-l));
    padding-right: max(12px, var(--safe-r));
  }

  .home-foot {
    grid-template-columns: 190px auto 170px;
    gap: 8px;
  }

  .home-social span,
  .fun-only b {
    display: none;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  .home-screen.is-on {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto auto auto;
    grid-template-areas:
      "top"
      "brand"
      "center"
      "menu"
      "history"
      "foot";
    gap: 13px;
    height: 100%;
    padding: max(10px, var(--safe-t)) max(12px, var(--safe-r)) max(16px, var(--safe-b)) max(12px, var(--safe-l));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
      linear-gradient(180deg, rgba(5, 2, 2, 0.18), rgba(5, 2, 2, 0.38) 35%, rgba(5, 2, 2, 0.76)),
      linear-gradient(90deg, rgba(5, 2, 2, 0.44), transparent 50%, rgba(5, 2, 2, 0.44));
  }

  .home-topbar {
    min-height: 44px;
  }

  .home-gear,
  .home-balance,
  .home-alert {
    min-height: 40px;
  }

  .home-gear {
    padding: 5px 12px 5px 6px;
  }

  .home-gear-icon {
    width: 29px;
    font-size: 17px;
  }

  .home-balance {
    padding: 5px 10px 5px 6px;
  }

  .home-balance > span {
    display: none;
  }

  .home-balance img {
    width: 26px;
    height: 26px;
  }

  .home-balance b {
    font-size: 15px;
  }

  .home-alert {
    width: 40px;
  }

  .home-brand {
    width: 100%;
  }

  .home-crest {
    width: min(76vw, 360px);
    max-height: 70px;
  }

  .home-title-km {
    font-size: clamp(2.4rem, 8vh, 4.4rem);
  }

  .home-title-en {
    font-size: 0.92rem;
  }

  .home-tag {
    font-size: 0.72rem;
  }

  .home-center {
    min-height: clamp(288px, 42vh, 420px);
    grid-template-rows: auto auto;
    gap: 5px;
  }

  .home-bowl {
    width: min(100%, 500px);
    height: clamp(215px, 34vh, 340px);
    align-self: auto;
  }

  .home-cover {
    width: min(70%, 350px);
  }

  .home-play {
    width: min(88vw, 430px);
    min-height: 72px;
  }

  .home-menu {
    width: min(100%, 520px);
    margin: 0 auto;
    gap: 8px;
  }

  .menu-row {
    min-height: 58px;
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .menu-row .menu-ico {
    width: 38px;
    height: 38px;
  }

  .home-history {
    width: min(100%, 520px);
    min-height: 180px;
    margin: 0 auto;
    padding: 18px 16px;
  }

  .home-history-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, 62px);
  }

  .home-history-slot {
    grid-template-columns: 40px 1fr;
    border-right: 1px solid rgba(239, 192, 73, 0.18);
    padding: 3px 6px;
  }

  .home-history-slot .hist-die {
    width: 36px;
    height: 36px;
  }

  .home-history-slot .hist-time {
    display: none;
  }

  .history-link {
    min-height: 40px;
  }

  .home-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .home-controls {
    order: 1;
    width: 100%;
  }

  .home-control {
    width: clamp(54px, 15vw, 70px);
  }

  .home-social {
    order: 2;
    justify-self: auto;
  }

  .fun-only {
    order: 3;
    justify-self: auto;
    max-width: min(100%, 360px);
  }
}

@media (max-width: 430px) and (orientation: portrait) {
  .home-gear > span:last-child {
    display: none;
  }

  .home-gear {
    padding-right: 6px;
  }

  .home-brand {
    margin-top: -4px;
  }

  .home-crest {
    max-height: 56px;
  }

  .home-title-km {
    font-size: 2.65rem;
  }

  .home-tag {
    margin-top: 5px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-bowl {
    height: clamp(205px, 29vh, 250px);
  }

  .home-center {
    min-height: clamp(278px, 39vh, 330px);
  }

  .home-play {
    min-height: 68px;
  }

  .home-play-km {
    font-size: 1.12rem;
  }

  .menu-row {
    min-height: 54px;
    padding: 7px 15px;
  }

  .home-history {
    min-height: 170px;
  }

  .home-history-list {
    grid-template-rows: repeat(2, 57px);
  }

  .home-history-slot {
    grid-template-columns: 34px 1fr;
    gap: 3px;
    padding-left: 3px;
    padding-right: 3px;
  }

  .home-history-slot .hist-die {
    width: 32px;
    height: 32px;
  }

  .home-social span {
    display: none;
  }
}

@media (max-height: 720px) and (orientation: landscape) {
  .home-screen.is-on {
    row-gap: 3px;
    padding-top: max(8px, var(--safe-t));
    padding-bottom: max(8px, var(--safe-b));
  }

  .home-crest {
    max-height: 48px;
  }

  .home-title-km {
    font-size: 2.5rem;
  }

  .home-tag {
    margin-top: 4px;
    padding-top: 3px;
  }

  .home-control {
    width: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-cover {
    animation: none !important;
  }
}

