@import url('./base.css');

/* V3 keeps the scene in charge: the publisher lives inside the existing HUD. */
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-title { font: 19px/1.05 var(--serif); letter-spacing: -.45px; }
.brand-publisher { color: #c0cdb8; font: 12px/1.15 Arial, Helvetica, sans-serif; letter-spacing: 0; }
.welcome-card .welcome-publisher { margin: 18px 0 0; font-size: 12px; color: #7c846e; }
.welcome-publisher strong { color: #49634c; font-weight: 600; }
.publisher-navigation { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.publisher-navigation > span { font-size: 12px; color: var(--muted); }
.publisher-navigation strong { color: #31543b; }
.publisher-navigation a { display: flex; align-items: center; gap: 9px; color: #31543b; font-size: 14px; text-decoration: none; width: fit-content; min-height: 36px; border-radius: 5px; padding: 4px 2px; }
.publisher-navigation a:hover { text-decoration: underline; text-underline-offset: 3px; }
.publisher-navigation svg { width: 18px; height: 18px; }

.featured-space { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); background: #e7eaf0; border-color: #b7c1d4; }
.featured-space > img { height: 100%; min-height: 180px; aspect-ratio: 2 / 1; }
.featured-space .space-card-body { justify-content: center; padding: 19px 22px; }
.featured-space .space-card-body strong { color: #354664; font-size: 29px; }
.featured-space .space-category { color: #697a98; }
.featured-space .space-progress { margin-top: 5px; }
.featured-space.active { background: #e4e9ef; border-color: #7d8eb0; box-shadow: 0 0 0 2px #7d8eb024; }
.featured-space .space-current { left: 10px; right: auto; background: #283950e8; }

/* Opacity and transform are animated; object artwork and hit maps stay still. */
.fire-flames path { animation-duration: 1.7s; }
.fire-flames path:nth-child(2) { animation-duration: 2.3s; }
.fire-flames path:nth-child(3) { animation-duration: 2.9s; }
.fire-glow { animation-duration: 5.7s; }
.steam path { animation-duration: 7s; }
.sunlight::before { animation-duration: 22s; }
.candle-glow { position: absolute; pointer-events: none; border-radius: 50%; background: radial-gradient(ellipse,#ffdfa450 0,#f9bb3724 32%,transparent 70%); mix-blend-mode: screen; animation: candle-breathe 3s ease-in-out infinite alternate; }
.moonlight { position: absolute; pointer-events: none; background: radial-gradient(ellipse at 65% 20%,#c8d8ff1c,transparent 68%); mix-blend-mode: screen; animation: moonlight-breathe 14s ease-in-out infinite alternate; }
.moonlight::before { content: ""; position: absolute; inset: 0; opacity: .45; background: radial-gradient(circle at 18% 45%,#e5eaff9e 0 1px,transparent 2px),radial-gradient(circle at 65% 58%,#e5eaff8c 0 1px,transparent 2px),radial-gradient(circle at 47% 26%,#e5eaff8c 0 1px,transparent 2px); animation: mote-drift 24s ease-in-out infinite alternate; }
@keyframes candle-breathe { 0% { opacity: .35; transform: scale(.97); } 50% { opacity: .62; } 100% { opacity: .46; transform: scale(1.03); } }
@keyframes moonlight-breathe { from { opacity: .35; } to { opacity: .65; } }
.dialog-open .scene-atmosphere *, .dialog-open .scene-atmosphere *::before,
.scene-busy .scene-atmosphere *, .scene-busy .scene-atmosphere *::before { animation-play-state: paused !important; }
.motion-off .found-mark, .motion-off .hint-ring { animation: none; }
.tab-hidden .found-mark, .tab-hidden .hint-ring { animation-play-state: paused; }
body[data-space="library"] .glass { background: #17263bdf; border-color: #c8d3eb42; }
body[data-space="library"] .scene-backdrop { filter: blur(25px) brightness(.4) saturate(.75); }

.mode-button, .hint-button { font-size: 14px; }
.pagination-button, #tray-count, .page-label, .space-category, .space-progress, .space-current { font-size: 12px; }
#hint-count { font-size: 12px; width: 18px; height: 18px; }
@media (max-width: 850px) {
  .brand > .brand-copy { display: none; }
}
@media (max-width: 650px) {
  .room-button, .list-toggle, .hint-button, .hud-progress { font-size: 14px; }
  .featured-space > img { min-height: 148px; }
  .featured-space .space-card-body { padding: 14px 12px; }
  .featured-space .space-card-body strong { font-size: 23px; }
  .featured-space .space-description { display: none; }
  .space-category, .space-progress, .space-current { font-size: 12px; letter-spacing: .2px; }
  .space-card-body { padding: 10px; }
  .tray-actions { gap: 6px; }
  #tray-count { padding-left: 0; }
}
@media (max-width: 360px) {
  .list-toggle { gap: 3px; }
  .tray-actions { gap: 3px; }
  .featured-space .space-card-body strong { font-size: 21px; }
}
@media (max-height: 620px) and (min-width: 700px) {
  .space-cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .featured-space { grid-column: auto; display: flex; }
  .featured-space > img { min-height: 0; height: auto; aspect-ratio: 3 / 2; }
  .featured-space .space-card-body { padding: 11px; }
  .featured-space .space-card-body strong { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .candle-glow, .moonlight, .moonlight::before { animation: none; }
}

#scene-viewport:focus-visible::after{content:"+";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font:32px sans-serif;color:white;text-shadow:0 1px 4px #000;pointer-events:none;z-index:12;}
