/* Uvila's own application shell. Loaded after the retained functional styles. */
:root { --ui-radius: 1.1rem; --default-scene: url('/assets/lavender-sunset.webp'); }
html { scrollbar-color: var(--border) transparent; }
body { font-size: 14px; -webkit-font-smoothing: antialiased; }
button, a, input, select, textarea { touch-action: manipulation; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-user-drag: none; }
.page { z-index: 1; }
.home { padding: 0; isolation: isolate; }
.home::before { content: ''; position: fixed; inset: 0; z-index: -2; background-color: var(--background); background-image: var(--app-background-image, var(--default-scene)); background-size: var(--app-background-size, cover); background-position: center; pointer-events: none; }
.home::after { content: ''; position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, #10101040, #10101010 45%, #10101060); pointer-events: none; }
body.is-local-background-moving .home::before { opacity: 0; }
.pages-launcher { position: fixed; left: max(.9rem, env(safe-area-inset-left)); bottom: max(.9rem, env(safe-area-inset-bottom)); z-index: 105; }
.pages-launcher .menu-button { position: relative; inset: auto; display: grid; place-items: center; z-index: 104; width: 3.6rem; height: 3.6rem; padding: .95rem; border: 1px solid color-mix(in srgb, var(--accent) 65%, var(--border)); border-radius: 1rem; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--accent); }
.menu-button > svg { width: 1.5rem; height: 1.5rem; }
.menu-button:hover, .is-menu-open .menu-button { background: color-mix(in srgb, var(--accent) 17%, var(--surface)); }
.pages-launcher .site-menu { position: absolute; inset: auto auto calc(100% + .6rem) 0; z-index: 105; width: min(16rem, calc(100vw - 1.8rem)); max-height: calc(100dvh - 6rem); overflow-y: auto; display: grid; gap: .1rem; padding: .5rem; border: 1px solid var(--border); border-radius: .9rem; background: var(--surface); box-shadow: 0 12px 32px #0003; backdrop-filter: none; transform: translateY(.3rem); opacity: 0; visibility: hidden; pointer-events: none; }
.is-menu-open .site-menu { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
.site-menu-heading { display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; padding: .15rem .6rem .4rem; margin-bottom: .3rem; color: var(--muted); border-bottom: 1px solid var(--border); font-size: .72rem; }
.site-menu-heading button { border: 0; width: 2rem; height: 2rem; display: grid; place-items: center; background: transparent; color: var(--text); cursor: pointer; }
.site-menu-heading svg { width: 1.1rem; height: 1.1rem; }
.site-menu .menu-link { display: flex; align-items: center; gap: .7rem; min-height: 2.8rem; padding: .45rem .6rem; border: 0; border-radius: .55rem; font-size: .85rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.site-menu .menu-link:hover { background: var(--surface-raised); color: var(--text); transform: none; }
.site-menu .menu-link.is-active { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--accent); }
.site-menu .menu-link.is-active::before { display: none; }
.site-menu .menu-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; color: var(--text); }
.site-menu .menu-link:last-child { margin-top: .35rem; border-top: 1px solid var(--border); border-radius: 0 0 .55rem .55rem; }
.site-menu .menu-icon { width: 1.8rem; height: 1.8rem; border: 0; background: transparent; color: inherit; }
.menu-online-count { display: inline-flex; align-items: center; gap: .3em; color: var(--muted); font-size: .75rem; font-weight: 400; white-space: nowrap; }
.menu-online-count::before { content: ''; width: .4rem; height: .4rem; margin-right: .1rem; border-radius: 50%; background: #82b787; }
.menu-online-count strong { color: inherit; font-weight: 600; }
.page-identity { width: 100%; padding: 4rem 1.2rem; color: #f2eae0; }
.home-logo.uvila-coded-logo { display: block; width: min(66vw, 36rem); height: auto; min-height: 0; aspect-ratio: 1240/520; overflow: visible; object-fit: initial; color: #f0e8de; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.wordmark-variant { display: none; }
.wordmark-default { display: inline; }
.uvila-coded-logo text { paint-order: stroke fill; stroke-linejoin: round; }
.wordmark-silkscreen, .wordmark-silkscreen-lettering { font-family: 'Uvila Silkscreen', monospace; font-size: 285px; letter-spacing: -12px; }
.wordmark-curly, .wordmark-curly-lettering { font-family: 'Uvila Curly', cursive; font-size: 430px; font-weight: 600; }
.wordmark-bubble, .wordmark-bubble-lettering { font-family: 'Uvila Bubble', sans-serif; font-size: 440px; font-weight: 800; letter-spacing: -12px; }
body:is([data-font='silkscreen'], [data-font='curly'], [data-font='bubble']) .wordmark-default { display: none; }
body[data-font='silkscreen'] .wordmark-silkscreen, body[data-font='curly'] .wordmark-curly, body[data-font='bubble'] .wordmark-bubble { display: inline; }
.home-status { position: fixed; top: max(1.5rem, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 2; display: none; flex-wrap: wrap; align-items: center; justify-content: center; gap: .55rem 1rem; width: max-content; max-width: calc(100vw - 2rem); color: #fff8f0; text-shadow: 0 2px 10px #0008; user-select: none; -webkit-user-drag: none; }
.is-home-page .home-status { display: flex; }
.home-local-time { position: static; transform: none; width: max-content; color: inherit; font-size: .88rem; font-weight: 500; letter-spacing: .01em; text-align: center; user-select: none; -webkit-user-drag: none; }
.home-weather { display: flex; align-items: center; gap: .45rem; color: inherit; font-size: .78rem; }
.home-weather [data-weather-icon] { display: flex; }
.home-weather svg { width: 1.5rem; height: 1.5rem; }
.uvila-dictation { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 50%; background: transparent; color: var(--text); cursor: pointer; }
.uvila-dictation svg { width: 1.2rem; height: 1.2rem; }
.uvila-dictation[aria-pressed='true'] { background: var(--accent); color: var(--background); }
.uvila-dictation:disabled { opacity: .4; cursor: default; }
.games-view, .media-choice-view, .music-view, .videos-view, .browser-view, .ai-view, .chat-view, .settings-view { background: color-mix(in srgb, var(--background) 97%, transparent); }
.games-library { padding: 7rem max(1.2rem, calc((100vw - 1200px)/2)) 3rem; }
.games-header { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; padding: 0; margin: 0 auto 2rem; text-align: center; }
.games-eyebrow { color: var(--accent); letter-spacing: .18em; font-size: .65rem; }
.games-header h1 { margin: .35rem 0; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.06em; }
.games-header [data-games-summary] { color: var(--muted); font-size: .8rem; }
.games-search { width: min(100%, 38rem); min-height: 3.2rem; border-radius: 1rem; border: 1px solid var(--border); background: var(--surface); }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 1.1rem; }
.game-card { position: relative; min-width: 0; padding: 0; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--border); border-radius: 1.15rem; background: var(--surface); box-shadow: none; }
.game-card-artwork { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.game-card-fallback { width: 100%; height: 100%; }
.game-card-fallback img { width: 100%; height: 100%; object-fit: cover; }
.game-card-copy { position: absolute; z-index: 2; inset: auto 0 0; display: block; box-sizing: border-box; min-width: 0; max-width: 100%; padding: .9rem; background: linear-gradient(transparent, #17121fe8 35%); color: #fff; opacity: 0; transform: translateY(6px); }
.game-card-copy strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; max-height: 3.9em; overflow: hidden; overflow-wrap: anywhere; white-space: normal; line-height: 1.3; text-align: center; font-size: .82rem; }
.game-card-copy > span, .game-card-copy > small { display: none; }
.game-card:hover .game-card-copy, .game-card:focus-visible .game-card-copy { opacity: 1; transform: none; }
.game-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.games-status { margin: 3rem auto; padding: 3rem 1.5rem; border: 1px dashed var(--border); border-radius: 1.25rem; background: var(--surface); color: var(--muted); }
.games-status strong { color: var(--text); font-size: 1.2rem; }
.games-status small { max-width: 28rem; line-height: 1.6; }
.game-player { position: fixed; inset: 0; z-index: 106; }
body.is-playing-game [data-pages-launcher] { display: none !important; }
.videos-shell { padding-top: 9.6rem; }
.videos-header { border: 0; background: transparent; box-shadow: none; }
.videos-search { border-radius: 1rem; }
.browser-view { inset: 6.2rem 1.1rem 1.1rem; height: auto; border: 1px solid var(--border); border-radius: 1.2rem; overflow: hidden; }
.browser-tab-strip { padding-left: .8rem; }
.browser-launch-status { padding: 1rem 1.25rem; color: var(--muted); line-height: 1.6; }
.ai-view, .chat-view { position: fixed; inset: 6.2rem 1.1rem 1.1rem; width: auto; height: auto; border-radius: 1.2rem; border: 1px solid var(--border); padding: 0; overflow: hidden; }
.ai-shell { width: 100%; height: 100%; max-width: none; max-height: none; border: 0; border-radius: inherit; background: var(--surface); }
.ai-sidebar { background: color-mix(in srgb, var(--background) 70%, var(--surface)); }
.ai-workspace { background: var(--surface); }
.ai-suggestions button { background: var(--surface-raised); border-color: var(--border); border-radius: 1rem; }
.ai-composer { border-radius: 1.1rem; background: var(--surface-raised); }
.ai-empty-state h2 { font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.045em; }
.chat-view { grid-template-columns: 4.5rem 15rem minmax(0,1fr); }
.server-rail, .chat-sidebar, .chat-main { background: var(--surface); }
.chat-sidebar { background: color-mix(in srgb, var(--background) 45%, var(--surface)); }
.settings-view { padding: 2.5rem max(1.2rem, calc((100vw - 1320px)/2)) 6rem; }
.settings-header { margin-left: 15rem; text-align: left; padding: .5rem 0 1rem; }
.settings-header h1 { font-size: 2rem; letter-spacing: -.04em; }
.settings-lede { font-size: .8rem; line-height: 1.6; }
.settings-tabs { position: fixed; top: 7rem; left: max(1.2rem, calc((100vw - 1320px)/2)); width: 13rem; display: grid; gap: .3rem; padding: .6rem; border: 1px solid var(--border); border-radius: 1.1rem; background: var(--surface); }
.settings-tab { text-align: left; white-space: normal; border-radius: .7rem; padding: .85rem; border: 0; font-size: .78rem; }
.settings-tab.is-selected { background: color-mix(in srgb, var(--accent) 13%, var(--surface-raised)); color: var(--accent); }
.settings-panels { margin-left: 15rem; width: calc(100% - 15rem); }
.settings-group { padding: 1.5rem; border: 1px solid var(--border); border-radius: 1.15rem; background: var(--surface); box-shadow: none; }
.group-heading h2 { font-size: 1.15rem; letter-spacing: -.025em; }
.section-number { color: var(--accent); }
.control-row p, .group-heading > p { line-height: 1.6; font-size: .75rem; }
.settings-link-list { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.settings-link-list a { padding: .75rem 1rem; border: 1px solid var(--border); border-radius: .75rem; color: var(--text); text-decoration: none; }
.settings-link-list a:hover { border-color: var(--accent); }
code, pre, .ai-code-frame { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }
:root[data-smooth-ui='off'] *, :root[data-smooth-ui='off'] *::before, :root[data-smooth-ui='off'] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
:root[data-smooth-ui='on'] .site-menu, :root[data-smooth-ui='on'] .game-card, :root[data-smooth-ui='on'] .game-card-copy { transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease; }
@media (hover: none) { .game-card-copy { opacity: 1; transform: none; } }
@media (max-width: 850px) { .chat-view { grid-template-columns: 3.5rem 12rem minmax(0,1fr); } }
@media (max-width: 600px) { .pages-launcher .menu-button { width: 3.25rem; height: 3.25rem; padding: .85rem; } .home-status { gap: .4rem .7rem; } .home-local-time { font-size: .78rem; } .home-weather { font-size: .72rem; } .home-logo.uvila-coded-logo { width: 84vw; } .games-library { padding-top: 3rem; } .games-grid { grid-template-columns: repeat(auto-fill, minmax(125px,1fr)); gap: .65rem; } .chat-view { inset: 1rem .5rem 5rem; border-radius: .65rem; } .videos-shell { padding-top: 5rem; } .settings-group { padding: 1.1rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
