/* house.css -- the studio's shared type, panel and chrome tokens (engine 0.6.20; fleet audit 2026-11-17, patterns 9,
 * 10 and 15). Served by the house router at /tenshin_house.css (house_router(..., assets=True)); link it right after
 * tenshin_nav.css and before the game's own sheet. A game reads the tokens; it sets its own colours.
 *
 * Type and panels scale with the window through clamp(): a 360 px phone and a 2560 px desktop both read at a size
 * made for them, instead of 12-13 px text on a wide screen. Every value is min, preferred, max. */
:root {
  --tn-fs-xs:   clamp(0.75rem,  0.70rem + 0.15vw, 0.875rem);
  --tn-fs-sm:   clamp(0.8125rem, 0.75rem + 0.25vw, 1rem);
  --tn-fs-body: clamp(0.9375rem, 0.85rem + 0.30vw, 1.1875rem);
  --tn-fs-lg:   clamp(1.0625rem, 0.95rem + 0.45vw, 1.5rem);
  --tn-fs-xl:   clamp(1.375rem, 1.10rem + 0.90vw, 2.25rem);
  --tn-fs-hero: clamp(1.75rem,  1.20rem + 2.00vw, 3.5rem);
  --tn-lh: 1.45;

  --tn-gap:       clamp(0.5rem, 0.35rem + 0.5vw, 1.25rem);
  --tn-pad:       clamp(0.625rem, 0.45rem + 0.6vw, 1.5rem);
  --tn-radius:    clamp(6px, 4px + 0.25vw, 10px);
  --tn-panel-min: clamp(16rem, 14rem + 8vw, 24rem);       /* a side panel's width: grows on wide screens */
  --tn-panel-max: clamp(20rem, 16rem + 14vw, 36rem);
  --tn-page-max:  min(100%, 120rem);                       /* use the full width, up to an ultrawide's sensible line */
  --tn-tap: 24px;                                          /* the studio tap floor; phones get 44 below */
}
@media (pointer: coarse) { :root { --tn-tap: 44px; } }

/* Opt-in classes for a game that wants them as they are. .tn-pane (0.6.54; was .tn-panel, the floating-panels drop-in's
 * class, so a game with the drop-in had to unpad its panels) is a side panel sized by --tn-panel-min/max. */
.tn-type      { font-size: var(--tn-fs-body); line-height: var(--tn-lh); }
.tn-pane      { padding: var(--tn-pad); border-radius: var(--tn-radius); min-width: 0;
                width: clamp(var(--tn-panel-min), 30vw, var(--tn-panel-max)); max-width: 100%; box-sizing: border-box; }
.tn-stack     { display: flex; flex-direction: column; gap: var(--tn-gap); }
.tn-tap       { min-width: var(--tn-tap); min-height: var(--tn-tap); }

/* House chrome at every width (pattern 10): the nav drop-in hid the build under 640 px; the build and the report
 * control stay. Specificity (0,2,0) beats the drop-in's media rule whatever the link order. */
.tn-nav .tn-nav-ver { display: inline; }
/* Under 640 px the nav wraps to the end side; a game whose bar scrolls its nav in one row sets --tn-nav-wrap: nowrap
 * (and --tn-nav-justify: flex-start, the side a browser scrolls to) instead of overriding the rule (0.6.54). */
@media (max-width: 640px) {
  .tn-nav .tn-nav-ver { display: inline; font-size: 10px; margin-right: 0; }
  .tn-nav { gap: 4px; flex-wrap: var(--tn-nav-wrap, wrap); justify-content: var(--tn-nav-justify, flex-end); }
}
/* A game's own report control (pattern 10: BRaiNSTEM's was unstyled): give it class tn-report. The fallbacks are
 * the nav's dark colours, for a page that does not link tenshin_nav.css. */
.tn-report { display: inline-flex; align-items: center; min-height: var(--tn-tap); padding: 0 10px; box-sizing: border-box;
  background: var(--tn-nav-bg, #171a1f); color: var(--tn-nav-ink, #e8eaed); border: 1px solid var(--tn-nav-edge, #2f343c); border-radius: 6px;
  font: 12px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-decoration: none; cursor: pointer; }
.tn-report:hover, .tn-report:focus-visible { border-color: var(--tn-nav-accent, #e0b24a); color: var(--tn-nav-ink, #e8eaed); outline: none; }

/* The landing hero slot (pattern 15): platform.landing.hero_html renders it from the game's own sprite or shot. */
.tn-hero { margin: 0 auto var(--tn-gap); max-width: var(--tn-page-max); display: grid; gap: var(--tn-gap);
  grid-template-columns: minmax(0, 1fr); align-items: center; }
.tn-hero img { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; border-radius: var(--tn-radius); }
.tn-hero img.tn-pixel { image-rendering: pixelated; }
.tn-hero figcaption { font-size: var(--tn-fs-sm); line-height: var(--tn-lh); opacity: 0.85; }
.tn-hero h1 { font-size: var(--tn-fs-hero); line-height: 1.1; margin: 0; }
@media (min-width: 900px) {
  .tn-hero.tn-hero-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}
