/* Dev Go: the developer hub for a phone. Calm and quick: one column, big type, big taps, nothing that scrolls sideways. */
:root {
  --ink: #14110A; --ink2: #1D180E; --ink3: #2A2110; --line: #3A2F18;
  --gold: #CFA53C; --gold-lt: #EBD597; --gold-dk: #9A7A22;
  --ivory: #F6F2EA; --mute: #B7AB90; --dim: #8F836A;
  --good: #7FBF9E; --bad: #E8806F; --warn: #E3A94F;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; background: var(--ink); color: var(--ivory); font: 16px/1.5 'DM Sans', system-ui, sans-serif; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; text-align: left; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.ti { line-height: 1; }
p, h1, h2, h3, div, span, a, button { overflow-wrap: anywhere; }

/* ── gate ── */
.gate { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(120% 90% at 50% 0%, #2A2110 0%, #14110A 60%); overflow-y: auto; }
.gate-card { width: 100%; max-width: 340px; text-align: center; padding: 32px 24px 22px; border: 1px solid var(--line); border-radius: 24px; background: rgba(29, 24, 14, .88); }
.gate-mark { border-radius: 16px; margin-bottom: 12px; }
.gate-name { font-family: 'Playfair Display', serif; font-size: 30px; color: var(--gold-lt); }
.gate-sub { font-size: 14px; color: var(--mute); margin: 2px 0 22px; }
.gate-err { min-height: 22px; margin-top: 10px; font-size: 14px; color: var(--bad); }
.gate-device { display: none; }
.gate-device.show { display: block; }
.gate-device > .ti { font-size: 40px; color: var(--gold); }
.gate-h { font-family: 'Playfair Display', serif; font-size: 22px; margin: 8px 0 6px; }
.gate-device p { font-size: 14.5px; color: var(--mute); margin-bottom: 6px; }
.gate-ver { margin-top: 20px; font-size: 11.5px; color: var(--dim); letter-spacing: .08em; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 54px; padding: 0 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--ink2); font-weight: 600; font-size: 16px; text-align: center; }
.btn:active { background: var(--ink3); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1A1408; }
.btn.gold:active { background: var(--gold-lt); }
.btn.danger { border-color: #7A3A2C; color: #F2B6A8; }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; }

/* ── frame ── */
.app { min-height: 100vh; min-height: 100dvh; background: linear-gradient(165deg, #14110A 0%, #231B0E 100%); }
.top { position: sticky; top: 0; z-index: 20; background: rgba(20, 17, 10, .94); backdrop-filter: blur(10px); padding-top: env(safe-area-inset-top); }
.top-in { display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; padding: 14px 18px 10px; min-height: 64px; }
.top h1 { flex: 1; min-width: 0; font-family: 'Playfair Display', serif; font-weight: 500; font-size: 30px; line-height: 1.15; color: var(--gold-lt); }
.top h1.small { font-size: 20px; }
.icon-btn { flex: none; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 22px; color: var(--gold); }
.icon-btn:active { background: var(--ink3); }
.dotlight { flex: none; width: 46px; height: 46px; display: grid; place-items: center; }
.dotlight i { width: 14px; height: 14px; border-radius: 50%; background: var(--dim); display: block; }
.dotlight.ok i { background: #3FBF83; box-shadow: 0 0 0 5px rgba(63, 191, 131, .18); }
.dotlight.bad i { background: #E5604F; box-shadow: 0 0 0 5px rgba(229, 96, 79, .2); }
.main { max-width: 560px; margin: 0 auto; padding: 8px 18px calc(110px + env(safe-area-inset-bottom)); }
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(20, 17, 10, .97); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(10px); }
.bottom-in { display: flex; max-width: 560px; margin: 0 auto; }
.bt { flex: 1; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--dim); position: relative; text-align: center; }
.bt .ti { font-size: 24px; }
.bt.on { color: var(--gold); }
.bt .n { position: absolute; top: 7px; left: calc(50% + 8px); min-width: 19px; padding: 0 5px; border-radius: 10px; background: var(--bad); color: #1A0A07; font-size: 11.5px; font-weight: 700; text-align: center; }

/* ── text and cards ── */
.hello { font-size: 17px; color: var(--mute); margin: 2px 0 16px; }
.lead { font-size: 15px; color: var(--mute); margin: 0 0 16px; }
.label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin: 26px 0 10px; }
.label:first-child { margin-top: 6px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.card { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 14px 16px; border-radius: 22px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(207, 165, 60, .2); }
a.card, button.card { cursor: pointer; }
a.card:active, button.card:active { background: rgba(207, 165, 60, .1); }
.card.flat { display: block; min-height: 0; }
.card.status { background: rgba(255, 255, 255, .05); }
.card.status.ok { border-color: rgba(63, 191, 131, .4); }
.card.status.bad { border-color: rgba(229, 96, 79, .55); background: rgba(229, 96, 79, .08); }
.tile { flex: none; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: rgba(207, 165, 60, .14); color: var(--gold); font-size: 24px; }
.tile.ok { background: rgba(63, 191, 131, .16); color: #7FD1A6; }
.tile.bad { background: rgba(229, 96, 79, .18); color: #F2A99F; }
.card-b { flex: 1; min-width: 0; }
.card-t { font-size: 18px; font-weight: 600; line-height: 1.25; }
.card-s { font-size: 14.5px; color: var(--mute); margin-top: 2px; }
.chev { flex: none; color: var(--dim); font-size: 20px; }
.pill { flex: none; min-width: 24px; padding: 2px 9px; border-radius: 12px; background: var(--bad); color: #1A0A07; font-size: 13px; font-weight: 700; text-align: center; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 11px; font-size: 12.5px; font-weight: 600; border: 1px solid currentColor; white-space: nowrap; color: var(--mute); }
.chip.urgent { color: var(--bad); } .chip.normal { color: var(--gold); } .chip.good { color: var(--good); }

/* ── segmented ── */
.seg { display: flex; padding: 4px; border-radius: 16px; background: var(--ink2); border: 1px solid var(--line); margin-bottom: 16px; }
.seg button { flex: 1; min-height: 46px; border-radius: 12px; text-align: center; color: var(--mute); font-weight: 600; }
.seg button.on { background: var(--gold); color: #1A1408; }

/* ── requests ── */
.req { display: block; width: 100%; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(207, 165, 60, .18); }
.req:active { background: rgba(207, 165, 60, .1); }
.req-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pdot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.pdot.urgent { background: var(--bad); } .pdot.low { background: var(--dim); }
.req-id { font-size: 13px; color: var(--mute); }
.req-t { font-size: 17px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.req-m { font-size: 13.5px; color: var(--mute); margin-top: 6px; }
.detail h2 { font-size: 22px; line-height: 1.3; font-weight: 600; margin: 4px 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.prose { white-space: pre-wrap; font-size: 16px; line-height: 1.6; color: var(--ivory); }
.log { list-style: none; }
.log li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--mute); }
.log li:first-child { border-top: 0; }
.log b { color: var(--ivory); font-weight: 600; }

/* ── sandbox ── */
.biz { position: relative; margin-bottom: 14px; }
.biz select { width: 100%; min-height: 56px; padding: 0 44px 0 16px; appearance: none; -webkit-appearance: none; border-radius: 16px; background: var(--ink2); border: 1px solid var(--line); font-weight: 600; font-size: 17px; }
.biz::after { content: ''; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.biz select:focus { border-color: var(--gold); outline: none; }
.biz select option { background: #1D180E; }
.warnbar { padding: 12px 14px; border-radius: 16px; background: rgba(227, 169, 79, .12); border: 1px solid rgba(227, 169, 79, .5); color: #F0C987; font-size: 14.5px; margin-bottom: 14px; }
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.count { padding: 12px 6px; border-radius: 18px; text-align: center; background: var(--ink2); border: 1px solid var(--line); min-width: 0; }
.count b { display: block; font-family: 'Playfair Display', serif; font-size: 30px; line-height: 1.1; color: var(--gold-lt); }
.count span { font-size: 13px; color: var(--mute); }
.act { margin-bottom: 12px; padding: 16px; border-radius: 22px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(207, 165, 60, .2); }
.act-h { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.act-h .tile { width: 42px; height: 42px; font-size: 21px; border-radius: 13px; }
.act-t { font-size: 17.5px; font-weight: 600; }
.act-s { font-size: 14.5px; color: var(--mute); margin: 2px 0 12px; }
.qty { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.act.danger { border-color: rgba(229, 96, 79, .45); }

/* ── system check ── */
.verdict { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 22px; margin: 16px 0; background: var(--ink2); border: 1px solid var(--line); }
.verdict.ok { border-color: rgba(63, 191, 131, .5); background: rgba(63, 191, 131, .08); }
.verdict.bad { border-color: rgba(229, 96, 79, .6); background: rgba(229, 96, 79, .09); }
.verdict .tile { width: 54px; height: 54px; font-size: 28px; }
.verdict-t { font-family: 'Playfair Display', serif; font-size: 22px; line-height: 1.2; }
.verdict-s { font-size: 14.5px; color: var(--mute); }
.chk { display: flex; align-items: flex-start; gap: 12px; padding: 13px 2px; border-top: 1px solid var(--line); }
.chk:first-child { border-top: 0; }
.chk .ti { flex: none; font-size: 22px; margin-top: 1px; }
.chk.ok .ti { color: var(--good); } .chk.bad .ti { color: var(--bad); }
.chk-t { font-size: 16px; }
.chk-d { font-size: 14px; color: var(--mute); }
.chk.bad .chk-d { color: #F2B6A8; }

/* ── more ── */
.dev { padding: 14px 16px; margin-bottom: 10px; border-radius: 20px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(207, 165, 60, .2); }
.dev-h { display: flex; align-items: center; gap: 12px; }
.dev-h .ti { font-size: 26px; color: var(--gold); flex: none; }
.dev-n { font-weight: 600; font-size: 16.5px; }
.dev-m { font-size: 13.5px; color: var(--mute); }
.dev .actions { display: flex; gap: 10px; margin-top: 12px; }
.dev .actions .btn { flex: 1; min-height: 48px; }
.note { padding: 14px 16px; border-radius: 18px; background: var(--ink2); border: 1px solid var(--line); color: var(--mute); font-size: 14px; }
.empty { padding: 26px 16px; text-align: center; color: var(--mute); border: 1px dashed var(--line); border-radius: 20px; }
.err { padding: 14px 16px; border-radius: 18px; background: #3A1A14; border: 1px solid #7A3A2C; color: #F2B6A8; font-size: 14.5px; }
.linkrow { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 4px; border-top: 1px solid var(--line); font-size: 16.5px; font-weight: 500; }
.linkrow:first-child { border-top: 0; }
.linkrow .ti:first-child { font-size: 22px; color: var(--gold); flex: none; }
.linkrow span { flex: 1; min-width: 0; }
.linkrow .chev { font-size: 18px; }

/* ── sheet (asks before anything big) ── */
.sheet-bg { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: #1D180E; border: 1px solid rgba(207, 165, 60, .3); border-bottom: 0; border-radius: 26px 26px 0 0; padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); }
.sheet-grip { width: 44px; height: 4px; border-radius: 4px; background: rgba(243, 236, 217, .25); margin: 0 auto 16px; }
.sheet h3 { font-family: 'Playfair Display', serif; font-weight: 500; font-size: 23px; margin-bottom: 8px; }
.sheet p { color: var(--mute); font-size: 15.5px; margin-bottom: 18px; white-space: pre-line; }
.sheet .row { display: flex; gap: 10px; }
.sheet .row .btn { flex: 1; }

.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 13px 18px; border-radius: 16px; background: var(--gold); color: #1A1408; font-weight: 600; font-size: 15px; z-index: 90; display: none; text-align: center; }
.toast.show { display: block; }

@media (min-width: 700px) { .main { padding-top: 16px; } }
@media (prefers-reduced-motion: no-preference) { .sheet { animation: rise .18s ease-out; } @keyframes rise { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } } }
