/* Light the Lamps: a dark reading room inside the game frame (the darkest tokens), lamps drawn in HTML + CSS, cards on pale paper. */
.fidget[data-fidget="light-the-lamps"] .fidget-stage.ll-stage { height: auto; min-height: 320px; touch-action: manipulation; background: var(--term-bg); overflow: hidden; }
.ll-room { position: relative; padding: 1.2rem clamp(.8rem, 3vw, 2rem) 1.6rem; background:
  repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 90px), linear-gradient(#17121c, #0d0b12 60%); color: #e9e3d6; }
.ll-warmth { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .9s ease;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 196, 110, .55), rgba(255, 160, 60, .18) 55%, transparent 80%); }
.ll-hall { position: relative; margin: 0 0 1rem; font: 700 .85rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #d9cfbd; }
.ll-hall a { color: #ffd98a; }
.ll-desks { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem .9rem; }
@media (max-width: 399px) { .ll-desks { grid-template-columns: minmax(0, 1fr); } } /* one wide desk per row on small phones, so titles fit */
@media (min-width: 700px) { .ll-desks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ll-desk { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 16rem; padding-top: .2rem;
  background: linear-gradient(transparent 6.6rem, #1d140e 6.6rem, #170f0a); border-radius: 4px; } /* dark desks, so the lamps carry the scene */
.ll-sorry { color: #e9e3d6; } .ll-sorry a { color: #ffd98a; }

/* the lamp: a real button (44px+), a green glass shade, a brass stem and base, a little pull chain */
.ll-lamp { position: relative; width: 5.5rem; height: 6.4rem; min-width: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 6px; }
.ll-lamp:focus-visible { outline: 3px solid #ffd98a; outline-offset: 3px; }
.ll-shade { position: absolute; left: .45rem; right: .45rem; top: .6rem; height: 2rem; background: linear-gradient(#1f6b45, #124a2f);
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); border-radius: 6px 6px 2px 2px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); transition: filter .5s ease; }
.ll-stem { position: absolute; left: calc(50% - 3px); top: 2.6rem; width: 6px; height: 2.6rem; background: linear-gradient(90deg, #8a6a2a, #d8b25a, #8a6a2a); }
.ll-base { position: absolute; left: 1.4rem; right: 1.4rem; bottom: .55rem; height: .7rem; border-radius: 50% 50% 4px 4px; background: linear-gradient(#d8b25a, #8a6a2a); }
.ll-chain { position: absolute; right: 1.2rem; top: 2.55rem; width: 2px; height: 1.6rem; background: repeating-linear-gradient(#cfae63 0 3px, transparent 3px 5px); transition: transform .1s ease; transform-origin: top; }
.ll-chain::after { content: ""; position: absolute; left: -3px; bottom: -4px; width: 8px; height: 8px; border-radius: 50%; background: #cfae63; }
.ll-lamp.is-pulled .ll-chain { transform: translateY(5px); }
.ll-glow { position: absolute; z-index: 0; left: -1.5rem; right: -1.5rem; top: 2.6rem; height: 5rem; pointer-events: none; opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(closest-side at 50% 40%, rgba(255, 214, 140, .7), rgba(255, 190, 100, .18) 60%, transparent); } /* soft light falling from the lip of the shade, behind the lamp */
.ll-shade, .ll-stem, .ll-base, .ll-chain { z-index: 1; }
.ll-lamp.is-on .ll-glow { opacity: 1; }
.ll-lamp.is-on .ll-shade { filter: brightness(1.45) saturate(1.2); }
.ll-pool { position: absolute; left: 6%; right: 6%; top: 6.4rem; height: 3rem; pointer-events: none; opacity: 0; transition: opacity .5s ease .1s;
  background: radial-gradient(ellipse at 50% 0, rgba(255, 205, 130, .5), transparent 70%); }
.ll-lamp.is-on + .ll-pool { opacity: 1; }

/* the card: pale paper with dark text, so it is always easy to read in the dark room */
.ll-card { position: relative; margin: .5rem .4rem 0; padding: .7rem .8rem; width: calc(100% - .8rem); background: #fbf8f1; color: #141218; border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: opacity .4s ease .3s, visibility 0s linear .7s; }
.ll-card.is-shown { opacity: 1; visibility: visible; transition: opacity .4s ease .3s, visibility 0s; }
.ll-kind { margin: 0 0 .25rem; font: 700 .8rem/1.2 var(--mono); text-transform: uppercase; color: #4a4552; }
.ll-title { margin: 0 0 .3rem; font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; }
.ll-title a { color: #2340d8; text-decoration: underline; }
.ll-title a:focus-visible { outline: 3px solid #2340d8; outline-offset: 2px; }
.ll-meta { margin: 0; font-size: .82rem; color: #4a4552; overflow-wrap: anywhere; }
.ll-call { margin: .25rem 0 0; font: .8rem/1.2 var(--mono); color: #4a4552; }
.ll-call:empty { display: none; }
.ll-pick { display: inline-flex; align-items: center; gap: .45rem; flex-wrap: wrap; max-width: 100%; }
.ll-pick select { max-width: 100%; }

/* Calm mode and reduced motion: no chain movement, quick plain fades */
.fidget[data-fidget="light-the-lamps"].is-calm .ll-chain { transition: none; }
.fidget[data-fidget="light-the-lamps"].is-calm .ll-glow, .fidget[data-fidget="light-the-lamps"].is-calm .ll-pool, .fidget[data-fidget="light-the-lamps"].is-calm .ll-shade { transition-duration: .2s; transition-delay: 0s; }
.fidget[data-fidget="light-the-lamps"].is-calm .ll-card, .fidget[data-fidget="light-the-lamps"].is-calm .ll-card.is-shown { transition: opacity .2s ease, visibility 0s; }
.fidget[data-fidget="light-the-lamps"].is-calm .ll-warmth { transition-duration: .2s; }
