/* DreamKeeper window: hidden keeps the same iframe attached to this page. */
html.dk-modal-open, html.dk-modal-open body { overflow: hidden; }
html.dk-modal-open .line-fab, html.dk-modal-open .to-top, html.dk-modal-open .chaty, html.dk-modal-open .chaty-widget,
html.dk-modal-open [id^="chaty-widget"] { visibility: hidden; }
.dk-modal[hidden], .dk-window-dock[hidden] { display: none !important; }
.dk-modal { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(10,22,16,.92); padding: 12px; }
.dk-modal-stage { position: relative; flex: 0 0 auto; width: min(calc(100vw - 48px), calc((100dvh - 112px) * 1.6)); aspect-ratio: 1.6 / 1; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(180deg,var(--dk-forest),var(--deep)); box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); display: grid; place-items: center; }
.dk-modal-stage iframe { position:absolute; inset:0; width:100%; height:100%; border:0; display:block; background:#201e20; }
.dk-modal-note { color:var(--on-ink); font-size:1.05rem; padding:24px; text-align:center; }
.dk-window-bar { display:flex; align-items:center; gap:12px; width:min(calc(100vw - 48px),calc((100dvh - 112px) * 1.6)); min-height:60px; color:#faf7ef; font-size:.9rem; padding:4px 0 8px; }
.dk-window-bar .dk-window-badge { width:30px; height:30px; }
.dk-window-title { font-family:"Pixelify Sans",monospace; font-size:1.05rem; letter-spacing:.03em; }
.dk-window-tip { color:rgba(250,247,239,.72); margin-right:auto; font-size:.8rem; }
.dk-window-tip::before { content:"✓ "; color:var(--gold); }
.dk-modal-close, .dk-window-min { flex-shrink:0; border:1px solid rgba(250,247,239,.35); background:transparent; color:#faf7ef; cursor:pointer; font:inherit; }
.dk-modal-close { width:40px; height:40px; border-radius:50%; font-size:20px; }
.dk-modal > .dk-modal-close { position:absolute; top:12px; right:12px; }
.dk-window-min { min-height:36px; padding:7px 14px; border-radius:999px; background:var(--gold); border-color:var(--gold); color:#183327; font-weight:700; }
.dk-modal-close:hover, .dk-window-min:hover { filter:brightness(1.15); }
.dk-modal button:focus-visible, .dk-window-dock button:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }
.dk-window-badge { object-fit:cover; border-radius:50%; border:1.5px solid var(--gold); background:#10241b; }
.dk-window-dock { position:fixed; left:20px; bottom:20px; z-index:9000; display:flex; align-items:center; gap:12px; max-width:calc(100vw - 40px); padding:8px 10px 8px 8px; border-radius:999px; background:#183327; color:#faf7ef; box-shadow:0 0 0 4px rgba(218,181,103,.28),0 16px 34px -14px rgba(0,0,0,.55); }
.dk-dock-go { display:flex; align-items:center; gap:12px; border:0; background:transparent; color:inherit; cursor:pointer; font:inherit; text-align:start; padding:0; border-radius:999px; }
.dk-dock-go img { width:48px; height:48px; animation:dk-window-glow 2.6s ease-in-out infinite; }
.dk-dock-words { display:grid; line-height:1.25; }
.dk-dock-words small { color:var(--gold); font-size:.74rem; letter-spacing:.06em; }
.dk-dock-words small::before { content:"● "; color:#6fd08c; }
.dk-dock-words b { font-size:.98rem; }
.dk-dock-end { flex-shrink:0; width:32px; height:32px; border-radius:50%; border:0; background:rgba(250,247,239,.1); color:inherit; cursor:pointer; font-size:20px; }
.dk-window-toast { position:fixed; left:20px; bottom:96px; z-index:9000; max-width:min(300px,calc(100vw - 40px)); padding:10px 14px; border-radius:12px; background:#faf7ef; color:#183327; font-size:.86rem; line-height:1.5; box-shadow:0 10px 30px -12px rgba(0,0,0,.4); border:1px solid rgba(24,51,39,.12); }
@keyframes dk-window-glow { 50% { box-shadow:0 0 0 4px rgba(218,181,103,.28); } }
@media (prefers-reduced-motion:reduce) { .dk-dock-go img { animation:none; } }
@media (max-width:1100px) { .dk-window-tip { display:none; } .dk-window-title { margin-right:auto; } }
@media (pointer:coarse), (max-width:759px) { .dk-modal-stage { aspect-ratio:auto; min-height:220px; width:calc(100vw - 32px); } }
