@font-face { font-family: Inter; src: url("/assets/fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url("/assets/fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url("/assets/fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
:root { --bg: #0c0d0f; --surface: #141518; --raised: #1b1c20; --stage: #101114; --line: rgba(255,255,255,.08); --line-strong: rgba(255,255,255,.14); --text: #f1f1f3; --muted: #8b8d96; --faint: #5c5e66; --accent: #7b6ee6; --accent-soft: rgba(123,110,230,.16); --star: #e6b84a; --danger: #e56b6b; --ok: #5bc489; --warn: #e0a84a; color-scheme: dark; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); font-family: Inter, -apple-system, system-ui, sans-serif; font-size: 15px; -webkit-font-smoothing: antialiased; }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
#root { min-height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.filled { fill: currentColor; stroke: none; }
.logo { display: block; border-radius: 28%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; letter-spacing: 2px; }
.screen { flex: 1; min-height: 100svh; display: flex; flex-direction: column; padding: 20px 24px calc(16px + env(safe-area-inset-bottom)); }
.screen.loading { align-items: center; justify-content: center; }
.spring { flex: 1; min-height: 24px; }
h1 { font-size: 30px; font-weight: 600; letter-spacing: -.5px; line-height: 1.15; }
h1.gap { margin-top: 40px; }
.lead { color: var(--muted); margin-top: 10px; line-height: 1.45; }
.code { position: relative; display: block; margin: 28px 0 14px; }
.cells { display: flex; align-items: center; gap: 5px; }
.cell { flex: 1; aspect-ratio: .78; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; }
.cell.full { background: var(--raised); }
.cell.active { border: 1.5px solid var(--accent); }
.dash { width: 8px; height: 2px; border-radius: 2px; background: var(--faint); flex: none; }
.code-input { position: absolute; inset: 0; width: 100%; opacity: 0; font-size: 16px; caret-color: transparent; border: 0; }
.problem { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(229,107,107,.1); color: var(--danger); font-size: 13px; margin: 0 0 12px; }
.problem i { width: 6px; height: 6px; border-radius: 3px; background: var(--danger); flex: none; }
.steps { list-style: none; display: grid; gap: 14px; margin-bottom: 24px; color: var(--muted); font-size: 14px; }
.steps li { display: flex; align-items: center; gap: 12px; }
.steps i { width: 24px; height: 24px; border-radius: 12px; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; font-weight: 600; }
.btn { width: 100%; height: 52px; border-radius: 14px; background: var(--accent); font-weight: 600; }
.btn.ghost { background: var(--raised); border: 1px solid var(--line); }
.btn.danger { color: var(--danger); }
.btn:disabled { background: var(--raised); border: 1px solid var(--line); color: var(--faint); }
.hint { color: var(--faint); font-size: 12px; text-align: center; margin-top: 14px; }
.accounts { flex: 1; display: grid; gap: 10px; align-content: start; margin: 20px 0; }
.account { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; width: 100%; color: var(--faint); }
.account:disabled { opacity: .6; }
.account b { display: block; color: var(--text); font-size: 16px; font-weight: 600; }
.account small { color: var(--muted); font-size: 12px; }
.account small.warn { color: var(--warn); }
.initial { display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; flex: none; }
.initial.s44 { width: 44px; height: 44px; border-radius: 13px; font-size: 17px; }
.initial.s26 { width: 26px; height: 26px; border-radius: 13px; font-size: 11px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; }
.top { padding: 14px 20px 6px; }
.top-row { display: flex; align-items: center; justify-content: space-between; }
.top h2 { font-size: 30px; font-weight: 600; letter-spacing: -.5px; margin-top: 22px; }
.me { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 500; max-width: 50%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.content { flex: 1; padding: 12px 16px calc(110px + env(safe-area-inset-bottom)); }
.chips { display: flex; gap: 8px; margin-bottom: 12px; }
.chips button { height: 34px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.chips button.on { background: var(--text); border-color: transparent; color: var(--bg); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); min-width: 0; cursor: pointer; }
.tile.worn { border: 1.5px solid var(--accent); }
.stage { position: relative; margin: 6px; aspect-ratio: .86; border-radius: 13px; background: var(--stage); display: flex; align-items: center; justify-content: center; }
.stage canvas { height: 68%; image-rendering: pixelated; }
.stage.big { margin: 0; aspect-ratio: auto; height: 300px; border-radius: 22px; padding-bottom: 22px; }
.stage.big canvas { height: 72%; }
.pills { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; }
.pill { font-size: 10px; font-weight: 600; letter-spacing: .3px; background: var(--raised); color: var(--muted); padding: 3px 7px; border-radius: 6px; }
.pill.accent { background: var(--accent); color: var(--text); }
.pill.status { position: absolute; left: 8px; bottom: 8px; }
.pill.ok { background: rgba(91,196,137,.16); color: var(--ok); }
.pill.bad { background: rgba(229,107,107,.16); color: var(--danger); }
.pill.wait { background: rgba(224,168,74,.16); color: var(--warn); }
.fav { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: var(--faint); }
.fav .icon { width: 18px; height: 18px; }
.fav.on { color: var(--star); }
.fav.big { position: static; width: 48px; height: 48px; border-radius: 24px; background: var(--raised); color: var(--muted); }
.fav.big .icon { width: 22px; height: 22px; }
.fav.big.on { color: var(--star); }
.meta { padding: 4px 12px 12px; }
.meta b, .meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta b { font-size: 14px; font-weight: 600; }
.meta small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 32px 0; text-align: center; color: var(--muted); font-size: 14px; }
.empty-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--faint); }
.note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.note .icon { width: 18px; height: 18px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tabs .inner { display: flex; max-width: 560px; margin: 0 auto; }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; color: var(--faint); font-size: 11px; font-weight: 500; }
.tab-icon { width: 56px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; }
.tab-icon .icon { width: 20px; height: 20px; }
.tabs button.on { color: var(--text); font-weight: 600; }
.tabs button.on .tab-icon { background: var(--accent-soft); color: var(--accent); }
.card { border-radius: 20px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; }
.profile { display: flex; align-items: center; gap: 16px; padding: 16px; }
.mini-stage { width: 88px; height: 120px; border-radius: 14px; background: var(--stage); display: flex; align-items: center; justify-content: center; color: var(--faint); flex: none; cursor: pointer; }
.mini-stage canvas { height: 92px; image-rendering: pixelated; }
.profile b.big { display: block; font-size: 20px; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile small { display: block; color: var(--muted); font-size: 12px; }
.profile span { font-weight: 500; font-size: 14px; }
.rows { padding: 0 16px; }
.rows div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; font-size: 14px; }
.rows div + div { border-top: 1px solid var(--line); }
.rows span { color: var(--muted); }
.rows b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack { display: grid; gap: 10px; margin-top: 8px; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; z-index: 5; animation: fade 160ms ease-out; }
.scrim.center { align-items: center; padding: 20px; }
.sheet { width: 100%; max-width: 560px; border-radius: 28px 28px 0 0; background: var(--surface); padding: 10px 20px calc(16px + env(safe-area-inset-bottom)); animation: rise 220ms cubic-bezier(.2,.8,.2,1); }
.handle { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 0 auto 14px; }
.sides { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; padding: 3px; border-radius: 999px; background: var(--raised); }
.sides button { padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sides button.on { background: var(--text); color: var(--bg); }
.title-row { display: flex; align-items: center; gap: 12px; margin: 18px 0 16px; }
.title-row h3 { font-size: 22px; font-weight: 600; letter-spacing: -.3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-row small { color: var(--muted); font-size: 13px; }
.dialog { width: 100%; max-width: 420px; border-radius: 24px; background: var(--raised); padding: 22px; }
.dialog h3 { font-size: 20px; font-weight: 600; }
.dialog p { color: var(--muted); margin: 8px 0 20px; line-height: 1.45; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .scrim, .sheet { animation: none; } }
.head { position: relative; flex: none; border-radius: 22%; overflow: hidden; background: var(--raised); }
.initial.s42 { width: 42px; height: 42px; border-radius: 12px; font-size: 16px; }
.initial.s36 { width: 36px; height: 36px; border-radius: 11px; font-size: 14px; }
.head .layer { position: absolute; inset: 0; image-rendering: pixelated; background-repeat: no-repeat; }
.me .head { border-radius: 50%; }
.label { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .5px; margin: 16px 2px 8px; }
.friend, .server { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; margin-bottom: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.friend b, .server b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend small, .server small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ok { color: var(--ok) !important; }
.avatar { position: relative; flex: none; }
.presence { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 6px; background: var(--faint); border: 2px solid var(--surface); }
.presence.on { background: var(--ok); }
.dot { width: 6px; height: 6px; border-radius: 3px; flex: none; }
.dot.warn { background: var(--warn); }
button.small { height: 34px; padding: 0 12px; border-radius: 10px; background: var(--accent); font-size: 13px; font-weight: 600; }
button.small.ghost { background: none; color: var(--muted); }
.server { flex-direction: column; align-items: stretch; gap: 0; }
.server-top { display: flex; align-items: center; gap: 8px; }
.server-top b { flex: 1; }
.server p { font-size: 13px; color: var(--text); margin-top: 6px; line-height: 1.4; }
.chat { display: flex; flex-direction: column; height: 100svh; padding-bottom: env(safe-area-inset-bottom); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.chat-head b { display: block; font-size: 16px; font-weight: 600; }
.chat-head small { color: var(--muted); font-size: 12px; }
.back { width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.back .icon { transform: scaleX(-1); }
.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.bubble { max-width: 80%; align-self: flex-start; padding: 9px 12px; border-radius: 16px 16px 16px 4px; background: var(--raised); font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: var(--accent); border-radius: 16px 16px 4px 16px; }
.bubble small { display: block; font-size: 10px; color: rgba(255,255,255,.55); margin-top: 3px; text-align: right; }
.chat .problem { margin: 0 12px 8px; }
.composer { display: flex; gap: 8px; padding: 8px 12px 12px; border-top: 1px solid var(--line); }
.chat-input { flex: 1; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 16px; font: inherit; font-size: 16px; }
.send { width: 44px; height: 44px; border-radius: 22px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.send .icon { width: 18px; height: 18px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line-strong); font-size: 13px; z-index: 30; }
.stage.big.wide canvas { height: 62%; }
.scene3d { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; perspective: 900px; touch-action: none; cursor: grab; }
.figure { position: relative; width: 0; height: 0; transform-style: preserve-3d; top: 96px; }
.cuboid, .cape3d { position: absolute; left: 0; top: 0; transform-style: preserve-3d; transform-origin: 0 0; }
.cuboid .face { position: absolute; image-rendering: pixelated; background-repeat: no-repeat; backface-visibility: hidden; }
.cape3d { transform-origin: 50% 0; }
.cape-side { position: absolute; inset: 0; backface-visibility: hidden; }
.cape-side.outer { transform: rotateY(180deg); }
.cape-side canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.stage.big .cape-side canvas { height: 100%; }
