/* Game content only. Shared header/footer/main geometry comes from the live shell. */
#tmnt{--mk3-gold:#efbd67;--mk3-panel:#211b20;color:#f8ece0}
#tmnt [hidden]{display:none!important}#tmnt a{color:inherit}#tmnt .subnav{display:flex;justify-content:space-between;gap:16px;margin:0 0 20px;font-size:14px}
#tmnt .hero{position:relative;isolation:isolate;aspect-ratio:1672/941;border:1px solid #65503b;border-radius:12px;overflow:hidden;background:#171316}
#tmnt .hero picture{display:block;width:100%;height:100%}#tmnt .hero img{display:block;width:100%;height:100%;object-fit:contain}
#tmnt .hero-copy{position:absolute;bottom:6%;left:15%;width:70%;text-align:center;text-shadow:0 3px 6px #000}
#tmnt .eyebrow{font-size:12px;font-weight:800;letter-spacing:.12em;color:var(--mk3-gold);margin:0 0 10px}
#tmnt h1{font-size:clamp(36px,5.5vw,72px);font-weight:900;line-height:1;letter-spacing:-.04em;color:#fff1d7;margin:0;text-wrap:balance}
#tmnt .mode-pills{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}#tmnt .mode-pills span{border:1px solid #a27d4f;background:#171318;border-radius:5px;padding:6px 9px;font-size:12px}
#tmnt .button{min-height:48px;height:auto;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 20px;border:1px solid #9e774a;border-radius:7px;font-size:15px;font-weight:750;text-decoration:none;cursor:pointer;background:#33252b;color:#fff0de}
#tmnt .button.primary{background:var(--mk3-gold);border-color:var(--mk3-gold);color:#21191a}#tmnt button:disabled{opacity:.6;cursor:wait}#tmnt :focus-visible{outline:3px solid #ffe2a9;outline-offset:4px}
#tmnt .actions{display:flex;flex-wrap:wrap;gap:10px}#tmnt .entry-panel{display:flex;align-items:center;justify-content:space-between;gap:24px;background:var(--mk3-panel);border:1px solid #69513b;border-radius:12px;padding:24px;margin:24px 0}
#tmnt .entry-panel>div:first-child{max-width:510px}#tmnt .entry-panel .actions{max-width:430px}#tmnt h2{font-size:28px;line-height:1.2;margin:0 0 12px}#tmnt h3{font-size:19px;margin:0 0 9px}#tmnt p{line-height:1.6}#tmnt .section{padding:30px 0;border-top:1px solid #69513b}
#tmnt .steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-top:25px}#tmnt .step>span{color:var(--mk3-gold);font-size:32px;font-weight:800;display:block;margin-bottom:8px}#tmnt .step p,#tmnt .muted{color:#cbbbaf}
#tmnt .guide-row{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:24px}#tmnt .guide-card,#tmnt .room-card{padding:22px;border:1px solid #69513b;border-radius:9px;background:var(--mk3-panel)}
#tmnt .rooms-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}#tmnt .room-list-actions{margin-top:20px}
#tmnt .form-page{max-width:800px;margin:0 auto;padding-top:12px}#tmnt .back-link{display:inline-flex;min-height:48px;align-items:center;margin-bottom:16px}#tmnt .form-title{font-size:32px;letter-spacing:normal;line-height:1.2}#tmnt .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:24px 0}
#tmnt label{display:flex;flex-direction:column;gap:8px;font-size:14px}#tmnt input,#tmnt select{width:100%;min-height:48px;padding:10px 12px;border:1px solid #9b7954;background:#191519;color:#fff0de;border-radius:6px;font:inherit}#tmnt input::placeholder{color:#cbbbaf}
#tmnt .error{color:#ffbfa9;min-height:24px}#tmnt .room-layout{display:grid;grid-template-columns:1fr 240px;gap:30px;margin:24px 0}#tmnt #public-qr{padding:16px;background:white;display:flex;align-items:center;justify-content:center;border-radius:6px;align-self:start}#tmnt #public-qr img{max-width:100%;height:auto;image-rendering:pixelated}#tmnt #public-link{margin:12px 0}
#tmnt details{border-bottom:1px solid #69513b;padding:17px 0}#tmnt summary{cursor:pointer;font-weight:700;min-height:48px;display:flex;align-items:center}#tmnt dialog{max-width:min(520px,calc(100vw - 32px));background:var(--mk3-panel);color:#fff0de;border:1px solid #9e774a;border-radius:12px;padding:24px}#tmnt dialog::backdrop{background:#090609cc}
@media(max-width:1100px) and (min-width:761px){#tmnt .hero{aspect-ratio:4/3}#tmnt .hero-copy{bottom:5%;left:12%;width:76%}#tmnt h1{font-size:54px}#tmnt .entry-panel{display:block}#tmnt .entry-panel>div:first-child,#tmnt .entry-panel .actions{max-width:none}#tmnt .entry-panel .actions{margin-top:20px}}
@media(max-width:760px){#tmnt .subnav{font-size:12px;flex-wrap:wrap;margin-bottom:14px}#tmnt .hero{aspect-ratio:2/3}#tmnt .hero-copy{bottom:8%;left:8%;width:84%}#tmnt h1{font-size:clamp(30px,8.5vw,46px)}#tmnt .eyebrow{font-size:10px;letter-spacing:.06em}#tmnt .entry-panel{display:block;padding:18px;margin-top:18px}#tmnt .entry-panel .actions{display:grid;grid-template-columns:1fr 1fr;margin-top:16px;max-width:none}#tmnt .game-download{grid-column:1/-1}#tmnt .button{padding:11px 12px;font-size:14px}#tmnt .steps,#tmnt .guide-row,#tmnt .rooms-grid,#tmnt .form-grid,#tmnt .room-layout{grid-template-columns:1fr}#tmnt .steps{gap:14px}#tmnt h2{font-size:24px}#tmnt .section{padding:24px 0}#tmnt .room-layout{gap:20px}#tmnt #public-qr{width:230px;max-width:100%}}

body.tmnt-theme {
  --tmnt-base: #151811;
  --tmnt-surface: #1b2118;
  --tmnt-ink: #f4f0dd;
  --tmnt-muted: #bfc5b4;
  --tmnt-accent: #c7e968;
  --tmnt-line: #f5f0dd2b;
  background: var(--tmnt-base);
  color: var(--tmnt-ink);
  color-scheme: dark;
}

.tmnt-theme .site-footer { background: #191e16; }
.tmnt-theme .brand strong { color: var(--tmnt-accent); }
.tmnt-theme .languages [aria-current="page"] { color: var(--tmnt-accent); background: #f5f0dd14; }

.tmnt-theme #tmnt { max-width: none; margin: 0; padding: 0; color: var(--tmnt-ink); }
#tmnt > [data-pane]:not(.tmnt-landing) {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 45px;
}
#tmnt .form-page { background: var(--tmnt-surface); border-radius: 16px; }
#tmnt .button.primary { background: var(--tmnt-accent); border-color: var(--tmnt-accent); color: #18210e; }
#tmnt .button.secondary { background: var(--tmnt-ink); border-color: var(--tmnt-ink); color: #18210e; }
#tmnt :focus-visible { outline: 3px solid var(--tmnt-accent); outline-offset: 4px; }

.tmnt-landing :is(h1, h2, p, figure) { margin: 0; }
.tmnt-wrap { width: min(100%, 1280px); margin-inline: auto; padding-inline: clamp(19px, 3vw, 36px); }
.tmnt-hero { position: relative; isolation: isolate; min-height: 620px; display: grid; align-items: center; }
.tmnt-poster, .tmnt-hero::before { position: absolute; inset: 0; z-index: -1; }
.tmnt-poster img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 33%; }
.tmnt-hero::before {
  content: '';
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #11170ff5 0%, #11170fe3 24%, #11170f86 43%, transparent 74%),
    linear-gradient(0deg, var(--tmnt-base), transparent 26%);
}
.tmnt-hero-copy { position: relative; padding-block: 62px 82px; }
#tmnt .tmnt-hero h1 {
  max-width: 535px;
  font-size: clamp(39px, 4.1vw, 60px);
  line-height: .98;
  letter-spacing: -.054em;
  font-weight: 900;
}
.tmnt-hero h1 span {
  display: block;
  margin-bottom: 15px;
  font-size: clamp(76px, 9vw, 130px);
  line-height: .84;
  letter-spacing: -.081em;
  color: var(--tmnt-accent);
}
.tmnt-landing .tmnt-lead { max-width: 35ch; margin-top: 22px; font-size: 19px; line-height: 1.55; }
.tmnt-actions, .tmnt-small-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tmnt-actions { margin-top: 24px; }
#tmnt .tmnt-landing .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 780;
  text-align: center;
}
.tmnt-actions img { filter: brightness(0); }
.tmnt-small-actions { margin-top: 13px; gap: 0 20px; font-size: 14px; font-weight: 650; color: var(--tmnt-muted); }
.tmnt-small-actions a { display: inline-flex; align-items: center; min-height: 44px; }
#tmnt .tmnt-small-actions .tmnt-install { color: var(--tmnt-accent); text-decoration: underline; text-underline-offset: 4px; }

.tmnt-rooms, .tmnt-home { background: var(--tmnt-surface); }
.tmnt-rooms, .tmnt-scenes { padding-block: 36px; }
#tmnt .tmnt-landing h2 { font-size: 34px; line-height: 1.1; letter-spacing: -.045em; font-weight: 850; }
.tmnt-rooms h2 + p, .tmnt-home p { margin-top: 7px; color: var(--tmnt-muted); line-height: 1.5; }
.tmnt-rooms .tmnt-actions { margin-block: 18px 20px; }
.tmnt-landing .tmnt-room-status { color: var(--tmnt-muted); font-size: 14px; margin-bottom: 7px; }
.tmnt-room-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: center;
  gap: clamp(8px, 3vw, 28px);
  min-height: 75px;
  padding: 8px 0;
  border-top: 1px solid var(--tmnt-line);
}
.tmnt-room-row:last-child { border-bottom: 1px solid var(--tmnt-line); }
.tmnt-room-name { min-width: 0; overflow-wrap: anywhere; }
.tmnt-room-name small { display: block; margin-top: 3px; color: var(--tmnt-muted); }
.tmnt-room-seats { font-variant-numeric: tabular-nums; }
.tmnt-screen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 20px; }
.tmnt-screen-grid figure { min-width: 0; background: #f5f0dd0a; }
.tmnt-screen-grid img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.tmnt-screen-grid figcaption { padding: 12px 14px; color: var(--tmnt-muted); font-size: 14px; font-weight: 650; }
.tmnt-home { padding-block: 30px; }
.tmnt-home-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; }
.tmnt-home img { border-radius: 15px; }
#tmnt .tmnt-home h2 { font-size: 28px; }

@media (max-width: 1050px) {
  .tmnt-hero { min-height: 520px; }
  .tmnt-poster img { object-position: 57% 36%; }
}
@media (max-width: 730px) {
  .tmnt-hero { display: block; min-height: 0; }
  .tmnt-poster { position: relative; z-index: auto; display: block; aspect-ratio: 16 / 9; }
  .tmnt-hero::before { display: none; }
  .tmnt-hero-copy { padding-block: 23px 28px; background: linear-gradient(150deg, #251f1b, var(--tmnt-base)); }
  #tmnt .tmnt-hero h1 { font-size: clamp(34px, 9.4vw, 51px); }
  .tmnt-hero h1 span { font-size: clamp(63px, 19vw, 88px); margin-bottom: 8px; }
  .tmnt-landing .tmnt-lead { margin-top: 13px; font-size: 16px; }
  .tmnt-actions { margin-top: 17px; gap: 8px; }
  .tmnt-small-actions { margin-top: 8px; }
  #tmnt .tmnt-landing .button { padding-inline: 11px; font-size: 13px; }
  .tmnt-rooms, .tmnt-scenes { padding-block: 28px; }
  #tmnt .tmnt-landing h2 { font-size: 28px; }
  .tmnt-screen-grid { grid-template-columns: 1fr; gap: 17px; }
  .tmnt-home-inner { grid-template-columns: auto 1fr; gap: 14px; }
  .tmnt-home-inner .button { grid-column: 2; justify-self: start; }
  #tmnt .tmnt-home h2 { font-size: 23px; }
}

#tmnt #tmnt-install-guide {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(475px, calc(100% - 36px));
  max-height: calc(100% - 36px);
  padding: clamp(18px, 5vw, 27px);
  background: #20281e;
  color: var(--tmnt-ink);
  border: 1px solid var(--tmnt-line);
  border-radius: 15px;
}
#tmnt #tmnt-install-guide::backdrop { background: #10140de0; }
#tmnt .tmnt-install-head { display: flex; align-items: center; gap: 12px; padding-right: 35px; }
#tmnt .tmnt-install-head h2 { font-size: clamp(21px, 5.5vw, 27px); }
.tmnt-install-head img { border-radius: 13px; }
.tmnt-install-head p { margin-top: 5px; color: var(--tmnt-muted); }
#tmnt .tmnt-install-close {
  position: absolute;
  inset: 5px 5px auto auto;
  width: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: 26px;
  line-height: 1;
}
#tmnt-install-guide ol { padding-inline-start: 23px; margin: 20px 0; }
#tmnt-install-guide li { padding-inline-start: 4px; margin-bottom: 9px; line-height: 1.5; }
#tmnt-install-guide li::marker { color: var(--tmnt-accent); font-weight: 750; }

.tmnt-theme .site-footer { min-width: 0; }
.tmnt-theme .footer-links { min-width: 0; display: flex; flex-wrap: wrap; gap: 12px 18px; }
.tmnt-theme .footer-telegram { display: block; }
@media (max-width: 760px) {
  .tmnt-theme .site-footer { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 28px 20px 105px; gap: 18px; }
  .tmnt-theme .footer-store { white-space: normal; }
}

/* The shared region wrapper supplies the block, while TMNT owns pane visibility. */
#tmnt:not([data-tmnt-pane="landing"]) [data-mobsik-ad] { display: none !important; }
#tmnt .tmnt-landing > [data-mobsik-ad] { width: min(calc(100% - 36px), 970px); }

#tmnt .tmnt-room-nav{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem 1.25rem}

#tmnt > .form-page[data-pane="create"] {
  box-sizing: border-box;
  padding: clamp(20px, 3.4vw, 40px);
}
#tmnt [data-pane="create"] > .back-link { margin: 0 0 20px; }
#tmnt [data-pane="create"] > .eyebrow { margin: 0 0 8px; }
#tmnt [data-pane="create"] > .form-title { margin: 0 0 6px; }
#tmnt [data-pane="create"] > .form-title + p { margin: 0 0 24px; }
#tmnt #create-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  margin: 0;
}
#tmnt #create-form label { min-width: 0; display: grid; gap: 8px; margin: 0; }
#tmnt #create-form :is(input, select) { box-sizing: border-box; min-width: 0; width: 100%; margin: 0; }
#tmnt #create-error:empty { display: none; }
#tmnt #create-form .actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
@media (max-width: 639px) {
  #tmnt > .form-page[data-pane="create"] { padding: 20px 16px; }
  #tmnt #create-form .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #tmnt [data-pane="create"] > .back-link { margin-bottom: 16px; }
}

@media (min-width: 761px) and (min-height: 501px) {
  html:has(body.tmnt-theme) { scroll-padding-top: 96px; scrollbar-gutter: stable; }
  .tmnt-theme .header {
    position: sticky;
    top: 0;
    z-index: 20;
    flex: 0 0 88px;
    background: #101516;
  }
  .tmnt-theme .header .brand strong { color: #c6ee67; }
  .tmnt-theme .header .languages [aria-current="page"] { color: #c6ee67; background: #202a20; }
}
@media (max-width: 760px), (max-height: 500px) {
  .tmnt-theme .header { background: #191e16; }
}
