      :root {
        --paper: #f8f5ef;
        --paper-deep: #f0e8d8;
        --card: #fffdf8;
        --ink: #2c2418;
        --ink-soft: #6f6350;
        --ink-faint: #9a8c74;
        --gold: #e8c266;
        --gold-bright: #f6d789;
        --gold-deep: #b9832a;
        --gold-soft: #f6e3b4;
        --line: #e7dcc6;
        --sb-night: #0e0a1a;
        --sb-deep: #160f2b;
        --sb-plum: #2a1b52;
        --sb-gold: #e8c266;
        --sb-lav: #a79dc4;
        --shadow-card: 0 1px 2px rgba(93, 70, 28, 0.06), 0 10px 30px -12px rgba(93, 70, 28, 0.22);
        --shadow-card-hover: 0 4px 8px rgba(93, 70, 28, 0.08), 0 30px 54px -16px rgba(93, 70, 28, 0.38), 0 0 0 1.5px rgba(232, 194, 102, 0.75), 0 14px 44px -6px rgba(232, 194, 102, 0.55);
        --hero-ink: #fbf3dc;
        --glyph-observatory: #44588c;
        --dot: #58a05c;
      }

      @media (prefers-color-scheme: dark) {
        :root {
          --paper: #17120c;
          --paper-deep: #100c07;
          --card: #241b11;
          --ink: #f2e8d5;
          --ink-soft: #c3b294;
          --ink-faint: #8d7c5f;
          --gold-deep: #eec26a;
          --gold-soft: #4a3a17;
          --line: #3a2e1c;
          --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -12px rgba(0, 0, 0, 0.55);
          --shadow-card-hover: 0 4px 8px rgba(0, 0, 0, 0.45), 0 30px 54px -16px rgba(0, 0, 0, 0.7), 0 0 0 1.5px rgba(232, 194, 102, 0.6), 0 14px 44px -6px rgba(232, 194, 102, 0.3);
          --glyph-observatory: #a9bde8;
          --dot: #7cc483;
        }
      }

      * { box-sizing: border-box; }

      html {
        -webkit-text-size-adjust: 100%;
        background-color: var(--paper-deep);
      }

      body {
        margin: 0;
        font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
        color: var(--ink);
        background:
          radial-gradient(1100px 480px at 85% -120px, rgba(232, 194, 102, 0.18), transparent 60%),
          radial-gradient(800px 420px at -10% 30%, rgba(167, 157, 196, 0.14), transparent 55%),
          linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
        min-height: 100vh;
        overflow-x: hidden;
      }

      /* Paper grain */
      body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: 0;
        opacity: 0.5;
        mix-blend-mode: multiply;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
      }

      @media (prefers-color-scheme: dark) {
        body::before { mix-blend-mode: screen; opacity: 0.35; }
      }

      /* Drifting ambient orbs */
      .orb {
        position: fixed;
        border-radius: 50%;
        pointer-events: none;
        z-index: 0;
        filter: blur(70px);
        will-change: transform;
      }
      .orb-a {
        width: 480px; height: 480px;
        right: -140px; top: -120px;
        background: radial-gradient(circle, rgba(232, 194, 102, 0.4), transparent 65%);
        animation: drift-a 26s ease-in-out infinite alternate;
      }
      .orb-b {
        width: 420px; height: 420px;
        left: -150px; top: 38%;
        background: radial-gradient(circle, rgba(122, 96, 196, 0.3), transparent 65%);
        animation: drift-b 32s ease-in-out infinite alternate;
      }
      .orb-c {
        width: 340px; height: 340px;
        right: 6%; bottom: -160px;
        background: radial-gradient(circle, rgba(232, 194, 102, 0.28), transparent 65%);
        animation: drift-a 38s ease-in-out infinite alternate-reverse;
      }

      /* Floating dust particles (canvas) */
      #dust {
        position: fixed;
        inset: 0;
        z-index: 0;
        pointer-events: none;
      }

      .wrap {
        position: relative;
        z-index: 1;
        max-width: 1020px;
        margin: 0 auto;
        padding: 22px 22px 56px;
      }

      /* ---------- Top bar ---------- */
      .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 20px;
      }

      .back-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--ink-soft);
        font-weight: 700;
        font-size: 0.92rem;
        text-decoration: none;
        padding: 8px 12px 8px 6px;
        border-radius: 10px;
        transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
      }
      .back-link .arrow { transition: transform 0.2s ease; font-size: 1.05rem; line-height: 1; }
      .back-link:hover { color: var(--gold-deep); background: rgba(232, 194, 102, 0.16); }
      .back-link:hover .arrow { transform: translateX(-3px); }
      .back-link:active { transform: scale(0.96); }
      .back-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

      .topbar .date {
        color: var(--ink-faint);
        font-size: 0.88rem;
        font-weight: 600;
        white-space: nowrap;
      }

      /* ---------- Hero ---------- */
      .hero {
        position: relative;
        overflow: hidden;
        border-radius: 28px;
        padding: 56px 46px 48px;
        background:
          radial-gradient(640px 320px at 108% -40%, rgba(232, 194, 102, 0.38), transparent 55%),
          radial-gradient(460px 280px at -6% 130%, rgba(140, 104, 220, 0.5), transparent 60%),
          radial-gradient(300px 200px at 62% 115%, rgba(232, 194, 102, 0.16), transparent 60%),
          linear-gradient(118deg, var(--sb-night) 0%, var(--sb-deep) 48%, var(--sb-plum) 82%, #3a2566 100%);
        box-shadow: 0 30px 60px -22px rgba(22, 15, 43, 0.7), 0 0 70px -18px rgba(232, 194, 102, 0.45), inset 0 1px 0 rgba(232, 194, 102, 0.3);
        animation: rise 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) backwards;
      }

      /* Twinkling starfield inside the hero */
      .hero .stars {
        position: absolute;
        inset: 0;
        pointer-events: none;
      }
      .hero .stars i {
        position: absolute;
        border-radius: 50%;
        background: #ffe9ad;
        animation: twinkle 3.4s ease-in-out infinite;
      }
      .hero .stars i:nth-child(1)  { left: 6%;  top: 18%; width: 3px; height: 3px; animation-delay: 0s; }
      .hero .stars i:nth-child(2)  { left: 14%; top: 64%; width: 2px; height: 2px; animation-delay: 0.7s; }
      .hero .stars i:nth-child(3)  { left: 26%; top: 30%; width: 2px; height: 2px; animation-delay: 1.3s; }
      .hero .stars i:nth-child(4)  { left: 38%; top: 12%; width: 3px; height: 3px; animation-delay: 2s; }
      .hero .stars i:nth-child(5)  { left: 47%; top: 74%; width: 2px; height: 2px; animation-delay: 0.4s; }
      .hero .stars i:nth-child(6)  { left: 56%; top: 22%; width: 2px; height: 2px; animation-delay: 1.7s; }
      .hero .stars i:nth-child(7)  { left: 64%; top: 58%; width: 3px; height: 3px; animation-delay: 2.6s; }
      .hero .stars i:nth-child(8)  { left: 72%; top: 14%; width: 2px; height: 2px; animation-delay: 1s; }
      .hero .stars i:nth-child(9)  { left: 81%; top: 44%; width: 2px; height: 2px; animation-delay: 0.2s; }
      .hero .stars i:nth-child(10) { left: 90%; top: 70%; width: 3px; height: 3px; animation-delay: 2.2s; }
      .hero .stars i:nth-child(11) { left: 33%; top: 84%; width: 2px; height: 2px; animation-delay: 2.9s; }
      .hero .stars i:nth-child(12) { left: 95%; top: 26%; width: 2px; height: 2px; animation-delay: 1.5s; }

      /* Shooting star - streaks across the hero every ~9s */
      .hero .shoot {
        position: absolute;
        left: 58%;
        top: 10%;
        width: 130px;
        height: 2px;
        border-radius: 2px;
        background: linear-gradient(90deg, rgba(255, 233, 173, 0), #ffe9ad 70%, #fff8e1);
        box-shadow: 0 0 8px 1px rgba(255, 233, 173, 0.7);
        transform: rotate(-24deg);
        transform-origin: right center;
        opacity: 0;
        animation: shoot 9s ease-in infinite;
        animation-delay: 2.5s;
        pointer-events: none;
      }

      /* Constellation, right side */
      .hero .constellation {
        position: absolute;
        right: 30px;
        top: 26px;
        width: 300px;
        height: 210px;
        pointer-events: none;
        opacity: 0.9;
      }
      .hero .constellation .ln {
        stroke: rgba(232, 194, 102, 0.4);
        stroke-width: 1;
        stroke-dasharray: 4 5;
        animation: dash-drift 14s linear infinite;
      }
      .hero .constellation .st {
        fill: #ffe9ad;
        animation: twinkle 3.4s ease-in-out infinite;
      }
      .hero .constellation .st.big { fill: var(--sb-gold); }

      /* Arched "windows" motif, like light through an atrium */
      .hero .arches {
        position: absolute;
        right: 26px;
        top: 0;
        bottom: 0;
        display: flex;
        align-items: flex-end;
        gap: 14px;
        pointer-events: none;
      }
      .hero .arches span {
        display: block;
        width: 54px;
        border-radius: 54px 54px 0 0;
        background: linear-gradient(180deg, rgba(232, 194, 102, 0.3), rgba(232, 194, 102, 0.04));
        border: 1px solid rgba(232, 194, 102, 0.32);
        border-bottom: none;
      }
      .hero .arches span:nth-child(1) { height: 62%; opacity: 0.5; }
      .hero .arches span:nth-child(2) { height: 82%; opacity: 0.72; }
      .hero .arches span:nth-child(3) { height: 52%; opacity: 0.36; }

      .hero .kicker {
        position: relative;
        margin: 0 0 10px;
        font-size: 0.82rem;
        font-weight: 900;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: var(--sb-gold);
        text-shadow: 0 0 18px rgba(232, 194, 102, 0.55);
      }

      .hero h1 {
        position: relative;
        margin: 0;
        font-family: "Playfair Display", Georgia, "Times New Roman", serif;
        font-weight: 700;
        font-size: clamp(2.7rem, 7vw, 4.4rem);
        line-height: 1.04;
        letter-spacing: -0.015em;
        color: var(--hero-ink);
        max-width: 15ch;
      }

      /* Shimmering gold name */
      .hero h1 .name {
        background: linear-gradient(100deg, #c9932b 0%, var(--gold) 22%, #fff0bd 40%, var(--gold-bright) 55%, #c9932b 78%, var(--gold) 100%);
        background-size: 220% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
        animation: shimmer 5.5s ease-in-out infinite;
        filter: drop-shadow(0 2px 14px rgba(232, 194, 102, 0.35));
      }

      .hero .sub {
        position: relative;
        margin: 16px 0 0;
        font-size: 1.05rem;
        line-height: 1.55;
        color: var(--sb-lav);
        max-width: 46ch;
        font-weight: 600;
      }

      .hero .glance {
        position: relative;
        margin-top: 26px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
      }

      .hero .chip {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 15px;
        border-radius: 999px;
        background: rgba(232, 194, 102, 0.12);
        border: 1px solid rgba(232, 194, 102, 0.45);
        color: var(--hero-ink);
        font-size: 0.88rem;
        font-weight: 700;
        backdrop-filter: blur(3px);
        box-shadow: 0 0 16px -4px rgba(232, 194, 102, 0.4), inset 0 1px 0 rgba(255, 240, 189, 0.25);
        transition: transform 0.18s ease, box-shadow 0.18s ease;
      }
      .hero .chip:hover {
        transform: translateY(-2px);
        box-shadow: 0 0 24px -2px rgba(232, 194, 102, 0.6), inset 0 1px 0 rgba(255, 240, 189, 0.3);
      }
      .hero .chip .dot, .pill .dot {
        width: 8px; height: 8px; border-radius: 50%;
        background: var(--dot);
        box-shadow: 0 0 0 0 rgba(88, 160, 92, 0.5), 0 0 8px 1px rgba(88, 160, 92, 0.7);
        animation: pulse 2.4s ease-out infinite;
      }

      /* ---------- Section label ---------- */
      .section-label {
        display: flex;
        align-items: center;
        gap: 16px;
        margin: 44px 4px 18px;
        animation: rise 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) backwards;
        animation-delay: 0.12s;
      }
      .section-label h2 {
        margin: 0;
        font-family: "Playfair Display", Georgia, serif;
        font-size: 1.6rem;
        font-weight: 700;
        letter-spacing: -0.01em;
        color: var(--ink);
        white-space: nowrap;
      }
      .section-label .rule {
        flex: 1;
        height: 2px;
        border-radius: 2px;
        background: linear-gradient(90deg, var(--gold) 0%, rgba(232, 194, 102, 0.25) 55%, transparent);
        position: relative;
      }
      .section-label .rule::after {
        content: "";
        position: absolute;
        left: 0; top: 50%;
        width: 7px; height: 7px;
        transform: translate(-1px, -50%) rotate(45deg);
        background: var(--gold);
        box-shadow: 0 0 10px 2px rgba(232, 194, 102, 0.6);
      }
      .section-label p {
        margin: 0;
        color: var(--ink-faint);
        font-size: 0.9rem;
        font-weight: 600;
        white-space: nowrap;
      }

      /* ---------- Room grid ---------- */
      .grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
        perspective: 1200px;
      }

      .card {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 15px;
        background: linear-gradient(160deg, var(--card) 0%, #fdf6e9 100%);
        border: 1px solid var(--line);
        border-radius: 22px;
        padding: 26px 26px 22px;
        text-decoration: none;
        color: inherit;
        box-shadow: var(--shadow-card);
        transition: box-shadow 0.3s ease, border-color 0.3s ease;
        animation: rise 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) backwards;
        overflow: hidden;
        will-change: transform;
      }

      @media (prefers-color-scheme: dark) {
        .card { background: linear-gradient(160deg, var(--card) 0%, #1d1509 100%); }
      }

      /* Animated gold border sheen on hover */
      .card::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        padding: 1.5px;
        background: linear-gradient(120deg, transparent 20%, var(--gold) 45%, #fff0bd 50%, var(--gold) 55%, transparent 80%);
        background-size: 250% 250%;
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
      }
      .card:hover::before {
        opacity: 1;
        animation: border-flow 2.6s linear infinite;
      }

      .card::after {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 3px;
        background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
        opacity: 0;
        transition: opacity 0.3s ease;
      }

      .card:hover {
        box-shadow: var(--shadow-card-hover);
        border-color: rgba(232, 194, 102, 0.6);
      }
      .card:hover::after { opacity: 1; }
      .card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
      .card:active { scale: 0.985; }

      .card .icon {
        position: relative;
        width: 66px;
        height: 66px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        flex: none;
        background:
          radial-gradient(circle at 32% 28%, rgba(232, 194, 102, 0.35), transparent 55%),
          linear-gradient(145deg, var(--sb-plum) 0%, var(--sb-deep) 55%, var(--sb-night) 100%);
        color: var(--sb-gold);
        box-shadow:
          inset 0 1px 0 rgba(232, 194, 102, 0.4),
          inset 0 0 0 1px rgba(232, 194, 102, 0.22),
          0 10px 22px -8px rgba(22, 15, 43, 0.65),
          0 0 22px -4px rgba(122, 96, 196, 0.45);
        transition: transform 0.3s cubic-bezier(0.22, 0.9, 0.3, 1), box-shadow 0.3s ease;
      }
      .card:hover .icon {
        transform: scale(1.1) rotate(-4deg);
        box-shadow:
          inset 0 1px 0 rgba(232, 194, 102, 0.5),
          inset 0 0 0 1px rgba(232, 194, 102, 0.35),
          0 14px 28px -8px rgba(22, 15, 43, 0.7),
          0 0 34px 0 rgba(232, 194, 102, 0.55);
      }
      .card .icon svg { width: 32px; height: 32px; filter: drop-shadow(0 0 5px rgba(232, 194, 102, 0.45)); }

      .card h3 {
        margin: 0;
        font-family: "Playfair Display", Georgia, serif;
        font-size: 1.5rem;
        font-weight: 700;
        line-height: 1.18;
        letter-spacing: -0.01em;
      }
      .card h3 .room-name {
        display: block;
        font-family: "Nunito", sans-serif;
        font-size: 0.72rem;
        font-weight: 900;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: var(--gold-deep);
        margin-bottom: 6px;
      }

      .card .desc {
        margin: 0;
        color: var(--ink-soft);
        font-size: 0.97rem;
        line-height: 1.55;
        flex: 1;
      }

      .card .foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px 10px;
        margin-top: 2px;
      }

      .pill {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 6px 12px;
        border-radius: 999px;
        background: linear-gradient(135deg, var(--sb-plum), var(--sb-deep));
        color: var(--sb-gold);
        font-size: 0.82rem;
        font-weight: 800;
        white-space: nowrap;
        box-shadow: 0 4px 12px -4px rgba(22, 15, 43, 0.55), 0 0 14px -2px rgba(232, 194, 102, 0.35), inset 0 1px 0 rgba(232, 194, 102, 0.3);
      }
      .pill.plain {
        background: linear-gradient(135deg, #fdf3d7, var(--gold-soft));
        border: 1px solid rgba(185, 131, 42, 0.35);
        color: #7c5c14;
        box-shadow: 0 4px 12px -6px rgba(185, 131, 42, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.7);
      }
      @media (prefers-color-scheme: dark) {
        .pill.plain { background: linear-gradient(135deg, #3a2c10, #2c2008); color: var(--gold-deep); border-color: rgba(232, 194, 102, 0.3); }
      }

      .enter {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--gold-deep);
        font-weight: 900;
        font-size: 0.92rem;
        white-space: nowrap;
      }
      .enter .arr { transition: transform 0.22s ease; }
      .card:hover .enter .arr { transform: translateX(4px); }

      /* Grid placement */
      .card-study { grid-column: span 2; animation-delay: 0.18s; }
      .card-desk { grid-column: span 2; animation-delay: 0.26s; }
      .card-nursery { grid-column: span 2; animation-delay: 0.34s; }
      .card-observatory { grid-column: span 4; animation-delay: 0.42s; }
      .card-door { grid-column: span 2; animation-delay: 0.5s; }
      .card-newsroom { grid-column: span 2; animation-delay: 0.58s; }

      /* Observatory sub-rooms */
      .subrooms {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-top: 2px;
      }
      .subroom {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        border-radius: 15px;
        background: linear-gradient(150deg, rgba(246, 227, 180, 0.35), rgba(255, 253, 248, 0.6));
        border: 1px solid var(--line);
        transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
      }
      @media (prefers-color-scheme: dark) {
        .subroom { background: linear-gradient(150deg, rgba(232, 194, 102, 0.08), rgba(0, 0, 0, 0.15)); }
      }
      .card:hover .subroom {
        border-color: rgba(232, 194, 102, 0.65);
        box-shadow: 0 6px 16px -8px rgba(185, 131, 42, 0.45);
      }
      .subroom svg { width: 21px; height: 21px; flex: none; color: var(--glyph-observatory); }
      .subroom .t { font-weight: 800; font-size: 0.95rem; line-height: 1.25; }
      .subroom .s { color: var(--ink-soft); font-size: 0.84rem; line-height: 1.35; }
      .subroom .status {
        margin-left: auto;
        flex: none;
        font-size: 0.78rem;
        font-weight: 800;
        color: var(--sb-gold);
        background: linear-gradient(135deg, var(--sb-plum), var(--sb-deep));
        padding: 4px 10px;
        border-radius: 999px;
        white-space: nowrap;
        box-shadow: 0 0 12px -2px rgba(232, 194, 102, 0.4);
      }

      footer {
        margin-top: 46px;
        text-align: center;
        color: var(--ink-faint);
        font-size: 0.85rem;
        font-weight: 600;
        animation: rise 0.7s ease backwards;
        animation-delay: 0.6s;
      }
      footer .sep { color: var(--gold-deep); margin: 0 8px; }

      /* ---------- Motion ---------- */
      @keyframes rise {
        from { opacity: 0; transform: translateY(18px); }
        to { opacity: 1; transform: translateY(0); }
      }

      @keyframes pulse {
        0% { box-shadow: 0 0 0 0 rgba(88, 160, 92, 0.45), 0 0 8px 1px rgba(88, 160, 92, 0.7); }
        70% { box-shadow: 0 0 0 7px rgba(88, 160, 92, 0), 0 0 8px 1px rgba(88, 160, 92, 0.7); }
        100% { box-shadow: 0 0 0 0 rgba(88, 160, 92, 0), 0 0 8px 1px rgba(88, 160, 92, 0.7); }
      }

      @keyframes twinkle {
        0%, 100% { opacity: 0.25; transform: scale(0.8); }
        50% { opacity: 1; transform: scale(1.25); }
      }

      @keyframes shimmer {
        0% { background-position: 110% 0; }
        55% { background-position: -60% 0; }
        100% { background-position: -60% 0; }
      }

      @keyframes shoot {
        0%, 88% { opacity: 0; transform: rotate(-24deg) translateX(0); }
        91% { opacity: 1; }
        97%, 100% { opacity: 0; transform: rotate(-24deg) translateX(-340px); }
      }

      @keyframes dash-drift {
        to { stroke-dashoffset: -90; }
      }

      @keyframes border-flow {
        0% { background-position: 0% 0%; }
        100% { background-position: 250% 250%; }
      }

      @keyframes drift-a {
        from { transform: translate(0, 0) scale(1); }
        to { transform: translate(-70px, 50px) scale(1.12); }
      }
      @keyframes drift-b {
        from { transform: translate(0, 0) scale(1.05); }
        to { transform: translate(60px, -45px) scale(0.95); }
      }

      @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
          animation-duration: 0.01ms !important;
          animation-delay: 0s !important;
          animation-iteration-count: 1 !important;
          transition-duration: 0.01ms !important;
        }
        .hero .shoot { display: none; }
      }

      /* ---------- Small screens ---------- */
      @media (max-width: 760px) {
        .wrap { padding: 16px 16px 44px; }
        .hero { padding: 38px 24px 32px; border-radius: 24px; }
        .hero .arches, .hero .constellation { display: none; }
        .grid { grid-template-columns: 1fr; }
        .card-study, .card-desk, .card-nursery, .card-observatory, .card-door, .card-newsroom { grid-column: span 1; }
        .subrooms { grid-template-columns: 1fr; }
        .topbar .date { display: none; }
        .section-label p { display: none; }
        .orb-a { width: 300px; height: 300px; }
        .orb-b { width: 260px; height: 260px; }
        .orb-c { display: none; }
      }

      /* ---------- Portal components (account chrome) ---------- */
      .topbar .bubble {
        width: 40px; height: 40px; border-radius: 50%;
        background: linear-gradient(135deg, var(--sb-plum), var(--sb-deep));
        color: var(--sb-gold);
        display: inline-grid; place-items: center;
        font-weight: 900; font-size: 17px; font-family: "Nunito", system-ui, sans-serif;
        border: 1px solid rgba(232, 194, 102, 0.5);
        box-shadow: 0 4px 14px -4px rgba(22, 15, 43, 0.6), 0 0 14px -2px rgba(232, 194, 102, 0.4);
        cursor: pointer; flex: none;
        transition: transform 0.18s ease, box-shadow 0.18s ease;
      }
      .topbar .bubble:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -6px rgba(22, 15, 43, 0.7), 0 0 20px 0 rgba(232, 194, 102, 0.55); }
      .topbar .bubble:active { transform: scale(0.94); }
      .topbar .bubble:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
      .topbar .right { display: flex; align-items: center; gap: 14px; }

      .dim { color: var(--ink-faint); }
      .msg { font-size: 0.85rem; font-weight: 700; }
      .msg[data-kind="error"] { color: #b3402e; }
      .msg[data-kind="info"] { color: var(--ink-soft); }

      .nameprompt {
        background: linear-gradient(160deg, var(--card) 0%, #fdf6e9 100%);
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 20px 22px;
        margin: 0 0 4px;
        box-shadow: var(--shadow-card);
        font-size: 0.95rem;
        animation: rise 0.7s cubic-bezier(0.22, 0.9, 0.3, 1) backwards;
        animation-delay: 0.08s;
      }
      @media (prefers-color-scheme: dark) {
        .nameprompt { background: linear-gradient(160deg, var(--card) 0%, #1d1509 100%); }
      }
      .nameprompt b { font-size: 1.02rem; }

      .namerow { padding: 12px 0 2px; }
      .namerow input {
        width: 100%; padding: 12px 14px;
        border: 1px solid var(--line); border-radius: 12px;
        font-family: "Nunito", system-ui, sans-serif; font-size: 0.95rem;
        background: #fffdf8; color: var(--ink);
        box-sizing: border-box;
      }
      .namerow input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
      @media (prefers-color-scheme: dark) {
        .namerow input { background: #17120c; color: var(--ink); }
      }
      .nbtns { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 10px; }
      .nbtns .msg { margin-right: auto; }

      .btn {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        padding: 11px 20px; border-radius: 12px;
        border: 1px solid var(--line); background: var(--card);
        font-family: "Nunito", system-ui, sans-serif; font-weight: 800; font-size: 0.92rem;
        color: var(--ink); cursor: pointer; text-decoration: none;
        transition: transform 0.15s ease, box-shadow 0.2s ease;
      }
      .btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(93, 70, 28, 0.4); }
      .btn:active { transform: scale(0.97); }
      .btn:disabled { opacity: 0.55; cursor: default; transform: none; }
      .btn.primary { background: linear-gradient(135deg, var(--sb-plum), var(--sb-deep)); border: 0; color: var(--sb-gold); box-shadow: 0 6px 18px -6px rgba(22, 15, 43, 0.6); }
      .btn.quiet { border: 0; background: none; color: var(--ink-soft); padding: 8px 12px; }
      .btn.quiet:hover { color: var(--gold-deep); background: rgba(232, 194, 102, 0.14); box-shadow: none; }
      .btn.danger { color: #b3402e; border-color: rgba(179, 64, 46, 0.35); width: 100%; }
      .btn.danger:hover { background: rgba(179, 64, 46, 0.08); box-shadow: none; }
      .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

      /* Front Door inner controls */
      .door-box {
        display: flex; flex-direction: column; gap: 4px;
        padding: 16px 18px;
        border-radius: 15px;
        background: linear-gradient(150deg, rgba(246, 227, 180, 0.35), rgba(255, 253, 248, 0.6));
        border: 1px solid var(--line);
      }
      @media (prefers-color-scheme: dark) {
        .door-box { background: linear-gradient(150deg, rgba(232, 194, 102, 0.08), rgba(0, 0, 0, 0.15)); }
      }
      .door-row {
        display: flex; align-items: center; justify-content: space-between;
        gap: 10px; padding: 8px 0;
        font-size: 0.95rem; font-weight: 600; color: var(--ink-soft);
      }
      .door-row > span:last-child { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; }
      .door-box .namerow { padding: 4px 0 8px; }

      /* Cards that are sections, not links */
      section.card { cursor: default; }
      .card .enter[href] { text-decoration: none; }

      /* ============ Room pages (Observatory, Front Door) ============ */
      /* Clean, professional styles for the settings-style sub-pages.    */
      /* No giant decorations -- content is the focus.                   */

      .backbar {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--ink-soft);
        text-decoration: none;
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 14px;
      }
      .backbar:hover { color: var(--gold-deep); }

      .pagehead { margin-bottom: 18px; }
      .pagehead h1 {
        font-family: Georgia, "Times New Roman", serif;
        font-weight: 400;
        font-size: 32px;
        margin: 0 0 4px;
        letter-spacing: 0.01em;
      }
      .pagehead p {
        margin: 0;
        color: var(--ink-soft);
        font-size: 16px;
      }

      .room {
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: var(--shadow-card);
        padding: 20px 22px;
        margin-bottom: 18px;
      }
      .rhead {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 6px;
      }
      .ricon {
        width: 44px;
        height: 44px;
        flex: none;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--sb-plum), var(--sb-deep));
      }
      .ricon svg {
        width: 24px;
        height: 24px;
        display: block;
      }
      .rhead h2 {
        font-family: Georgia, "Times New Roman", serif;
        font-weight: 400;
        font-size: 21px;
        margin: 0 0 2px;
      }
      .rhead .status {
        font-size: 13px;
        color: var(--ink-faint);
      }
      .rdetail { padding-top: 8px; }

      .rrow {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 12px;
        padding: 9px 0;
        border-bottom: 1px solid var(--line);
        font-size: 15px;
      }
      .rrow:last-child { border-bottom: 0; }
      .rrow b { font-variant-numeric: tabular-nums; }

      .switchrow {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 10px 0;
        font-size: 15px;
      }
      .switch {
        flex: none;
        width: 48px;
        height: 28px;
        border-radius: 14px;
        border: 1px solid var(--line);
        background: var(--paper-deep);
        position: relative;
        cursor: pointer;
        padding: 0;
        transition: background 0.18s ease, border-color 0.18s ease;
      }
      .switch::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
        transition: transform 0.18s ease;
      }
      .switch[aria-checked="true"] {
        background: var(--gold);
        border-color: var(--gold-deep);
      }
      .switch[aria-checked="true"]::after { transform: translateX(20px); }

      .msg {
        font-size: 13.5px;
        line-height: 1.5;
        color: var(--ink-soft);
        background: rgba(232, 194, 102, 0.1);
        border: 1px solid rgba(232, 194, 102, 0.3);
        border-radius: 10px;
        padding: 10px 12px;
        margin: 12px 0 4px;
      }
      .msg[data-kind="error"] {
        background: rgba(179, 64, 46, 0.07);
        border-color: rgba(179, 64, 46, 0.3);
        color: #b3402e;
      }

      .field { margin: 10px 0; }
      .field label {
        display: block;
        font-size: 13px;
        font-weight: 700;
        color: var(--ink-soft);
        margin-bottom: 6px;
      }
      .field input[type="email"],
      .field input[type="text"] {
        width: 100%;
        font: inherit;
        font-size: 15px;
        color: var(--ink);
        background: var(--paper);
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 10px 12px;
      }
      .field input:focus {
        outline: 2px solid var(--gold);
        outline-offset: 1px;
        border-color: var(--gold-deep);
      }

      .dim { color: var(--ink-faint); font-size: 13.5px; }

      .privacy {
        font-size: 13.5px;
        line-height: 1.55;
        color: var(--ink-soft);
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 14px 16px;
        margin-bottom: 18px;
      }

      .danger-zone {
        background: var(--card);
        border: 1px solid rgba(179, 64, 46, 0.3);
        border-radius: 18px;
        padding: 20px 22px;
        margin-bottom: 18px;
      }

      /* ---------- The Study (Shelf) ---------- */
      .toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        align-items: center;
        margin-bottom: 16px;
      }
      .searchbox {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 999px;
        padding: 8px 14px;
        flex: 1 1 220px;
        max-width: 340px;
      }
      .searchbox input {
        border: 0;
        background: transparent;
        outline: none;
        font: inherit;
        font-size: 15px;
        color: var(--ink);
        width: 100%;
      }
      .searchbox input::placeholder { color: var(--ink-faint); }
      .pills { display: flex; gap: 8px; flex-wrap: wrap; }
      .pills .pill {
        font: inherit;
        cursor: pointer;
        border: 1px solid transparent;
      }
      .pills .pill.on {
        outline: 2px solid var(--gold);
        outline-offset: 1px;
      }
      .alist {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }
      .acard {
        display: block;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: 16px;
        box-shadow: var(--shadow-card);
        padding: 16px 18px;
        text-decoration: none;
        color: var(--ink);
        transition: box-shadow 0.18s ease, transform 0.18s ease;
      }
      .acard:hover {
        box-shadow: var(--shadow-card-hover);
        transform: translateY(-1px);
      }
      .acard .src {
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--gold-deep);
        margin-bottom: 6px;
      }
      .acard h3 {
        font-family: Georgia, "Times New Roman", serif;
        font-weight: 400;
        font-size: 20px;
        line-height: 1.35;
        margin: 0 0 8px;
        color: var(--ink);
        display: flex;
        align-items: flex-start;
        gap: 10px;
      }
      .acard .meta {
        font-size: 13.5px;
        color: var(--ink-faint);
      }
      .unread {
        flex: none;
        align-self: center;
        font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--sb-gold);
        background: linear-gradient(135deg, var(--sb-plum), var(--sb-deep));
        border-radius: 999px;
        padding: 3px 10px;
        white-space: nowrap;
      }
      .empty {
        text-align: center;
        color: var(--ink-soft);
        padding: 48px 20px;
      }
      .empty svg {
        width: 56px;
        height: 56px;
        color: var(--ink-faint);
        margin-bottom: 12px;
      }
      .meter {
        margin-top: 16px;
        font-size: 13px;
        color: var(--ink-faint);
        text-align: center;
      }

/* Fix giant decorative star on Nursery page */
svg.star { width: 48px; height: 48px; }

/* ---- Observatory: CSP-safe replacements for removed inline styles ---- */
.room.r-observatory { cursor: default; }
.room.r-observatory.obs-first { margin-top: 14px; }
.room .rdetail { display: block; }
/* Constellation twinkle delays (were inline animation-delay styles) */
.constellation circle.st:nth-of-type(2) { animation-delay: 0.8s; }
.constellation circle.st:nth-of-type(3) { animation-delay: 1.6s; }
.constellation circle.st:nth-of-type(4) { animation-delay: 2.3s; }
.constellation circle.st:nth-of-type(5) { animation-delay: 0.3s; }
.constellation circle.st:nth-of-type(6) { animation-delay: 1.1s; }
.constellation circle.st:nth-of-type(7) { animation-delay: 2.8s; }
.constellation circle.st:nth-of-type(8) { animation-delay: 1.9s; }

/* ---- Nursery: brand link lost its styles in the redesign (was blue) ---- */
.masthead { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.masthead .brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; }
.masthead .brand svg { width: 26px; height: 26px; flex: none; }
.masthead .brand:hover { color: var(--gold-deep); }
.masthead .acct { display: flex; align-items: center; gap: 10px; }
.masthead .acct .email { font-size: 14px; color: var(--ink-soft); }

/* Article body links (Shelf read page) */
#r-body a {
  color: var(--gold-deep);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 2px;
}
#r-body a:hover {
  color: var(--gold);
}
#r-body a:visited {
  color: var(--ink-soft);
}

/* Front Door page (replaces inline styles) */
.room.r-front { cursor: default; }
.room-lead { margin-top: 14px; }
.signout-pad { padding: 10px 0 2px; }
.signout-pad-sm { padding: 6px 0 2px; }
.dz-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 20px;
  margin-bottom: 6px;
}
.dz-desc {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

/* ---- Nursery (Kids) page ---- */
.rooms-pad { padding-top: 6px; }
.push-right { margin-left: auto; }

/* Fix preset toggle contrast - dark text on light backgrounds */
#presets .name {
  color: #2a2118;
  font-weight: 600;
}
#presets .seg button {
  color: #2a2118;
  background: #f5f0e6;
}
#presets .seg button[aria-pressed="true"] {
  color: #fff;
  background: #4a3f6b;
}
/* Observatory search box - append to atrium.css */
.searchform {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.searchform input[type="search"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(232, 194, 102, 0.3);
  border-radius: 12px;
  background: rgba(22, 15, 43, 0.6);
  color: #f5f0e6;
  font-size: 1rem;
}
.searchform input[type="search"]::placeholder {
  color: #8a7f6a;
}
.searchform input[type="search"]:focus {
  outline: 2px solid #e8c266;
  outline-offset: 1px;
  border-color: #e8c266;
}
.searchform .btn {
  flex-shrink: 0;
}
#search-hint {
  margin-top: 12px;
}
#search-hint b {
  color: #e8c266;
}
#search-copy {
  margin-left: 8px;
}
/* Front Door device list - append to atrium.css */
.device-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(232, 194, 102, 0.12);
}
.device-row:last-child {
  border-bottom: 0;
}
.device-info b {
  display: block;
  font-size: 1rem;
  color: var(--ink, #f5f0e6);
}
.device-meta {
  font-size: 0.85rem;
  color: var(--ink-soft, #a79dc4);
}
.device-badge {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(232, 194, 102, 0.15);
  color: #e8c266;
  border: 1px solid rgba(232, 194, 102, 0.3);
}
