:root {
  --bg: #000000;
  --surface: #101217;
  --surface-2: #171a20;
  --surface-3: #20242b;
  --text: #ffffff;
  --muted: #b7bcc5;
  --dim: #858b95;
  --line: rgba(255,255,255,.14);
  --good: #c9ffd5;
  --warn: #fff2b6;
  --focus: #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
html, body { width: 600px; height: 600px; overflow: hidden; }
body { touch-action: none; }
button, input { font: inherit; }
button { color: inherit; }

.app-root { position: relative; width: 600px; height: 600px; padding: 8px; overflow: hidden; background: #000; }
.topbar { height: 72px; margin: 8px 8px 0; padding: 12px 16px; border-radius: 22px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); }
.brand-block { display: flex; gap: 14px; align-items: baseline; }
.brand { font-size: 24px; font-weight: 800; letter-spacing: .08em; }
.screen-label { font-size: 14px; color: var(--muted); }
.top-status { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #777; box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.status-dot.online { background: #d5ffe0; }

.screen { display: none; position: absolute; left: 16px; right: 16px; top: 96px; bottom: 48px; overflow: hidden; }
.screen.active { display: block; }
.hero-copy { height: 58px; padding: 2px 6px; }
.eyebrow, .kicker { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
h1, h2 { margin: 2px 0 0; line-height: 1.05; }
h1 { font-size: 28px; }
h2 { font-size: 24px; }
.section-head { min-height: 64px; padding: 2px 6px 8px; }
.section-head.inline { display: flex; align-items: flex-start; justify-content: space-between; }
.pill { padding: 8px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.home-grid { height: 368px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); gap: 12px; }
.tile, .action-card, .wide-button, .list-item { border: 1px solid var(--line); background: var(--surface); border-radius: 24px; outline: none; transition: transform 475ms cubic-bezier(.6,0,.4,1), background 300ms cubic-bezier(.4,.04,.5,1), border-color 300ms; }
.tile { min-height: 112px; padding: 14px 18px; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: 1fr 1fr; text-align: left; align-items: center; }
.tile-icon { grid-row: 1 / 3; font-size: 30px; opacity: .9; }
.tile-title { font-size: 20px; font-weight: 750; align-self: end; }
.tile-note { font-size: 13px; color: var(--muted); align-self: start; margin-top: 3px; }

.focusable { opacity: .82; }
.focusable:focus { opacity: 1; transform: scale(.94); border-color: rgba(255,255,255,.72); background: var(--surface-3); box-shadow: inset 0 0 0 2px rgba(255,255,255,.22); }
.focusable:active { transform: scale(.90); transition-duration: 100ms; }

.answer-card, .translate-card, .location-card, .micro-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.answer-card { height: 176px; padding: 20px; font-size: 20px; line-height: 1.35; overflow: hidden; display: flex; align-items: center; }
.answer-card.tall { height: 252px; font-size: 18px; }
.answer-card.loading::after { content: '…'; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:.25}50%{opacity:1} }

.rail { display: grid; gap: 10px; margin-top: 12px; }
.rail-3 { grid-template-columns: repeat(3, 1fr); }
.rail-2 { grid-template-columns: repeat(2, 1fr); }
.action-card { min-height: 88px; padding: 12px; font-size: 14px; font-weight: 700; }
.composer-wrap { display: block; margin-top: 10px; font-size: 11px; color: var(--dim); }
.composer { margin-top: 4px; width: 100%; height: 54px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); color: #fff; outline: none; padding: 0 16px; font-size: 16px; }
.composer:focus { transform: none; }

.translate-card { height: 234px; padding: 18px 20px; display: flex; flex-direction: column; }
.lang { font-size: 12px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.translation { margin-top: 12px; font-size: 25px; font-weight: 700; line-height: 1.2; flex: 1; overflow: hidden; }
.original { min-height: 0; max-height: 46px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.3; opacity: 0; transition: opacity .2s; }
.original.visible { opacity: 1; }
.session-card { height: 62px; margin-top: 10px; padding: 0 18px; display: flex; justify-content: space-between; align-items: center; background: var(--surface-2); border-radius: 20px; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.session-card strong { color: #fff; font-size: 18px; letter-spacing: .08em; }

.wide-button { width: 100%; min-height: 88px; margin-top: 12px; font-weight: 750; font-size: 16px; }
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { height: 132px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); padding: 15px 17px; display: flex; flex-direction: column; }
.metric span, .metric small { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 29px; margin: auto 0 3px; }

.list-stack { display: grid; gap: 10px; }
.list-item { min-height: 88px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; text-align: left; font-size: 17px; font-weight: 700; }
.list-item small { color: var(--muted); font-weight: 500; }
.micro-panel { margin-top: 10px; min-height: 82px; padding: 16px 18px; color: var(--muted); font-size: 14px; line-height: 1.35; }

.location-card { height: 268px; padding: 22px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.compass { font-size: 54px; margin-bottom: 18px; }
.location-card strong { font-size: 21px; max-width: 430px; }
.location-card small { margin-top: 10px; color: var(--muted); font-size: 13px; }

.hintbar { position: absolute; bottom: 8px; left: 16px; right: 16px; height: 34px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; justify-content: space-around; align-items: center; color: var(--dim); font-size: 10px; }
.toast { position: absolute; top: 24px; left: 50%; transform: translateX(-50%) translateY(-20px); max-width: 536px; padding: 12px 18px; background: #242831; border: 1px solid rgba(255,255,255,.2); border-radius: 22px; opacity: 0; pointer-events: none; z-index: 30; font-size: 14px; transition: .25s ease; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (min-width: 601px), (min-height: 601px) {
  body { display: grid; place-items: center; min-width: 100vw; min-height: 100vh; }
  .app-root { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 30px 90px rgba(0,0,0,.55); }
}
