@font-face{font-family:'Eight Bit Dragon';src:url('assets/fonts/eight-bit-dragon.woff') format('woff');font-weight:400;font-style:normal;font-display:swap}
:root{color-scheme:dark;font-family:'Eight Bit Dragon','Courier New',monospace;color:#fff;background:#000}*{box-sizing:border-box}body{margin:0;background:#000}button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;border-radius:0}button:focus-visible{outline:2px solid #fff;outline-offset:5px}main{min-height:100svh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:28px 20px}.intro{text-align:center;position:relative;z-index:1;max-width:900px}.intro h1,.intro p{font-family:inherit;font-size:20px;font-weight:400;letter-spacing:0;line-height:1.6;color:#fff}.intro h1{margin:0 0 10px}.intro p{margin:0;text-wrap:balance}.room-stage{position:relative;width:min(92vw,calc(100svh - 180px),950px);aspect-ratio:214/216;flex-shrink:0}.scene{position:absolute;width:119.626%;aspect-ratio:1;left:-9.813%;top:-9.722%;isolation:isolate}.room-image{display:block;width:100%;height:auto;image-rendering:pixelated}.hotspot{position:absolute;display:flex;align-items:center;justify-content:center;padding:0;z-index:2}.tooltip{position:absolute;bottom:calc(50% + 28px);left:50%;transform:translateX(-50%);white-space:nowrap;padding:12px;background:#000;color:#fff;font-size:11px;line-height:1.5;border:2px solid #fff;box-shadow:4px 4px 0 #000;opacity:0;pointer-events:none}.hotspot:hover .tooltip,.hotspot:focus-visible .tooltip{opacity:1}dialog{width:min(480px,calc(100vw - 40px));max-height:85svh;padding:24px;border:3px solid #fff;outline:1px solid #fff;outline-offset:4px;background:#000;color:#fff;box-shadow:8px 8px 0 #000;overflow:auto}dialog::backdrop{background:#000b}.detail-top{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:24px;padding-bottom:16px;border-bottom:2px solid #fff}#detail-number,.eyebrow{font-size:10px;line-height:1.8;letter-spacing:0;color:#fff}.close-button{background:#fff;color:#000;border:2px solid #fff;min-width:32px;min-height:32px;font-size:20px;line-height:1;padding:3px}.close-button:hover,.back:hover{background:#000;color:#fff}h2{font:400 22px/1.6 'Eight Bit Dragon','Courier New',monospace;margin:16px 0 24px;overflow-wrap:anywhere}#detail-body p{font-size:12px;line-height:2;color:#fff}.placeholder{padding:16px;border:2px dashed #fff;background:#000}.item{border-top:1px solid #fff;padding:16px 0}.item h3{font-size:14px;font-weight:400;margin:0 0 8px}.item p{margin:0}.back{margin-top:24px;padding:12px;background:#fff;color:#000;border:2px solid #fff;font-size:11px;line-height:1.6}@media(max-width:600px){main{padding:26px 12px;gap:28px}.intro{padding:0 18px;max-width:390px}.intro h1,.intro p{font-size:14px}.room-stage{width:min(94vw,calc(100svh - 220px))}.tooltip{padding:8px;font-size:9px;max-width:240px;white-space:normal;width:max-content}dialog{padding:18px}h2{font-size:18px}#detail-body p{font-size:11px}}
.marker {
  background: #fff;
  border: 2px solid #000;
  outline: 2px solid #fff;
  color: #000;
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  width: 28px;
  height: 28px;
  box-shadow: 4px 4px 0 #000;
  opacity: 0;
}
.hotspot:hover .marker,
.hotspot:focus-visible .marker { opacity: 1; }
@media (max-width: 600px) {
  .marker { width: 22px; height: 22px; font-size: 12px; line-height: 18px; }
}

/* Supplied pixel-art bubble, shown unchanged with text inside its white center. */
dialog {
  width: min(1100px, calc(125vw - 16px), calc(125svh - 16px));
  height: auto;
  aspect-ratio: 1;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent url('assets/thought-bubble.png') center / 100% 100% no-repeat;
  image-rendering: pixelated;
  color: #000;
  overflow: visible;
  box-shadow: none;
}
dialog::before, dialog::after { content: none; }
.thought-content {
  position: absolute;
  left: 22%;
  top: 32%;
  width: 58%;
  height: 38%;
  padding: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #000 #fff;
}
.detail-top { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid #000; }
#detail-number, #detail-location { color: #000; font-size: 9px; line-height: 1.5; }
#detail-location { margin: 8px 0; }
h2 { font-size: 18px; line-height: 1.4; margin: 10px 0; }
#detail-body p { color: #000; font-size: 11px; line-height: 1.7; }
.placeholder { padding: 10px; border-color: #000; background: #fff; }
.item { border-top-color: #000; }
.close-button, .back { color: #000; background: #fff; border-color: #000; }
.close-button { min-width: 26px; min-height: 26px; font-size: 16px; }
.back { margin-top: 10px; padding: 8px; font-size: 10px; }
.close-button:hover, .back:hover { color: #fff; background: #000; }
dialog button:focus-visible { outline-color: #000; }
@media (max-width: 600px) {
  dialog { padding: 0; }
  #detail-number, #detail-location { font-size: 8px; }
  h2 { font-size: 14px; }
  #detail-body p { font-size: 10px; }
  .back { font-size: 9px; }
}

/* Center the enlarged artwork while keeping the white bubble within view. */
dialog{position:fixed;top:50%;left:50%;right:auto;bottom:auto;margin:0;transform:translate(-50%,-50%);}


/* Small pixel icons use the same white hover buttons as before. */
.marker{display:grid;place-items:center;flex-shrink:0}.marker svg{display:block;width:16px;height:16px;fill:#000;shape-rendering:crispEdges;pointer-events:none}@media(max-width:600px){.marker svg{width:12px;height:12px}}

/* Hover-only task prompts replace the small icon buttons. */
.task-label{display:block;line-height:1.7}
.interact-hint{display:block;font-size:8px;line-height:1.6;margin-top:8px;padding-top:7px;border-top:1px solid #fff}
@media(max-width:600px){.interact-hint{font-size:7px;margin-top:6px;padding-top:5px}}

/* Larger task labels with matching text sizes and no divider. */
.tooltip{padding:16px 20px;font-size:13px;line-height:1.7;min-width:230px}
.task-label,.interact-hint{font-size:inherit;line-height:1.7}
.interact-hint{margin-top:8px;padding-top:0;border-top:0}
@media(max-width:600px){
  .tooltip{padding:12px 14px;font-size:11px;min-width:210px;max-width:280px}
  .task-label,.interact-hint{font-size:inherit;line-height:1.7}
  .interact-hint{margin-top:6px;padding-top:0;border-top:0}
}

/* Consistent retro dialogue inside the cloud, without divider lines. */
.thought-content{--dialogue-size:13px;font-size:var(--dialogue-size);line-height:1.7}
.dialogue-heading{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.dialogue-speaker{display:inline-block;background:#000;color:#fff;padding:5px 8px}
.thought-content #detail-number,.thought-content #detail-location,.thought-content #detail-title,.thought-content #detail-body p,.thought-content #detail-body h3,.thought-content .dialogue-speaker,.thought-content .back,.thought-content .close-button{font-family:inherit;font-size:var(--dialogue-size);font-weight:400;line-height:1.7;letter-spacing:0}
.thought-content .detail-top{border:0;padding-bottom:0;margin-bottom:12px}
.thought-content .placeholder{border:0;padding:0;background:transparent}
.thought-content .item{border:0}
.thought-content #detail-body .dialogue-speech::before{content:'> '}
.thought-content .back::before{content:'> ';font-family:inherit}
@media(max-width:600px){.thought-content{--dialogue-size:11px}}

/* Reserve each line’s final height so the cloud doesn’t jump while text types. */
.typing-line{position:relative}
.typing-sizer{display:block;visibility:hidden}
.typing-visible{position:absolute;top:0;left:0;width:100%;white-space:pre-wrap}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* Leave room for the dialogue prompt beside the typed paragraph. */
#detail-body .dialogue-speech.typing-line{padding-left:20px}
#detail-body .dialogue-speech.typing-line::before{position:absolute;top:0;left:0}
#detail-body .dialogue-speech.typing-line .typing-visible{left:20px;width:calc(100% - 20px)}

#detail-information[hidden]{display:none}#detail-information{margin-top:16px}

/* Completion checkmarks appear only inside the existing hover prompts. */
.task-label{display:flex;align-items:center;gap:10px}
.task-check[hidden]{display:none}
.task-check{display:inline-flex;flex-shrink:0}
.task-check svg{display:block;width:16px;height:16px;fill:#fff;shape-rendering:crispEdges}
.task-progress{position:fixed;right:22px;bottom:20px;z-index:5;display:flex;align-items:center;gap:16px;padding:14px 16px;border:2px solid #fff;background:#000;color:#fff;font-size:11px;line-height:1.6}
.task-progress output{white-space:nowrap}
@media(max-width:600px){.task-progress{right:12px;bottom:12px;gap:10px;padding:10px 12px;font-size:9px}.task-check svg{width:13px;height:13px}main{padding-bottom:72px}}

/* Center the task title whether or not its completion checkmark is visible. */
.tooltip{text-align:center}
.task-label{justify-content:center;text-align:center}
.interact-hint{text-align:center}
/* The completion counter is larger, freestanding text. */
.task-progress{padding:0;border:0;outline:0;background:transparent;box-shadow:none;font-size:16px;gap:16px}
@media(max-width:600px){.task-progress{font-size:12px;padding:0;gap:10px}}

/* Original pixel trophy and Minecraft-inspired achievement card. */
.expert-achievement{position:fixed;inset:auto;top:22px;right:22px;margin:0;width:min(420px,calc(100vw - 32px));padding:16px;border:3px solid #bdbdbd;outline:3px solid #000;background:#202020;color:#fff;box-shadow:inset 3px 3px 0 #505050,inset -3px -3px 0 #0c0c0c,5px 5px 0 #000;transform:translateX(calc(100% + 32px));opacity:0;visibility:hidden;transition:transform 300ms steps(10,end),opacity 150ms,visibility 300ms;pointer-events:none;font-family:'Eight Bit Dragon','Courier New',monospace}
.expert-achievement::backdrop{background:transparent}
.expert-achievement.is-visible{transform:translateX(0);opacity:1;visibility:visible}
.achievement-inner{display:flex;align-items:center;gap:16px}
.achievement-badge{width:48px;height:48px;flex-shrink:0;shape-rendering:crispEdges}
.achievement-kicker{font-size:11px;line-height:1.7;color:#ffdc55;margin:0 0 6px}
.achievement-name{font-size:13px;line-height:1.7;margin:0}
.achievement-note{font-size:9px;line-height:1.7;color:#ddd;margin:7px 0 0}
@media(max-width:600px){.expert-achievement{top:14px;right:14px;padding:12px}.achievement-inner{gap:12px}.achievement-badge{width:36px;height:36px}.achievement-name{font-size:11px}.achievement-kicker{font-size:9px}.achievement-note{font-size:8px}}
@media(prefers-reduced-motion:reduce){.expert-achievement{transition:none;transform:none}}

/* Supplied achievement artwork includes its own border and text. */
.expert-achievement{width:min(480px,calc(100vw - 28px));padding:0;border:0;outline:0;background:transparent;box-shadow:none}
.achievement-art{display:block;width:100%;height:auto;image-rendering:pixelated}
@media(max-width:600px){.expert-achievement{padding:0}}

/* The action result is narration; only the paragraphs below Connor’s tag are spoken. */
.thought-content .detail-top{justify-content:flex-end;margin-bottom:8px}
.thought-content #detail-title{margin:0 0 20px}
#detail-body>.dialogue-speaker{display:inline-block;margin:0 0 8px}
#detail-body>.dialogue-speech{margin-top:0}

/* Supplied black checkmark sits on white so it stays visible in the black labels. */
.task-check{background:#fff;padding:2px}.task-check img{display:block;width:20px;height:20px;image-rendering:pixelated}@media(max-width:600px){.task-check img{width:16px;height:16px}}

/* Show the tiny checkmark within the original transparent 800x600 canvas. */
.task-check{position:relative;display:inline-block;width:30px;height:28px;overflow:hidden;padding:0;background:transparent;flex-shrink:0}
.task-check[hidden]{display:none}
.task-check img{position:absolute;display:block;max-width:none;width:1600px;height:1200px;left:-722px;top:-442px;image-rendering:pixelated}
@media(max-width:600px){.task-check{width:15px;height:14px}.task-check img{width:800px;height:600px;left:-361px;top:-221px}}

/* Cloud artwork replaces the hover frame; no separate black backing. */
.tooltip{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  width:400px;
  min-width:0;
  max-width:calc(100vw - 24px);
  height:auto;
  aspect-ratio:208 / 158;
  padding:56px 48px;
  border:0;
  outline:0;
  border-radius:0;
  box-shadow:none;
  background:transparent url('assets/thought-bubble.png') 43.75% 43.877551% / 123.076923% 162.025316% no-repeat;
  image-rendering:pixelated;
  color:#000;
  white-space:normal;
  text-align:center;
  transform:translateX(-50%);
}
.tooltip::before,.tooltip::after{content:none}
.tooltip .task-label{justify-content:center;text-align:center;color:#000}
.tooltip .interact-hint{border:0;padding-top:0;color:#000}
@media(max-width:600px){
  .tooltip{width:320px;min-width:0;max-width:calc(100vw - 24px);padding:44px 36px}
}

/* Fit each hover cloud to its own text, including the completion checkmark. */
.tooltip{
  width:max-content;
  min-width:0;
  max-width:calc(100vw - 24px);
  height:auto;
  aspect-ratio:auto;
  padding:52px 54px;
}
.tooltip .task-label{max-width:100%;min-width:0}
.tooltip .task-label>span:last-child{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){
  .tooltip{width:max-content;min-width:0;max-width:calc(100vw - 24px);padding:40px 40px}
}

/* A single, slightly larger task line in each automatically sized cloud. */
.tooltip{font-size:15px}
.tooltip .task-label{font-size:inherit;line-height:1.6}
@media(max-width:600px){.tooltip{font-size:12px}}

/* Put Task on its own centered line above the action. */
.tooltip .task-label{position:relative;display:block;padding:0 38px;text-align:center}
.task-copy,.task-caption,.task-action{display:block}
.task-caption{margin-bottom:7px}
.tooltip .task-check{position:absolute;left:0;top:50%;transform:translateY(-50%)}
@media(max-width:600px){.tooltip .task-label{padding:0 24px}.task-caption{margin-bottom:5px}}

/* Wide bottom dialogue panel inspired by the supplied reference. */
dialog{
  position:fixed;
  top:auto;
  left:50%;
  right:auto;
  bottom:24px;
  margin:0;
  transform:translateX(-50%);
  width:min(1180px,calc(100vw - 32px));
  height:auto;
  aspect-ratio:auto;
  max-width:none;
  max-height:70svh;
  padding:0;
  border:0;
  outline:0;
  border-radius:0;
  background:#000 url('assets/dialogue-frame.png') 48.829953% 39.750446% / 503.144654% 1538.461538% no-repeat;
  color:#fff;
  box-shadow:none;
  overflow:hidden;
}
dialog::before,dialog::after{content:none}
dialog::backdrop{background:#0005}
.thought-content{
  --dialogue-size:14px;
  position:relative;
  left:auto;top:auto;
  width:100%;height:auto;
  max-height:70svh;
  padding:30px 38px;
  display:grid;
  grid-template-columns:160px minmax(0,1fr);
  align-items:center;
  gap:28px;
  border-radius:0;
  overflow-y:auto;
  scrollbar-color:#fff #000;
  color:#fff;
}
.dialogue-portrait{display:block;width:160px;height:160px;object-fit:cover;align-self:center;image-rendering:pixelated}
.dialogue-panel-content{min-width:0}
.thought-content .detail-top{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:0;margin:0 0 12px;border:0}
.thought-content #detail-title{color:#fff;font-size:var(--dialogue-size);line-height:1.7;margin:0}
.thought-content #detail-title::before{content:'* ';color:#fff}
#detail-body>.dialogue-speaker{color:#fff;background:transparent;padding:0;margin:0 0 8px;font-size:var(--dialogue-size)}
.thought-content #detail-body p,.thought-content #detail-body h3{color:#fff;font-size:var(--dialogue-size);line-height:1.7}
.thought-content #detail-body .dialogue-speech::before{content:'* '}
#detail-body .dialogue-speech.typing-line{padding-left:24px}
#detail-body .dialogue-speech.typing-line .typing-visible{left:24px;width:calc(100% - 24px)}
.thought-content .placeholder{background:transparent;color:#fff;padding:0;border:0}
.thought-content .close-button{background:transparent;color:#fff;border:0;padding:0;min-width:24px;min-height:24px;font-size:20px;line-height:1}
.thought-content .close-button:hover{background:transparent;color:#ff3344}
.dialogue-actions{display:flex;align-items:center;gap:32px;flex-wrap:wrap;margin-top:20px}
.thought-content .dialogue-option{display:inline-flex;align-items:center;gap:12px;color:#fff;background:transparent;border:0;padding:5px 0;margin:0;font-size:var(--dialogue-size);line-height:1.7;text-align:left}
.thought-content .dialogue-option[hidden]{display:none}
.thought-content .dialogue-option:hover{background:transparent;color:#ffdb55}
.choice-heart{display:block;width:22px;height:20px;flex-shrink:0;background:#f00018;clip-path:polygon(10% 0,40% 0,50% 15%,60% 0,90% 0,100% 15%,100% 50%,50% 100%,0 50%,0 15%);visibility:hidden}


.thought-content .back::before{content:none}
dialog button:focus-visible{outline-color:#fff}
#detail-information{margin-top:16px}
@media(max-width:700px){
  dialog{bottom:14px;width:calc(100vw - 20px);max-height:72svh}
  .thought-content{--dialogue-size:11px;grid-template-columns:72px minmax(0,1fr);gap:14px;padding:22px;max-height:72svh}
  .dialogue-portrait{width:72px;height:72px;align-self:start;margin-top:6px}
  .dialogue-actions{gap:14px;margin-top:14px}
  .thought-content .dialogue-option{gap:7px}
  .choice-heart{width:15px;height:14px}
}
@media(max-width:420px){.thought-content{grid-template-columns:54px minmax(0,1fr);gap:10px;padding:18px}.dialogue-portrait{width:54px;height:54px}.thought-content{--dialogue-size:10px}}
@media(min-width:701px){.thought-content{--dialogue-size:18px}}
#detail-title:focus{outline:none}

/* Use the supplied Undertale heart image instead of a CSS-drawn shape. */
.choice-heart{background:transparent url('assets/dialogue-heart.png') center / contain no-repeat;clip-path:none;image-rendering:pixelated}

/* Object-specific information panels use the newly supplied taller frame. */
#topic-detail{
  position:fixed;top:50%;left:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);
  width:min(980px,calc(100vw - 32px));height:min(720px,82svh);max-height:82svh;
  background:#000 url('assets/topic-frame.png?v=larger-2') 58.178439% 52.224824% / 305.343511% 346.820809% no-repeat;
  color:#fff;overflow:hidden;
}
#topic-detail::backdrop{background:#000b}
.topic-layout{position:absolute;inset:30px 38px;display:flex;flex-direction:column;min-height:0;gap:18px}
.topic-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
#topic-title{font-family:inherit;font-size:20px;line-height:1.6;font-weight:400;margin:0;color:#fff}
#topic-title:focus{outline:none}
#topic-close{color:#fff;font-size:24px;line-height:1;padding:0 4px}
.topic-content{flex:1;min-height:0;overflow:auto;padding-right:10px;scrollbar-color:#fff #000;font-size:13px;line-height:1.9}
.topic-intro{margin:0 0 24px}
.topic-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px}
.topic-card{min-width:0}
.topic-photo,.topic-photo-placeholder{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;margin:0 0 16px}
.topic-photo-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;border:2px dashed #777;color:#aaa;background:#0d0d0d;text-align:center;font-size:12px}
.topic-photo-placeholder p{margin:0}
.topic-card h3{font-size:14px;line-height:1.7;font-weight:400;margin:0 0 12px;color:#fff}
.topic-caption{font-size:12px;line-height:1.9;color:#ccc;margin:0}
.topic-actions{display:flex;flex-wrap:wrap;align-items:center;gap:28px;padding-top:8px}
.topic-actions button{display:inline-flex;align-items:center;gap:10px;background:transparent;border:0;padding:5px 0;color:#fff;font-size:12px;line-height:1.7;text-align:left}
.topic-actions button:hover{color:#ffdb55}


#topic-detail button:focus-visible{outline-color:#fff}
@media(max-width:600px){#topic-detail{width:calc(100vw - 20px);height:84svh;max-height:84svh}.topic-layout{inset:24px 22px;gap:14px}#topic-title{font-size:15px}.topic-content{font-size:11px}.topic-gallery{grid-template-columns:1fr;gap:26px}.topic-card h3{font-size:12px}.topic-caption{font-size:11px}.topic-actions{gap:12px}.topic-actions button{font-size:10px;gap:7px}}

/* Keep the heart on the last hovered or keyboard-focused choice. */
.dialogue-actions button .choice-heart,.topic-actions button .choice-heart{visibility:hidden}
.dialogue-actions button.is-selected .choice-heart,.topic-actions button.is-selected .choice-heart{visibility:visible}

/* Game artwork stays uncropped inside a consistent logo area. */
.games-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.game-card{padding:16px;border:1px solid #555;background:#080808}
.game-card .topic-photo{width:100%;height:150px;aspect-ratio:auto;object-fit:contain;object-position:center;background:transparent;margin:0 0 18px}
.game-card h3{font-size:13px;line-height:1.7}
.game-card .topic-caption{font-size:11px;line-height:1.9}
@media(max-width:900px){.games-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.games-gallery{grid-template-columns:1fr;gap:20px}.game-card{padding:16px}.game-card .topic-photo{height:150px}.game-card h3{font-size:12px}.game-card .topic-caption{font-size:11px}}

/* All nine games on one page, with larger text and concise example descriptions. */
#topic-detail.games-panel{--game-text-size:20px;width:min(1240px,calc(100vw - 24px));height:min(900px,94svh);max-height:94svh}
.games-panel .topic-layout{inset:26px 30px;gap:12px}
.games-panel .topic-content{display:flex;flex-direction:column;gap:12px;overflow:hidden;padding:0}
.games-panel #topic-title,.games-panel .topic-intro,.games-panel .game-copy h3,.games-panel .game-copy .topic-caption,.games-panel .topic-actions button{font-size:var(--game-text-size);line-height:1.5;font-weight:400}
.games-panel .topic-intro{margin:0;flex-shrink:0}
.games-panel .games-gallery{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:12px}
.games-panel .game-card{display:grid;grid-template-columns:60px minmax(0,1fr);grid-template-rows:1fr;align-items:center;min-height:0;gap:14px;padding:12px;text-align:left}
.games-panel .game-card .topic-photo{grid-column:1;grid-row:1;width:60px;height:60px;aspect-ratio:auto;object-fit:contain;margin:0}
.games-panel .game-copy{grid-column:2;grid-row:1;align-self:center;display:flex;flex-direction:column;min-width:0;gap:8px}
.games-panel .game-copy h3,.games-panel .game-copy .topic-caption{margin:0;overflow-wrap:anywhere}
.games-panel .topic-actions{flex-shrink:0;padding:0;gap:24px}
body:has(dialog[open]){overflow:hidden}
@media(max-width:900px){
  #topic-detail.games-panel{--game-text-size:16px}
  .games-panel .game-card{grid-template-columns:44px minmax(0,1fr);padding:10px;gap:10px}
  .games-panel .game-card .topic-photo{width:44px;height:44px}
}
@media(max-width:600px){
  #topic-detail.games-panel{--game-text-size:14px;height:94svh;max-height:94svh}
  .games-panel .topic-layout{inset:22px 18px;gap:10px}
  .games-panel .topic-content{gap:10px}
  .games-panel .games-gallery{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));gap:8px}
  .games-panel .game-card{grid-template-columns:30px minmax(0,1fr);gap:7px;padding:7px}
  .games-panel .game-card .topic-photo{width:30px;height:30px}
  .games-panel .game-copy{gap:5px}
  .games-panel .game-copy h3,.games-panel .game-copy .topic-caption{line-height:1.35}
  .games-panel .topic-actions{gap:12px}
  .games-panel .topic-actions button{font-size:11px}
}
@media(max-height:599px) and (min-width:601px){
  #topic-detail.games-panel{--game-text-size:14px;height:96svh;max-height:96svh}
  .games-panel .topic-layout{inset:18px 24px;gap:8px}
  .games-panel .topic-intro{display:none}
  .games-panel .games-gallery{gap:8px}
  .games-panel .game-card{grid-template-columns:32px minmax(0,1fr);padding:7px;gap:8px}
  .games-panel .game-card .topic-photo{width:32px;height:32px}
  .games-panel .game-copy{gap:4px}
  .games-panel .game-copy h3,.games-panel .game-copy .topic-caption{line-height:1.3}
}

/* Larger supplied frame and open game layout, without individual boxes. */
.games-panel .game-card{border:0;background:transparent;grid-template-columns:112px minmax(0,1fr);padding:8px;gap:16px}
.games-panel .game-card .topic-photo{width:112px;height:112px}
@media(max-width:900px){
  .games-panel .game-card{grid-template-columns:76px minmax(0,1fr);gap:12px}
  .games-panel .game-card .topic-photo{width:76px;height:76px}
}
@media(max-width:600px){
  .games-panel .games-gallery{grid-template-columns:1fr;grid-template-rows:repeat(9,minmax(0,1fr));gap:6px}
  .games-panel .game-card{grid-template-columns:48px minmax(0,1fr);padding:3px 6px;gap:14px}
  .games-panel .game-card .topic-photo{width:48px;height:48px}
  .games-panel .game-copy{gap:3px}
}
@media(max-height:599px) and (min-width:601px){
  .games-panel .game-card{grid-template-columns:56px minmax(0,1fr);gap:10px;padding:4px}
  .games-panel .game-card .topic-photo{width:56px;height:56px}
}
/* Plain white outlines for each game. */
.games-panel .game-card{border:1px solid #fff;background:transparent}
/* Use the large information frame for every task. */
#topic-detail{width:min(1240px,calc(100vw - 24px));height:min(900px,94svh);max-height:94svh}
@media(max-width:600px){#topic-detail{height:94svh;max-height:94svh}}
@media(max-height:599px) and (min-width:601px){#topic-detail{height:96svh;max-height:96svh}}
/* Match the larger type across every task's information and dialogue. */
#topic-detail{--task-text-size:20px}
#topic-detail #topic-title,#topic-detail .topic-intro,#topic-detail .topic-card h3,#topic-detail .topic-caption,#topic-detail .topic-actions button,#topic-detail .topic-photo-placeholder,#topic-detail .spotify-link{font-size:var(--task-text-size);line-height:1.5}
@media(min-width:701px){.thought-content{--dialogue-size:20px}}
.shows-panel .topic-content{display:flex;flex-direction:column;overflow:hidden}
.shows-panel .topic-gallery{flex:1;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:20px}
.shows-panel .topic-card{border:1px solid #fff;display:flex;align-items:center;justify-content:center;padding:20px;text-align:center}
.shows-panel .topic-card h3{margin:0}
.shows-panel .topic-caption:empty{display:none}
.spotify-player{display:block;width:100%;height:352px;border:0;border-radius:12px;margin:0 0 20px;color-scheme:dark}
.spotify-link{color:#fff;text-underline-offset:5px}
#topic-detail.music-panel{width:min(980px,calc(100vw - 24px));height:min(630px,90svh);max-height:90svh}
@media(max-width:900px){#topic-detail{--task-text-size:16px}}
@media(max-width:600px){
  #topic-detail{--task-text-size:14px}
  .thought-content{--dialogue-size:14px}
  .shows-panel .topic-gallery{gap:12px}
  .shows-panel .topic-card{padding:12px}
  #topic-detail.music-panel{height:min(630px,92svh);max-height:92svh}
}
@media(max-height:599px) and (min-width:601px){#topic-detail{--task-text-size:14px}}
.music-panel .topic-content{display:flex;flex-direction:column;gap:16px;overflow:hidden;padding-right:0}
.music-panel .topic-intro{margin:0;flex-shrink:0}
.music-panel .spotify-player{flex:1;min-height:152px;height:auto;margin:0}
.music-panel .spotify-link{flex-shrink:0}

/* Curated collections, each kept inside a single information panel. */
.games-panel .topic-content{gap:16px}
.games-panel .games-gallery{flex:0 0 38%;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr}
.games-panel .game-card{grid-template-columns:100px minmax(0,1fr);padding:16px;gap:16px}
.games-panel .game-card .topic-photo{width:100px;height:100px}
.games-panel .game-copy .topic-caption{display:none}
.clips-section{min-height:0;display:flex;flex-direction:column;gap:14px}
.clips-section>h3{margin:0;font-size:var(--task-text-size);line-height:1.5;font-weight:400}
.clips-grid{min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.clip-card{min-width:0;display:flex;flex-direction:column;gap:12px}
.clip-placeholder,.clip-card video{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;width:100%;aspect-ratio:16/9;border:1px dashed #888;background:#080808;min-height:0}
.clip-placeholder p{font-size:14px;line-height:1.5;color:#aaa;margin:0;text-align:center}
.clip-card video{object-fit:contain;border:1px solid #fff}
.clip-card h4{font-size:var(--task-text-size);font-weight:400;line-height:1.5;margin:0}
.pixel-play{width:20px;height:24px;background:#fff;clip-path:polygon(0 0,100% 50%,0 100%)}
.games-panel .clips-section{flex:1}
.games-panel .clips-grid{flex:1;align-content:center}
.shows-panel .topic-gallery{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr;align-items:stretch}
#topic-detail.shows-panel{width:min(1100px,calc(100vw - 24px));height:min(450px,88svh);max-height:88svh}
.friends-panel .topic-content{display:flex;flex-direction:column;overflow:hidden}
.friends-panel .topic-gallery{flex:1;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:18px 24px}
.friends-panel .topic-card{display:flex;flex-direction:column;min-height:0}
.friends-panel .topic-photo,.friends-panel .topic-photo-placeholder{flex:1;min-height:0;height:0;aspect-ratio:auto;margin-bottom:10px}
.friends-panel .topic-photo-placeholder p+p{display:none}
.friends-panel .topic-card h3{margin:0}
.topic-caption:empty{display:none}
.books-panel .topic-content{display:flex;flex-direction:column;overflow:hidden}
.books-panel .topic-gallery{flex:1;min-height:0;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:20px}
.book-card{min-height:0;display:flex;flex-direction:column;gap:10px}
.book-cover{flex:1;min-height:0;border:1px solid #fff;box-shadow:inset 6px 0 0 #222;display:grid;place-items:center;background:#0b0b0b;font-size:24px;color:#888}
.book-card .topic-photo{flex:1;min-height:0;height:0;aspect-ratio:auto;object-fit:contain;margin:0}
#topic-detail .book-card h3{margin:0;font-size:var(--task-text-size)}
#topic-detail .book-card .topic-caption{font-size:12px;color:#aaa}
#topic-detail.music-panel{width:min(1240px,calc(100vw - 24px));height:min(650px,92svh);max-height:92svh}
.music-panel .topic-content{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:16px 28px;overflow:hidden}
.music-panel .topic-intro{grid-column:1/-1}
.music-panel .spotify-player{grid-column:1;grid-row:2;width:100%;height:100%;min-height:152px}
.music-panel .spotify-link{grid-column:1;grid-row:3}
.music-panel .clips-section{grid-column:2;grid-row:2/4;justify-content:center}
.music-panel .clips-grid{grid-template-columns:1fr}
@media(max-width:900px){
  .games-panel .game-card{grid-template-columns:64px minmax(0,1fr);padding:12px;gap:10px}
  .games-panel .game-card .topic-photo{width:64px;height:64px}
  .clip-placeholder p{font-size:12px}
}
@media(max-width:600px){
  .games-panel .topic-content{gap:10px}
  .games-panel .games-gallery{flex:0 0 30%;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr;gap:8px}
  .games-panel .game-card{display:flex;flex-direction:column;justify-content:center;padding:8px 3px;gap:10px;text-align:center}
  .games-panel .game-card .topic-photo{width:48px;height:48px}
  .games-panel .game-copy h3{font-size:12px}
  .games-panel .clips-grid{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:10px;align-content:stretch}
  .games-panel .clip-card{display:grid;grid-template-columns:42% minmax(0,1fr);align-items:center;gap:12px;min-height:0}
  .games-panel .clip-placeholder,.games-panel .clip-card video{height:100%;aspect-ratio:auto;gap:8px}
  .games-panel .clip-placeholder p{font-size:10px}
  .pixel-play{width:14px;height:17px}
  .shows-panel .topic-gallery{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr))}
  #topic-detail.shows-panel{height:min(530px,88svh)}
  .friends-panel .topic-gallery{gap:14px}
  .friends-panel .topic-photo-placeholder{font-size:11px;gap:6px}
  .books-panel .topic-gallery{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));gap:12px}
  .book-card{display:grid;grid-template-columns:36px minmax(0,1fr);grid-template-rows:1fr 1fr;gap:2px 10px;align-items:center}
  .book-cover,.book-card .topic-photo{grid-column:1;grid-row:1/3;width:36px;height:100%;font-size:14px}
  #topic-detail .book-card h3{grid-column:2;align-self:end;font-size:13px}
  #topic-detail .book-card .topic-caption{grid-column:2;align-self:start;font-size:9px}
  #topic-detail.music-panel{height:min(720px,94svh);max-height:94svh}
  .music-panel .topic-content{grid-template-columns:1fr;grid-template-rows:auto minmax(180px,1fr) auto minmax(160px,1fr);gap:12px}
  .music-panel .spotify-player{grid-column:1;grid-row:2}
  .music-panel .spotify-link{grid-column:1;grid-row:3}
  .music-panel .clips-section{grid-column:1;grid-row:4;gap:8px}
  .music-panel .clip-card{display:grid;grid-template-columns:50% minmax(0,1fr);align-items:center;gap:12px}
  .music-panel .clip-placeholder,.music-panel .clip-card video{height:105px;aspect-ratio:auto}
}
/* The guestbook sits below the room and uses the same white pixel-frame language. */
.guestbook{width:min(820px,calc(100% - 40px));margin:20px auto 100px;padding:32px;border:2px solid #fff;background:#000;font-size:16px;line-height:1.7}
.guestbook h2{font-size:24px;line-height:1.5;margin:0 0 12px}
.guestbook-intro{margin:0 0 28px;color:#ccc}
#guestbook-form{display:flex;flex-direction:column;gap:10px}
#guestbook-form label{font-size:14px}
#guestbook-form label span{color:#aaa}
#guestbook-form input,#guestbook-form textarea{font:inherit;font-size:16px;line-height:1.7;padding:12px;color:#fff;background:#080808;border:1px solid #fff;border-radius:0;width:100%;resize:vertical}
#guestbook-form input{margin-bottom:10px}
#guestbook-form input:focus-visible,#guestbook-form textarea:focus-visible{outline:2px solid #fff;outline-offset:3px}
.guestbook-submit{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-top:8px}
#guestbook-storage{font-size:11px;line-height:1.7;color:#aaa;margin:0;max-width:300px}
.guestbook-submit button{border:2px solid #fff;padding:12px 16px;white-space:nowrap;font-size:14px}
.guestbook-submit button:hover{background:#fff;color:#000}
#guestbook-status{font-size:12px;line-height:1.7;margin:4px 0;min-height:21px}
#guestbook-notes{display:grid;gap:16px}
.guest-note{border-top:1px solid #777;padding-top:20px;overflow-wrap:anywhere}
.guest-note-top{display:flex;align-items:center;justify-content:space-between;gap:20px}
.guest-note h3{font-size:14px;font-weight:400;margin:0}
.guest-note button{font-size:10px;color:#aaa;text-decoration:underline;text-underline-offset:4px}
.guest-note p{font-size:14px;white-space:pre-wrap;margin:12px 0 0}
@media(max-width:600px){.guestbook{padding:22px;margin-bottom:90px;font-size:13px}.guestbook h2{font-size:20px}.guestbook-submit{flex-direction:column;align-items:stretch;gap:12px}.guestbook-submit button{font-size:13px}#guestbook-form input,#guestbook-form textarea{font-size:14px}}
@media(max-width:600px){
  .music-panel .topic-content{grid-template-rows:auto 152px auto minmax(160px,1fr)}
  .music-panel .spotify-player{height:152px}
}
.guestbook-entry{text-align:center;margin:10px auto 90px;padding:24px 20px}
.guestbook-entry a{display:inline-block;color:#fff;font-size:24px;line-height:1.7;text-underline-offset:8px;text-decoration-thickness:2px}
.guestbook-entry a:hover{color:#ffdb55}
.guestbook-entry a:focus-visible{outline:2px solid #fff;outline-offset:8px}
.guestbook-entry p{font-size:12px;line-height:1.8;color:#aaa;margin:16px 0 0}
@media(max-width:600px){.guestbook-entry a{font-size:20px}.guestbook-entry p{font-size:11px}}
/* Desktop room: reserve space for the footer and let the artwork fit the remainder. */
@media(min-width:701px){
  body.room-page{height:100svh;display:flex;flex-direction:column}
  .room-page>main{flex:1;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);justify-items:center;align-items:center;gap:16px;padding:24px 20px 0}
  .room-page .room-stage{height:100%;width:auto;aspect-ratio:214/216;max-width:min(80vw,950px);max-height:950px;min-height:0}
  .room-page .guestbook-entry{flex-shrink:0;margin:0;padding:12px 20px 20px}
  .room-page .guestbook-entry a{font-size:20px;line-height:1.6}
  .room-page .guestbook-entry p{margin-top:8px;font-size:11px;line-height:1.6}
}
@media(min-width:701px) and (max-width:1000px){
  .room-page .task-progress{font-size:12px;right:16px;bottom:16px;gap:10px}
  .room-page .guestbook-entry p{max-width:300px;margin-left:auto;margin-right:auto}
}
@media(min-width:701px) and (max-height:650px){
  .room-page>main{padding-top:16px;gap:10px}
  .room-page .intro h1,.room-page .intro p{font-size:16px}
  .room-page .intro{max-width:850px}
  .room-page .intro h1{margin-bottom:6px}
  .room-page .guestbook-entry{padding-top:8px;padding-bottom:14px}
}

/* The footer link matches the greeting and gains an underline only on hover. */
.room-page{--intro-text-size:20px}
.room-page .intro h1,.room-page .intro p,.room-page .guestbook-entry a{font-size:var(--intro-text-size);font-weight:400;line-height:1.6}
.room-page .guestbook-entry a{text-decoration:none}
.room-page .guestbook-entry a:hover{color:#fff;text-decoration:underline}
@media(max-width:600px){.room-page{--intro-text-size:14px}}
@media(min-width:701px) and (max-height:650px){.room-page{--intro-text-size:16px}}
/* Game memories share the same white text as the titles. */
.games-panel .games-gallery{flex-basis:52%}
.games-panel .game-card{grid-template-columns:72px minmax(0,1fr);grid-template-rows:72px minmax(0,1fr);align-items:start;padding:14px;gap:12px}
.games-panel .game-card .topic-photo{width:72px;height:72px;grid-column:1;grid-row:1}
.games-panel .game-copy{display:contents}
.games-panel .game-copy h3{grid-column:2;grid-row:1;align-self:center}
.games-panel .game-copy .topic-caption{display:block;grid-column:1/-1;grid-row:2;color:#fff}
.games-panel .clips-grid{align-content:stretch}
.games-panel .clip-card{min-height:0}
.games-panel .clip-placeholder,.games-panel .clip-card video{flex:1;aspect-ratio:auto;min-height:0}
#topic-detail.shows-panel{width:min(1240px,calc(100vw - 24px));height:min(820px,94svh);max-height:94svh}
.shows-panel .topic-card{display:flex;flex-direction:column;justify-content:flex-start;min-height:0;gap:18px;padding:18px}
.shows-panel .topic-photo{flex:1;min-height:0;height:0;width:100%;aspect-ratio:auto;object-fit:contain;margin:0;image-rendering:auto}
.shows-panel .topic-card h3{flex-shrink:0;color:#fff}
@media(max-width:600px){
  .games-panel .games-gallery{flex-basis:60%;grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr))}
  .games-panel .game-card{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto;padding:10px;gap:5px 12px;text-align:left}
  .games-panel .game-card .topic-photo{width:44px;height:44px;grid-row:1/3;align-self:center}
  .games-panel .game-copy h3{font-size:14px;grid-column:2;grid-row:1;align-self:end}
  .games-panel .game-copy .topic-caption{font-size:12px;line-height:1.5;grid-column:2;grid-row:2;align-self:start}
  .games-panel .clips-section{gap:8px}
  .games-panel .clips-grid{gap:8px}
  .games-panel .clip-card h4{font-size:12px}
  .games-panel .clip-placeholder{gap:4px}
  .games-panel .clip-placeholder p{font-size:9px}
  .shows-panel .topic-gallery{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:12px}
  .shows-panel .topic-card{display:grid;grid-template-columns:90px minmax(0,1fr);align-items:center;gap:14px;padding:12px}
  .shows-panel .topic-photo{width:90px;height:100%;max-height:160px;object-fit:contain}
}
@media(max-height:599px) and (min-width:601px){
  .games-panel .game-card{grid-template-columns:40px minmax(0,1fr);grid-template-rows:40px minmax(0,1fr);padding:8px;gap:6px 10px}
  .games-panel .game-card .topic-photo{width:40px;height:40px}
  .games-panel .game-copy .topic-caption{font-size:12px;line-height:1.4}
  .shows-panel .topic-card{gap:10px;padding:10px}
}
/* The game list is a compact, lowercase menu; choose a game to open its clip. */
#topic-detail.games-panel{width:min(1100px,calc(100vw - 24px));height:min(500px,90svh);max-height:90svh;text-transform:lowercase}
.games-panel .topic-content{gap:16px}
.games-panel .games-gallery{flex:1;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:1fr}
.games-panel .game-card{grid-template-columns:60px minmax(0,1fr);grid-template-rows:60px minmax(0,1fr) auto;gap:12px;padding:16px;cursor:pointer;text-align:left;color:#fff}
.games-panel .game-card .topic-photo{width:60px;height:60px}
.games-panel .game-copy h3{grid-column:2;grid-row:1}
.games-panel .game-copy .topic-caption{grid-column:1/-1;grid-row:2}
#topic-detail.games-panel .game-copy .topic-caption{font-size:16px;line-height:1.6;color:#fff}
.game-clip-hint{grid-column:1/-1;grid-row:3;font-size:12px;line-height:1.5;justify-self:start}
.games-panel .game-card:hover,.games-panel .game-card:focus-visible{background:#171717}
.games-panel .game-card:hover .game-clip-hint,.games-panel .game-card:focus-visible .game-clip-hint{text-decoration:underline;text-underline-offset:4px}
.games-panel .game-clip-hint::before{content:'▶ ';font-size:10px}
#topic-detail.games-panel.game-clip-view{width:min(980px,calc(100vw - 24px));height:min(660px,92svh);max-height:92svh}
.game-clip-view .topic-content{display:flex;justify-content:center}
.selected-game-clip{width:100%;min-height:0;flex:1;display:flex;align-items:center;justify-content:center}
.selected-game-clip video,.selected-game-clip>.clip-placeholder{display:flex;width:100%;height:100%;min-height:0;aspect-ratio:16/9;object-fit:contain;background:#080808}
.selected-game-clip>.clip-placeholder{border:1px dashed #888}
/* Eight supplied covers, arranged in two rows. */
.books-panel .topic-gallery{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:20px 28px}
.books-panel .book-card{gap:10px}
.books-panel .book-card .topic-photo{width:100%;height:0;min-height:0;flex:1;object-fit:contain;image-rendering:auto}
#topic-detail.books-panel .book-card h3{font-size:18px;line-height:1.4;min-height:51px;text-align:center}
@media(max-width:900px) and (min-width:601px){
  #topic-detail.games-panel .game-copy .topic-caption{font-size:14px}
  .games-panel .game-card{grid-template-columns:48px minmax(0,1fr);grid-template-rows:48px minmax(0,1fr) auto;padding:12px;gap:10px}
  .games-panel .game-card .topic-photo{width:48px;height:48px}
}
@media(max-width:600px){
  #topic-detail.games-panel{height:min(720px,94svh);max-height:94svh}
  .games-panel .games-gallery{flex:1;grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr));gap:10px}
  .games-panel .game-card{grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto auto;padding:10px;gap:5px 12px}
  .games-panel .game-card .topic-photo{width:44px;height:44px;grid-column:1;grid-row:1/4}
  .games-panel .game-copy h3{grid-column:2;grid-row:1;align-self:end}
  #topic-detail.games-panel .game-copy .topic-caption{grid-column:2;grid-row:2;font-size:12px;line-height:1.5}
  .game-clip-hint{grid-column:2;grid-row:3;font-size:10px;align-self:start}
  .books-panel .topic-gallery{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:14px 10px}
  .books-panel .book-card{display:grid;grid-template-columns:52px minmax(0,1fr);grid-template-rows:1fr;align-items:center;gap:8px}
  .books-panel .book-card .topic-photo{grid-column:1;grid-row:1;width:52px;height:100%;object-fit:contain}
  #topic-detail.books-panel .book-card h3{grid-column:2;grid-row:1;align-self:center;font-size:12px;line-height:1.4;min-height:0;text-align:left}
}
#topic-detail.games-panel:not(.game-clip-view){height:min(420px,90svh)}
.games-panel .topic-actions button{text-transform:lowercase}
@media(max-width:600px){#topic-detail.games-panel:not(.game-clip-view){height:min(640px,94svh)}}
/* Music content starts with the player; introductions live in the dialogue. */
.music-panel .topic-content{grid-template-rows:minmax(0,1fr) auto}
.music-panel .spotify-player{grid-row:1}
.music-panel .spotify-link{grid-row:2}
.music-panel .clips-section{grid-row:1/3}
@media(max-width:600px){
  .music-panel .topic-content{grid-template-rows:152px auto minmax(160px,1fr)}
  .music-panel .spotify-player{grid-row:1}
  .music-panel .spotify-link{grid-row:2}
  .music-panel .clips-section{grid-row:3}
}
/* All ten original cat photographs fit together, without cropping. */
.cats-panel .topic-content{display:flex;flex-direction:column;overflow:hidden;padding:0}
.cats-panel .topic-gallery{flex:1;min-height:0;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:18px}
.cats-panel .topic-card{min-height:0;display:flex;align-items:center;justify-content:center;background:#080808;border:1px solid #333;padding:6px}
.cats-panel .topic-photo{width:100%;height:100%;min-height:0;aspect-ratio:auto;object-fit:contain;image-rendering:auto;margin:0}
.cats-panel .topic-card h3,.cats-panel .topic-caption{display:none}
@media(max-width:600px){
  .cats-panel .topic-gallery{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));gap:10px}
  .cats-panel .topic-card{padding:3px}
}
/* White photo-card frames around the cat snapshots. */
.cats-panel .topic-card{background:#fff;border:0;padding:8px 8px 26px}
.cats-panel .topic-photo{background:#fff}
@media(max-width:600px){.cats-panel .topic-card{padding:5px 5px 14px}}
/* Matching photo-card frames for the four friends photographs. */
.friends-panel .topic-card{display:flex;align-items:center;justify-content:center;background:#fff;padding:8px 8px 26px}
.friends-panel .topic-photo{flex:1;width:100%;height:0;min-height:0;object-fit:contain;image-rendering:auto;background:#fff;margin:0}
.friends-panel .topic-card h3,.friends-panel .topic-caption{display:none}
@media(max-width:600px){.friends-panel .topic-card{padding:5px 5px 16px}}
/* Friends photos use a clean background without photo-card frames. */
.friends-panel .topic-card{background:transparent;padding:0;border:0}
.friends-panel .topic-photo{background:transparent}
/* Keep a dedicated caption area beneath each unframed friends photograph. */
.friends-panel .topic-card{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:12px;align-items:stretch;justify-content:stretch}
.friends-panel .topic-photo{grid-row:1;width:100%;height:100%;min-height:0;object-fit:contain}
.friends-panel .topic-card .topic-caption{display:block;grid-row:2;min-height:3em;line-height:1.5;color:#fff;margin:0;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:600px){.friends-panel .topic-card{gap:8px}.friends-panel .topic-card .topic-caption{min-height:3em}}
/* Center each memory with its caption; give the tall aquarium photo more room. */
.friends-panel .topic-gallery{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:22px 28px}
.friends-panel .topic-card{grid-template-rows:minmax(0,1fr) auto;justify-items:center;gap:12px}
.friends-panel .topic-photo{align-self:center;justify-self:center}
.friends-panel .topic-card .topic-caption{text-align:center;width:100%;max-width:520px;min-height:0;align-self:start;line-height:1.5}
.friends-panel .topic-card:nth-child(3){grid-row:1/3;grid-column:2;grid-template-rows:minmax(0,1fr) auto}
.friends-panel .topic-card:nth-child(1){grid-row:1;grid-column:1}
.friends-panel .topic-card:nth-child(2){grid-row:2;grid-column:1}
.friends-panel .topic-card:nth-child(4){grid-row:2;grid-column:2}
/* Give the aquarium its own tall column, alongside the other three moments. */
.friends-panel .topic-gallery{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:22px 28px}
.friends-panel .topic-card:nth-child(1){grid-row:1;grid-column:1}
.friends-panel .topic-card:nth-child(2){grid-row:1;grid-column:2}
.friends-panel .topic-card:nth-child(3){grid-row:1/3;grid-column:3}
.friends-panel .topic-card:nth-child(4){grid-row:2;grid-column:1/3}
@media(max-width:600px){
  .friends-panel .topic-gallery{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:14px}
  .friends-panel .topic-card{gap:8px}
  .friends-panel .topic-card:nth-child(1){grid-row:1;grid-column:1}
  .friends-panel .topic-card:nth-child(2){grid-row:2;grid-column:1}
  .friends-panel .topic-card:nth-child(3){grid-row:1/3;grid-column:2}
  .friends-panel .topic-card:nth-child(4){grid-row:3;grid-column:1/3}
  #topic-detail.friends-panel .topic-card .topic-caption{font-size:12px;line-height:1.5}
}
/* Clip the empty black footer through the photo viewport. */
.friends-panel .cropped-photo{overflow:hidden}
/* Keep the cropped aquarium photo and its caption together as one centered group. */
.friends-panel .topic-card:nth-child(3){display:flex;flex-direction:column;justify-content:center;align-items:center}
.friends-panel .topic-card:nth-child(3) .cropped-photo{width:100%;height:auto;flex:0 1 auto;min-height:0;aspect-ratio:1080/1438}
.friends-panel .topic-card:nth-child(3) .topic-caption{flex-shrink:0}

/* Telescope photos: two Saturn views share one labeled group. */
.astronomy-panel .topic-content{display:flex;overflow:hidden;padding-right:0}
.astronomy-panel .topic-gallery{width:100%;height:100%;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:20px 28px}
.astronomy-panel .topic-card{min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:10px;align-items:center;text-align:center}
.astronomy-panel .topic-photo{width:100%;height:100%;min-height:0;aspect-ratio:auto;object-fit:contain;image-rendering:auto;margin:0}
.astronomy-panel .topic-photo-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-height:0;height:100%;width:100%}
.astronomy-panel .topic-card h3{margin:0;color:#fff}
.astronomy-panel .topic-caption{display:none}
@media(max-width:600px){.astronomy-panel .topic-gallery{gap:16px 12px}.astronomy-panel .topic-photo-group{grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr));gap:6px}#topic-detail.astronomy-panel .topic-card h3{font-size:14px;line-height:1.5}}

.cello-player{display:block;width:100%;aspect-ratio:16/9;border:0;background:#080808;min-height:0}
.astronomy-panel .topic-content{flex-direction:column;gap:16px}
.astronomy-panel .topic-gallery{flex:1;height:auto}
.astronomy-project{flex-shrink:0;text-align:center;color:#fff;font-size:16px;line-height:1.5}
.astronomy-project a{color:#fff;text-decoration:none;font-size:20px}
.astronomy-project a:hover{text-decoration:underline}
.astronomy-project p{margin:8px auto 0;max-width:900px}
@media(max-width:600px){.astronomy-project{font-size:12px}.astronomy-project a{font-size:16px}.music-panel .clip-card{display:flex}.music-panel .clips-grid{flex:1}.music-panel .cello-player{flex:1;max-height:100%;min-height:100px}.music-panel .clip-card h4{font-size:12px}}

.astronomy-project a{font-size:inherit;text-decoration:underline;text-underline-offset:3px}.astronomy-project p{margin:0 auto}

.astronomy-panel .topic-content{gap:28px}
#topic-detail .astronomy-project{font-size:var(--task-text-size);line-height:1.5;padding:8px 12px 12px}
.astronomy-project p{max-width:1050px}
@media(max-width:600px){.astronomy-panel .topic-content{gap:20px}#topic-detail .astronomy-project{padding:4px 4px 8px}}

.game-clip-hint{text-decoration:underline;text-underline-offset:4px}
.games-panel .game-clip-hint::before{content:none}
.selected-game-image{display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;image-rendering:auto}

.selected-game-clip{flex-direction:column;gap:20px}
.selected-game-clip .selected-game-image{flex:1;min-height:0}
.game-image-caption{flex-shrink:0;margin:0;text-align:center;color:#fff;font-size:var(--task-text-size);line-height:1.5;max-width:1000px}
@media(max-width:600px){.selected-game-clip{gap:16px}}

/* Dark cat photo cards with a clear white outline. */
.cats-panel .topic-card{background:#000;border:3px solid #fff;padding:6px}
.cats-panel .topic-photo{background:#000}
@media(max-width:600px){.cats-panel .topic-card{border-width:3px;padding:3px}}

/* Give the desktop welcome sentence the full available width. */
@media(min-width:701px){
  .room-page .intro{max-width:none;width:100%;padding-inline:0}
  .room-page .intro p{white-space:nowrap;text-wrap:nowrap;font-size:min(var(--intro-text-size),1.55vw)}
}

.room-page .task-progress{font-size:var(--intro-text-size);line-height:1.6}

.garden-panel .topic-content{display:flex;overflow:hidden;padding:0}
.garden-panel .topic-gallery{flex:1;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:28px}
.garden-panel .topic-card{min-height:0;display:flex;align-items:center;justify-content:center}
.garden-panel .topic-photo{width:100%;height:100%;min-height:0;aspect-ratio:auto;object-fit:contain;image-rendering:auto;margin:0}
.garden-panel .topic-card h3,.garden-panel .topic-caption{display:none}
@media(max-width:600px){.garden-panel .topic-gallery{grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr));gap:18px}}

.garden-panel .topic-card{display:flex;flex-direction:column;gap:16px}
.garden-panel .topic-photo{flex:1;min-height:0;height:0}
#topic-detail.garden-panel .topic-caption{display:block;flex-shrink:0;text-align:center;color:#fff;margin:0;line-height:1.5}
@media(max-width:600px){.garden-panel .topic-card{gap:10px}}

.dialogue-portrait{overflow:hidden}.dialogue-portrait image{image-rendering:pixelated}

/* Consistent close controls across room panels and the guestbook. */
.thought-content .close-button:hover,
.thought-content .close-button:focus-visible,
#topic-close:hover,
#topic-close:focus-visible,
.guestbook-close:hover,
.guestbook-close:focus-visible{color:#ff3344}

/* Oversized room artwork must not intercept footer links. */
.room-page .scene{pointer-events:none}
.room-page .scene .hotspot{pointer-events:auto}
.room-page .guestbook-entry{position:relative;z-index:3}
.room-page .task-progress{pointer-events:none}
