@font-face {
  font-family: 'AlvOS Gothic';
  src: url('./fonts/UnifrakturMaguntia-Book.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --text: #f1f2e9;
  --muted: #bec4b2;
  --line: #ffffff1c;
  --accent: #c1ce9f;
  font: 16px 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: #48513c;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100svh; }
.standalone-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; padding: 16px clamp(16px, 4vw, 36px); border-bottom: 1px solid #ffffff20; background: #263126c9; }
.standalone-top a { color: var(--accent); text-decoration: none; }
.standalone-top h1 { font-size: 17px; font-weight: 550; margin: 0; }
.app-intro { position: relative; z-index: 1; width: min(900px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 38px); border-bottom: 1px solid var(--line); background: #263126c9; }
.app-intro h2 { margin: 0 0 14px; font-size: clamp(27px, 4vw, 38px); line-height: 1.2; font-weight: 550; }
.app-intro p:not(.eyebrow) { max-width: 68ch; margin: 0 0 12px; color: var(--muted); line-height: 1.55; }
.app-intro .app-intro-example { color: var(--text) !important; }
.app-intro-start { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px; padding: 10px 18px; border-radius: 10px; background: #aebf8b; color: #1f291d; font-weight: 650; text-decoration: none; }
.app-intro-start:hover { background: #c6d5a4; }
#app-content { position: relative; z-index: 1; width: min(900px, 100%); min-height: calc(100svh - 60px); margin: 0 auto; padding: clamp(18px, 4vw, 36px); background: #2631269c; }
#app-content:target { scroll-margin-top: 12px; }
.window-actions { display: flex; align-items: center; gap: 8px; }
.direct-app-link { color: var(--accent); font-size: 12px; text-decoration: none; white-space: nowrap; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid #e0e9c5; outline-offset: 5px; }
[hidden] { display: none !important; }
svg { width: 24px; height: 24px; flex-shrink: 0; }
.wallpaper-layer { position: fixed; inset: 0; z-index: 0; background-color: #48513c; pointer-events: none; }
.wallpaper-wordmark { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'AlvOS Gothic', 'Old English Text MT', serif; font-size: clamp(120px, 22vw, 330px); line-height: 1; color: #dbe1bd; opacity: .17; filter: blur(2px); user-select: none; }
.wallpaper-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 65%; display: none; }
body[data-wallpaper="bie"] .wallpaper-photo { display: block; }
body[data-wallpaper="bie"] .wallpaper-wordmark { display: none; }
.desktop { position: relative; z-index: 1; min-height: 100svh; padding: 35px 30px 150px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, 116px); gap: 22px 18px; align-content: start; }
.app-shortcut { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; border: 1px solid transparent; background: transparent; border-radius: 14px; padding: 12px 4px; min-height: 132px; transition: background .15s, transform .15s; }
.app-shortcut:hover { background: #10180d26; border-color: #ffffff16; transform: translateY(-2px); }
.app-shortcut:active { transform: none; }
.app-icon { width: 66px; height: 66px; display: grid; place-items: center; background: #2c382dcc; border: 1px solid #e3ebc448; border-radius: 19px; box-shadow: 0 6px 18px #10180d24, inset 0 1px 0 #ffffff15; font-size: 30px; }
.app-icon svg { width: 35px; height: 35px; }
.app-icon--actual { background: #31463ecc; }
.app-icon--install { background: #35423dcc; }
.app-name { font-size: 14px; font-weight: 500; margin-top: 11px; line-height: 1.4; text-align: center; overflow-wrap: anywhere; text-shadow: 0 1px 4px #0009; }
.desktop-clock { position: fixed; left: 34px; bottom: 88px; font-size: 29px; font-weight: 350; letter-spacing: .4px; font-variant-numeric: tabular-nums; text-shadow: 0 2px 8px #0005; }
.wallpaper-button { position: fixed; left: 30px; bottom: 26px; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 15px; border: 1px solid #ffffff30; border-radius: 12px; background: #253025a8; color: #f1f2e9; backdrop-filter: blur(12px); font-size: 14px; }
.wallpaper-button:hover { background: #202d24df; }
.wallpaper-button svg { width: 20px; height: 20px; }
.app-window { padding: 0; width: min(570px, calc(100% - 40px)); max-height: calc(100dvh - 48px); border: 1px solid #dce7be33; border-radius: 18px; color: var(--text); background: #252e25; box-shadow: 0 30px 100px #0007; overflow: auto; overscroll-behavior: contain; }
.app-window::backdrop { background: #10180d5c; backdrop-filter: blur(6px); }
.window-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #202920; position: sticky; top: 0; z-index: 1; }
.window-caption { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; }
.small-mark { display: grid; place-items: center; width: 25px; height: 25px; flex-shrink: 0; border-radius: 7px; background: #81906b; color: #fff; font-size: 18px; font-weight: 700; }
.icon-button { border: 0; background: transparent; width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; color: #cad1be; flex-shrink: 0; }
.icon-button:hover { background: #ffffff0e; color: white; }
.icon-button svg { width: 20px; height: 20px; }
.window-content { padding: 30px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 1.7px; color: #c1ce9f; margin: 0 0 10px; }
.window-content h2 { font-size: 27px; font-weight: 550; letter-spacing: -.6px; line-height: 1.3; margin: 0 0 15px; }
.window-content > p:not(.eyebrow) { font-size: 16px; line-height: 1.65; color: var(--muted); }
.welcome-logo { display: grid; place-items: center; width: 62px; height: 62px; background: #697b53; border-radius: 18px; font-size: 40px; font-weight: 700; margin-bottom: 25px; }
.welcome-detail { display: flex; gap: 16px; margin-top: 25px; }
.welcome-detail > span { font-size: 12px; color: var(--accent); padding-top: 4px; }
.welcome-detail h3 { font-size: 16px; font-weight: 600; margin: 0 0 5px; }
.welcome-detail p { font-size: 14px; line-height: 1.65; color: var(--muted); margin: 0; }
.welcome-note { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 27px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.wallpaper-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 25px 0 15px; }
.wallpaper-option { padding: 0 0 14px; border: 2px solid #ffffff17; border-radius: 14px; overflow: hidden; background: #1d251d; text-align: left; }
.wallpaper-option[aria-pressed="true"] { border-color: #c2d49d; }
.wallpaper-preview { display: grid; place-items: center; width: 100%; height: 134px; background: #48513c; margin-bottom: 13px; overflow: hidden; }
.wallpaper-preview--military { font-family: 'AlvOS Gothic', serif; font-size: 52px; color: #dbe1bd66; }
.wallpaper-preview img { width: 100%; height: 100%; object-fit: cover; object-position: center 65%; }
.wallpaper-option > strong, .wallpaper-option > small { display: block; margin: 0 12px; }
.wallpaper-option > strong { font-size: 14px; font-weight: 500; }
.wallpaper-option > small { margin-top: 5px; font-size: 12px; color: #c2cbb7; }
.wallpaper-feedback { min-height: 24px; font-size: 14px !important; }
@media (max-width: 600px) {
  .wallpaper-wordmark { display: none; }
  .desktop { padding: calc(83px + env(safe-area-inset-top, 0px)) 24px calc(104px + env(safe-area-inset-bottom, 0px)); }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
  .app-shortcut { width: 100%; min-height: 140px; padding: 16px 5px; }
  .app-icon { width: 70px; height: 70px; border-radius: 21px; }
  .desktop-clock { top: calc(22px + env(safe-area-inset-top, 0px)); left: 27px; bottom: auto; font-size: 22px; font-weight: 500; }
  .wallpaper-button { left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); white-space: nowrap; }
  .app-window { width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .window-bar { padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; }
  .window-content { padding: 28px 24px calc(30px + env(safe-area-inset-bottom, 0px)); }
  .window-content h2 { font-size: 25px; }
  .wallpaper-options { gap: 10px; }
  .wallpaper-preview { height: 125px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.music-dock--launch { position: fixed; left: 30px; bottom: 26px; z-index: 2; }
.music-dock--launch #music-launch { min-height: 44px; padding: 10px 15px; border: 1px solid #ffffff30; border-radius: 14px; background: #253025d9; color: #f1f2e9; box-shadow: 0 10px 26px #0b120b45; backdrop-filter: blur(12px); font-size: 14px; }
.music-dock--launch #music-launch:hover { background: #202d24; }
.music-dock--launch + .wallpaper-button { left: 170px; }
@media (max-width: 600px) {
  .music-dock--launch { left: 16px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .music-dock--launch + .wallpaper-button { left: 50%; }
}

/* AlvOS visual polish: depth, hierarchy and responsive touch targets. */
:root { --panel-glass: #1b281fe8; --glow: #d8e9aa; }
.wallpaper-layer { overflow: hidden; }
.wallpaper-layer::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, #12201635, transparent 48%, #0b110c45); mix-blend-mode: multiply; }
.wallpaper-wordmark { text-shadow: 0 0 42px #dcebb080; }
.app-shortcut { background: #10180d0a; border-radius: 18px; transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; }
.app-shortcut:hover { background: #10180d45; border-color: #eff7df26; transform: translateY(-4px); box-shadow: 0 12px 24px #09110925; }
.app-icon { position: relative; overflow: hidden; border-radius: 21px; box-shadow: 0 12px 28px #10180d35, inset 0 1px 0 #ffffff20; }
.app-icon::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, #ffffff18, transparent 46%); pointer-events: none; }
.app-icon--actual { background: linear-gradient(145deg, #526d4c, #293e31); }
.app-icon--install { background: linear-gradient(145deg, #5a6746, #2a382c); }
.app-icon--contal { background: linear-gradient(145deg, #687e53, #2d4033); }
.wallpaper-button { border-radius: 14px; box-shadow: 0 10px 26px #0b120b45; transition: background .2s, transform .2s; }
.wallpaper-button:hover { transform: translateY(-2px); }
.app-window { border-radius: 22px; background: #1b281fe8; box-shadow: 0 32px 110px #000a; backdrop-filter: blur(18px); }
.window-bar { background: #1b281fe8; }
.small-mark { background: linear-gradient(145deg, #8da66a, #52683f); box-shadow: inset 0 1px 0 #fff5; }
.wallpaper-option { border-radius: 16px; transition: transform .2s, border-color .2s; }
.wallpaper-option:hover { transform: translateY(-3px); }
.wallpaper-option[aria-pressed="true"] { box-shadow: 0 0 0 3px #c2d49d20; }
@media (max-width: 600px) {
  .desktop { padding-left: 20px; padding-right: 20px; }
  .app-grid { gap: 18px 14px; }
  .app-shortcut { min-height: 143px; }
  .app-icon { width: 72px; height: 72px; border-radius: 22px; }
}
