/* Final approved Home composition. Home-only; gameplay rules and logic remain untouched. */

.home-screen.is-on {
  grid-template-columns:
    clamp(210px, 22vw, 350px)
    minmax(0, 1fr)
    clamp(230px, 23vw, 350px);
  grid-template-rows:
    clamp(54px, 8vh, 76px)
    clamp(105px, 18vh, 170px)
    minmax(0, 1fr)
    clamp(58px, 9.5vh, 88px);
  grid-template-areas:
    "top top top"
    "history brand menu"
    "history center menu"
    "foot foot foot";
  column-gap: clamp(10px, 1.4vw, 24px);
  row-gap: 0;
  width: 100vw;
  height: var(--app-h, 100dvh);
  padding:
    max(12px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  overflow: hidden;
}

.home-topbar {
  grid-area: top;
  z-index: 80;
  align-self: start;
  min-height: 0;
}

.home-top-left,
.home-utilities,
.home-account {
  display: flex;
  align-items: center;
}

.home-top-left {
  gap: clamp(7px, 0.7vw, 12px);
}

.home-utilities {
  gap: clamp(5px, 0.55vw, 9px);
}

.home-gear,
.home-balance,
.home-alert,
.home-utility {
  min-height: clamp(42px, 6.2vh, 58px);
  border: 1px solid rgba(240, 190, 67, 0.72);
  background:
    linear-gradient(180deg, rgba(50, 31, 17, 0.92), rgba(9, 8, 7, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 228, 149, 0.18),
    0 5px 12px rgba(0, 0, 0, 0.32);
}

.home-gear {
  min-width: clamp(120px, 10vw, 168px);
  padding: 5px clamp(13px, 1.2vw, 19px) 5px 6px;
  gap: clamp(7px, 0.7vw, 11px);
  border-radius: 999px;
  color: #f7dda0;
  font-size: clamp(0.7rem, 1.5vh, 0.9rem);
}

.home-gear-icon {
  width: clamp(30px, 4.2vh, 40px);
  border-color: rgba(245, 201, 91, 0.72);
  background: radial-gradient(circle, rgba(94, 58, 21, 0.68), rgba(13, 10, 7, 0.9));
}

.home-utility {
  display: grid;
  place-items: center;
  width: clamp(42px, 6.2vh, 58px);
  aspect-ratio: 1;
  padding: 0;
  border-radius: 50%;
  color: #f5d77f;
  transition:
    transform 150ms ease,
    filter 150ms ease;
}

.home-utility > img {
  width: 48%;
  height: 48%;
  object-fit: contain;
  object-position: center;
}

.home-utility-lang {
  width: clamp(74px, 9vw, 104px);
  aspect-ratio: auto;
  grid-template-columns: 24px auto;
  gap: 4px;
  padding-inline: 12px;
  border-radius: 999px;
}

.home-utility-lang > img {
  width: 22px;
  height: 22px;
}

.home-utility-lang > span {
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 1.35vh, 0.8rem);
  letter-spacing: 0.08em;
}

.home-utility:hover,
.home-gear:hover,
.home-alert:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.home-account {
  gap: clamp(7px, 0.7vw, 11px);
}

.home-balance {
  min-width: clamp(160px, 13vw, 220px);
  justify-content: center;
  padding: 5px clamp(15px, 1.3vw, 21px) 5px 7px;
  gap: clamp(6px, 0.65vw, 10px);
  border-radius: 999px;
  color: #f3dda3;
  font-size: clamp(0.68rem, 1.4vh, 0.86rem);
}

.home-balance img {
  width: clamp(28px, 4.2vh, 40px);
  height: clamp(28px, 4.2vh, 40px);
}

.home-balance b {
  margin-left: 2px;
  font-size: clamp(0.96rem, 2.25vh, 1.3rem);
}

.home-alert {
  width: clamp(42px, 6.2vh, 58px);
  border-radius: 50%;
}

.home-alert > img {
  width: 48%;
  height: 48%;
}

.home-history {
  grid-area: history;
  z-index: 40;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(5px, 0.7vh, 9px);
  margin: clamp(4px, 1vh, 10px) 0;
  padding:
    clamp(17px, 2.3vh, 25px)
    clamp(13px, 1.2vw, 20px);
  overflow: hidden;
  background:
    url("../assets/img/panel-frame.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(25, 17, 10, 0.92), rgba(8, 7, 6, 0.95));
  filter: drop-shadow(0 13px 20px rgba(0, 0, 0, 0.45));
  pointer-events: auto;
}

.home-history h2 {
  margin: 0;
  padding-bottom: clamp(5px, 0.65vh, 8px);
  border-bottom: 1px solid rgba(232, 185, 68, 0.28);
  color: #ffe19a;
  font-family: var(--font-display);
  font-size: clamp(0.76rem, 1.65vh, 1rem);
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.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: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: clamp(2px, 0.45vh, 5px) 2px;
  border-bottom: 1px solid rgba(232, 185, 68, 0.2);
}

.home-history-slot:last-child {
  border-bottom: 0;
}

.home-history-slot .hist-row {
  display: flex;
  align-items: center;
  gap: clamp(7px, 0.7vw, 11px);
  min-width: 0;
}

.home-history-slot .hist-die {
  flex: 0 0 auto;
  width: clamp(32px, 4.5vh, 48px);
  height: clamp(32px, 4.5vh, 48px);
  object-fit: contain;
  object-position: center;
}

.home-history-slot .hist-num {
  color: #f8d878;
  font-family: var(--font-display);
  font-size: clamp(0.94rem, 2.25vh, 1.28rem);
}

.home-history-slot .hist-time {
  color: #d9b96e;
  font-size: clamp(0.48rem, 1vh, 0.62rem);
  white-space: nowrap;
}

.home-history-slot.is-empty::before {
  content: "—";
  grid-column: 1 / -1;
  place-self: center;
  color: rgba(255, 225, 142, 0.34);
}

.history-link {
  min-height: clamp(36px, 5.6vh, 48px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid rgba(238, 187, 58, 0.58);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(64, 39, 16, 0.9), rgba(24, 16, 10, 0.92));
  color: #f4d67e;
  font-size: clamp(0.56rem, 1.2vh, 0.72rem);
  text-align: left;
}

.history-link img {
  width: clamp(16px, 2.4vh, 22px);
  height: clamp(16px, 2.4vh, 22px);
}

.history-link b {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(102, 65, 18, 0.7);
  text-align: center;
}

.home-brand {
  grid-area: brand;
  z-index: 50;
  align-self: start;
  justify-self: center;
  width: min(100%, 720px);
  max-height: none;
  padding: 0;
  margin: 0;
  overflow: visible;
  text-align: center;
  pointer-events: none;
  transform: translateY(clamp(-48px, -5vh, -28px));
}

.home-crest {
  position: relative;
  top: 0;
  width: min(42%, 260px);
  max-height: clamp(38px, 6.5vh, 66px);
  margin: 0 auto clamp(-9px, -0.8vh, -4px);
  object-fit: contain;
  object-position: center;
  filter:
    drop-shadow(0 5px 5px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 9px rgba(255, 199, 67, 0.28));
}

.home-title-km {
  color: #ffe199;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7.4vh, 5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.03em;
  text-shadow:
    0 2px 0 #5e2b06,
    0 5px 0 #8b4c0d,
    0 10px 18px rgba(0, 0, 0, 0.7),
    0 0 18px rgba(255, 190, 49, 0.25);
}

.home-title-en {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 0.8vw, 12px);
  width: min(72%, 390px);
  margin: clamp(7px, 1vh, 11px) auto 0;
  color: #ffe8a0;
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 1.8vh, 1.08rem);
  letter-spacing: 0.28em;
  text-shadow: 0 3px 8px #000;
}

.home-title-en::before,
.home-title-en::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d9a637);
}

.home-title-en::after {
  background: linear-gradient(90deg, #d9a637, transparent);
}

.home-title-en span {
  position: relative;
  color: #ffe9a6;
}

.home-title-en span::before,
.home-title-en span::after {
  content: "◆";
  position: absolute;
  top: 50%;
  color: #e4b341;
  font-size: 0.42em;
  transform: translateY(-50%);
}

.home-title-en span::before {
  left: -1.2em;
}

.home-title-en span::after {
  right: -1.2em;
}

.home-tag {
  display: inline-block;
  margin-top: clamp(7px, 1.1vh, 13px);
  padding: 0;
  border: 0;
  color: #f1cf77;
  font-size: clamp(0.6rem, 1.35vh, 0.82rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 2px 5px #000;
}

.home-center {
  grid-area: center;
  z-index: 30;
  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, 0.6vh, 7px);
  overflow: visible;
  isolation: isolate;
  pointer-events: auto;
}

.home-bowl {
  position: relative;
  align-self: stretch;
  justify-self: center;
  width: min(100%, 760px);
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  overflow: visible;
}

.home-bowl-aura {
  z-index: 0;
  bottom: 8%;
  width: 88%;
  opacity: 0.72;
}

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

.home-pedestal {
  z-index: 20;
  bottom: -1%;
  width: min(104%, 760px);
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.56));
}

.home-plate {
  z-index: 22;
  bottom: 18%;
  width: min(78%, 600px);
  filter: drop-shadow(0 15px 14px rgba(0, 0, 0, 0.45));
}

.home-cover {
  z-index: 24;
  bottom: 31%;
  width: min(58%, 450px);
  filter: drop-shadow(0 14px 11px rgba(24, 7, 2, 0.45));
}

.home-play {
  z-index: 45;
  align-self: end;
  justify-self: center;
  width: clamp(330px, 70%, 560px);
  max-width: 88%;
  min-height: clamp(56px, 8.5vh, 82px);
  margin: 0 0 clamp(2px, 0.55vh, 6px);
  padding: clamp(7px, 1vh, 11px) clamp(28px, 3vw, 45px);
  background:
    url("../assets/img/btn-spin-frame.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(255, 235, 150, 0.13), transparent 34%),
    linear-gradient(180deg, #be3523 0%, #921d16 48%, #5c0d0a 100%);
  box-shadow:
    inset 0 0 0 2px rgba(88, 27, 6, 0.7),
    inset 0 3px 0 rgba(255, 234, 157, 0.16),
    0 9px 18px rgba(0, 0, 0, 0.45),
    0 0 17px rgba(237, 174, 42, 0.22);
  filter: none;
}

.home-play-km {
  font-size: clamp(1.15rem, 2.9vh, 1.72rem);
  line-height: 1;
}

.home-play-en {
  margin-top: 3px;
  font-size: clamp(0.52rem, 1vh, 0.66rem);
}

.home-menu {
  grid-area: menu;
  z-index: 40;
  align-self: stretch;
  justify-self: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(5, minmax(0, 1fr));
  width: 100%;
  max-width: none;
  min-height: 0;
  gap: clamp(7px, 1.15vh, 12px);
  margin: clamp(3px, 0.8vh, 8px) 0;
  transform: none;
  justify-content: stretch;
  pointer-events: auto;
}

.home-menu .menu-row {
  position: relative;
  display: grid;
  grid-template-columns:
    clamp(42px, 4vw, 58px)
    minmax(0, 1fr)
    clamp(12px, 1.2vw, 18px);
  align-items: center;
  gap: clamp(9px, 0.9vw, 14px);
  width: 100%;
  height: auto;
  min-height: 0;
  padding: clamp(6px, 0.8vh, 10px) clamp(12px, 1.2vw, 19px);
  overflow: visible;
  border: 1px solid rgba(238, 188, 62, 0.56);
  border-radius: 7px;
  background:
    url("../assets/img/btn-dark-frame.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(35, 24, 15, 0.96), rgba(8, 7, 6, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 223, 135, 0.1),
    0 8px 17px rgba(0, 0, 0, 0.36);
  color: #ffe4a0;
  text-align: left;
}

.home-menu .menu-row.is-featured {
  background:
    url("../assets/img/btn-gold-frame.webp") center / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(68, 40, 18, 0.97), rgba(15, 10, 7, 0.97));
}

.home-menu .menu-row::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  width: clamp(38px, 3.7vw, 52px);
  aspect-ratio: 1;
  border: 1px solid rgba(242, 202, 104, 0.66);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, rgba(89, 57, 24, 0.88), rgba(19, 11, 6, 0.96) 72%);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 163, 0.2),
    0 4px 10px rgba(0, 0, 0, 0.28);
}

.home-menu .menu-ico {
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  width: clamp(25px, 2.4vw, 34px);
  height: clamp(25px, 2.4vw, 34px);
  padding: 0;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.home-menu .menu-ico-friends {
  width: clamp(34px, 3.5vw, 48px);
  height: clamp(34px, 3.5vw, 48px);
}

.home-menu .menu-copy {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-menu .menu-row b {
  overflow-wrap: normal;
  font-size: clamp(0.82rem, 1.75vh, 1.08rem);
  line-height: 1.15;
}

.home-menu .menu-row small {
  margin-top: 2px;
  color: #d9b45e;
  font-family: var(--font-display);
  font-size: clamp(0.5rem, 1vh, 0.66rem);
  line-height: 1.1;
  letter-spacing: 0.06em;
}

.home-menu .menu-arrow {
  grid-column: 3;
  display: block;
  color: #f7d77b;
  font-family: Georgia, serif;
  font-size: clamp(1.25rem, 2.8vh, 1.7rem);
  line-height: 1;
  text-align: right;
  text-shadow: 0 2px 4px #000;
}

.home-menu .menu-row em {
  z-index: 5;
  top: -7px;
  right: 9px;
}

.home-foot {
  grid-area: foot;
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(190px, 1fr);
  align-items: end;
  min-height: 0;
  height: 100%;
  gap: clamp(8px, 1vw, 15px);
  transform: none;
  pointer-events: auto;
}

.fun-only {
  justify-self: start;
  max-width: min(320px, 100%);
  min-height: clamp(44px, 6.4vh, 58px);
  padding: 6px 10px;
  border: 1px solid rgba(233, 183, 54, 0.52);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(25, 18, 12, 0.9), rgba(7, 7, 6, 0.9));
}

.fun-only img {
  width: clamp(30px, 4.5vh, 42px);
  height: clamp(30px, 4.5vh, 42px);
}

.fun-only b {
  font-size: clamp(0.58rem, 1.2vh, 0.72rem);
}

.fun-only small {
  font-size: clamp(0.45rem, 0.9vh, 0.58rem);
}

.home-controls {
  justify-self: center;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 3px;
  border: 1px solid rgba(238, 188, 62, 0.58);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(29, 20, 12, 0.94), rgba(7, 7, 6, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 226, 143, 0.12),
    0 7px 15px rgba(0, 0, 0, 0.36);
}

.home-control {
  position: relative;
  width: clamp(64px, 8vh, 84px);
  min-height: clamp(46px, 6.8vh, 62px);
  aspect-ratio: auto;
  gap: 1px;
  border: 0;
  border-right: 1px solid rgba(224, 176, 61, 0.28);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-control:first-child {
  border-radius: 999px 0 0 999px;
}

.home-control:last-child {
  border-right: 0;
  border-radius: 0 999px 999px 0;
}

.home-control.is-on {
  background: radial-gradient(circle at 50% 36%, rgba(107, 68, 22, 0.46), transparent 72%);
  box-shadow: none;
}

.home-control > img {
  width: clamp(18px, 2.6vh, 25px);
  height: clamp(18px, 2.6vh, 25px);
}

.home-control > span {
  font-size: clamp(0.4rem, 0.85vh, 0.54rem);
  line-height: 1;
}

.home-social {
  justify-self: end;
  min-height: clamp(44px, 6.4vh, 58px);
  gap: clamp(5px, 0.55vw, 9px);
  padding: 5px 8px 5px 12px;
  border: 1px solid rgba(233, 183, 54, 0.52);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(25, 18, 12, 0.9), rgba(7, 7, 6, 0.9));
}

.home-social > span {
  display: block;
  color: #e4c377;
  font-size: clamp(0.5rem, 1vh, 0.64rem);
}

.home-social button {
  width: clamp(30px, 4.4vh, 40px);
  height: clamp(30px, 4.4vh, 40px);
}

@media (max-height: 820px) and (min-width: 933px) {
  .home-screen.is-on {
    grid-template-rows:
      50px
      clamp(84px, 15vh, 112px)
      minmax(0, 1fr)
      58px;
    padding-block:
      max(8px, env(safe-area-inset-top))
      max(7px, env(safe-area-inset-bottom));
  }

  .home-brand {
    transform: translateY(-28px);
  }

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

  .home-title-km {
    font-size: clamp(3rem, 9vh, 4rem);
  }

  .home-title-en {
    margin-top: 6px;
    font-size: 0.72rem;
  }

  .home-tag {
    margin-top: 5px;
    font-size: 0.58rem;
  }

  .home-history,
  .home-menu {
    margin-block: 14px;
  }

  .home-menu {
    gap: 6px;
  }

  .home-cover {
    bottom: 29%;
    width: min(54%, 370px);
  }

  .home-plate {
    width: min(74%, 530px);
  }

  .home-pedestal {
    width: min(84%, 680px);
  }

  .home-play {
    width: clamp(340px, 72%, 520px);
    min-height: 54px;
    margin-bottom: 14px;
  }

  .home-control {
    width: 90px;
    min-height: 44px;
  }

  .fun-only {
    width: min(230px, 100%);
  }

  .home-social {
    min-width: 178px;
  }

  .home-social button {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 932px) and (orientation: landscape) {
  .home-screen.is-on {
    grid-template-columns:
      clamp(104px, 17vw, 160px)
      minmax(0, 1fr)
      clamp(180px, 28vw, 250px);
    grid-template-rows:
      42px
      clamp(50px, 14vh, 60px)
      minmax(0, 1fr)
      48px;
    grid-template-areas:
      "top top top"
      "history brand menu"
      "history center menu"
      "foot foot foot";
    column-gap: clamp(5px, 0.8vw, 8px);
    padding:
      max(3px, env(safe-area-inset-top))
      max(6px, env(safe-area-inset-right))
      max(3px, env(safe-area-inset-bottom))
      max(6px, env(safe-area-inset-left));
  }

  .home-top-left {
    gap: 5px;
  }

  .home-utilities {
    gap: 3px;
  }

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

  .home-gear {
    min-width: 0;
    padding: 3px 8px 3px 3px;
    gap: 4px;
    font-size: 0.54rem;
  }

  .home-gear-icon {
    width: 30px;
  }

  .home-utility {
    width: 38px;
  }

  .home-utility-lang {
    width: 68px;
    grid-template-columns: 18px auto;
    padding-inline: 7px;
  }

  .home-utility-lang > img {
    width: 18px;
    height: 18px;
  }

  .home-utility-lang > span {
    font-size: 0.52rem;
  }

  .home-account {
    gap: 5px;
  }

  .home-balance {
    min-width: 0;
    padding: 3px 8px 3px 4px;
    gap: 4px;
    font-size: 0.52rem;
  }

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

  .home-balance b {
    font-size: 0.78rem;
  }

  .home-alert {
    width: 38px;
  }

  .home-history {
    gap: 2px;
    margin-block: 2px;
    padding: 9px 6px;
  }

  .home-history h2 {
    padding-bottom: 3px;
    font-size: clamp(0.48rem, 1.9vh, 0.58rem);
  }

  .home-history-slot {
    gap: 3px;
    padding: 1px;
  }

  .home-history-slot .hist-row {
    gap: 4px;
  }

  .home-history-slot .hist-die {
    width: clamp(22px, 6.2vh, 28px);
    height: clamp(22px, 6.2vh, 28px);
  }

  .home-history-slot .hist-num {
    font-size: clamp(0.66rem, 2.6vh, 0.82rem);
  }

  .home-history-slot .hist-time {
    font-size: clamp(0.38rem, 1.5vh, 0.48rem);
  }

  .history-link {
    min-height: 28px;
    gap: 3px;
    padding: 2px 4px;
    font-size: clamp(0.42rem, 1.6vh, 0.5rem);
  }

  .history-link img {
    width: 14px;
    height: 14px;
  }

  .history-link b {
    min-width: 17px;
    padding: 1px 4px;
  }

  .home-brand {
    width: 100%;
    transform: translateY(-8px);
  }

  .home-crest {
    width: min(38%, 130px);
    max-height: 20px;
    margin-bottom: -3px;
  }

  .home-title-km {
    font-size: clamp(1.25rem, 6vh, 1.65rem);
  }

  .home-title-en {
    width: min(68%, 210px);
    margin-top: 3px;
    font-size: 0.48rem;
  }

  .home-tag {
    display: none;
  }

  .home-pedestal {
    width: min(98%, 430px);
  }

  .home-plate {
    bottom: 17%;
    width: min(76%, 330px);
  }

  .home-cover {
    bottom: 29%;
    width: min(55%, 230px);
  }

  .home-play {
    width: min(76%, 300px);
    min-height: 44px;
    margin-bottom: 1px;
    padding: 4px 18px;
  }

  .home-play-km {
    font-size: clamp(0.82rem, 3.7vh, 1.02rem);
  }

  .home-play-en {
    margin-top: 1px;
    font-size: 0.44rem;
  }

  .home-menu {
    gap: 3px;
    margin-block: 2px;
  }

  .home-menu .menu-row {
    grid-template-columns: 30px minmax(0, 1fr) 10px;
    gap: 5px;
    padding: 3px 7px;
  }

  .home-menu .menu-row::before {
    width: 28px;
  }

  .home-menu .menu-ico {
    width: 18px;
    height: 18px;
  }

  .home-menu .menu-ico-friends {
    width: 28px;
    height: 28px;
  }

  .home-menu .menu-row b {
    font-size: clamp(0.55rem, 2.25vh, 0.66rem);
  }

  .home-menu .menu-row small {
    margin-top: 0;
    font-size: clamp(0.36rem, 1.35vh, 0.43rem);
  }

  .home-menu .menu-arrow {
    font-size: 1rem;
  }

  .home-menu .menu-row em {
    top: -3px;
    right: 5px;
    padding: 1px 4px;
    font-size: 6px;
  }

  .home-foot {
    grid-template-columns: minmax(104px, 1fr) auto minmax(90px, 1fr);
    height: 48px;
    gap: 4px;
  }

  .fun-only,
  .home-social {
    min-height: 38px;
  }

  .fun-only {
    max-width: 155px;
    gap: 4px;
    padding: 3px 5px;
  }

  .fun-only img {
    width: 25px;
    height: 25px;
  }

  .fun-only b {
    font-size: 6px;
  }

  .fun-only small {
    display: none;
  }

  .home-controls {
    padding: 2px;
  }

  .home-control {
    width: 39px;
    min-height: 36px;
  }

  .home-control > img {
    width: 16px;
    height: 16px;
  }

  .home-control > span {
    font-size: 4.7px;
  }

  .home-social {
    gap: 2px;
    padding: 3px 4px;
  }

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

  .home-social button {
    width: 27px;
    height: 27px;
  }
}

@media (max-width: 740px) and (max-height: 380px) and (orientation: landscape) {
  .home-screen.is-on {
    grid-template-columns: 92px minmax(0, 1fr) 158px;
    grid-template-rows: 42px 46px minmax(0, 1fr) 43px;
    column-gap: 4px;
  }

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

  .home-utility {
    width: 32px;
    min-height: 32px;
  }

  .home-utility-lang {
    width: 58px;
    padding-inline: 5px;
  }

  .home-account {
    gap: 3px;
  }

  .home-balance {
    min-height: 34px;
  }

  .home-alert {
    width: 34px;
    min-height: 34px;
  }

  .home-history {
    padding: 7px 4px;
  }

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

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

  .history-link > span {
    white-space: nowrap;
  }

  .home-brand {
    transform: translateY(-5px);
  }

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

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

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

  .home-pedestal {
    width: min(96%, 330px);
  }

  .home-plate {
    width: min(72%, 250px);
  }

  .home-cover {
    width: min(50%, 175px);
  }

  .home-play {
    width: min(72%, 235px);
    min-height: 40px;
  }

  .home-menu .menu-row {
    grid-template-columns: 26px minmax(0, 1fr) 8px;
    gap: 4px;
    padding: 2px 5px;
  }

  .home-menu .menu-row::before {
    width: 24px;
  }

  .home-menu .menu-ico {
    width: 15px;
    height: 15px;
  }

  .home-menu .menu-ico-friends {
    width: 24px;
    height: 24px;
  }

  .home-menu .menu-row b {
    font-size: 0.53rem;
  }

  .home-menu .menu-row small {
    font-size: 0.34rem;
  }

  .home-foot {
    height: 43px;
  }

  .home-control {
    width: 34px;
    min-height: 33px;
  }

  .home-social button {
    width: 25px;
    height: 25px;
  }
}
