/* house.css — page-specific styles for 🏛️ The House (house.html).
 *
 * MUST NOT contain navbar rules — those live in nav.css (see its header for
 * the commit-7d08a29 story). This file carries no navbar selector.
 *
 * Same single dark carnival look as arena.css / the game pages (site-wide
 * choice): Comic Sans stack, BlazeitBG backdrop, dark translucent panels,
 * orange glow, gold numbers. The page-specific flavour is "arcade cabinet
 * row": every game is a cabinet card with a marquee strip, a status lamp and
 * an LED-style money readout (tabular-nums + glow).
 *
 * No global box-sizing reset on this page (same as arena.css) — every rule
 * that mixes width/min-height with padding sets box-sizing explicitly.
 */

/* Brand colour tokens — copied verbatim from arena.css/style.css so the navbar
 * (which consumes these, with nav.css's :root fallback as the safety net)
 * renders colour-identical to every other page. Required, not decorative. */
:root {
    --c-orange: orange;
    --c-orange-dark: darkorange;
    --c-red: #ff4500;
    --c-gold: #ffcf48;
    --c-text: #ffffff;
    --navbar-bg: rgba(0, 0, 0, 0.95);
    --glow: 0 0 10px rgba(255, 69, 0, 0.7);
    /* --nav-h and --touch come from nav.css. Do not redefine them here. */
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body, "Comic Sans MS", system-ui, sans-serif);
    background: url('images/BlazeitBG.png') no-repeat center center;
    background-size: 100% auto;
    background-attachment: fixed;
    background-color: #b0e8f7;
    color: var(--c-text);
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    padding-top: calc(var(--nav-h) + 24px);
    /* Sticky footer — same flex-column mechanism as every other page;
       tests/footer.spec.js checks the mechanism, not just the look. */
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px 40px;
    box-sizing: border-box;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #000;
    color: var(--c-gold);
    padding: 8px 14px;
    z-index: 200;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
}

/* ------------------------------------------------------------------ */
/* The big panel                                                       */
/* ------------------------------------------------------------------ */

.hd-panel {
    background: rgba(0, 0, 0, .82);
    border: 2px solid #ff7a18;
    box-shadow: 0 0 12px rgba(255, 69, 0, .6);
    border-radius: 20px;
    padding: 24px;
    box-sizing: border-box;
    text-align: center;
}

/* Marquee title — a chasing-lights strip around the headline. The "lights"
 * are a repeating gradient border animated via background-position; motion is
 * fully disabled under prefers-reduced-motion. */
.hd-marquee {
    display: inline-block;
    padding: 6px 18px 10px;
    border-radius: 16px;
    background:
        linear-gradient(rgba(0, 0, 0, .85), rgba(0, 0, 0, .85)) padding-box,
        repeating-linear-gradient(90deg,
            #ffcf48 0 10px, rgba(255, 207, 72, .15) 10px 20px) border-box;
    border: 4px solid transparent;
    animation: hd-chase 1.2s linear infinite;
}

@keyframes hd-chase {
    to { background-position: 0 0, 20px 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hd-marquee { animation: none; }
    .hd-lamp-open { animation: none; }
}

.hd-panel h1 {
    margin: 0;
    color: var(--c-gold);
    text-shadow: 0 0 6px #ff8c00, 0 0 10px #ff4500;
    overflow-wrap: anywhere;
}

.hd-tagline {
    margin: 12px auto 8px;
    color: #ffd9a0;
    max-width: 70ch;
}

/* "how to read the books" trigger — same pill shape as every info button. */
.viewer-info-btn {
    display: inline-block;
    font-family: inherit;
    font-size: 14px;
    margin: 0 auto 10px;
    padding: 6px 14px;
    min-height: var(--touch);
    border-radius: 999px;
    border: 1px solid rgba(255, 207, 72, .6);
    background: rgba(0, 0, 0, .45);
    color: var(--c-gold);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color .2s ease, border-color .2s ease;
}

.viewer-info-btn:hover,
.viewer-info-btn:focus-visible {
    background: rgba(255, 140, 0, .25);
    border-color: var(--c-gold);
    outline: none;
}

.hd-stamp {
    margin: 4px 0 18px;
    font-size: 13px;
    color: #b8c6cf;
}

.hd-stamp.hd-stamp-warn {
    color: #ffb347;
}

/* ------------------------------------------------------------------ */
/* Totals strip — the odometers                                        */
/* ------------------------------------------------------------------ */

.hd-totals {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0 0 22px;
}

.hd-total {
    flex: 1 1 170px;
    max-width: 240px;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 207, 72, .35);
    border-radius: 14px;
    padding: 12px 14px;
    box-sizing: border-box;
}

.hd-total-label {
    display: block;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #ffd9a0;
    margin-bottom: 6px;
}

.hd-total-value {
    display: block;
    font-size: 26px;
    color: var(--c-gold);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(255, 140, 0, .8);
    overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ */
/* The cabinet row                                                     */
/* ------------------------------------------------------------------ */

.hd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
    text-align: left;
}

.hd-cab {
    position: relative;
    background: rgba(10, 6, 2, .88);
    border: 2px solid rgba(255, 122, 24, .85);
    border-radius: 16px;
    padding: 14px 16px 16px;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(255, 69, 0, .35);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Cabinet marquee strip along the top edge. */
.hd-cab::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: repeating-linear-gradient(90deg,
        rgba(255, 207, 72, .9) 0 8px, rgba(255, 69, 0, .5) 8px 16px);
}

.hd-cab-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.hd-cab-name {
    font-size: 17px;
    font-weight: bold;
    color: var(--c-gold);
    text-decoration: none;
    text-shadow: 0 0 6px rgba(255, 140, 0, .7);
}

.hd-cab-name:hover,
.hd-cab-name:focus-visible {
    text-decoration: underline;
    outline: none;
}

.hd-lamp {
    flex: 0 0 auto;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(0, 0, 0, .5);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hd-lamp-open {
    color: #7cfc00;
    border-color: rgba(124, 252, 0, .5);
    animation: hd-lamp-pulse 2.4s ease-in-out infinite;
}

@keyframes hd-lamp-pulse {
    50% { box-shadow: 0 0 8px rgba(124, 252, 0, .55); }
}

.hd-lamp-paused {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, .55);
}

.hd-lamp-unknown {
    color: #b8c6cf;
    border-style: dashed;
}

/* The money readout. */
.hd-cab-float {
    background: rgba(0, 0, 0, .6);
    border: 1px solid rgba(255, 207, 72, .3);
    border-radius: 10px;
    padding: 8px 12px;
    box-sizing: border-box;
}

.hd-cab-float-label {
    display: block;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #ffd9a0;
}

.hd-cab-float-value {
    display: block;
    font-size: 24px;
    color: var(--c-gold);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(255, 140, 0, .8);
    overflow-wrap: anywhere;
}

.hd-rows {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.hd-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    border-top: 1px dashed rgba(255, 255, 255, .12);
    font-size: 13px;
}

/* [hidden] must beat the display:flex above, or a row hidden from JS still
   paints. Rows hide when a table is quiet and the vault figure would just
   repeat the headline float. */
.hd-row[hidden] { display: none; }

.hd-row dt {
    color: #ffd9a0;
    margin: 0;
}

.hd-row dd {
    margin: 0;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
    text-align: right;
    overflow-wrap: anywhere;
}

.hd-cab-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.hd-mode {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(184, 198, 207, .4);
    color: #b8c6cf;
    background: rgba(0, 0, 0, .5);
    white-space: nowrap;
}

.hd-play {
    font-size: 13px;
    font-weight: bold;
    color: #ffb347;
    text-decoration: none;
    padding: 6px 10px;
    min-height: var(--touch);
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 179, 71, .5);
    box-sizing: border-box;
}

.hd-play:hover,
.hd-play:focus-visible {
    background: rgba(255, 140, 0, .2);
    outline: none;
}

/* (.hd-footnote was dropped with the "straight talk" paragraph on
   2026-08-19 — owner request. The disclosure moved to the info modal.) */

/* ------------------------------------------------------------------ */
/* The static info modal                                               */
/*                                                                     */
/* viewer-modal.css does NOT own the whole modal, which is easy to get  */
/* wrong: it supplies the backdrop, the close button and the rap-verse  */
/* blocks, but the POSITIONING SHELL (.viewer-modal) and the CARD       */
/* itself (.viewer-modal-card) are defined per page, in each page's own */
/* stylesheet — arena.css, blazehilo.css, nftviewer.css and the rest    */
/* each carry their own copy.                                          */
/*                                                                     */
/* Linking the shared sheet and stopping there is exactly what shipped  */
/* on 2026-08-19: the dialog had no fixed position, no card, no ground, */
/* so it rendered as raw text down the page over the background art     */
/* with the buttons stranded at the bottom. The failure mode is silent  */
/* — every class name resolves, they just style nothing — which is why  */
/* the site-wide gate (it only checks that viewer-modal.css is LINKED)  */
/* stayed green through it. Copied from arena.css to stay identical.    */
/* ------------------------------------------------------------------ */

.viewer-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.viewer-modal[hidden] { display: none; }

.viewer-modal-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 26px 24px 24px;
    border-radius: 16px;
    border: 2px solid #ff7a18;
    background: rgba(10, 6, 2, .97);
    color: var(--c-text, #fff);
    box-shadow: 0 20px 60px -12px rgba(0, 0, 0, .8), var(--glow, 0 0 10px rgba(255, 69, 0, .7));
    animation: hdModalIn .22s ease;
    text-align: center;
}

@keyframes hdModalIn {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .viewer-modal-card { animation: none; }
}

#hdInfoTitle {
    margin: 0 0 4px;
    font-size: 20px;
    color: var(--c-gold, #ffcf48);
    text-shadow: 0 0 6px #ff8c00, 0 0 10px #ff4500;
    text-wrap: balance;
}

.viewer-rap { margin: 0; font-size: 14px; line-height: 1.7; color: #fff; }

/* Links inside the card would otherwise fall back to the browser's default
   blue, which on this near-black ground is close to unreadable. */
.viewer-modal-card a {
    color: #ffb347;
    text-decoration: underline;
}

.viewer-modal-card a:hover,
.viewer-modal-card a:focus-visible { color: var(--c-gold, #ffcf48); outline: none; }

.viewer-rap-mode {
    margin: 0 0 6px;
    font-weight: bold;
    color: var(--c-gold, #ffcf48);
    font-size: 15px;
}

.viewer-rap-mode span { color: rgba(255, 255, 255, .6); font-weight: normal; font-size: 12px; }

.viewer-btn {
    font-family: inherit;
    font-weight: bold;
    font-size: 16px;
    min-height: var(--touch);
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    background: orange;
    color: #000;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color .2s ease;
}

.viewer-btn:hover,
.viewer-btn:focus-visible { background: darkorange; outline: none; }

/* ------------------------------------------------------------------ */
/* Footer — same chrome as every page (footer.spec.js checks it)       */
/* ------------------------------------------------------------------ */

/* Footer — the SITE-STANDARD block, byte-for-byte the one in wrapper.css /
   revoker.css / txdecoder.css and the rest. This page used to carry its own
   darker, dimmer variant (0.9 alpha, dim text, bigger padding); the owner saw
   the seam from page to page (2026-09-02: "the footer has to be the same in
   all of our pages"). tests/footer-parity.spec.js pins the computed result. */
.footer {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 14px;
    margin-top: 20px;
    box-sizing: border-box;
}
.footer p { margin: 0; }
.trust-strip {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    justify-content: center;
    align-items: baseline;
    padding: 0 12px;
    font-size: 12px;
    color: #ded6c6; /* opaque: translucent text over a translucent panel has no contrast ratio (READABILITY rule) */
}
.trust-strip a { color: var(--c-gold); text-decoration: none; }
.trust-strip a:hover, .trust-strip a:focus-visible { color: var(--c-orange); text-decoration: underline; }
.trust-sep { opacity: 0.5; }

@media (max-width: 640px) {
    .hd-panel { padding: 18px 12px; }
    .hd-total { max-width: none; }
    .hd-total-value { font-size: 22px; }
}
