/* ============================================================
   전광휘 — 사무실 (interactive 3D office)
   Based on Jongseo Lee's MIT-licensed 3D room (see LICENSE-office).
   ============================================================ */

:root {
    --navy-900: #121110;
    --navy-800: #1a1916;
    --navy-700: #2b2a26;
    --navy-600: #c0432a;
    --navy-500: #c0432a;
    --blue-400: #a0564a;
    --blue-100: #e6e0d4;
    --blue-50:  #f4f2ee;
    --bg:       #faf9f7;
    --surface:  #fffdfa;
    --ink:      #1a1916;
    --ink-soft: #5f5953;
    --ink-faint:#857d74;
    --line:     #e8e2d8;
    --accent:   #c9a85a;
    --coral:    #c0432a;
    --radius:   14px;
    --shadow-md: 0 6px 20px rgba(40, 30, 20, 0.10);
    --shadow-lg: 0 14px 40px rgba(40, 30, 20, 0.16);
    --panel-w: 460px;
    --ease: cubic-bezier(.22, .8, .24, 1);

    /* Semantic tokens: everything the night theme changes goes through these. */
    --heading:  var(--navy-800);
    --strong:   var(--navy-700);
    --page-bg:  radial-gradient(ellipse at 60% 45%, #fffdfa 0%, var(--bg) 45%, #efe9df 100%);
    --glass:        rgba(255, 255, 255, .8);
    --glass-strong: rgba(255, 255, 255, .96);
    --warn-bg: #fffbeb;  --warn-line: #f3dc8f;  --warn-ink: #7a5b00;
    --gold-bg: #fff6d6;  --gold-line: #f1d98a;  --gold-ink: #8a6400;
    --coral-bg: #f8e6e1; --coral-line: #e9bfb3; --coral-ink: #a33a24;
    --wall: #f3eee6;
    --wall-light: radial-gradient(ellipse at 50% 35%, transparent 45%, rgba(60, 48, 30, .08) 100%);
    --frame: #fffdfa;    --frame-line: #d8cfbe;
    --floor-a: #dcc095;  --floor-b: #c9a877;
}

/* Night in Seoul: a dim room lit by warm lamps. Contrast stays high; only the surfaces go dark. */
body[data-theme="night"] {
    color-scheme: dark;
    --navy-500: #e08a74;
    --blue-100: #3d3730;
    --blue-50:  #2a2621;
    --bg:       #141210;
    --surface:  #221f1b;
    --ink:      #f1ece4;
    --ink-soft: #c9c1b5;
    --ink-faint:#9a9188;
    --line:     #3d3730;
    --shadow-md: 0 6px 20px rgba(0, 0, 0, .38);
    --shadow-lg: 0 14px 40px rgba(0, 0, 0, .5);
    --heading:  #f7f2e9;
    --strong:   #f0c9b8;
    --page-bg:  radial-gradient(ellipse at 60% 45%, #2a2621 0%, #1b1815 55%, #0f0d0b 100%);
    --glass:        rgba(30, 27, 23, .8);
    --glass-strong: rgba(30, 27, 23, .95);
    --warn-bg: #2c2717;  --warn-line: #66562a;  --warn-ink: #f3d98c;
    --gold-bg: #3a3015;  --gold-line: #6b5827;  --gold-ink: #f4d67e;
    --coral-bg: #36201e; --coral-line: #6b3a35; --coral-ink: #f6a79f;
    --wall: #1f1c18;
    /* a warm pool of light around the door, as if a lamp hung above it */
    --wall-light: radial-gradient(ellipse 34% 62% at 50% 48%, rgba(255, 190, 120, .2), transparent 100%),
                  radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(4, 8, 18, .45) 100%);
    --frame: #e9e1d2;    --frame-line: #14120f;
    --floor-a: #7d6549;  --floor-b: #5d4a35;
}

* { box-sizing: border-box; }

html, body { height: 100%; overscroll-behavior: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    overflow: hidden;
    font-family: 'DM Sans', -apple-system, 'Noto Sans KR', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'EB Garamond', Georgia, 'Noto Sans KR', serif; color: var(--heading); line-height: 1.3; margin: 0; }
a { color: var(--navy-500); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
a, button { -webkit-tap-highlight-color: transparent; }

/* ---------- Canvas + overlays ---------- */

#scene {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
    opacity: 0;
    transition: opacity .9s ease;
    cursor: grab;
}
#scene.ready { opacity: 1; }
#scene.dragging { cursor: grabbing; }
#scene.hovering { cursor: pointer; }
#scene.grabbable { cursor: grab; }
#scene.talkable { cursor: pointer; }
#scene.grabbing, #scene.grabbing.grabbable { cursor: grabbing; }

#markers { position: fixed; inset: 0; pointer-events: none; }
#leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: opacity .45s ease 1s; }
#leaders line { stroke: var(--navy-500); stroke-width: 1.5; stroke-opacity: .55; stroke-linecap: round; }
body:not(.labels-in) #leaders, body.is-focused #leaders { opacity: 0; transition-delay: 0s; }

.marker {
    position: absolute;
    left: 0; top: 0;
    width: 0; height: 0;
    padding: 0;
    border: 0;
    background: none;
    pointer-events: none;
    transition: opacity .35s ease;
    will-change: transform;
}
.marker-dot {
    position: absolute;
    left: -10px; top: -10px;
    width: 20px; height: 20px;
    pointer-events: auto;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px var(--navy-500), var(--shadow-md);
}
.marker-dot::before {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: var(--navy-500);
}
.marker-dot::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--navy-500);
    animation: pulse 2.4s ease-out infinite;
}
.marker[data-kind="exit"] .marker-dot { box-shadow: 0 0 0 2px var(--ink-faint), var(--shadow-md); }
.marker[data-kind="exit"] .marker-dot::before { background: var(--ink-faint); }
.marker[data-kind="exit"] .marker-dot::after { display: none; }

/* Always-on label next to each dot; JS places it and keeps labels from overlapping. */
.marker-label {
    position: absolute;
    left: 0; top: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px 5px 5px;
    border-radius: 999px;
    background: var(--glass-strong);
    border: 1px solid var(--blue-100);
    color: var(--heading);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    transition:
        opacity .45s ease calc(var(--i) * 90ms),
        scale .45s var(--ease) calc(var(--i) * 90ms),
        background-color .15s ease,
        color .15s ease,
        border-color .15s ease;
}
.marker[data-kind="exit"] .marker-label { padding-left: 13px; color: var(--ink-soft); font-size: 13px; }

/* Tour-order badge, shared by marker labels and the bottom chips. */
.num {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--navy-600);
    color: #fff;
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    transition: background-color .15s ease, color .15s ease;
}
body:not(.labels-in) .marker-label { opacity: 0; scale: .8; }


.marker:hover, .marker.is-hover { z-index: 2; }
.marker:hover .marker-label,
.marker.is-hover .marker-label,
.marker:focus-visible .marker-label { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.marker:hover .num,
.marker.is-hover .num,
.marker:focus-visible .num { background: #fff; color: #163a6b; }
.marker:focus-visible { outline: none; }
.marker:focus-visible .marker-dot { box-shadow: 0 0 0 2px var(--navy-500), 0 0 0 6px rgba(42, 99, 173, .3); }
.marker.is-hidden { opacity: 0; }
.marker.is-hidden * { pointer-events: none; }
body.is-focused .marker { opacity: 0; }
body.is-focused .marker * { pointer-events: none; }

@keyframes pulse {
    0%   { transform: scale(1);   opacity: .7; }
    80%  { transform: scale(2.1); opacity: 0; }
    100% { transform: scale(2.1); opacity: 0; }
}

#tooltip {
    position: fixed;
    left: 0; top: 0;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(15, 42, 82, .92);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
    white-space: nowrap;
}
#tooltip.show { opacity: 1; }

/* ---------- Top bar ---------- */

.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 8;
    pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.top-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand, .clock {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 15px;
    border-radius: 999px;
    background: var(--glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    white-space: nowrap;
}
.brand { font-family: 'EB Garamond', Georgia, 'Noto Sans KR', serif; font-weight: 600; font-size: 16.5px; color: var(--heading); }
.brand span { font-weight: 600; color: var(--ink-soft); }
.brand:hover { text-decoration: none; }
.clock { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.clock:hover { background: var(--surface); }
.clock-time { color: var(--heading); font-variant-numeric: tabular-nums; }
/* sun by day, crescent by night */
.clock-icon { flex: none; width: 14px; height: 14px; border-radius: 50%; background: #f5b52e; box-shadow: 0 0 0 3px rgba(245, 181, 46, .25); }
body[data-theme="night"] .clock-icon { background: none; box-shadow: inset -4px -2px 0 0 #ffe29a; transform: rotate(-20deg); }
.top-links { display: flex; gap: 6px; }
.top-links :is(a, button) {
    white-space: nowrap;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--strong);
    background: var(--glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--line);
}
.top-links :is(a, button):hover { background: var(--surface); text-decoration: none; }

/* ---------- Lobby ----------
   The wall outside the office. The doorway is a transparent hole (the wall itself is the doorway's
   huge box-shadow), so the 3D canvas behind shows through as soon as the door leaf swings open. */

.lobby {
    --floor-h: 13vh;
    --door-h: clamp(300px, 62vh, 640px);
    position: fixed;
    inset: 0;
    z-index: 6;
    overflow: hidden;
    transition: transform .7s var(--ease), opacity .4s ease, visibility 0s;
}
/* Entering: the door swings, then the whole wall rushes past as we walk through the doorway. */
body.inside .lobby {
    transform: scale(7);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 1s var(--ease) .35s, opacity .55s ease .7s, visibility 0s linear 1.3s;
}
.lobby.no-anim, .lobby.no-anim * { transition: none !important; }
.lobby::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: var(--wall-light);
}

.lobby-row {
    position: absolute;
    inset: 64px 0 var(--floor-h) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 4vw, 64px);
    padding: 0 24px;
}
.lobby-floor {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: var(--floor-h);
    z-index: 1;
    border-top: 8px solid var(--frame);
    box-shadow: 0 -1px 0 var(--frame-line);
    background:
        repeating-linear-gradient(90deg, transparent 0 159px, rgba(120, 85, 45, .2) 159px 160px),
        linear-gradient(var(--floor-a), var(--floor-b));
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--navy-500);
}

.plate, .board {
    position: relative;
    z-index: 1;
    flex: none;
    width: clamp(270px, 26vw, 360px);
    padding: 22px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}
:where(.plate, .board) :where(p, ul, h2, h3) { margin: 0; }

.plate-head { display: flex; align-items: center; gap: 14px; }
.plate-head img { flex: none; width: 68px; height: 68px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--blue-100); }
.plate h1 { font-size: 27px; letter-spacing: -.01em; }
.plate-role { margin-top: 2px; font-size: 14.5px; color: var(--ink-soft); }
.plate-affil { margin-top: 12px; font-size: 14.5px; color: var(--ink-soft); }
.plate-tagline { margin-top: 10px; font-size: 15px; }
.plate-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.plate-links .btn { padding: 8px 14px; font-size: 13.5px; }
.visitors { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.visitors[hidden] { display: none; }
.visitors b { font-family: 'EB Garamond', Georgia, 'Noto Sans KR', serif; font-size: 14.5px; color: var(--heading); }
.visitors .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #3fb56b; box-shadow: 0 0 0 3px rgba(63, 181, 107, .2); }
.only-sm { display: none; margin-top: 12px; font-size: 13.5px; }

.note { padding: 14px; border-radius: 12px; background: var(--warn-bg); border: 1px solid var(--warn-line); }
.note h2 { margin: 9px 0 4px; font-size: 16.5px; }
.note p { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.board-sub { margin: 16px 0 6px; font-family: 'DM Mono', monospace; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.board-news { list-style: none; padding: 0; }
.board-news a {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 8px;
    width: calc(100% + 16px);
    margin: 0 -8px;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    background: none;
    text-align: left;
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--ink);
}
.board-news a:hover { background: var(--blue-50); }
.board-news a { text-decoration: none; }
.board-news time { font-size: 12.5px; font-weight: 700; line-height: 1.5; color: var(--navy-500); font-variant-numeric: tabular-nums; }
.board-credits { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.board-credits li { display: flex; flex-direction: column; font-size: 13.5px; line-height: 1.35; }
.board-credits a { width: fit-content; font-weight: 700; color: var(--heading); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.board-credits a:hover { text-decoration-color: currentColor; }
.board-credits span { font-size: 12.5px; color: var(--ink-soft); }

/* The door */
.door { align-self: flex-end; flex: none; display: flex; flex-direction: column-reverse; align-items: center; gap: 14px; }
.doorway {
    position: relative;
    width: calc(var(--door-h) * .5);
    height: var(--door-h);
    border: 10px solid var(--frame);
    border-bottom: 0;
    box-shadow: inset 0 0 0 1px var(--frame-line), 0 0 0 1px var(--frame-line), 0 0 0 200vmax var(--wall);
    perspective: 1400px;
}
.door-leaf {
    position: absolute;
    inset: 0;
    width: 100%;
    padding: 0;
    border: 0;
    background: linear-gradient(165deg, #d4674c 0%, var(--navy-600) 45%, #a63a24 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset -10px 0 24px rgba(60, 20, 10, .25);
    transform-origin: left center;
    transition: transform .8s var(--ease);
}
@media (hover: hover) { .door:hover .door-leaf { transform: rotateY(14deg); } }
.door-leaf:focus-visible { transform: rotateY(14deg); }
.door-leaf:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
/* The open leaf fades before the zoom, or it would sweep past the camera as a giant blue slab. */
body.inside .door-leaf { transform: rotateY(82deg); opacity: 0; transition: transform .8s var(--ease), opacity .3s ease .4s; }
.door-sign {
    position: absolute;
    left: 50%; top: 20%;
    transform: translateX(-50%);
    padding: 10px 16px 9px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(10, 31, 61, .3);
    white-space: nowrap;
    text-align: center;
}
.door-sign b { display: block; font-family: 'EB Garamond', Georgia, 'Noto Sans KR', serif; font-size: 17px; color: #1a1916; }
.door-sign small { display: block; margin-top: 1px; font-size: 11.5px; font-weight: 600; color: #2e9a59; }
.door-inset {
    position: absolute;
    left: 14%; right: 14%; bottom: 7%;
    height: 32%;
    border-radius: 6px;
    background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.door-knob {
    position: absolute;
    right: 9%; top: 53%;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffe9a3, var(--accent) 55%, #b88a14);
    box-shadow: 0 2px 5px rgba(10, 31, 61, .45);
}
.door-knob::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    animation: pulse 2.4s ease-out infinite;
}
.door-cta {
    position: relative;
    z-index: 1;
    padding: 9px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--navy-600);
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    transition: background .2s ease;
}
.door:hover .door-cta { background: var(--navy-700); }
.door-cta span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }

body:not(.inside) :is(.chips, .hint, .only-inside) { display: none; }


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background .2s ease, transform .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--navy-600); color: #fff; }
.btn-primary:hover { background: var(--navy-700); }

/* ---------- Section chips ---------- */

/* With a panel open the bar centres itself in the space left of it, and scrolls if that is too narrow. */

@keyframes hint { 0% { opacity: 0; } 6%, 85% { opacity: 1; } 100% { opacity: 0; } }


/* ---------- Panel ---------- */

.panel {
    position: fixed;
    top: 12px; right: 12px; bottom: 12px;
    width: var(--panel-w);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    z-index: 9;
    transform: translateX(calc(100% + 24px));
    transition: transform .5s var(--ease), visibility 0s linear .5s;
    visibility: hidden;
}
.panel.open { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 24px 14px;
    border-bottom: 1px solid var(--line);
}
.panel-eyebrow { margin: 0 0 2px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--navy-500); }
.panel-title { font-size: 26px; outline: none; }
.panel-close {
    flex: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 22px;
    line-height: 1;
    color: var(--ink-soft);
}
.panel-close:hover { background: var(--blue-50); }
.panel-body { flex: 1; overflow-y: auto; padding: 18px 24px 24px; overscroll-behavior: contain; }
.panel-body > * + * { margin-top: 14px; }
:where(.panel-body) :where(p, ul, h3) { margin: 0; }

/* ---------- Panel content ---------- */

.p-sub { font-size: 15px; letter-spacing: .02em; margin-top: 22px !important; }
.p-lead { font-size: 16.5px; }


.timeline, .plain-list, .recog, .contact-list { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--blue-100); margin-left: 5px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--navy-500); }
.timeline li:last-child { padding-bottom: 0; }
.timeline b, .plain-list li > b { display: block; font-weight: 600; font-size: 15px; color: var(--heading); }
.timeline span, .plain-list li > span { display: block; font-size: 13.5px; color: var(--ink-soft); }

.ri { padding: 16px 18px; border-radius: var(--radius); background: var(--blue-50); border: 1px solid var(--blue-100); }
.ri h3 { font-size: 17px; margin: 2px 0 6px; }
.ri p { font-size: 14.5px; color: var(--ink-soft); }

.pub { display: grid; grid-template-columns: 104px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.pub h3 { font-size: 14.5px; line-height: 1.4; margin-bottom: 4px; }


.news { padding: 14px 0; border-top: 1px solid var(--line); }
.news:first-child { border-top: 0; padding-top: 0; }
.news.pinned { padding: 14px 16px; border: 1px solid var(--warn-line); border-radius: var(--radius); background: var(--warn-bg); }
.news h3 { font-size: 15.5px; margin: 2px 0 6px; }
.news p { font-size: 14.5px; color: var(--ink-soft); }



.scene-error {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%);
    width: min(440px, calc(100vw - 32px));
    margin: 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    font-size: 14px;
    color: var(--ink);
    z-index: 5;
}
.scene-error[hidden] { display: none; }
.scene-error small { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-faint); word-break: break-word; }

.noscript { position: fixed; inset: auto 16px 16px; padding: 14px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-md); z-index: 10; }

/* ---------- Small screens ---------- */

/* Phones in either orientation: a compact top bar. */
@media (max-width: 900px), (max-height: 560px) {
    .topbar { height: 52px; padding: 0 12px; }
    .top-left { gap: 6px; }
    .top-links { gap: 5px; }
    .top-links :is(a, button) { padding: 6px 11px; font-size: 13px; }
    .brand span, .clock-place, .hide-sm { display: none; }
    .brand, .clock { height: 34px; padding: 0 12px; }
    .brand { font-size: 15px; }
    .only-sm { display: block; }
}
@media (max-width: 380px) {
    .brand, .clock { padding: 0 10px; }
    .brand { font-size: 14px; }
    .clock { font-size: 12.5px; gap: 6px; }
}

/* Lobby stacks into one scrolling column — who I am, the door, then the notice board — whenever
   the three can't stand side by side: narrow screens, and phones held sideways. */
@media (max-width: 820px), (max-height: 560px) {
    .lobby { --door-h: 300px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
    .lobby-row { position: static; flex-direction: column; gap: 22px; padding: 64px 16px calc(32px + env(safe-area-inset-bottom)); }
    .lobby-floor { display: none; }
    .plate, .board { width: 100%; max-width: 440px; padding: 18px; }
    .plate h1 { font-size: 24px; }
    .door { align-self: center; }
    .doorway { width: calc(var(--door-h) * .62); border-bottom: 10px solid var(--frame); }
    .door-sign b { font-size: 15px; }
}

@media (max-width: 820px) {
    :root { --panel-w: 100vw; }

        .btn { padding: 8px 14px; font-size: 13.5px; }
    
    /* Labels stay big enough to tap. */
    .marker-dot { width: 16px; height: 16px; left: -8px; top: -8px; }
    .marker-dot::before { inset: 5px; }
    .marker-label { gap: 5px; padding: 4px 10px 4px 4px; font-size: 12.5px; }
    .marker[data-kind="exit"] .marker-label { padding-left: 10px; font-size: 12px; }
    .marker-label .num { width: 19px; height: 19px; font-size: 10.5px; }
        
        
    .panel {
        top: auto; left: 0; right: 0; bottom: 0;
        width: auto;
        height: 62vh;
        height: 62dvh;
        border-radius: 20px 20px 0 0;
        transform: translateY(105%);
    }
    .panel-head { padding: 16px 18px 10px; }
    .panel-title { font-size: 22px; }
    .panel-body { padding: 14px 18px calc(20px + env(safe-area-inset-bottom)); }
    .pub { grid-template-columns: 84px 1fr; }
    }

/* A phone held sideways keeps the side panel, just slimmer, and drops the hint. */
@media (max-height: 560px) and (min-width: 821px) {
    :root { --panel-w: min(420px, 52vw); }
    .panel { top: 6px; right: 6px; bottom: 6px; }
    .panel-head { padding: 14px 18px 10px; }
    .panel-title { font-size: 21px; }
        }

@media (max-height: 760px) and (min-height: 561px) and (min-width: 821px) {
    .plate-tagline, .board-dir { display: none; }
    .plate, .board { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ============================================================
   Desk scene: one marker, a picture viewer, and the MacBook desktop.
   ============================================================ */
.marker-label { padding-left: 12px; }
.marker[data-kind="desktop"] .marker-label { font-size: 14px; }
.marker[data-kind="desktop"].is-hover .marker-label, .marker[data-kind="desktop"]:focus-visible .marker-label { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
#leaders { display: none; }
body.desktop-opening .marker, body.desktop-open .marker { opacity: 0; }
body.desktop-opening .marker *, body.desktop-open .marker * { pointer-events: none; }

/* ---------- the picture viewer ---------- */
.viewer {
    position: fixed; inset: 0; z-index: 30;
    display: grid; place-items: center;
    padding: 32px;
    background: rgba(26, 25, 22, .78);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .25s ease;
}
.viewer.show { opacity: 1; }
.viewer[hidden] { display: none; }
.viewer img { max-width: min(92vw, 1100px); max-height: 88vh; border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); background: #fff; }
.viewer-close {
    position: absolute; top: 16px; right: 16px;
    width: 44px; height: 44px; border-radius: 50%; border: 0;
    background: rgba(255, 253, 250, .92); color: var(--ink);
    font-size: 24px; line-height: 1;
}
.viewer-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- the MacBook desktop, after macOS (menu bar, welcome, folders, windows, dock) ---------- */
.desktop {
    position: fixed; inset: 0; z-index: 20;
    overflow: hidden;
    background:
        linear-gradient(118deg, transparent 36%, rgba(255, 255, 255, .22) 43%, rgba(255, 255, 255, .06) 49%, transparent 56%),
        radial-gradient(60% 50% at 18% 12%, rgba(150, 125, 255, .8), transparent 62%),
        radial-gradient(50% 60% at 78% 22%, rgba(80, 120, 255, .65), transparent 62%),
        radial-gradient(70% 55% at 55% 100%, rgba(8, 36, 140, .95), transparent 62%),
        linear-gradient(120deg, #5a45d8 0%, #2b4ae0 42%, #0e2a8c 100%);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'DM Sans', 'Noto Sans KR', sans-serif;
    opacity: 0;
    transform: scale(.92);
    transform-origin: 50% 62%;
    transition: opacity .35s ease, transform .45s var(--ease);
    user-select: none;
}
.desktop.show { opacity: 1; transform: none; }
.desktop[hidden] { display: none; }
body[data-theme="night"] .desktop {
    background:
        linear-gradient(118deg, transparent 36%, rgba(255, 255, 255, .12) 43%, rgba(255, 255, 255, .03) 49%, transparent 56%),
        radial-gradient(60% 50% at 18% 12%, rgba(110, 90, 210, .7), transparent 62%),
        radial-gradient(50% 60% at 78% 22%, rgba(50, 80, 190, .6), transparent 62%),
        radial-gradient(70% 55% at 55% 100%, rgba(4, 18, 80, .95), transparent 62%),
        linear-gradient(120deg, #2e2478 0%, #172a8a 42%, #061649 100%);
}
.dt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dt-ico { display: inline-flex; width: 18px; height: 18px; flex: none; color: currentColor; }
.dt-ico svg { width: 100%; height: 100%; }

/* menu bar */
.dt-bar {
    position: absolute; left: 0; right: 0; top: 0; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    height: 40px; padding: 0 20px;
    background: rgba(255, 255, 255, .5); -webkit-backdrop-filter: blur(40px); backdrop-filter: blur(40px);
    color: #111; font-size: 14px;
}
.dt-bar-left, .dt-bar-right { display: flex; align-items: center; gap: 20px; min-width: 0; }
.dt-bar-mark { display: inline-flex; color: #111; }
.dt-bar-name { font-weight: 700; white-space: nowrap; }
.dt-bar-links, .dt-bar-icons { display: flex; align-items: center; gap: 20px; list-style: none; margin: 0; padding: 0; }
.dt-bar-links button { border: 0; background: none; padding: 0; font: inherit; color: #111; cursor: pointer; }
.dt-bar-links button:hover { text-decoration: underline; }
.dt-bar-icons .dt-ico { width: 26px; height: 26px; padding: 4px; border-radius: 5px; border: 0; background: none; color: #111; cursor: default; }
.dt-bar-icons button.dt-ico:hover { background: rgba(0, 0, 0, .08); }
.dt-bar-clock { font-weight: 500; white-space: pre; font-variant-numeric: tabular-nums; color: #111; }
.dt-room { border: 0; background: none; border-radius: 6px; padding: 4px 9px; margin-right: -9px; font: 500 14px inherit; font-family: inherit; color: #111; white-space: nowrap; cursor: pointer; }
.dt-room:hover { background: rgba(0, 0, 0, .08); }
.dt-bar button:focus-visible, .dt-room:focus-visible { outline: 2px solid #3478f6; outline-offset: 1px; }

/* welcome text */
.dt-welcome {
    position: absolute; left: 50%; top: 50%; translate: -50% -56%;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    color: #e5e7eb; pointer-events: none;
    font-family: 'Georama', -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif;
}
.dt-welcome > * { pointer-events: auto; }
.dt-welcome-sub { font-size: clamp(20px, 2.4vw, 30px); font-weight: 100; margin: 0; white-space: nowrap; }
.dt-welcome-title { font-family: 'Noto Sans KR', sans-serif; font-size: clamp(40px, 7vw, 96px); font-weight: 700; margin: 20px 0 0; line-height: 1.1; color: #e5e7eb; letter-spacing: -.02em; white-space: nowrap; }
.dt-welcome span { display: inline-block; transition: font-variation-settings .25s ease; }

/* folders on the desktop: a column from the top left */
.dt-folders { position: absolute; left: 28px; top: 68px; display: flex; flex-direction: column; gap: 22px; margin: 0; padding: 0; }
.dt-folder {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    width: 128px; padding: 4px; border: 0; border-radius: 8px; background: none;
    font: 500 14px inherit; font-family: inherit; color: #fff; text-align: center; cursor: default;
    touch-action: none;
}
.dt-folder-icon { display: block; width: 72px; height: 58px; padding: 3px; border-radius: 7px; }
.dt-folder-icon svg, .dt-folder-icon img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 10, 40, .35)); }
.dt-folder:hover .dt-folder-icon { background: rgba(3, 7, 18, .12); }
.dt-folder-name { padding: 1px 5px; border-radius: 5px; line-height: 1.3; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); max-width: 100%; overflow-wrap: anywhere; }
.dt-folder:hover .dt-folder-name, .dt-folder[aria-current="true"] .dt-folder-name, .dt-folder:focus-visible .dt-folder-name { background: #3b82f6; text-shadow: none; }
.dt-folder:focus-visible { outline: none; }

/* dock */
.dt-dock {
    position: absolute; left: 50%; bottom: 20px; translate: -50% 0; z-index: 50;
    display: flex; align-items: flex-end; gap: 6px; padding: 6px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, .25);
}
.dt-dock-sep { align-self: stretch; width: 1px; margin: 6px 4px; background: rgba(255, 255, 255, .35); }
.dt-dock-item {
    position: relative; display: block; width: 56px; height: 56px; padding: 0; border: 0; background: none;
    cursor: pointer; transform-origin: 50% 100%; transition: transform .2s ease;
}
.dt-dock-item:disabled { cursor: default; }
.dt-dock-item:disabled .dt-dock-icon { opacity: .6; }
.dt-dock-item:focus-visible { outline: none; }
.dt-dock-item:focus-visible .dt-dock-icon { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3478f6; }
.dt-dock-icon { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 4px 10px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .35); overflow: hidden; }
.dt-dock-icon::before, .dt-dock-icon::after { content: ""; position: absolute; }
.dt-dock .dt-dock-item.has-img .dt-dock-icon { background: none !important; box-shadow: none; border-radius: 0; overflow: visible; }
.dt-dock .dt-dock-item.has-img .dt-dock-icon::before, .dt-dock .dt-dock-item.has-img .dt-dock-icon::after { display: none; }
.dt-dock-icon img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
/* One visual size for every icon: the PNG squircles fill ~81% of their canvas, so the CSS-drawn tiles
   (Messages, Room) shrink to match, and the taller non-square shapes (CV page, trash can) are scaled to the same height */
.dt-dock-item:not(.has-img) .dt-dock-icon { transform: scale(.81); }
.dt-dock-item[data-ico="cv"] .dt-dock-icon img { transform: scale(.9); }
.dt-dock-item[data-ico="trash"] .dt-dock-icon img { transform: scale(.87); }
/* Finder-ish: a two-tone blue face */
.dt-dock-item[data-ico="finder"] .dt-dock-icon { background: linear-gradient(#67c2f5, #2d8fe3); }
.dt-dock-item[data-ico="finder"] .dt-dock-icon::before { left: 0; top: 0; width: 50%; height: 100%; background: linear-gradient(#b9e4fb, #78c3f3); }
.dt-dock-item[data-ico="finder"] .dt-dock-icon::after { left: 16px; top: 18px; width: 24px; height: 20px; border: 3px solid #0b2e5a; border-top: 0; border-radius: 0 0 14px 14px; box-shadow: -2px -11px 0 -1px #0b2e5a, 10px -11px 0 -1px #0b2e5a; background: none; border-color: transparent transparent #0b2e5a transparent; }
/* Safari-ish: a compass */
.dt-dock-item[data-ico="safari"] .dt-dock-icon { background: radial-gradient(circle at 50% 50%, #fff 0 23%, #38b6ff 24% 46%, #1f8ff0 47%); }
.dt-dock-item[data-ico="safari"] .dt-dock-icon::before { left: 50%; top: 50%; width: 10px; height: 28px; translate: -50% -50%; rotate: 45deg; background: linear-gradient(#ff3b30 50%, #e5e7eb 50%); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
/* Photos-ish: a flower of petals */
.dt-dock-item[data-ico="photos"] .dt-dock-icon { background: #fff; }
.dt-dock-item[data-ico="photos"] .dt-dock-icon::before { left: 50%; top: 50%; width: 34px; height: 34px; translate: -50% -50%; border-radius: 50%; background: conic-gradient(#ffcc00, #ff9500, #ff3b30, #ff2d55, #af52de, #5856d6, #007aff, #34c759, #ffcc00); -webkit-mask: radial-gradient(circle, transparent 0 7px, #000 8px); mask: radial-gradient(circle, transparent 0 7px, #000 8px); opacity: .9; }
/* Contacts-ish: a tan book with a silhouette */
.dt-dock-item[data-ico="contact"] .dt-dock-icon { background: linear-gradient(#d9b98a, #b8905a); }
.dt-dock-item[data-ico="contact"] .dt-dock-icon::before { left: 20px; top: 13px; width: 16px; height: 16px; border-radius: 50%; background: #fff7e6; }
.dt-dock-item[data-ico="contact"] .dt-dock-icon::after { left: 13px; top: 31px; width: 30px; height: 16px; border-radius: 15px 15px 0 0; background: #fff7e6; }
/* Terminal-ish */
.dt-dock-item[data-ico="terminal"] .dt-dock-icon { background: linear-gradient(#3a3f45, #111417); color: #fff; font: 700 15px/1 'DM Mono', monospace; }
.dt-dock-item[data-ico="terminal"] .dt-dock-icon::before { content: ">_"; position: absolute; left: 10px; top: 8px; width: auto; height: auto; }
/* CV: a white document */
.dt-dock-item[data-ico="cv"] .dt-dock-icon { background: linear-gradient(#f3f4f6, #d1d5db); }
.dt-dock-item[data-ico="cv"] .dt-dock-icon::before { left: 14px; top: 9px; width: 28px; height: 38px; background: #fff; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.dt-dock-item[data-ico="cv"] .dt-dock-icon::after { content: "CV"; left: 14px; top: 22px; width: 28px; height: auto; text-align: center; font: 700 12px/1 -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif; color: #c0432a; }
/* Trash */
.dt-dock-item[data-ico="trash"] .dt-dock-icon { background: linear-gradient(#e5e7eb, #cbd5e1); }
.dt-dock-item[data-ico="trash"] .dt-dock-icon::before { left: 18px; top: 16px; width: 20px; height: 26px; background: linear-gradient(90deg, #9aa3af, #e5e7eb 30%, #9aa3af 60%, #d1d5db); border-radius: 2px 2px 5px 5px; }
.dt-dock-item[data-ico="trash"] .dt-dock-icon::after { left: 15px; top: 12px; width: 26px; height: 4px; background: #6b7280; border-radius: 2px; }
/* Room: back to the 3D office */
.dt-dock-item[data-ico="room"] .dt-dock-icon { background: linear-gradient(#e08a74, #c0432a); }
.dt-dock-item[data-ico="room"] .dt-dock-icon::before { left: 17px; top: 22px; width: 22px; height: 18px; background: #fff; border-radius: 2px; }
.dt-dock-item[data-ico="room"] .dt-dock-icon::after { left: 14px; top: 10px; width: 0; height: 0; border: 14px solid transparent; border-bottom: 13px solid #fff; border-top: 0; }
.dt-dock-label {
    position: absolute; left: 50%; bottom: calc(100% + 12px); translate: -50% 0;
    padding: 4px 12px; border-radius: 6px;
    background: #bfdbfe; color: #1e3a8a; box-shadow: 0 10px 25px rgba(0, 0, 0, .25);
    font: 500 12px -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity .15s;
}
.dt-dock-item:hover .dt-dock-label, .dt-dock-item:focus-visible .dt-dock-label { opacity: 1; }

/* windows: white, rounded, shadowed; each app has a home position and can be dragged by its header */
.dt-windows { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.dt-win {
    position: absolute; display: flex; flex-direction: column;
    min-width: 320px; max-width: calc(100% - 24px); max-height: calc(100% - 120px);
    border-radius: 12px; background: #fff; color: #1a1916;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .5), 0 0 0 .5px rgba(0, 0, 0, .15);
    overflow: hidden; pointer-events: auto; user-select: text;
    color-scheme: light;
    --surface: #fff; --bg: #faf9f7; --ink: #1a1916; --ink-soft: #5f5953; --ink-faint: #857d74; --line: #e8e2d8;
    --heading: #1a1916; --strong: #2b2a26; --navy-500: #c0432a; --blue-50: #f4f2ee; --blue-100: #e6e0d4;
    --glass: rgba(255, 255, 255, .8); --shadow-md: 0 6px 20px rgba(40, 30, 20, .1);
}
.dt-win[hidden] { display: none; }
.dt-win.pop { animation: dt-pop .4s cubic-bezier(.22, 1, .36, 1); }
@keyframes dt-pop { from { opacity: 0; transform: translateY(40px) scale(.8); } to { opacity: 1; transform: none; } }
.dt-win.is-zoomed { left: 12px !important; top: 52px !important; width: calc(100% - 24px) !important; height: calc(100% - 150px) !important; translate: 0 0 !important; }
.dt-finder   { left: 11%; top: 76px; width: min(840px, 78vw); height: min(72vh, 640px); }
.dt-photos   { left: calc(50% - min(450px, 40vw)); top: 96px; width: min(900px, 80vw); height: min(68vh, 600px); }
.dt-contact  { left: 40%; top: 130px; width: min(560px, 80vw); }
.dt-terminal { left: 7%; top: 110px; width: min(620px, 80vw); }
.dt-cv       { left: 54%; top: 48px; width: min(560px, 44vw); height: calc(100% - 150px); }
.dt-music    { left: 170px; top: auto; bottom: 110px; width: 380px; }
.dt-music .dt-win-body { flex-direction: column; gap: 10px; padding: 12px; background: #fff; }
.dt-music-player { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #111; }
.dt-music-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.dt-music-meta { display: flex; flex-direction: column; padding: 0 4px 2px; font-family: -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif; }
.dt-music-meta b { font-size: 14px; font-weight: 600; color: #111; }
.dt-music-meta small { font-size: 12px; color: #6b7280; }
.dt-win-head {
    position: relative; flex: none;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; border-bottom: 1px solid #e5e7eb; background: #f9fafb;
    color: #9ca3af; font-size: 13px; user-select: none; cursor: grab; touch-action: none;
}
.dt-win-head:active { cursor: grabbing; }
.dt-lights { display: flex; gap: 8px; flex: none; }
.dt-light { width: 14px; height: 14px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; position: relative; }
.dt-win-close { background: #ff6157; }
.dt-win-min   { background: #ffc030; }
.dt-win-zoom  { background: #2acb42; }
.dt-light::after { content: ""; position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; font: 700 10px/14px 'DM Sans', 'Noto Sans KR', sans-serif; color: rgba(0, 0, 0, .55); }
.dt-win-close::after { content: "×"; }
.dt-win-min::after   { content: "–"; }
.dt-win-zoom::after  { content: "+"; }
.dt-lights:hover .dt-light::after, .dt-light:focus-visible::after { opacity: 1; }
.dt-light:focus-visible { outline: 2px solid #3478f6; outline-offset: 2px; }
.dt-win-title { flex: 1; margin: 0; font: 700 13px -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif; color: #111; text-align: center; outline: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-nav { display: flex; gap: 2px; flex: none; }
.dt-tool { width: 26px; height: 24px; padding: 0 0 2px; border: 0; border-radius: 5px; background: none; color: #6b7280; font-size: 19px; line-height: 1; cursor: pointer; }
.dt-tool:hover:not(:disabled) { background: #e5e7eb; }
.dt-tool:disabled { color: #d1d5db; cursor: default; }
.dt-tool:focus-visible { outline: 2px solid #3478f6; }
.dt-head-ico { width: 26px; height: 26px; padding: 4px; border-radius: 4px; color: #6b7280; }
a.dt-head-ico:hover { background: #e5e7eb; }
.dt-head-icos { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dt-win-body { flex: 1; min-height: 0; display: flex; overflow: hidden; }
.dt-win-body > :only-child { flex: 1; }
.dt-side { flex: none; width: 190px; display: flex; flex-direction: column; gap: 10px; padding: 18px 12px; border-right: 1px solid #e5e7eb; background: #f9fafb; overflow: auto; }
.dt-side h3 { margin: 6px 8px 2px; font: 500 11px -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif; color: #9ca3af; letter-spacing: .02em; }
.dt-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.dt-side button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-radius: 7px; background: none; color: #374151; font: 500 13.5px -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif; text-align: left; cursor: pointer; }
.dt-side button:hover { background: #e5e7eb; }
.dt-side button[aria-current="true"] { background: #dbeafe; color: #1d4ed8; }
.dt-side button:focus-visible { outline: 2px solid #3478f6; outline-offset: -2px; }
.dt-side .dt-ico { width: 16px; height: 16px; color: #3b82f6; }
.dt-ico-folder svg { filter: none; }
.dt-content { flex: 1; min-width: 0; overflow-y: auto; overflow-x: hidden; padding: 20px 26px 28px; overscroll-behavior: contain; font-family: 'DM Sans', 'Noto Sans KR', sans-serif; }
.dt-content > * + * { margin-top: 10px; }
.dt-content .p-sub { margin-top: 22px !important; }
.dt-content .gallery { margin: 10px 0 4px; }
.dt-content img { max-width: 100%; }
.dt-fd-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, 120px); gap: 12px 6px; }
.dt-fd-grid .dt-folder { width: 120px; color: #111; font-size: 13px; }
.dt-fd-grid .dt-folder-name { text-shadow: none; }
.dt-fd-grid .dt-folder:hover .dt-folder-name { background: none; }
.dt-fd-grid .dt-folder:focus-visible .dt-folder-name, .dt-fd-grid .dt-folder:hover .dt-folder-icon { background: #e5e7eb; }
/* Safari page */
/* Photos */
.dt-album { padding: 18px 20px 26px; }
.dt-album-title { margin: 12px 0 2px; font: 600 15px -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif; color: #111; }
.dt-album-title:first-child { margin-top: 0; }
.dt-album-text { margin: 0 0 10px; font-size: 13.5px; color: #6b7280; }
.dt-mosaic { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 0 0 12px; }
.dt-mosaic figure { margin: 0; cursor: zoom-in; }
.dt-mosaic img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.dt-mosaic figcaption { font-size: 12px; color: #6b7280; margin-top: 4px; }
.dt-mosaic figure:nth-child(3n + 1) { grid-column: span 3; }
.dt-mosaic figure:nth-child(3n + 2), .dt-mosaic figure:nth-child(3n) { grid-column: span 2; }
.dt-mosaic figure:nth-child(3n + 1) img { aspect-ratio: 3 / 2; }
/* Contact */
.dt-contact .dt-win-body { flex-direction: column; gap: 16px; padding: 20px 22px 24px; font-family: 'DM Sans', 'Noto Sans KR', sans-serif; overflow: auto; }
.dt-card-head { display: flex; align-items: center; gap: 16px; }
.dt-avatar { width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 2px 8px rgba(0, 0, 0, .08); }
.dt-contact h3 { margin: 0; font: 600 20px -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif; color: #111; }
.dt-card-role { margin-top: 2px !important; font-size: 13px !important; color: #6b7280 !important; }
.dt-contact p { margin: 0; color: #374151; font-size: 14.5px; line-height: 1.5; }
.dt-socials { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.dt-socials li { position: relative; }
.dt-socials a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #f9fafb; color: #111; text-decoration: none; transition: background .2s, border-color .2s, box-shadow .2s, transform .2s; }
.dt-socials a:hover { background: #fff; border-color: #d1d5db; box-shadow: 0 6px 16px rgba(0, 0, 0, .08); transform: translateY(-1px); }
.dt-socials a:focus-visible { outline: 2px solid #3478f6; outline-offset: 2px; }
.dt-social-ico { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 9px; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.dt-social-ico svg { width: 19px; height: 19px; }
.dt-social-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dt-social-txt b { font-size: 14px; font-weight: 600; }
.dt-social-txt small { font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-social-go { flex: none; color: #9ca3af; font-size: 14px; transition: color .2s, transform .2s; }
.dt-socials a:hover .dt-social-go { color: #111; transform: translate(1px, -1px); }
.dt-socials li:has(.dt-social-copy) a { padding-right: 78px; }
.dt-socials li:has(.dt-social-copy) .dt-social-go { display: none; }
.dt-social-copy { position: absolute; right: 10px; top: 50%; translate: 0 -50%; display: flex; align-items: center; gap: 4px; padding: 5px 9px; border: 1px solid #e5e7eb; border-radius: 999px; background: #fff; color: #374151; font: 500 12px -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif; cursor: pointer; }
.dt-social-copy:hover { border-color: #d1d5db; color: #111; }
.dt-social-copy.is-done { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.dt-social-copy:focus-visible { outline: 2px solid #3478f6; outline-offset: 2px; }
/* Terminal */
.dt-terminal .dt-win-body { flex-direction: column; padding: 20px 22px; font: 13px/1.6 'DM Mono', monospace; color: #111; overflow: auto; }
.dt-terminal p { margin: 0; }
/* CV */
.dt-cv .dt-win-body { flex-direction: column; background: #e5e7eb; }
.dt-cv iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.dt-cv-note { margin: 0; padding: 8px 12px; font-size: 12px; color: #6b7280; text-align: center; }
.dt-cv-note a { color: #2563eb; }
.dt-cv-card { display: none; }
@media (max-width: 560px) {
    /* phones: Finder and Photos drop their sidebars so the content gets the full width (‹ goes back) */
    .dt-finder .dt-side, .dt-photos .dt-side { display: none; }
    /* the CV is a card with a button instead of Drive's preview */
    .dt-cv iframe, .dt-cv-note { display: none; }
    .dt-cv .dt-win-body { background: #f5f5f7; }
    .dt-cv-card { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center; font-family: -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif; }
    .dt-cv-doc { display: grid; place-items: center; width: 84px; height: 108px; margin-bottom: 10px; border-radius: 6px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); font: 700 22px 'EB Garamond', Georgia, 'Noto Sans KR', serif; color: #c0432a; }
    .dt-cv-card b { font-size: 16px; color: #111; }
    .dt-cv-card small { font-size: 13px; color: #6b7280; }
    .dt-cv-open { margin-top: 14px; padding: 10px 20px; border-radius: 999px; background: #0a84ff; color: #fff; font-size: 14.5px; font-weight: 600; text-decoration: none; }
}

/* Control Center (after playground-macos) */
#dt-cc-btn.is-active { background: rgba(0, 0, 0, .12); }
#dt-wifi.is-off { opacity: .35; }
.dt-cc {
    position: absolute; top: 44px; right: 8px; z-index: 60;
    width: 320px; max-width: calc(100% - 16px); height: 384px;
    display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(5, 1fr); gap: 8px;
    padding: 10px; border-radius: 16px;
    background: rgba(241, 243, 246, .7); -webkit-backdrop-filter: blur(24px) saturate(1.5); backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, .5); box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    color: #111; font-size: 13px; user-select: none;
}
.dt-cc[hidden] { display: none; }
.cc-grid { border-radius: 12px; background: rgba(255, 255, 255, .55); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); border: 0; color: inherit; font: inherit; text-align: left; min-width: 0; }
.cc-net { grid-row: span 2; grid-column: span 2; display: flex; flex-direction: column; justify-content: space-around; padding: 8px; }
.cc-row { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.cc-row b, .cc-theme b { display: block; font-weight: 500; line-height: 1.2; }
.cc-row small, .cc-music small { display: block; font-size: 11px; color: #6b7280; line-height: 1.2; }
.cc-btn { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: #1677ff; color: #fff; }
.cc-btn svg { width: 16px; height: 16px; }
[aria-pressed="false"] > .cc-btn { background: #d1d5db; color: #111; }
.cc-theme { grid-column: span 2; display: flex; align-items: center; gap: 10px; padding: 8px; cursor: pointer; }
.cc-theme .cc-moon { display: none; }
body[data-theme="night"] .cc-theme .cc-moon { display: block; }
body[data-theme="night"] .cc-theme .cc-sun { display: none; }
.cc-small { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; text-align: center; cursor: default; }
.cc-small small { font-size: 11px; line-height: 1.2; }
.cc-ico { display: inline-flex; width: 20px; height: 20px; }
.cc-ico svg { width: 100%; height: 100%; }
.cc-slider { grid-column: span 4; display: flex; flex-direction: column; justify-content: space-around; padding: 6px 10px; }
.cc-slider b { font-weight: 500; margin-left: 2px; }
.cc-range { display: flex; align-items: center; }
.cc-range-ico { display: grid; place-items: center; width: 28px; height: 24px; flex: none; border: 1px solid #cbd5e1; border-right: 0; border-radius: 999px 0 0 999px; background: #fff; color: #6b7280; }
.cc-range-ico svg { width: 14px; height: 14px; }
.cc-range input { flex: 1; height: 24px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.cc-range input::-webkit-slider-runnable-track { height: 24px; border-radius: 0 999px 999px 0; background: #fff; border: 1px solid #cbd5e1; }
.cc-range input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid #cbd5e1; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); margin-top: 0; }
.cc-range input::-moz-range-track { height: 24px; border-radius: 0 999px 999px 0; background: #fff; border: 1px solid #cbd5e1; }
.cc-range input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid #cbd5e1; }
.cc-range input:focus-visible { outline: 2px solid #3478f6; outline-offset: 2px; border-radius: 999px; }
.cc-music { grid-column: span 4; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; }
.cc-cover { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 8px; background: linear-gradient(135deg, #fb7185, #c0432a); color: #fff; overflow: hidden; }
.cc-cover svg { width: 26px; height: 26px; }
.cc-cover img { width: 100%; height: 100%; object-fit: cover; }
.cc-music-text { flex: 1; min-width: 0; }
.cc-music-text b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-play { width: 32px; height: 32px; padding: 4px; border: 0; background: none; color: #111; cursor: pointer; border-radius: 50%; }
.cc-play:hover { background: rgba(0, 0, 0, .08); }
.cc-play:disabled { opacity: .35; cursor: default; }
.cc-play svg { width: 100%; height: 100%; }
.cc-play .cc-pause-ico, .dt-cc.is-playing .cc-play-ico { display: none; }
.dt-cc.is-playing .cc-pause-ico { display: block; }
.dt-cc button:focus-visible { outline: 2px solid #3478f6; outline-offset: 2px; }
.dt-dim { position: absolute; inset: 0; z-index: 70; background: #000; opacity: 0; pointer-events: none; transition: opacity .15s; }

/* Terminal */
.dt-terminal { left: 7%; top: 110px; width: min(680px, 80vw); height: min(440px, 70vh); }
.dt-terminal .dt-win-body { display: block; position: relative; overflow: auto; padding: 8px 10px 10px; background: rgba(31, 41, 55, .94); color: #fff; font: 13px/1.55 'DM Mono', ui-monospace, monospace; cursor: text; }
.term-hello { padding: 2px 0 8px; }
.term-row { overflow-wrap: anywhere; }
.term-pre { white-space: pre-wrap; }
.term-green { color: #86efac; }
.term-red { color: #f87171; }
.term-user { color: #fef08a; white-space: nowrap; }
.term-dir { color: #d8b4fe; }
.term-prompt { display: flex; gap: 6px; align-items: baseline; }
.term-input { flex: 1; min-width: 0; padding: 0 2px; border: 0; outline: none; background: transparent; color: #fff; font: inherit; caret-color: #fff; }
.term-ls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px 10px; }
.term-help { margin: 0 0 6px 20px; padding: 0; }
.term-help b { color: #f87171; font-weight: 500; }
.term-table { border-collapse: collapse; margin: 4px 0 6px; }
.term-table th { font-weight: 500; color: #86efac; text-align: left; padding: 0 16px 0 8px; }
.term-table td { padding: 0 4px; }
.term-row a { color: #93c5fd; }
.term-rain { position: absolute; inset: 0; z-index: 2; background: #000; cursor: pointer; }
.term-rain canvas { position: absolute; inset: 0; }
.term-rain-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; font-family: -apple-system, 'DM Sans', 'Noto Sans KR', sans-serif; }
.term-rain-emoji { font-size: 34px; }
.term-rain-big { font-size: 28px; font-weight: 600; }

/* Messages (the guestbook) */
.dt-messages { left: 24%; top: 90px; width: min(760px, 80vw); height: min(540px, 72vh); }
.dt-dock-item[data-ico="messenger"] .dt-dock-icon { background: linear-gradient(#6ee36a, #2fc42b); }
.dt-dock-item[data-ico="messenger"] .dt-dock-icon::before { inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 3.5c-5 0-9 3.3-9 7.4 0 2.3 1.3 4.4 3.3 5.8-.2 1.3-.9 2.6-2 3.5 1.9 0 3.6-.7 4.8-1.6.9.2 1.9.3 2.9.3 5 0 9-3.3 9-7.5S17 3.5 12 3.5z'/%3E%3C/svg%3E") center / 66% no-repeat; }   /* one SVG bubble, so it keeps its shape at any icon size */
.dt-dock-item[data-ico="messenger"] .dt-dock-icon::after { display: none; }
/* macOS Messages: a gray sidebar under the traffic lights, a white conversation, iMessage bubbles */
.dt-messages { --msg-side: 260px; --msg-blue: #0a84ff; --msg-gray: #e9e9eb; font-family: -apple-system, BlinkMacSystemFont, 'DM Sans', 'Noto Sans KR', sans-serif; }
.dt-messages .dt-win-head { background: linear-gradient(90deg, #ececec 0 var(--msg-side), #fff var(--msg-side)); border-bottom: 0; padding: 12px 16px 6px; }
.dt-msg-compose { position: absolute; left: calc(var(--msg-side) - 40px); top: 7px; display: grid; place-items: center; width: 30px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: #6e6e73; cursor: pointer; }
.dt-msg-compose:hover { background: rgba(0, 0, 0, .07); }
.dt-msg-side { flex: none; width: var(--msg-side); display: flex; flex-direction: column; gap: 8px; padding: 2px 10px 10px; background: #ececec; border-right: 1px solid #d8d8dc; overflow: auto; }
.dt-msg-search { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 7px; background: rgba(0, 0, 0, .06); color: #8e8e93; }
.dt-msg-search .dt-ico { width: 13px; height: 13px; flex: none; }
.dt-msg-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; font-size: 13px; color: #1d1d1f; }
.dt-msg-search:focus-within { box-shadow: 0 0 0 3px rgba(10, 132, 255, .35); }
.dt-msg-convs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dt-msg-convs li + li button { box-shadow: inset 0 1px 0 #dcdce0; }
.dt-msg-convs li + li button[aria-current="true"], .dt-msg-convs li:has(+ li button[aria-current="true"]) + li button { box-shadow: none; }
.dt-msg-convs button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border: 0; border-radius: 9px; background: none; color: #1d1d1f; font: inherit; text-align: left; cursor: pointer; }
.dt-msg-convs button:hover { background: rgba(0, 0, 0, .04); }
.dt-msg-convs button[aria-current="true"] { background: var(--msg-blue); color: #fff; }
.dt-msg-convs button:focus-visible { outline: 2px solid var(--msg-blue); outline-offset: -2px; }
.dt-msg-none { padding: 18px 8px; font-size: 13px; color: #8e8e93; text-align: center; }
.dt-msg-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: linear-gradient(#a8adb7, #858a94); color: #fff; font-weight: 600; font-size: 16px; }
.dt-msg-avatar svg { width: 18px; height: 18px; }
.dt-msg-avatar-new { background: linear-gradient(#6fd0ff, var(--msg-blue)); }
.dt-msg-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dt-msg-top { display: flex; align-items: baseline; gap: 6px; }
.dt-msg-top b { flex: 1; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dt-msg-top time { flex: none; font-size: 11.5px; color: #8e8e93; }
.dt-msg-who small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.3; color: #8e8e93; }
.dt-msg-convs button[aria-current="true"] :is(time, small) { color: rgba(255, 255, 255, .85); }
.dt-msg-side-status { padding: 0 8px; font-size: 12.5px; color: #8e8e93; }
.dt-msg-side-status[hidden] { display: none; }
.dt-msg { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; }
.dt-msg-head { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 12px 8px; border-bottom: 1px solid #ececec; }
.dt-msg-head .dt-msg-avatar { width: 34px; height: 34px; font-size: 14px; }
.dt-msg-head .dt-msg-avatar svg { width: 15px; height: 15px; }
.dt-msg-title { font-size: 11.5px; font-weight: 500; color: #1d1d1f; }
.dt-msg-back { display: none; position: absolute; left: 10px; top: 4px; border: 0; background: none; color: var(--msg-blue); font: inherit; font-size: 26px; line-height: 1; padding: 0 6px; cursor: pointer; }
.dt-msg-list { flex: 1; overflow: auto; padding: 14px 18px 10px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.dt-msg-stamp { align-self: center; margin: 0 0 8px; font-size: 11px; color: #8e8e93; }
.dt-msg-item { display: flex; flex-direction: column; max-width: 72%; }
.dt-msg-item.them { align-self: flex-start; align-items: flex-start; }
.dt-msg-item.me { align-self: flex-end; align-items: flex-end; }
.dt-msg-item + .dt-msg-item:not(:has(.dt-msg-sender)) { margin-top: -1px; }
.dt-msg-sender { display: flex; align-items: center; gap: 6px; margin: 8px 0 2px 12px; font-size: 11px; color: #8e8e93; }
.dt-msg-soon { padding: 1px 6px; border-radius: 999px; background: #c8573c; color: #fff; font-size: 9.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.dt-msg-bubble { position: relative; padding: 7px 12px; border-radius: 18px; line-height: 1.35; overflow-wrap: anywhere; }
.dt-msg-item.them .dt-msg-bubble { background: var(--msg-gray); color: #1d1d1f; }
.dt-msg-item.me .dt-msg-bubble { background: var(--msg-blue); color: #fff; }
/* the tail, only on the last bubble of a run */
.dt-msg-bubble::before, .dt-msg-bubble::after { content: ""; position: absolute; bottom: 0; height: 20px; }
.dt-msg-item.me .dt-msg-bubble::before { right: -7px; width: 20px; background: var(--msg-blue); border-bottom-left-radius: 16px 14px; }
.dt-msg-item.me .dt-msg-bubble::after { right: -26px; width: 26px; background: #fff; border-bottom-left-radius: 10px; }
.dt-msg-item.them .dt-msg-bubble::before { left: -7px; width: 20px; background: var(--msg-gray); border-bottom-right-radius: 16px 14px; }
.dt-msg-item.them .dt-msg-bubble::after { left: -26px; width: 26px; background: #fff; border-bottom-right-radius: 10px; }
.dt-msg-item.me:has(+ .dt-msg-item.me) .dt-msg-bubble::before, .dt-msg-item.me:has(+ .dt-msg-item.me) .dt-msg-bubble::after,
.dt-msg-item.them:has(+ .dt-msg-item.them) .dt-msg-bubble::before, .dt-msg-item.them:has(+ .dt-msg-item.them) .dt-msg-bubble::after { display: none; }
.dt-msg-time { margin: 2px 6px 4px; font-size: 10.5px; color: #8e8e93; }
.dt-msg-delivered { margin: 1px 6px 4px; font-size: 10.5px; font-weight: 500; color: #8e8e93; }
.dt-msg-typing { display: flex; gap: 4px; padding: 11px 13px; }
.dt-msg-typing span { width: 7px; height: 7px; border-radius: 50%; background: #8e8e93; animation: dt-typing 1.3s infinite ease-in-out; }
.dt-msg-typing span:nth-child(2) { animation-delay: .18s; }
.dt-msg-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes dt-typing { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dt-msg-typing span { animation: none; opacity: .6; } }
.dt-msg-status { align-self: center; margin: 8px 0; font-size: 12px; color: #8e8e93; text-align: center; }
.dt-msg-form { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 8px 14px 10px; background: #fff; }
.dt-msg-form[hidden] { display: none; }
.dt-msg-from { display: flex; align-items: center; gap: 6px; padding: 0 2px 6px; border-bottom: 1px solid #f0f0f2; font-size: 12.5px; color: #8e8e93; }
.dt-msg-name { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; font-size: 13px; color: #1d1d1f; }
.dt-msg-row { display: flex; gap: 8px; align-items: center; }
.dt-msg-plus { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: #e9e9eb; color: #8e8e93; font-size: 19px; line-height: 1; }
.dt-msg-pill { flex: 1; display: flex; align-items: center; gap: 4px; padding: 3px 3px 3px 12px; border: 1px solid #d1d1d6; border-radius: 999px; background: #fff; }
.dt-msg-pill:focus-within { border-color: #b8b8bd; }
.dt-msg-text { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: inherit; font-size: 13.5px; color: #1d1d1f; padding: 3px 0; }
.dt-msg-pill button { display: grid; place-items: center; width: 24px; height: 24px; flex: none; padding: 0; border: 0; border-radius: 50%; background: var(--msg-blue); color: #fff; cursor: pointer; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.dt-msg-form.has-text .dt-msg-pill button { opacity: 1; transform: none; }
.dt-msg-pill button:disabled { opacity: .5; cursor: default; }
.dt-msg-pill button:focus-visible { opacity: 1; transform: none; outline: 2px solid var(--msg-blue); outline-offset: 2px; }
.dt-msg-err { margin: 0; min-height: 14px; font-size: 12px; color: #ff3b30; }
.cat-sec + .cat-sec { margin-top: 26px; padding-top: 20px; border-top: 1px solid #e5e7eb; }
.cat-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.cat-avatar { width: 64px; height: 64px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid #fdf0e3; box-shadow: 0 0 0 1px #f3d9bf; }
.cat-name { margin: 0; font-size: 20px; }
.cat-intro { margin: 2px 0 0; color: #6b7280; }
.cat-video { display: block; width: 100%; max-height: 360px; border-radius: 12px; background: #111; margin-bottom: 10px; }
.cat-gallery img { cursor: zoom-in; }

@media (max-width: 820px) {
    .dt-bar { height: 36px; padding: 0 10px; gap: 8px; }
    .dt-cc { top: 40px; right: 4px; width: calc(100% - 8px); }
    .dt-messages .dt-msg-side { width: 100%; border-right: 0; }
    .dt-messages .dt-win-head { background: #ececec; }
    .dt-msg-compose { left: auto; right: 12px; }
    .dt-msg { display: none; }
    .dt-msg.is-chat { display: flex; }
    .dt-messages .dt-win-body:has(.dt-msg.is-chat) .dt-msg-side { display: none; }
    .dt-msg-back { display: block; }
    .dt-terminal .dt-win-body { font-size: 12px; }
    .dt-bar-links { display: none; }
    .dt-bar-icons li:not(:last-child) { display: none; }
    .dt-bar-icons { gap: 0; }
    .dt-bar-left { flex: 1; min-width: 0; }
    .dt-bar-right { flex: none; gap: 10px; }
    .dt-bar-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
    .dt-bar-clock { font-size: 12px; }
    .dt-room { font-size: 13px; padding: 4px 6px; margin-right: -6px; }
    .dt-welcome { top: auto; bottom: 100px; translate: -50% 0; width: calc(100% - 32px); }
    .dt-welcome-sub { white-space: normal; font-size: 18px; }
    .dt-welcome-title { font-size: 36px; margin-top: 8px; }
    .dt-folders { left: 8px; right: 8px; top: 48px; flex-direction: row; flex-wrap: wrap; gap: 6px 0; justify-content: flex-start; }
    .dt-folder { width: calc(100% / 3); font-size: 12.5px; }
    .dt-folder-icon { width: 60px; height: 48px; }
    .dt-win, .dt-win.is-zoomed { left: 6px !important; right: 6px; top: 42px !important; bottom: 92px; width: auto !important; height: auto !important; max-width: none; max-height: none; translate: 0 0 !important; min-width: 0; }
    .dt-win-head { cursor: default; padding: 10px 12px; }
    /* Now Playing stays a compact card at the bottom (above the dock), so Control Center remains visible */
    .dt-music, .dt-music.is-zoomed { top: auto !important; }
    /* the dock fits a phone without scrolling: the decorative Trash tile is dropped */
    .dt-dock-item[data-ico="trash"] { display: none; }
    .dt-side { width: 130px; padding: 12px 6px; }
    .dt-side button { font-size: 12.5px; padding: 6px 8px; }
    .dt-content { padding: 14px 14px 22px; }
            .dt-mosaic { grid-template-columns: repeat(2, 1fr); }
    .dt-mosaic figure, .dt-mosaic figure:nth-child(3n + 1), .dt-mosaic figure:nth-child(3n + 2), .dt-mosaic figure:nth-child(3n) { grid-column: span 1; }
    .dt-socials { grid-template-columns: 1fr; }
        .dt-dock { bottom: 10px; padding: 5px; gap: 4px; max-width: calc(100% - 16px); overflow-x: auto; }
    .dt-dock-item, .dt-dock-icon { width: 44px; height: 44px; }
    .dt-dock-icon { border-radius: 11px; }
    .dt-dock-item { transform: none !important; }
    .dt-dock-item[data-ico="finder"] .dt-dock-icon::after { left: 12px; top: 13px; width: 20px; height: 16px; }
    .dt-dock-item[data-ico="contact"] .dt-dock-icon::before { left: 15px; top: 9px; width: 14px; height: 14px; }
    .dt-dock-item[data-ico="contact"] .dt-dock-icon::after { left: 9px; top: 25px; width: 26px; height: 14px; }
    .dt-dock-item[data-ico="cv"] .dt-dock-icon::before { left: 11px; top: 7px; width: 22px; height: 30px; }
    .dt-dock-item[data-ico="cv"] .dt-dock-icon::after { left: 11px; top: 17px; width: 22px; font-size: 10px; }
    .dt-dock-item[data-ico="trash"] .dt-dock-icon::before { left: 14px; top: 13px; width: 16px; height: 20px; }
    .dt-dock-item[data-ico="trash"] .dt-dock-icon::after { left: 12px; top: 9px; width: 20px; }
    .dt-dock-item[data-ico="room"] .dt-dock-icon::before { left: 13px; top: 18px; width: 18px; height: 14px; }
    .dt-dock-item[data-ico="room"] .dt-dock-icon::after { left: 11px; top: 8px; border-width: 11px; border-bottom-width: 10px; }
    .dt-dock-item[data-ico="terminal"] .dt-dock-icon::before { left: 8px; top: 6px; font-size: 13px; }
    .viewer { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .desktop, .viewer, .dt-dock-item, .dt-win, .dt-welcome span, .dt-socials a { transition: none; animation: none; }
    .desktop { transform: none; }
    .dt-dock-item { transform: none !important; }
}


/* ============================================================
   Opening gate: tap the glowing badge onto the reader to check in
   ============================================================ */
.gate { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px;
    background: radial-gradient(ellipse at 50% 40%, #232a33, #0d1014 70%); color: #e8ecf1; font-family: 'Noto Sans KR', sans-serif;
    transition: opacity .6s ease; }
.gate[hidden] { display: none; }
.gate.leaving { opacity: 0; pointer-events: none; }
.gate-title { margin: 0; font-size: 15px; letter-spacing: .2em; color: #8b96a5; }
.gate-stage { display: flex; align-items: center; gap: clamp(40px, 12vw, 160px); }
.gate-badge-wrap { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.gate-badge { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 150px; padding: 0 0 16px; overflow: hidden;
    border: 0; border-radius: 12px; background: #fff; color: #1a1916; font: inherit; cursor: grab; touch-action: none;
    animation: gate-glow 1.6s ease-in-out infinite; }
.gate-badge:active { cursor: grabbing; }
.gate-badge:focus-visible { outline: 3px solid #6ee36a; outline-offset: 4px; }
.gate-badge.flying { transition: transform .55s cubic-bezier(.3, .7, .2, 1); }
.gate-band { width: 100%; padding: 8px 0; background: #ea002c; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .15em; }
.gate-badge img { width: 84px; height: 104px; margin-top: 8px; object-fit: cover; border-radius: 4px; background: #e5e7eb; pointer-events: none; }
.gate-name { font-size: 20px; }
.gate-team { font-size: 11px; color: #5f5953; }
@keyframes gate-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(110, 227, 106, .0), 0 10px 30px rgba(0, 0, 0, .4); } 50% { box-shadow: 0 0 0 8px rgba(110, 227, 106, .35), 0 0 36px 6px rgba(110, 227, 106, .45); } }
.gate-badge.flying + .gate-hint { opacity: 0; transition: opacity .2s; }
.gate-hint { margin: 0; font-size: 15px; font-weight: 500; color: #b9f5b6; animation: gate-bob 1.6s ease-in-out infinite; }
@keyframes gate-bob { 50% { transform: translateY(-4px); } }
.gate-reader { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; width: 150px; padding: 18px 14px 22px;
    border-radius: 16px; background: linear-gradient(#3a414b, #23282f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 40px rgba(0, 0, 0, .5); }
.gate-led { width: 12px; height: 12px; border-radius: 50%; background: #e0453a; box-shadow: 0 0 10px #e0453a; }
.gate-reader.ok .gate-led { background: #6ee36a; box-shadow: 0 0 14px #6ee36a; }
.gate-screen { width: 100%; padding: 8px 4px; border-radius: 6px; background: #0b1a12; color: #7df07a; font-size: 12px; text-align: center; font-family: 'DM Mono', 'Noto Sans KR', monospace; }
.gate-pad { width: 96px; height: 96px; border-radius: 12px; border: 2px dashed rgba(255, 255, 255, .25);
    background: repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .06) 0 6px, transparent 6px 14px); }
.gate-skip { position: absolute; right: 20px; bottom: 20px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px;
    background: none; color: #b8c1cc; font: inherit; font-size: 13px; cursor: pointer; }
.gate-skip:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
@media (max-width: 560px) { .gate-stage { flex-direction: column; gap: 40px; } }
@media (prefers-reduced-motion: reduce) { .gate-badge, .gate-hint { animation: none; box-shadow: 0 0 0 4px rgba(110, 227, 106, .5); } }

/* one-time hint after entering: objects can be thrown */
.hint { position: fixed; left: 50%; bottom: 28px; z-index: 7; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px;
    background: rgba(26, 25, 22, .82); color: #fff; font-size: 14px; white-space: nowrap; pointer-events: none;
    animation: hint-life 6s ease forwards; }
.hint[hidden] { display: none; }
@keyframes hint-life { 0% { opacity: 0; transform: translate(-50%, 8px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
@media (max-width: 560px) { .hint { white-space: normal; text-align: center; width: max-content; max-width: calc(100vw - 32px); } }

/* scoreboard (bin shots, broken mugs) and the big shout when something happens */
.scoreboard { position: fixed; top: 64px; right: 16px; z-index: 7; margin: 0; padding: 6px 12px; border-radius: 999px;
    background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-md); font-size: 13px; font-weight: 500; color: #1a1916; pointer-events: none; }
.scoreboard[hidden], .shout[hidden] { display: none; }
.shout { position: fixed; left: 50%; top: 22%; z-index: 7; margin: 0; transform: translateX(-50%); font-size: clamp(22px, 4vw, 40px); font-weight: 700;
    color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); pointer-events: none; opacity: 0; white-space: nowrap; }
.shout.pop { animation: shout-pop 1.6s ease forwards; }
@keyframes shout-pop { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 75% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; } }

/* coworkers' speech bubbles, pinned above their heads */
#bubbles { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.bubble { position: absolute; left: 0; top: 0; max-width: 240px; padding: 8px 12px; border-radius: 14px; background: #fff; color: #1a1916;
    font-size: 13px; line-height: 1.4; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: inherit; transform: translateX(-50%) rotate(45deg); }
.bubble[hidden] { display: none; }
.bubble.ouch { background: #ffefe9; color: #c0432a; font-weight: 700; font-size: 16px; }

/* ============================================================
   Project cards (monitor → Projects, and the sticky-note panel)
   ============================================================ */
.dt-side .dt-sub { padding-left: 26px; }
.proj-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.proj-toc a { white-space: nowrap; padding: 5px 10px; border-radius: 999px; background: #eef1f5; color: #1a1916; font-size: 12.5px; text-decoration: none; }
.proj-toc a:hover { background: #dfe5ee; }
.proj-group { margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 2px solid #1a1916; font-size: 15px; letter-spacing: .02em; }
.proj { margin: 0 0 18px; padding: 16px 18px; border: 1px solid #e3e6ea; border-radius: 14px; background: #fff; scroll-margin-top: 12px; }
.proj-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.proj-head:empty { display: none; }
.proj-tag { padding: 2px 8px; border-radius: 6px; background: #1a1916; color: #fff; font-size: 11.5px; font-weight: 700; }
.proj-title { margin: 0; font-size: 17px; font-family: 'Noto Sans KR', sans-serif; font-weight: 700; }
.proj-award { width: 100%; font-size: 12.5px; color: #8a6d1d; font-weight: 600; }
.proj-line { margin: 8px 0 12px; color: #4a4744; font-size: 14px; }
.metrics { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; }   /* chips grow to fit their text */
.metrics li { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: #f6f3ec; max-width: 100%; }
.metrics b { font-size: 17px; font-weight: 800; color: #c0432a; line-height: 1.2; white-space: nowrap; }
.metrics span { font-size: 12px; color: #5f5953; white-space: nowrap; }
.proj-sec { margin-top: 10px; }
.proj-sec-h { display: inline-block; margin: 0 0 6px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; background: #5d6670; }
.proj-sec[data-kind="문제"] .proj-sec-h { background: #c0432a; }
.proj-sec[data-kind="한 일"] .proj-sec-h { background: #2f6f9f; }
.proj-sec[data-kind="결과"] .proj-sec-h { background: #2f8a57; }
.proj-sec ul { margin: 0; padding-left: 18px; }
.proj-sec li { margin: 4px 0; font-size: 13.5px; line-height: 1.6; }

/* short UI labels never break onto a second line */
.dt-side button, .marker-label, .dt-folder-name, .proj-tag { white-space: nowrap; }

/* newspaper panel: article list */
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 12px 0; border-bottom: 1px solid #e3e6ea; }
.news-title { display: block; font-size: 15px; font-weight: 700; color: #1a1916; text-decoration: none; }
a.news-title:hover { text-decoration: underline; }
a.news-title::after { content: ' ↗'; color: #8a8178; font-weight: 400; }
.news-meta { display: block; margin-top: 3px; font-size: 12.5px; color: #8a8178; }
.news-sum { margin: 6px 0 0; font-size: 13.5px; color: #4a4744; }
