/* Start screen. Telegram already frames the Mini App, so the menu sits directly
   on the page: no card, no dividers. Actions are raised, information is recessed. */
.layout.is-home { display: flex; justify-content: center; align-items: stretch; padding: 0; overflow-y: auto; }
.is-home .panel { position: relative; display: flex; flex-direction: column; width: min(100%, 400px); min-height: 100%; max-height: none; margin: 0 auto; padding: 46px 2px 0; gap: 18px; overflow: visible; background: none; border: 0; border-radius: 0; box-shadow: none; }
/* Title and choices stay centred in the free space; statistics and icons keep to the bottom. */
.is-home .start-brand { margin-top: auto; }
.is-home #home-choices, .is-home #online-slot { margin-bottom: auto; }
.is-home .back-button { top: 2px; left: 0; }

.is-home .language-switch { top: 2px; right: 0; padding: 0; border: 0; background: none; }
.is-home .language-switch button { min-width: 36px; min-height: 36px; font-size: 11px; }
.is-home .language-switch button[aria-pressed='true'] { background: none; box-shadow: none; color: var(--ink); }

.is-home .mode-button:not(.primary) { border-color: transparent; background: var(--surface); box-shadow: 0 1px 2px #31463c14, 0 4px 14px -6px #31463c29; }
.is-home .mode-button:not(.primary):hover:not(:disabled) { background: #fff; }
.is-home #play-computer[aria-expanded='true'] { background: var(--surface-2); box-shadow: none; }

/* Visitors: a quiet status plate on a neutral ground, not part of the game UI. */
.attendance { display: flex; align-items: center; gap: 14px; min-width: 0; margin: 0; padding: 10px 14px; border-radius: 14px; background: #eaebe4; color: var(--muted); }
.attendance.is-unavailable { display: none; }
.attendance-figure { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; flex: none; min-width: 96px; margin: 0; line-height: 1.2; }
.attendance-figure svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.attendance-figure strong { color: #56635b; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.attendance-figure span { grid-column: 1 / -1; font-size: 10px; white-space: nowrap; }
.attendance-chart { display: block; flex: 1; min-width: 0; height: 36px; overflow: visible; touch-action: pan-y; cursor: crosshair; }
.attendance-chart:focus { outline: none; }
.attendance-chart:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
.attendance-base { stroke: #d3d7cd; stroke-width: 1; }
.attendance-area { fill: #7e8f84; opacity: .12; }
.attendance-line { fill: none; stroke: #7e8f84; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.attendance-now { fill: var(--accent); stroke: #eaebe4; stroke-width: 2; }
.attendance-cursor { stroke: #9aa59d; stroke-width: 1; stroke-dasharray: 2 2; }

/* Five icons, no labels: games to watch, leaderboard, rules, share, settings. */
.home-nav { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 -2px; padding-bottom: 2px; }
.home-nav-button { display: grid; place-items: center; height: 56px; padding: 0; border: 0; border-radius: 14px; background: transparent; color: #3e5360; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background 130ms, transform 130ms; }
.home-nav-button svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-nav-button:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.home-nav-button:active:not(:disabled) { transform: scale(.94); }
.home-nav-button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.home-nav-button:disabled { opacity: .45; cursor: wait; }
/* Share feedback floats above the icons instead of pushing the layout. */
.home-nav .telegram-status { position: absolute; left: 50%; bottom: calc(100% + 6px); z-index: 2; width: max-content; max-width: 100%; padding: 7px 12px; border-radius: 10px; background: var(--ink); color: var(--surface); font-size: 12px; transform: translateX(-50%); box-shadow: 0 6px 20px -8px #19303d80; pointer-events: none; }

@media (max-width: 440px) {
  .is-home .panel { padding-top: 44px; gap: 16px; }
}
@media (max-height: 700px) {
  .is-home .panel { padding-top: 40px; gap: 12px; }
  .attendance { padding: 7px 12px; }
  .attendance-chart { height: 30px; }
  .home-nav-button { height: 50px; }
}
