/* =====================================================================
   THE LOUNGE — page styles. Everything is scoped under .lg-* so nothing
   here can leak into the rest of the site (styles.css is untouched).
   ===================================================================== */

.lg-page { background: #0b1220; }
.lg-page [hidden] { display: none !important; } /* the hidden attribute always wins over our display rules */
/* This page has one more top-level nav item than the other flat-nav pages; tighten the desktop gap so
   "Order Now" never runs into the header social icons. Mobile nav is untouched. */
@media (min-width: 769px) { .lg-page .nav-menu { gap: clamp(1.1rem, 2.2vw, 2.4rem); } }
.lg-main {
    background:
        radial-gradient(1200px 500px at 50% -10%, rgba(249, 115, 22, 0.14), transparent 60%),
        linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
    color: #fff;
    padding: 6.5rem 1rem 2.5rem;
    min-height: 60vh;
}
@media (min-width: 900px) { .lg-main { padding-top: 7.5rem; } }

/* ---------- intro ---------- */
.lg-intro { text-align: center; max-width: 760px; margin: 0 auto 1.5rem; }
.lg-eyebrow {
    margin: 0 0 0.35rem; font: 700 0.72rem/1 'Inter', sans-serif; letter-spacing: 0.22em;
    text-transform: uppercase; color: #fdba74;
}
.lg-title {
    margin: 0; font-family: 'Permanent Marker', cursive; font-weight: 400;
    font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: 1.05; color: #fff;
    text-shadow: 0 4px 0 rgba(249, 115, 22, 0.55), 0 10px 30px rgba(0, 0, 0, 0.5);
}
.lg-sub { margin: 0.75rem auto 0; max-width: 560px; color: #cbd5e1; font-size: 1rem; line-height: 1.55; }

/* ---------- the room (desktop: one perspective scene) ---------- */
.lg-scene {
    position: relative;
    margin: 0 auto;
    width: min(100%, calc((100vh - 230px) * 1.6));
    min-width: min(100%, 720px);
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    overflow: hidden;
    background: #7c7c75;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    isolation: isolate;
}
.lg-room-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lg-spot { position: absolute; }
.lg-spot-board  { left: 37%;   top: 19.5%; width: 41%;   height: 41.5%; }
.lg-spot-frame  { left: 83.5%; top: 26.2%; width: 5.75%; height: 7.2%; }
.lg-spot-plaque { left: 76%;   top: 63%;   width: 21%;   height: 21%; }
.lg-spot-table  { left: 21.5%; top: 58.5%; width: 28%;   height: 15%; }
.lg-m-ceiling, .lg-m-floor { display: none; }

/* ---------- bulletin board ---------- */
.lg-board {
    position: relative; width: 100%; height: 100%;
    border: 0.55em solid #6b4a2a;
    border-image: linear-gradient(160deg, #8b6238 0%, #5d3f22 50%, #85603a 100%) 1;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0 2px, transparent 3px),
        radial-gradient(circle at 70% 60%, rgba(0, 0, 0, 0.10) 0 2px, transparent 3px),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.06) 0 1px, transparent 2px),
        repeating-radial-gradient(circle at 50% 50%, rgba(0,0,0,0.04) 0 1px, transparent 1px 4px),
        linear-gradient(135deg, #c9a070 0%, #b98c5d 50%, #c59a6a 100%);
    background-size: 23px 19px, 31px 27px, 17px 23px, 9px 9px, 100% 100%;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.45);
    font-size: clamp(8px, 0.9vw, 14px);
    transition: none;
}
.lg-board-label {
    position: absolute; top: -1.9em; left: 50%; transform: translateX(-50%);
    background: #111; color: #f5f5f5; font: 800 0.72em/1 'Inter', sans-serif; letter-spacing: 0.18em;
    padding: 0.55em 1.1em; border-radius: 3px; white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}
.lg-board-inner { position: absolute; inset: 0; }
.lg-board-loading { position: absolute; left: 36%; top: 30%; width: 28%; }
.lg-board-more {
    position: absolute; left: 50%; bottom: -1.5em; z-index: 2; /* a tag hanging off the bottom of the frame */
    display: inline-flex; align-items: center; gap: 0.5em; white-space: nowrap;
    background: #fff8e1; color: #1e293b; border: 0; border-radius: 3px;
    padding: 0.75em 1em 0.65em 1.1em; font: 700 0.95em/1 'Inter', sans-serif; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35); transform: translateX(-50%) rotate(-1.5deg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lg-board-more .lg-pin { position: static; display: inline-block; width: 0.9em; height: 0.9em; transform: none; }
.lg-board-more:hover, .lg-board-more:focus-visible { transform: translateX(-50%) rotate(0deg) scale(1.05); box-shadow: 0 8px 18px rgba(0,0,0,0.45); outline: none; }
.lg-board-more:focus-visible { box-shadow: 0 0 0 3px #f97316, 0 8px 18px rgba(0,0,0,0.45); }

/* ---------- a pinned note ---------- */
.lg-note {
    --rot: 0deg; --x: 0%; --y: 0%; --w: 26%;
    position: absolute; left: var(--x); top: var(--y); width: var(--w);
    display: flex; flex-direction: column; gap: 0.35em;
    padding: 1.2em 0.75em 0.8em; border: 0; border-radius: 2px; text-align: left;
    color: #1f2937; font-family: 'Inter', sans-serif; cursor: pointer;
    background: #fbfaf5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25), 0 8px 16px rgba(0,0,0,0.3);
    transform: rotate(var(--rot));
    transform-origin: 50% 0.6em;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    will-change: transform;
}
.lg-note:hover, .lg-note:focus-visible {
    transform: rotate(0deg) scale(1.08); z-index: 5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 18px 34px rgba(0,0,0,0.45);
    outline: none;
}
.lg-note:focus-visible { box-shadow: 0 0 0 3px #f97316, 0 18px 34px rgba(0,0,0,0.45); }
.lg-note:active { transform: rotate(0deg) scale(1.03); }
.lg-note-static { pointer-events: none; }
.lg-note.lg-size-sm { --w: 20%; }
.lg-note.lg-size-md { --w: 24%; }
.lg-note.lg-size-lg { --w: 30%; }
/* On the wall itself notes stay compact; the reader modal / full-board view show everything */
.lg-board-inner .lg-note.lg-size-sm .lg-note-body { display: none; }
.lg-board-inner .lg-note.lg-size-md .lg-note-body { -webkit-line-clamp: 2; }
.lg-board-inner .lg-note.lg-size-sm .lg-note-title { font-size: 0.9em; }
.lg-board-inner .lg-note-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lg-board-inner.lg-dense .lg-note-body { display: none; }
.lg-board-inner.lg-dense .lg-note-title { -webkit-line-clamp: 2; font-size: 0.92em; }
.lg-board-inner.lg-dense .lg-note-link { display: none; }
.lg-paper-white  { background: linear-gradient(180deg, #fffefb, #f4f1e8); }
.lg-paper-yellow { background: linear-gradient(180deg, #fff4a9, #ffe77a); }
.lg-paper-blue   { background: linear-gradient(180deg, #dbeeff, #bcdcfb); }
.lg-paper-pink   { background: linear-gradient(180deg, #ffe0e8, #ffc6d4); }
.lg-paper-kraft  { background: linear-gradient(180deg, #dcb98b, #c9a06e); color: #2b1d10; }
.lg-paper-photo  { background: #fff; padding: 0.6em 0.6em 1.1em; gap: 0.5em; }
.lg-paper-photo .lg-note-title { font-family: 'Permanent Marker', cursive; font-weight: 400; text-align: center; font-size: 0.95em; }
.lg-pin {
    position: absolute; top: 0.35em; left: 50%; transform: translateX(-50%);
    width: 1.1em; height: 1.1em; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff 0, #ef4444 28%, #991b1b 100%);
    box-shadow: 0 2px 3px rgba(0,0,0,0.4);
}
.lg-pin-red    { background: radial-gradient(circle at 35% 30%, #fff 0, #ef4444 28%, #991b1b 100%); }
.lg-pin-blue   { background: radial-gradient(circle at 35% 30%, #fff 0, #3b82f6 28%, #1e3a8a 100%); }
.lg-pin-yellow { background: radial-gradient(circle at 35% 30%, #fff 0, #facc15 28%, #a16207 100%); }
.lg-pin-green  { background: radial-gradient(circle at 35% 30%, #fff 0, #22c55e 28%, #14532d 100%); }
.lg-pin-black  { background: radial-gradient(circle at 35% 30%, #cbd5e1 0, #334155 28%, #0f172a 100%); }
.lg-note-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1px; background: #e5e7eb; }
.lg-paper-photo .lg-note-img { aspect-ratio: 1 / 1; }
.lg-note-title { font-weight: 800; font-size: 1em; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.lg-paper-yellow .lg-note-title, .lg-paper-pink .lg-note-title, .lg-paper-blue .lg-note-title { font-family: 'Permanent Marker', cursive; font-weight: 400; font-size: 1.05em; }
.lg-note-body {
    font-size: 0.8em; line-height: 1.35; color: #374151;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.lg-note-link { font-size: 0.75em; font-weight: 700; color: #c2410c; }
.lg-note-empty {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-2deg);
    width: 60%; text-align: center; background: #fff8e1; color: #1e293b; padding: 1.2em 1em 1em; border-radius: 2px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3); font: 600 1em/1.35 'Inter', sans-serif;
}

/* ---------- framed real photo ---------- */
.lg-frame {
    position: relative; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer;
    background: #111; border-radius: 2px; box-shadow: 0 6px 14px rgba(0,0,0,0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.lg-frame img { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: cover; display: block; filter: saturate(0.9); }
.lg-frame-caption {
    position: absolute; left: 50%; bottom: -1.7em; transform: translateX(-50%);
    white-space: nowrap; font: 600 0.65rem/1 'Inter', sans-serif; color: rgba(255,255,255,0.75);
    opacity: 0; transition: opacity 0.2s ease;
}
.lg-frame:hover, .lg-frame:focus-visible { transform: scale(1.12); box-shadow: 0 12px 26px rgba(0,0,0,0.6), 0 0 0 3px rgba(249,115,22,0.6); outline: none; z-index: 3; }
.lg-frame:hover .lg-frame-caption, .lg-frame:focus-visible .lg-frame-caption { opacity: 1; }

/* ---------- check-in plaque ---------- */
.lg-plaque {
    position: relative; width: 100%; min-height: 100%; height: auto;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25em;
    padding: 0.8em 0.9em 0.7em; text-align: center; color: #fff;
    background: linear-gradient(180deg, #1b1b1f, #121215);
    border: 0.45em solid #8a5a33; border-image: linear-gradient(160deg, #a4703f, #6b4424 60%, #936436) 1;
    box-shadow: 0 12px 28px rgba(0,0,0,0.5), inset 0 0 30px rgba(0,0,0,0.5);
    font-size: clamp(9px, 0.95vw, 15px);
    transition: none;
}
.lg-plaque-head { font: 800 0.72em/1 'Inter', sans-serif; letter-spacing: 0.2em; color: #fdba74; }
.lg-plaque-count { font: 900 2.4em/1 'Inter', sans-serif; letter-spacing: -0.02em; color: #fff; text-shadow: 0 3px 0 rgba(249,115,22,0.6); }
.lg-plaque-text { margin: 0; font-size: 0.82em; line-height: 1.3; color: #e2e8f0; }
.lg-plaque-btn {
    margin-top: 0.4em; border: 0; border-radius: 999px; cursor: pointer;
    background: linear-gradient(135deg, #f97316, #ea580c); color: #fff;
    font: 800 0.85em/1 'Inter', sans-serif; letter-spacing: 0.04em; text-transform: uppercase;
    padding: 0.8em 1.3em; box-shadow: 0 6px 16px rgba(249,115,22,0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.lg-plaque-btn:hover:not(:disabled), .lg-plaque-btn:focus-visible { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(249,115,22,0.45); outline: none; }
.lg-plaque-btn:focus-visible { box-shadow: 0 0 0 3px #fff, 0 10px 22px rgba(249,115,22,0.45); }
.lg-plaque-btn:disabled { opacity: 0.55; cursor: default; }
.lg-plaque-btn.is-in { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 6px 16px rgba(34,197,94,0.35); }
.lg-plaque-link {
    background: none; border: 0; color: #93c5fd; text-decoration: underline; cursor: pointer;
    font: 600 0.72em/1.2 'Inter', sans-serif; padding: 0.3em; margin-top: 0.15em;
}
.lg-plaque-link:focus-visible { outline: 2px solid #f97316; outline-offset: 2px; border-radius: 4px; }
.lg-plaque-fine { margin: 0.15em 0 0; font-size: 0.6em; color: #94a3b8; line-height: 1.3; max-width: 26em; }

/* ---------- games on the table ---------- */
.lg-table-items { display: flex; justify-content: space-between; align-items: flex-end; width: 100%; height: 70%; gap: 2%; }
.lg-table-hint { display: none; }
.lg-game-item {
    flex: 1 1 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.4em;
    background: none; border: 0; padding: 0.4em 0.2em 0; cursor: pointer; color: #fff;
    font-size: clamp(8px, 0.9vw, 14px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
    filter: drop-shadow(0 6px 6px rgba(0,0,0,0.45));
}
.lg-game-item:hover, .lg-game-item:focus-visible { transform: translateY(-6%) scale(1.08); filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5)) drop-shadow(0 0 10px rgba(249,115,22,0.45)); outline: none; }
.lg-game-item:focus-visible .lg-game-label { box-shadow: 0 0 0 2px #f97316; }
.lg-game-label {
    font: 700 0.8em/1 'Inter', sans-serif; color: #fff; background: rgba(0,0,0,0.55);
    padding: 0.45em 0.7em; border-radius: 999px; white-space: nowrap;
}
/* card deck */
.lg-cards { position: relative; width: 4.2em; height: 3.2em; }
.lg-cards i {
    position: absolute; left: 0; bottom: 0; width: 2.6em; height: 3.2em; border-radius: 0.25em;
    background: linear-gradient(135deg, #f97316, #c2410c); border: 0.18em solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.lg-cards i:nth-child(2) { left: 0.7em; transform: rotate(6deg); }
.lg-cards i:nth-child(3) { left: 1.4em; transform: rotate(12deg); background: linear-gradient(135deg, #3b82f6, #1e3a8a); }
/* bagel stack */
.lg-bagels { position: relative; width: 4.4em; height: 3.4em; }
.lg-bagels i {
    position: absolute; left: 50%; width: 4em; height: 1.5em; margin-left: -2em; border-radius: 50%;
    background: radial-gradient(ellipse at 50% 40%, #e8b277 0 48%, #c8894a 50%, #b8773a 100%);
    box-shadow: inset 0 -0.25em 0.4em rgba(0,0,0,0.25), 0 2px 3px rgba(0,0,0,0.3);
}
.lg-bagels i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 1.1em; height: 0.45em; margin: -0.22em 0 0 -0.55em; border-radius: 50%; background: #5a3a1e; }
.lg-bagels i:nth-child(1) { bottom: 0; }
.lg-bagels i:nth-child(2) { bottom: 0.95em; width: 3.7em; margin-left: -1.75em; }
.lg-bagels i:nth-child(3) { bottom: 1.9em; width: 3.3em; margin-left: -1.75em; }
/* tic-tac-toe pad */
.lg-ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.15em; width: 3.4em; height: 3.4em; padding: 0.3em; background: #fff8e1; border-radius: 0.3em; box-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.lg-ttt i { background: #e2e8f0; border-radius: 0.1em; }
.lg-ttt i:nth-child(1), .lg-ttt i:nth-child(5), .lg-ttt i:nth-child(9) { background: radial-gradient(circle, #e8b277 0 55%, #5a3a1e 56% 70%, #e8b277 71%); }
.lg-ttt i:nth-child(3), .lg-ttt i:nth-child(7) { background: #3b82f6; }

/* ---------- footnote ---------- */
.lg-footnote { max-width: 720px; margin: 1.25rem auto 0; text-align: center; color: #94a3b8; font-size: 0.85rem; line-height: 1.5; }

/* ---------- modals ---------- */
.lg-modal { position: fixed; inset: 0; z-index: 6000; display: flex; align-items: center; justify-content: center; padding: 1rem; transition: none; }
.lg-modal[hidden] { display: none; }
.lg-modal-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, 0.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lg-close {
    position: absolute; top: 0.6rem; right: 0.6rem; width: 2.6rem; height: 2.6rem; border-radius: 50%;
    border: 0; background: #111827; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 2;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform 0.15s ease, background 0.15s ease;
}
.lg-close:hover, .lg-close:focus-visible { transform: scale(1.08); background: #f97316; outline: none; }
.lg-close:focus-visible { box-shadow: 0 0 0 3px #fff; }

.lg-sheet {
    position: relative; width: min(100%, 640px); max-height: min(92vh, 92dvh); overflow: auto;
    background: linear-gradient(180deg, #fffefb, #f6f3ea); color: #1f2937; border-radius: 6px;
    padding: 2.6rem 1.5rem 1.5rem; box-shadow: 0 30px 80px rgba(0,0,0,0.6); font-family: 'Inter', sans-serif;
    animation: lgPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lg-sheet-pin { top: 0.7rem; width: 1.3rem; height: 1.3rem; }
.lg-sheet-title { margin: 0 0 0.9rem; font: 400 clamp(1.5rem, 4vw, 2.1rem)/1.15 'Permanent Marker', cursive; color: #111827; overflow-wrap: anywhere; }
.lg-sheet-title:empty { display: none; }
.lg-sheet-figure { margin: 0 0 1rem; text-align: center; }
.lg-sheet-figure img { display: inline-block; max-width: 100%; max-height: 60vh; height: auto; width: auto; border-radius: 4px; box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.lg-sheet-body { font-size: 1.02rem; line-height: 1.6; color: #1f2937; white-space: pre-wrap; overflow-wrap: anywhere; }
.lg-sheet-body a { color: #c2410c; font-weight: 600; }
.lg-sheet-link {
    display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.1rem;
    background: linear-gradient(135deg, #f97316, #ea580c); color: #fff !important; text-decoration: none;
    font-weight: 800; padding: 0.8rem 1.3rem; border-radius: 999px; box-shadow: 0 8px 18px rgba(249,115,22,0.35);
}
.lg-sheet-link:focus-visible { outline: 3px solid #1e3a8a; outline-offset: 2px; }
.lg-sheet-meta { margin: 1.2rem 0 0; font-size: 0.78rem; color: #6b7280; }
.lg-sheet-meta:empty { display: none; }

.lg-boardview {
    position: relative; width: min(100%, 1040px); max-height: min(92vh, 92dvh); overflow: auto; border-radius: 10px;
    padding: 3.2rem 1.25rem 1.5rem;
    border: 10px solid #6b4a2a;
    background:
        repeating-radial-gradient(circle at 50% 50%, rgba(0,0,0,0.04) 0 1px, transparent 1px 4px),
        linear-gradient(135deg, #c9a070 0%, #b98c5d 50%, #c59a6a 100%);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.35), 0 30px 80px rgba(0,0,0,0.6);
    animation: lgPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lg-boardview-title {
    position: absolute; top: 0.75rem; left: 50%; transform: translateX(-50%);
    margin: 0; background: #111; color: #fff; font: 800 0.75rem/1 'Inter', sans-serif; letter-spacing: 0.18em; text-transform: uppercase;
    padding: 0.6rem 1rem; border-radius: 3px;
}
.lg-boardview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.4rem 1.1rem; padding: 0.5rem 0.25rem; font-size: 13px; }
.lg-boardview-grid .lg-note { position: relative; left: auto; top: auto; width: auto; --w: auto; }

.lg-photo { position: relative; margin: 0; max-width: min(100%, 980px); background: #111; padding: 10px; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,0.7); animation: lgPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1); }
.lg-photo img { display: block; max-width: 100%; max-height: 78vh; width: auto; height: auto; border-radius: 2px; }
.lg-photo figcaption { color: #e2e8f0; font: 500 0.85rem/1.4 'Inter', sans-serif; text-align: center; padding: 0.75rem 0.25rem 0.25rem; }

.lg-gamebox {
    position: relative; width: min(100%, 560px); max-height: min(94vh, 94dvh); display: flex; flex-direction: column;
    background: #0f172a; color: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.08);
    animation: lgPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lg-gamebox-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1rem 0.9rem 1.25rem; background: #111827; border-bottom: 1px solid rgba(255,255,255,0.08); }
.lg-gamebox-title { margin: 0; font: 400 1.5rem/1 'Permanent Marker', cursive; color: #fff; }
.lg-close-inline { position: static; width: 2.4rem; height: 2.4rem; flex-shrink: 0; }
.lg-gamebox-body { padding: 1rem; overflow: auto; -webkit-overflow-scrolling: touch; flex: 1 1 auto; min-height: 320px; touch-action: manipulation; }

@keyframes lgPop { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
body.lg-modal-open { overflow: hidden; }

/* ---------- games (shared) ---------- */
.lg-g { font-family: 'Inter', sans-serif; display: flex; flex-direction: column; gap: 0.9rem; align-items: center; user-select: none; -webkit-user-select: none; }
.lg-g-bar { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: center; align-items: center; width: 100%; color: #cbd5e1; font-weight: 600; font-size: 0.95rem; }
.lg-g-bar strong { color: #fff; }
.lg-g-status { min-height: 1.6em; text-align: center; font-weight: 700; font-size: 1.05rem; color: #fdba74; }
.lg-g-btn {
    border: 0; border-radius: 999px; padding: 0.8rem 1.4rem; cursor: pointer; font: 800 0.95rem/1 'Inter', sans-serif;
    background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; box-shadow: 0 6px 16px rgba(249,115,22,0.35);
    transition: transform 0.15s ease; min-height: 44px;
}
.lg-g-btn:hover, .lg-g-btn:focus-visible { transform: translateY(-1px); outline: none; }
.lg-g-btn:focus-visible { box-shadow: 0 0 0 3px #fff; }
.lg-g-btn.lg-g-btn-ghost { background: rgba(255,255,255,0.1); box-shadow: none; }
.lg-g-btn.is-on { background: linear-gradient(135deg, #3b82f6, #1e3a8a); }
.lg-g-error { text-align: center; padding: 2rem 1rem; color: #fca5a5; font-weight: 600; }

/* memory */
.lg-mem-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; width: min(100%, 420px); }
.lg-mem-card { position: relative; aspect-ratio: 1 / 1; border: 0; background: none; padding: 0; cursor: pointer; perspective: 600px; min-height: 56px; }
.lg-mem-card-inner { position: absolute; inset: 0; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d; }
.lg-mem-card.is-up .lg-mem-card-inner, .lg-mem-card.is-done .lg-mem-card-inner { transform: rotateY(180deg); }
.lg-mem-face { position: absolute; inset: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; font-size: clamp(1.6rem, 7vw, 2.4rem); }
.lg-mem-back { background: linear-gradient(135deg, #f97316, #c2410c); border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.35); }
.lg-mem-back::after { content: 'BB'; font: 400 1.1rem/1 'Permanent Marker', cursive; color: rgba(255,255,255,0.9); }
.lg-mem-front { background: #fffbeb; transform: rotateY(180deg); border: 3px solid #fde68a; }
.lg-mem-card.is-done .lg-mem-front { background: #dcfce7; border-color: #86efac; }
.lg-mem-card:focus-visible { outline: 3px solid #fff; outline-offset: 2px; border-radius: 12px; }

/* stack */
.lg-stack-canvas { display: block; width: min(100%, 420px); aspect-ratio: 3 / 4; max-height: 62vh; background: linear-gradient(180deg, #1e293b, #0f172a); border-radius: 14px; touch-action: none; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }

/* tic-tac-toe */
.lg-ttt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; width: min(100%, 360px); }
.lg-ttt-cell { aspect-ratio: 1 / 1; border: 0; border-radius: 14px; background: #fffbeb; font-size: clamp(2rem, 9vw, 3rem); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.35); transition: transform 0.15s ease, background 0.15s ease; min-height: 64px; }
.lg-ttt-cell:hover:not(:disabled), .lg-ttt-cell:focus-visible { transform: scale(1.04); outline: none; background: #fff; }
.lg-ttt-cell:focus-visible { box-shadow: 0 0 0 3px #f97316; }
.lg-ttt-cell.is-win { background: #dcfce7; }
.lg-ttt-cell:disabled, .lg-mem-card:disabled { cursor: default; color: inherit; opacity: 1; -webkit-text-fill-color: initial; }
.lg-ttt-modes { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .lg-note, .lg-frame, .lg-game-item, .lg-plaque-btn, .lg-board-more, .lg-mem-card-inner, .lg-ttt-cell { transition: none !important; }
    .lg-sheet, .lg-boardview, .lg-photo, .lg-gamebox { animation: none !important; }
}

/* =====================================================================
   MOBILE / NARROW (≤ 900px): walk through the room top to bottom.
   Same materials (ceiling → wall → table → floor), flow layout.
   ===================================================================== */
@media (max-width: 900px) {
    .lg-main { padding-left: 0.75rem; padding-right: 0.75rem; }
    .lg-scene {
        width: 100%; min-width: 0; aspect-ratio: auto; display: flex; flex-direction: column;
        border-radius: 16px; background: #7c7c75;
    }
    .lg-room-svg { display: none; }
    .lg-spot { position: relative; left: auto; top: auto; width: auto; height: auto; }

    .lg-m-ceiling {
        display: flex; justify-content: center; gap: 12%; align-items: center; height: 54px; padding: 0 6%;
        background:
            linear-gradient(90deg, transparent 0 calc(25% - 1px), #c8c6bd calc(25% - 1px) calc(25% + 1px), transparent calc(25% + 1px) calc(50% - 1px), #c8c6bd calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px) calc(75% - 1px), #c8c6bd calc(75% - 1px) calc(75% + 1px), transparent calc(75% + 1px)),
            linear-gradient(180deg, #e8e6df, #d6d4cc);
        border-bottom: 2px solid #c2c0b7;
    }
    .lg-m-ceiling span { display: block; width: 32%; height: 22px; background: #fffef8; border: 2px solid #dcdad0; border-radius: 3px; box-shadow: 0 0 22px 6px rgba(255,250,225,0.75); }

    .lg-spot-board { padding: 2.2rem 0.9rem 1.1rem; background: linear-gradient(180deg, #9a9a92, #85857d); }
    .lg-board { font-size: 14px; border-width: 8px; }
    .lg-board-inner { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1.1rem 0.9rem; padding: 1.1rem 0.8rem 1rem; min-height: 180px; }
    .lg-board-loading { position: relative; left: auto; top: auto; width: auto; grid-column: 1 / -1; display: flex; justify-content: center; }
    .lg-board-loading .lg-note { position: relative; width: 70%; }
    .lg-note { position: relative; left: auto; top: auto; width: auto; --w: auto; }
    .lg-board-inner .lg-note.lg-size-sm .lg-note-body { display: -webkit-box; }
    .lg-board-inner .lg-note.lg-size-md .lg-note-body { -webkit-line-clamp: 3; }
    .lg-board-inner .lg-note.lg-size-sm .lg-note-title { font-size: 1em; }
    .lg-note:nth-child(odd)  { margin-top: 0.25rem; }
    .lg-note:nth-child(even) { margin-top: 0.7rem; }
    .lg-note.lg-size-lg { grid-column: 1 / -1; }
    .lg-note-empty { position: relative; left: auto; top: auto; transform: rotate(-2deg); width: auto; grid-column: 1 / -1; margin: 0.5rem auto; max-width: 320px; }
    .lg-board-more { display: none !important; } /* every post is already on the wall on mobile */
    .lg-board-label { top: -1.8em; font-size: 0.72rem; }

    .lg-spot-frame { display: flex; justify-content: center; padding: 0.4rem 1rem 1.6rem; background: #85857d; }
    .lg-frame { width: 150px; height: 112px; }
    .lg-frame-caption { opacity: 1; font-size: 0.72rem; }

    .lg-spot-plaque { padding: 0.6rem 1.25rem 1.8rem; background: linear-gradient(180deg, #85857d, #7c7c75 70%, #e9e7e0 70%, #e9e7e0 76%, #bfae92 76%); }
    .lg-plaque { height: auto; font-size: 15px; padding: 1.1rem 1rem 1rem; border-width: 7px; max-width: 420px; margin: 0 auto; gap: 0.35rem; }
    .lg-plaque-btn { min-height: 48px; padding: 0.85em 1.5em; font-size: 0.9em; }
    .lg-plaque-link { font-size: 0.8em; min-height: 36px; }

    .lg-spot-table { padding: 1.4rem 1rem 1.6rem; background: linear-gradient(180deg, #bfae92, #cdbb9c); position: relative; }
    .lg-spot-table::before {
        content: ''; position: absolute; left: 6%; right: 6%; top: 0.9rem; bottom: 2.4rem;
        background: linear-gradient(180deg, #5e5e62, #3b3b3f); border-radius: 50% / 14%;
        box-shadow: 0 14px 30px rgba(0,0,0,0.4), inset 0 -8px 0 #2f2f33;
    }
    .lg-table-items { position: relative; height: auto; justify-content: space-around; align-items: flex-end; padding: 0.4rem 0 0.2rem; }
    .lg-game-item { font-size: 15px; min-height: 108px; min-width: 88px; justify-content: flex-end; gap: 0.55rem; padding: 0.5rem 0.25rem 0.35rem; }
    .lg-game-label { font-size: 0.72rem; white-space: normal; text-align: center; line-height: 1.15; }
    .lg-table-hint { display: block; position: relative; margin: 0.8rem 0 0; text-align: center; color: #1f2937; font: 600 0.78rem/1.3 'Inter', sans-serif; }

    .lg-m-floor { display: block; height: 42px; background: repeating-linear-gradient(90deg, #c9b592 0 64px, #b8a37f 64px 66px); border-top: 2px solid #a89572; }

    .lg-gamebox { width: 100%; height: 100%; max-height: none; border-radius: 0; }
    .lg-modal-game { padding: 0; }
    .lg-gamebox-body { padding: 0.9rem 0.8rem 1.2rem; display: flex; flex-direction: column; justify-content: center; }
    .lg-sheet { padding: 2.6rem 1.1rem 1.25rem; }
    .lg-boardview { padding: 3rem 0.75rem 1rem; border-width: 8px; }
    .lg-boardview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 0.8rem; font-size: 13px; }
}
@media (max-width: 420px) {
    .lg-board-inner { gap: 0.9rem 0.6rem; padding: 1rem 0.6rem 0.9rem; }
    .lg-board { font-size: 13px; }
    .lg-game-item { min-width: 80px; }
}

/* Simple Mode shell (accessibility.js) hides the navbar; keep our top padding sane */
body.a11y-sv-browsing .lg-main { padding-top: 1.25rem; }
