/* tg.css: Telegram Mini App extras (tg.js). Only has an effect when tg.js put class "tg" on <html>. */
html.tg, html.tg body { background: #000; }
/* Fullscreen on a phone: Telegram draws its own buttons over the top strip; keep the start screen below them. */
html.tg-fs body:not([data-mode]):not(.tc-play) .cover { padding-top: calc(var(--tg-top, 0px) + 14px); }
html.tg-fs body.tc-play .tc-sheet { margin-top: var(--tg-top, 0px); }

.mkv-tg-sheet { position: fixed; inset: 0; z-index: 9100; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, 0.62); padding: 12px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
@media (min-height: 520px) and (min-width: 700px) { .mkv-tg-sheet { align-items: center; } }
.mkv-tg-box { width: min(100%, 360px); display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid #5a4214; border-radius: 8px;
  background: linear-gradient(180deg, #1a1208 0%, #0a0705 100%); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7); }
.mkv-tg-h { font: 400 15px/1.2 "Russo One", "Arial Black", system-ui, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; color: #f2c14e; text-align: center; padding: 2px 0 4px; }
.mkv-tg-hint { min-height: 1.2em; text-align: center; font: 13px/1.2 system-ui, sans-serif; color: #a99d89; }
.mkv-tg-box button { appearance: none; border: 1px solid #4a3716; border-radius: 6px; padding: 13px 14px; min-height: 46px; cursor: pointer;
  font: 400 15px/1 "Russo One", "Arial Black", system-ui, sans-serif; letter-spacing: 0.03em; text-transform: uppercase; color: #efe9df; background: #17110a; }
.mkv-tg-box button.gold { color: #1c1204; border-color: #b47a12; background: linear-gradient(180deg, #ffe08a 0%, #f2c14e 45%, #c98a16 100%); }
.mkv-tg-box button.red { color: #fff; border-color: #6d0b05; background: linear-gradient(180deg, #e2402c 0%, #b3170e 55%, #6d0b05 100%); }
.mkv-tg-box button.plain { border-color: transparent; background: transparent; color: #a99d89; text-transform: none; font-size: 14px; font-family: system-ui, sans-serif; min-height: 40px; }
.mkv-tg-box button:disabled { opacity: 0.5; }
.mkv-tg-box button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Pseudo full screen (tg.js, inside Telegram only): the stage covers the window, 16:10, centred, black. */
html.tg-pfs, html.tg-pfs body { overflow: hidden; background: #000; }
html.tg-pfs .stage { position: fixed !important; inset: 0 !important; z-index: 900; width: 100vw !important; height: 100vh !important; max-width: none !important;
  aspect-ratio: auto !important; margin: 0 !important; border: 0 !important; background: #000; }
html.tg-pfs .stage { width: 100dvw !important; height: 100dvh !important; }
html.tg-pfs .stage .dos { inset: auto; left: 50%; top: 50%; width: min(100vw, 160vh); height: min(100vh, 62.5vw); transform: translate(-50%, -50%); }
@supports (height: 100dvh) { html.tg-pfs .stage .dos { width: min(100dvw, 160dvh); height: min(100dvh, 62.5dvw); } }
html.tg-pfs .bar, html.tg-pfs header.top { visibility: hidden; }
.mkv-tg-fsx { position: fixed; z-index: 9050; top: calc(var(--tg-top, 0px) + 8px); right: 8px; pointer-events: auto; appearance: none; cursor: pointer;
  border: 1px solid rgba(242, 193, 78, 0.5); border-radius: 5px; padding: 7px 11px; min-height: 32px; opacity: 0.55; color: #f2c14e; background: rgba(0, 0, 0, 0.55);
  font: 400 12px/1 "Russo One", "Arial Black", system-ui, sans-serif; letter-spacing: 0.03em; text-transform: uppercase; }
.mkv-tg-fsx:hover { opacity: 1; }
