html.entry #entry, html.entry #e-ui { display: block; }
html.entry #entry-track { display: block; height: var(--entry-track, 0px); }
html.entry, html.entry body { background: #05060b; }
html.entry.e-lock, html.entry.e-lock body { overflow: hidden; }
html.entry .skip { z-index: 1003; }

#entry { position: fixed; inset: 0; z-index: 1000; font: 400 13px/1.4 var(--mono); color: #d7def6; }
#entry [hidden] { display: none !important; }
#e-stage { position: absolute; inset: 0; overflow: hidden; background: #05060b; }
#e-stage img, #e-stage video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: 57% 40%; transform-origin: 0 0; display: block; max-width: none; }
html.e-portrait #e-stage img { object-position: 50% 35%; }
#e-room, #e-idle, #e-fly { opacity: 0; }
#e-room { opacity: 1; }
#e-off { opacity: 0; transition: opacity .9s ease; }
html.e-s-off #e-off, html.e-s-boot #e-off { opacity: 1; }
#e-screen { position: absolute; left: 0; top: 0; width: 1280px; height: 662px; transform-origin: 0 0; overflow: hidden; color: #e8edff; pointer-events: none; }
html.entry:not(.e-ready) #e-screen { visibility: hidden; }
#e-screen > div { position: absolute; inset: 0; transition: opacity .35s ease; }
#e-glass { background: radial-gradient(120% 90% at 30% 20%, #0f1218 0%, #05060a 60%, #020204 100%); }
#e-boot { background: #020308; display: grid; place-content: center; gap: 30px; justify-items: center; opacity: 0; }
.e-mark { display: flex; align-items: center; gap: 26px; letter-spacing: .32em; font-size: 46px; font-weight: 500; color: #cfd8ff; }
.e-mark i { width: 44px; height: 44px; border: 4px solid #cfd8ff; border-radius: 50%; position: relative; }
.e-mark i::after { content: ""; position: absolute; left: 50%; top: -12px; width: 4px; height: 24px; background: #cfd8ff; transform: translateX(-50%); box-shadow: 0 0 0 6px #020308; }
.e-bar { width: 620px; height: 6px; background: rgba(207, 216, 255, .14); overflow: hidden; }
.e-bar i { display: block; height: 100%; width: 100%; background: #cfd8ff; transform-origin: 0 50%; transform: scaleX(0); }
.e-line { font-size: 28px; letter-spacing: .12em; color: rgba(207, 216, 255, .6); }
#e-desk { opacity: 0; background: radial-gradient(90% 120% at 70% 30%, #2244e6 0%, #1530c8 38%, #0b1d93 75%, #071266 100%); }
#e-desk::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 30, .07) 0 1px, transparent 1px 3px); pointer-events: none; }
.e-icons { position: absolute; left: calc(var(--sx, 0px) + 44px); top: calc(var(--sy, 0px) + 44px); display: grid; gap: 22px; }
.e-icon { display: grid; justify-items: center; gap: 6px; width: 96px; padding: 8px 4px; border: 1px solid transparent; font-size: 14px; letter-spacing: .02em; }
.e-icon svg { width: 46px; height: 46px; fill: none; stroke: #f2f5ff; stroke-width: 2; filter: drop-shadow(0 1px 1px rgba(0, 0, 40, .5)); }
.e-icon span { text-shadow: 0 1px 2px rgba(0, 0, 40, .7); }
.e-icon.sel { background: rgba(200, 215, 255, .2); border-color: rgba(220, 230, 255, .6); }
.e-taskbar { position: absolute; left: 0; right: 0; bottom: var(--sy, 0px); height: 40px; display: flex; align-items: center; gap: 18px; padding: 0 calc(var(--sx, 0px) + 36px); background: rgba(3, 8, 40, .72); border-top: 1px solid rgba(200, 215, 255, .18); font-size: 14px; }
.e-brand { display: flex; align-items: center; gap: 10px; letter-spacing: .18em; font-size: 12px; opacity: .85; }
.e-brand i { width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; }
.e-task { padding: 4px 12px; background: rgba(200, 215, 255, .16); border-bottom: 2px solid #cfd8ff; font-size: 13px; }
.e-clock { margin-left: auto; font-variant-numeric: tabular-nums; opacity: .9; }
.e-brand, .e-task, .e-clock { white-space: nowrap; }
#e-cursor { position: absolute; left: 0; top: 0; width: 30px; height: 30px; fill: #fff; stroke: #06092a; stroke-width: 1.4; transform-origin: 3px 2px; filter: drop-shadow(1px 2px 1px rgba(0, 0, 30, .55)); }
#e-win { position: absolute; left: 0; top: 0; transform-origin: 0 0; visibility: hidden; display: grid; grid-template-rows: 34px 38px 1fr; background: #05070f; box-shadow: 0 30px 90px rgba(0, 0, 0, .6), 0 0 0 1px rgba(200, 215, 255, .25); }
.e-title { display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 16px; background: #1a2a8c; color: #eef1ff; font-size: 13px; }
.e-ctl { display: flex; gap: 18px; opacity: .85; }
.e-ctl i { font-style: normal; }
.e-addr { display: flex; align-items: center; gap: 10px; padding: 0 14px; background: #0b1230; color: #cfd8ff; font-size: 13px; position: relative; border-bottom: 1px solid rgba(200, 215, 255, .18); }
.e-addr .e-pad { width: 10px; height: 10px; border: 1.5px solid #cfd8ff; border-radius: 2px; }
.e-load { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: #c4d6fa; box-shadow: 0 0 6px rgba(52, 92, 255, .7); transform-origin: 0 50%; transform: scaleX(0); }
html.e-in-window #record { position: fixed; top: 0; left: 0; right: 0; z-index: 1001; background: linear-gradient(var(--n0), var(--n0)) 0 0 / 100% 100svh no-repeat, var(--paper); transform-origin: 0 0; will-change: transform; }

#e-grain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: overlay; opacity: .2; image-rendering: pixelated; }
#e-ui { position: fixed; inset: 0; z-index: 1002; pointer-events: none; font: 400 13px/1.4 var(--mono); color: #d7def6; }
#e-ui:focus { outline: none; }
#e-ui button { pointer-events: auto; font: inherit; color: inherit; background: rgba(5, 8, 20, .55); border: 1px solid rgba(215, 222, 246, .35); padding: 9px 14px; cursor: pointer; backdrop-filter: blur(4px); }
#e-ui button:hover { border-color: rgba(215, 222, 246, .8); }
#e-ui button:focus-visible { outline: 2px solid #8db4ee; outline-offset: 3px; opacity: 1 !important; }
#e-gate { position: absolute; left: 50%; bottom: 7vh; transform: translateX(-50%); display: grid; justify-items: center; gap: 14px; text-align: center; }
#e-gate p { margin: 0; letter-spacing: .08em; text-shadow: 0 1px 3px #000; }
.e-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
#e-power { background: rgba(141, 180, 238, .2) !important; border-color: rgba(141, 180, 238, .8) !important; color: #fff !important; }
#e-hint { position: absolute; left: 50%; bottom: 5vh; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; letter-spacing: .2em; text-transform: uppercase; font-size: 11px; opacity: 0; transition: opacity .5s; text-shadow: 0 1px 3px #000; }
#e-hint i { width: 20px; height: 32px; border: 1.5px solid rgba(215, 222, 246, .7); border-radius: 11px; position: relative; }
#e-hint i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; border-radius: 2px; background: #d7def6; transform: translate(-50%, 0); animation: e-wheel 1.6s ease-in-out infinite; }
html:not(.e-s-desk) #e-hint i::after { animation-play-state: paused; }
@keyframes e-wheel { 0% { opacity: 0; transform: translate(-50%, -1px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 10px); } }
#e-sound { position: absolute; right: 18px; top: 16px; font-size: 11px !important; padding: 6px 10px !important; letter-spacing: .1em; text-transform: uppercase; }
#e-out { position: absolute; left: 18px; top: 16px; font-size: 11px !important; padding: 6px 10px !important; letter-spacing: .1em; text-transform: uppercase; }
html.e-s-off #e-sound, html.e-s-off #e-out { visibility: hidden; }
html.e-maxed #e-sound, html.e-maxed #e-out { visibility: hidden; }
html:not(.e-s-off) #e-gate { visibility: hidden; }
html.e-s-desk #e-hint { opacity: 1; }
html.e-portrait .e-icons { left: calc(var(--sx, 0px) + 36px); top: calc(var(--sy, 0px) + 70px); grid-template-columns: repeat(2, 150px); gap: 40px 30px; }
html.e-portrait .e-icon { width: 150px; font-size: 24px; gap: 10px; }
html.e-portrait .e-icon svg { width: 84px; height: 84px; stroke-width: 1.8; }
html.e-portrait .e-taskbar { height: 76px; padding: 0 calc(var(--sx, 0px) + 28px); font-size: 24px; }
html.e-portrait .e-brand { font-size: 20px; }
html.e-portrait .e-brand i { width: 18px; height: 18px; }
html.e-portrait .e-task { font-size: 20px; }
html.e-portrait .e-sub { display: none; }
html.e-portrait .e-task { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html.e-portrait #e-cursor { width: 52px; height: 52px; }
html.e-portrait .e-mark { font-size: 40px; flex-direction: column; gap: 30px; }
html.e-portrait .e-bar { width: 440px; }
html.e-portrait #e-gate { bottom: 5vh; width: calc(100% - 32px); }
html.e-portrait .e-btns { flex-direction: column; width: 100%; }
html.e-portrait .e-btns button { width: 100%; padding: 13px 14px !important; }

@media print {
  #entry, #entry-track, #e-ui { display: none !important; }
  html.entry, html.entry body { overflow: visible !important; background: #fff !important; }
  html.e-in-window #record { position: static !important; transform: none !important; clip-path: none !important; opacity: 1 !important; }
}
