/* ---------- screens: boot, welcome, turn off ---------- */
.screen { position: absolute; inset: 0; z-index: 100; }
#boot { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #000000; color: var(--boot-fg); cursor: pointer; }
.boot-c { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-inline: 16px; }
.boot-logo { width: 86px; height: 86px; }
.word { font: 700 46px/1 "Trebuchet MS", Tahoma, sans-serif; letter-spacing: -1px; white-space: nowrap; }
.word span { margin-left: 3px; color: var(--boot-accent); font-size: 0.56em; font-style: italic; vertical-align: super; }
.edition { font: italic 15px/1 "Trebuchet MS", Tahoma, sans-serif; color: var(--boot-dim); }
.boot-bar { position: relative; width: 170px; height: 20px; margin-top: 48px; border: 2px solid #b2b2b2; border-radius: 4px; overflow: hidden; }
.boot-bar i { position: absolute; top: 3px; left: 0; width: 10px; height: 10px; border-radius: 1px; background: linear-gradient(180deg, #ffb07a, #e2541c 55%, #a8350c); animation: boot 1.6s linear infinite; }
.boot-bar i:nth-child(2) { margin-left: 12px; }
.boot-bar i:nth-child(3) { margin-left: 24px; }
@keyframes boot { from { transform: translateX(-40px); } to { transform: translateX(180px); } }
.boot-foot { position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: 18px; display: flex; justify-content: space-between; gap: 12px; margin: 0; font: 12px/1.3 Tahoma, sans-serif; color: var(--boot-dim); }
#welcome { display: grid; grid-template-rows: 78px minmax(0, 1fr) 78px; background: var(--wel-band); color: var(--wel-fg); font-family: var(--ui-font); }
.wel-band { position: relative; background: var(--wel-band); }
.wel-top::after, .wel-bot::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; }
.wel-top::after { bottom: 0; background: var(--wel-line-top); }
.wel-bot::before { top: 0; background: var(--wel-line-bot); }
.wel-mid { display: flex; align-items: center; justify-content: center; gap: 40px; padding-block: 20px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--wel-mid); overflow: auto; }
.wel-left { flex: 1; max-width: 380px; display: flex; flex-direction: column; align-items: flex-end; gap: 18px; text-align: right; }
.wel-logo { display: flex; align-items: center; gap: 12px; }
.wel-logo .ico { width: 62px; height: 62px; }
.wel-logo .word { font-size: 38px; }
.wel-logo .edition { display: block; margin-top: 6px; color: inherit; opacity: 0.8; }
.wel-left p { margin: 0; font-size: 19px; }
.wel-div { align-self: stretch; width: 2px; margin: 30px 0; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.7), transparent); }
.wel-right { flex: 1; max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.wel-user { width: 100%; display: flex; align-items: center; gap: 14px; padding: 8px; background: none; border: 0; border-radius: 8px; color: inherit; text-align: left; }
.wel-user:hover, .wel-user:focus-visible { background: rgba(255, 255, 255, 0.14); outline: none; }
.wel-pic { width: 62px; height: 62px; flex: none; overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.9); border-radius: 7px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.wel-pic .ico { width: 100%; height: 100%; }
.wel-user b { display: block; font-size: 20px; }
.wel-user small { opacity: 0.85; }
.wel-pass { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 0 84px; }
.wel-pass .field { width: 180px; }
.wel-go { width: 28px; height: 28px; padding: 0; background: none; border: 0; }
.wel-go svg { width: 100%; height: 100%; }
.wel-hint { flex-basis: 100%; margin: 4px 0 0; font-size: 13px; }
.wel-bot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wel-off { display: flex; align-items: center; gap: 8px; padding: 4px 6px; background: none; border: 0; border-radius: 4px; color: inherit; font-size: 15px; }
.wel-off:hover { background: rgba(255, 255, 255, 0.12); }
.wel-off .ico { width: 30px; height: 30px; }
.wel-bot p { max-width: 380px; margin: 0; font-size: 13px; text-align: right; opacity: 0.85; }
#turnoff { position: absolute; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(0, 0, 0, 0.25); }
.to-dlg { width: min(340px, calc(100% - 32px)); overflow: hidden; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.to-dlg header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--wel-band); color: var(--wel-fg); font-size: 16px; }
.to-dlg header .ico { width: 28px; height: 28px; }
.to-btns { display: flex; justify-content: space-around; padding: 22px 10px; background: var(--to-mid); color: var(--to-fg); }
.to-btns button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; background: none; border: 0; border-radius: 6px; color: inherit; font-size: var(--small-size); }
.to-btns button:hover .ico { filter: brightness(1.15); }
.to-btns .ico { width: 42px; height: 42px; }
.to-dlg footer { display: flex; justify-content: flex-end; padding: 8px 12px; background: var(--wel-band); }
#os.dim #desktop, #os.dim #taskbar { filter: grayscale(1) brightness(0.7); transition: filter 1s; }
#off { display: grid; place-content: center; gap: 10px; padding: 24px; background: #000000; color: var(--shut-fg); font: 700 22px/1.4 "Trebuchet MS", Tahoma, sans-serif; text-align: center; cursor: pointer; }
#off p { margin: 0; }
#off small { font: 400 13px/1.4 Tahoma, sans-serif; color: var(--boot-dim); }
#off.shutting { background: var(--wel-mid); color: var(--wel-fg); cursor: progress; }
#standby { display: grid; place-items: center; background: #000000; color: #5a5a5a; font: 14px/1.4 Tahoma, sans-serif; cursor: pointer; }

/* screen saver and the crash */
#saver { z-index: 120; overflow: hidden; background: #000000; cursor: none; }
#saver canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.saver-logo { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px; color: #ffffff; font: 700 30px/1 "Trebuchet MS", Tahoma, sans-serif; white-space: nowrap; will-change: transform; }
.saver-logo .ico { width: 58px; height: 58px; }
.saver-logo em { margin-left: 3px; font-size: 0.6em; vertical-align: super; }
.saver-corner { position: absolute; left: 50%; top: 50%; color: #ffffff; font: 700 30px/1 "Trebuchet MS", Tahoma, sans-serif; opacity: 0; transform: translate(-50%, -50%); }
.saver-corner.show { animation: pop 1.4s ease-out; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
#bsod { z-index: 130; display: grid; place-content: center; padding-block: 24px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: #0000aa; color: #ffffff; font: 16px/1.5 "Lucida Console", "Courier New", monospace; cursor: default; }
#bsod > div { max-width: 640px; }
#bsod h2 { width: max-content; margin: 0 auto 22px; padding: 0 8px; background: #aaaaaa; color: #0000aa; font: inherit; font-weight: 700; }
#bsod p { margin: 0 0 16px; }
.bs-cont { text-align: center; }
.bs-cont::after { content: "_"; animation: blink 1s steps(2) infinite; }

/* a little CRT for The Matrix */
[data-skin="matrix"] #os::after { content: ""; position: absolute; inset: 0; z-index: 96; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px); }
.wel-plain { align-self: flex-start; margin: 6px 0 0 8px; color: inherit; font-size: 13px; opacity: 0.85; }
.wel-plain:hover { opacity: 1; }
