:root {
  --bg: #0b0d12;
  --bg-2: #10131a;
  --card: #141821;
  --card-2: #191e29;
  --line: #232937;
  --line-2: #2d3446;
  --text: #e8ebf2;
  --text-2: #a3abbd;
  --text-3: #6f788c;
  --accent: #8b7bff;
  --accent-2: #5ec8ff;
  --accent-soft: rgba(139, 123, 255, .14);
  --good: #3ddc97;
  --warn: #ffb547;
  --crit: #ff5d6c;
  --sleep: #7d8597;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px -12px rgba(0,0,0,.6);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6fa; --bg-2: #eef0f6; --card: #ffffff; --card-2: #f7f8fc; --line: #e3e6ee; --line-2: #d4d9e4;
    --text: #141826; --text-2: #4c5468; --text-3: #8a91a3; --accent-soft: rgba(110, 92, 255, .1);
    --accent: #6e5cff; --shadow: 0 1px 2px rgba(20,24,38,.04), 0 8px 24px -16px rgba(20,24,38,.18);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { overflow-x: clip; }
body {
  font: 14px/1.5 Inter, system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(139,123,255,.12), transparent 60%),
    radial-gradient(900px 400px at -10% 10%, rgba(94,200,255,.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-feature-settings: "tnum" 1, "cv11" 1;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-2); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--text-3); }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px max(16px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid var(--line);
}
/* the blur lives on a layer behind the bar: backdrop-filter on .topbar itself would make it the
   containing block for the phone tab bar (position: fixed), pinning that to the header, not the screen */
.topbar::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; font-size: 16px; }
.brand-mark { display: block; width: 32px; height: 32px; flex: none; }
.tabs { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); padding: 4px; border-radius: 12px; }
.tab { position: relative; display: flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 9px; color: var(--text-2); font-weight: 500; transition: .15s; }
.tab i { font-size: 17px; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.tab-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--crit); color: #fff; font-size: 11px; display: grid; place-items: center; }
.tab-badge.warn { background: var(--warn); color: #241a00; }
.tab-badge.info { background: var(--accent); }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search-trigger { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; color: var(--text-3); min-width: 220px; }
.search-trigger span { flex: 1; text-align: left; }
kbd { font: 11px var(--mono); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; color: var(--text-3); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 18px; color: var(--text-2); }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn.unlocked { color: var(--good); }
.claw-btn { display: flex; align-items: center; gap: 6px; border: 0; padding: 8px 14px; border-radius: 10px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--accent), #b26bff); box-shadow: 0 6px 20px -8px var(--accent); }
.claw-btn:hover { filter: brightness(1.08); }

main { max-width: 1320px; margin: 0 auto; padding: 28px 16px 80px; min-width: 0; }
.view { min-width: 0; }

/* ---------- hero ---------- */
.hero { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; }
h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 4px; font-weight: 700; }
h2 { font-size: 15px; margin: 0; font-weight: 600; letter-spacing: -.005em; }
.hero-sub { margin: 0; color: var(--text-2); display: flex; align-items: center; gap: 8px; font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-up, .dot-ok { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.dot-degraded, .dot-warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.dot-down, .dot-crit { background: var(--crit); box-shadow: 0 0 0 3px color-mix(in srgb, var(--crit) 22%, transparent); animation: pulse 1.6s infinite; }
.dot-unknown, .dot-pending, .dot-sleep, .dot-sleeping { background: var(--sleep); }
.dot-known { background: var(--sleep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 30%, transparent); }
.known-chip { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.known-note { font-size: 12.5px; color: var(--text-2); background: color-mix(in srgb, var(--warn) 8%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--warn) 25%, var(--line)); border-radius: 8px; padding: 5px 9px; }
.tile:has(.dot-known) { opacity: .75; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--crit) 0%, transparent); } }

/* ---------- widgets ---------- */
.widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 32px; }
.widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-height: 150px; display: flex; flex-direction: column; gap: 12px; }
.widget-head { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-weight: 500; font-size: 13px; }
.widget-head i { font-size: 16px; margin-right: 6px; color: var(--text-3); }
.widget-big { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.widget-big small { font-size: 13px; color: var(--text-3); font-weight: 500; margin-left: 4px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; padding: 8px; border-radius: 8px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--card-2); color: var(--text); box-shadow: var(--shadow); }
.seg button.on.ai { color: var(--accent); }
.seg button.on.gaming { color: var(--good); }
.seg button:disabled { opacity: .5; cursor: progress; }
.kv { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.kv b { color: var(--text); font-weight: 600; }
.mini-hosts { display: grid; gap: 7px; }
.mini-host { display: grid; grid-template-columns: 92px 1fr 40px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.mini-host b { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-host span:last-child { text-align: right; font-family: var(--mono); font-size: 11.5px; }

/* ---------- bars ---------- */
.bar { height: 6px; border-radius: 4px; background: var(--bg-2); overflow: hidden; border: 1px solid var(--line); }
.bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .6s ease; }
.bar.warn > i { background: var(--warn); }
.bar.crit > i { background: var(--crit); }

/* ---------- app grid ---------- */
.app-groups { display: grid; gap: 28px; }
.group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.group-head.collapsible { cursor: pointer; user-select: none; border-radius: 8px; margin-left: -6px; padding: 2px 6px; }
.group-head.collapsible:hover { background: color-mix(in srgb, var(--card) 70%, transparent); }
.group-head .chev { font-size: 18px; color: var(--text-3); transition: transform .15s; }
.group-head.closed .chev { transform: rotate(-90deg); }
.group-head .sp { flex: 1; }
.group-head .down-count { color: var(--crit); font-size: 12px; font-weight: 600; }
.link-btn { border: 0; background: transparent; color: var(--text-3); font-size: 12px; padding: 2px 6px; border-radius: 6px; }
.link-btn:hover { color: var(--text); background: var(--bg-2); }
.app-groups section.closed .app-grid { display: none; }
.link-btn.on { color: var(--accent); background: var(--accent-soft); }
.edit-banner { position: sticky; top: 64px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.edit-banner span { flex: 1; color: var(--text-2); }
.edit-banner .ghost-btn { margin: 0; }
.edit-banner i { font-size: 20px; color: var(--accent); }
.app-groups.editing .app-grid { min-height: 84px; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 8px; transition: background .12s, border-color .12s; }
.app-groups.editing .app-grid.drop-over { border-color: var(--accent); background: var(--accent-soft); }
.app-groups.editing .tile { cursor: grab; }
.app-groups.editing .tile:hover { transform: none; }
.app-groups.editing .tile .dot { display: none; }
.tile.dragging { opacity: .35; }
.drop-mark { border: 2px dashed var(--accent); border-radius: var(--radius); min-height: 76px; background: var(--accent-soft); }
.drop-hint { grid-column: 1 / -1; display: grid; place-items: center; color: var(--text-3); font-size: 13px; min-height: 64px; }
.gctl { display: flex; gap: 2px; }
.gctl button { border: 0; background: transparent; color: var(--text-3); width: 30px; height: 28px; border-radius: 7px; font-size: 16px; }
.gctl button:hover:not(:disabled) { background: var(--bg-2); color: var(--text); }
.gctl button:disabled { opacity: .3; }
.app-groups section.closed .group-head { margin-bottom: 0; }
.app-groups { gap: 22px; }
.group-head h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); }
.group-head .count { color: var(--text-3); font-size: 12px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.tile {
  position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center;
  padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s, background .15s; min-height: 76px;
}
.tile:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--card-2); }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.app-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; font-size: 24px; color: var(--accent); }
.app-icon img { width: 30px; height: 30px; object-fit: contain; }
.app-icon.letter { color: #fff; font-weight: 700; font-size: 18px; border: 0; }
.tile-body { min-width: 0; }
.tile-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 18px; }
.tile-desc { color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11.5px; color: var(--text-3); }
.chip { border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; font-size: 11px; color: var(--text-2); background: var(--bg-2); }
.tile .dot { position: absolute; top: 14px; right: 14px; }
.tile-menu { position: absolute; bottom: 8px; right: 8px; opacity: 0; border: 0; background: transparent; color: var(--text-3); font-size: 18px; border-radius: 6px; width: 26px; height: 26px; }
.tile:hover .tile-menu { opacity: 1; }
.tile-menu:hover { background: var(--bg-2); color: var(--text); }
.tile.is-hidden { opacity: .45; }
.ghost-btn { border: 1px solid var(--line); background: transparent; color: var(--text-2); padding: 8px 14px; border-radius: 10px; margin-top: 24px; }
.ghost-btn:hover { color: var(--text); border-color: var(--line-2); }
.primary-btn { border: 0; background: var(--accent); color: #fff; padding: 9px 16px; border-radius: 10px; font-weight: 600; }
.primary-btn:hover { filter: brightness(1.08); }
.danger-btn { border: 1px solid color-mix(in srgb, var(--crit) 40%, transparent); background: transparent; color: var(--crit); padding: 8px 14px; border-radius: 10px; font-weight: 600; }
.menu { position: fixed; z-index: 50; max-height: calc(100vh - 16px); overflow-y: auto; background: var(--card-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 4px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); min-width: 170px; }
.menu button { display: flex; width: 100%; gap: 8px; align-items: center; border: 0; background: transparent; padding: 7px 10px; border-radius: 7px; text-align: left; }
.menu button:hover { background: var(--bg-2); }

/* ---------- monitor ---------- */
.status-banner { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); margin-bottom: 14px; box-shadow: var(--shadow); }
.status-banner .big-dot { width: 14px; height: 14px; }
.status-banner h1 { font-size: 20px; margin: 0; }
.status-banner p { margin: 0; color: var(--text-2); }
.status-banner.ok { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--good) 8%, var(--card)), var(--card)); }
.status-banner.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--warn) 9%, var(--card)), var(--card)); }
.status-banner.crit { border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--crit) 10%, var(--card)), var(--card)); }
.alerts { display: grid; gap: 8px; margin-bottom: 26px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 11px; background: var(--card); border: 1px solid var(--line); }
.alert i { font-size: 18px; }
.alert.crit i { color: var(--crit); } .alert.warn i { color: var(--warn); } .alert.info i { color: var(--accent); }
.alert b { font-weight: 600; }
.alert span { color: var(--text-3); margin-left: auto; font-size: 12.5px; text-align: right; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 28px 0 12px; }
.pve-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 8px; }
.pve-tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.pve-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.pve-tile.offline { opacity: .6; }
.pve-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pve-main small { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pve-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font-size: 12px; color: var(--text-2); }
.pve-go { color: var(--text-3); }
.host-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.host { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.host.offline { opacity: .6; }
.host-head { display: flex; align-items: center; gap: 10px; }
.host-head .host-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 20px; }
.host-head h3 { margin: 0; font-size: 15px; }
.host-head small { color: var(--text-3); display: block; font-size: 12px; }
.host-head .dot { margin-left: auto; }
.metric { display: grid; grid-template-columns: 64px 1fr 92px; gap: 10px; align-items: center; font-size: 12.5px; }
.metric > span:first-child { color: var(--text-3); }
.metric .val { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.metric-stack { display: grid; gap: 4px; }
.spark { width: 100%; height: 22px; display: block; }
.spark path.line { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.spark path.area { fill: var(--accent-soft); }
.spark.gpu path.line { stroke: var(--good); } .spark.gpu path.area { fill: color-mix(in srgb, var(--good) 12%, transparent); }
.host-foot { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--line); padding-top: 10px; }
.host-foot button { border: 0; background: transparent; color: var(--accent); padding: 0; margin-left: auto; font-size: 12px; }
.host-detail { display: grid; gap: 4px; max-height: 260px; overflow: auto; font-size: 12px; }
.row-mini { display: grid; grid-template-columns: 14px 1fr 54px 64px; gap: 8px; align-items: center; padding: 3px 0; color: var(--text-2); }
.row-mini b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.row-mini span { text-align: right; font-family: var(--mono); font-size: 11px; }
.child-tag { font-size: 11px; color: var(--text-3); border: 1px dashed var(--line-2); border-radius: 6px; padding: 0 6px; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px; box-shadow: var(--shadow); }
.disk { display: grid; grid-template-columns: 1fr 120px; gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.disk:last-child { border-bottom: 0; }
.disk b { font-weight: 600; }
.disk small { color: var(--text-3); }
.disk .right { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.disk .bar { grid-column: 1 / -1; height: 8px; }
.heavy-row { display: grid; grid-template-columns: 1fr 70px 80px; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.heavy-row:last-child { border-bottom: 0; }
.heavy-row small { color: var(--text-3); display: block; font-size: 11.5px; }
.heavy-row span { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.table-wrap { padding: 0; overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; color: var(--text-3); padding: 10px 16px; border-bottom: 1px solid var(--line); cursor: pointer; white-space: nowrap; user-select: none; }
.table td { padding: 9px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.num { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.table a:hover { color: var(--accent); }
.state { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- store ---------- */
.store-hero { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.store-hero p { margin: 0; max-width: 620px; }
.target { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 500; }
select, input, textarea { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; outline: none; }
select:focus, input:focus, textarea:focus { border-color: var(--accent); }
.queue { display: grid; gap: 10px; }
.q-empty { color: var(--text-3); padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--radius); text-align: center; }
.q-item, .proj, .cat, .host, .ex-panel, .alert { min-width: 0; }
.q-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 8px; }
.q-item.pending { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.q-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.q-top b { font-size: 15px; }
.q-status { font-size: 11.5px; border-radius: 6px; padding: 1px 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: var(--bg-2); color: var(--text-2); }
.q-status.pending { background: var(--accent-soft); color: var(--accent); }
.q-status.done { color: var(--good); } .q-status.failed { color: var(--crit); } .q-status.deploying, .q-status.approved { color: var(--warn); }
.q-actions { margin-left: auto; display: flex; gap: 8px; }
.q-item p { margin: 0; color: var(--text-2); white-space: pre-wrap; }
details summary { cursor: pointer; color: var(--text-3); font-size: 12.5px; }
pre { font-family: var(--mono); font-size: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow: auto; max-height: 360px; margin: 8px 0 0; }
.catalog-search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; margin-bottom: 14px; }
.catalog-search i { font-size: 20px; color: var(--text-3); }
.catalog-search input { border: 0; background: transparent; flex: 1; padding: 10px 0; font-size: 15px; }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.cat .app-icon { background: #fff; }
.cat h4 { margin: 0; font-size: 14.5px; }
.cat p { margin: 4px 0 10px; color: var(--text-3); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat-foot { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.cat-foot .chip { overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.cat-foot button { margin-left: auto; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); color: var(--accent); border-radius: 9px; padding: 5px 10px; font-weight: 600; font-size: 12.5px; display: flex; gap: 5px; align-items: center; }

/* ---------- apps (installed) ---------- */
.apps-tabs { grid-template-columns: auto auto; }
.apps-tabs button { padding: 8px 16px; }
.apps-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.projects { display: grid; gap: 22px; margin-top: 20px; }
.proj-host h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
.proj-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 10px; }
.proj { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.proj.stopped { opacity: .72; }
.proj-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.proj-top b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-top .chip { flex: none; }
.proj-top .sp { flex: 1; }
.proj-path { font: 11.5px var(--mono); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc { display: flex; flex-wrap: wrap; gap: 5px; }
.svc span { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; background: var(--bg-2); color: var(--text-2); cursor: pointer; }
.svc span:hover { border-color: var(--line-2); color: var(--text); }
.svc .dot { width: 6px; height: 6px; box-shadow: none; animation: none; }
.proj-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.proj-actions button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); border-radius: 8px; padding: 4px 9px; font-size: 12.5px; }
.proj-actions button:hover:not(:disabled) { color: var(--text); border-color: var(--line-2); }
.proj-actions button:disabled { opacity: .4; cursor: not-allowed; }
.proj-actions button.busy { color: var(--accent); }
.proj-actions button.busy i { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.proj-out { font: 11.5px/1.5 var(--mono); background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; max-height: 180px; overflow: auto; margin: 0; }
.proj-out.fail { border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); }
.lock-chip { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.activity { margin-top: 26px; }
.activity summary { font-size: 13px; }
.act-row { display: grid; grid-template-columns: 120px 110px 1fr auto; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.act-row b { color: var(--text); font-weight: 500; }
.editor-modal { width: min(980px, calc(100vw - 32px)); max-height: 88vh; display: flex; flex-direction: column; }
.editor-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ed-tabs { width: max-content; grid-template-columns: auto auto; }
#edText { font: 12.5px/1.55 var(--mono); min-height: 52vh; resize: vertical; tab-size: 2; white-space: pre; }
.diff { font: 12px/1.55 var(--mono); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; min-height: 52vh; max-height: 60vh; overflow: auto; padding: 6px 0; }
.diff div { padding: 0 12px; white-space: pre; }
.diff .add { background: color-mix(in srgb, var(--good) 14%, transparent); color: color-mix(in srgb, var(--good) 70%, var(--text)); }
.diff .del { background: color-mix(in srgb, var(--crit) 14%, transparent); color: color-mix(in srgb, var(--crit) 70%, var(--text)); }
.diff .ctx { color: var(--text-3); }
.diff .gap { color: var(--text-3); text-align: center; font-family: Inter, sans-serif; font-size: 11px; }
.ed-note { margin-right: auto; font-size: 12px; align-self: center; }

/* ---------- demo mode ---------- */
.demo-btn { width: auto; padding: 0 10px; gap: 6px; display: flex; }
.demo-btn .demo-label { display: none; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.demo-btn.on { color: #fff; background: linear-gradient(135deg, #f59e0b, #ef4444); border-color: transparent; }
.demo-btn.on .demo-label { display: inline; }
body.demo .tab[data-tab="logs"], body.demo #clawBtn, body.demo #lockBtn, body.demo #editLayout, body.demo .activity,
body.demo .tile-menu, body.demo [data-ask], body.demo #drawer { display: none !important; }
.gctl button.demo-hidden { color: var(--warn); }

/* ---------- watches ---------- */
.w-form { display: grid; grid-template-columns: 2fr 3fr 1fr 1fr 1fr; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: 16px; }
.w-form textarea { grid-column: 1 / -1; resize: vertical; }
.w-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.w-form-actions .ghost-btn { margin: 0; }
.watches { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; margin-top: 18px; }
.watch { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; box-shadow: var(--shadow); min-width: 0; }
.watch.off { opacity: .6; }
.w-top { display: flex; gap: 10px; align-items: flex-start; }
.w-top b { font-size: 14.5px; line-height: 1.35; }
.w-top .sp { flex: 1; }
.w-state { flex: none; font-weight: 700; font-size: 12px; border-radius: 8px; padding: 3px 9px; white-space: nowrap; }
.w-state.in { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.w-state.out { background: var(--bg-2); color: var(--text-2); border: 1px solid var(--line); }
.w-state.bad { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.w-state.wait { background: var(--accent-soft); color: var(--accent); }
.w-price { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.w-price small { font-size: 12px; color: var(--text-3); font-weight: 500; margin-left: 6px; }
.w-trend { font-size: 12.5px; color: var(--text-3); }
.w-trend b { color: var(--text-2); font-weight: 600; }
.w-trend b.down { color: var(--good); } .w-trend b.up { color: var(--crit); }
.w-sum { color: var(--text-2); font-size: 13px; margin: 0; }
.w-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; color: var(--text-3); align-items: center; }
.w-meta a { color: var(--accent); }
.w-hist { display: flex; gap: 2px; align-items: flex-end; height: 18px; }
.w-hist i { width: 6px; border-radius: 2px; background: var(--line-2); }
.w-hist i.ok.in { background: var(--good); } .w-hist i.ok.out { background: var(--sleep); } .w-hist i.fail { background: var(--warn); } .w-hist i.skip { background: var(--line); }

/* ---------- explore ---------- */
.ex-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.ex-views { display: flex; gap: 6px; align-items: center; margin-right: auto; }
.ex-views select { min-width: 200px; font-weight: 600; }
.ex-ranges { grid-template-columns: repeat(6, auto); }
.ex-ranges button { padding: 6px 12px; }
.ex-ranges button.on { color: var(--accent); }
.ex-custom { display: flex; align-items: center; gap: 6px; }
.ex-custom input { padding: 6px 8px; font-size: 12.5px; }
.ex-custom.on input { border-color: var(--accent); }
.ex-builder { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px; }
.ex-builder select { max-width: 240px; }
.ex-builder .primary-btn { padding: 7px 12px; }
.ex-hint { margin-left: auto; font-size: 12px; }
.ex-panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 14px; }
.ex-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 8px; box-shadow: var(--shadow); min-width: 0; }
.ex-ph { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ex-ph h3 { margin: 0; font-size: 14px; outline: none; border-radius: 6px; padding: 1px 4px; margin-left: -4px; }
.ex-ph h3:focus { background: var(--bg-2); }
.ex-ph .sp { flex: 1; }
.ex-ph button { border: 0; background: transparent; color: var(--text-3); font-size: 17px; border-radius: 6px; width: 28px; height: 28px; }
.ex-ph button:hover { background: var(--bg-2); color: var(--text); }
.ex-chart { min-height: 240px; }
.ex-chart .u-legend { font-size: 12px; color: var(--text-2); text-align: left; }
.ex-chart .u-legend .u-marker { border-radius: 3px; }
.ex-chart .u-legend th { font-weight: 500; }
.ex-chart .u-select { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.ex-chart .u-legend .u-series:first-child { display: none; }
.ex-pf { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-3); padding-top: 4px; }
.ex-pf a { color: var(--accent); cursor: pointer; }
.ex-empty { padding: 50px; text-align: center; color: var(--text-3); border: 1px dashed var(--line-2); border-radius: var(--radius); grid-column: 1 / -1; }
.ex-foot { font-size: 11.5px; margin-top: 14px; }
.ll-filter { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 400; color: var(--text-2); background: var(--accent-soft); border-radius: 8px; padding: 2px 4px 2px 8px; }
.ll-filter button { border: 0; background: transparent; color: var(--text-2); padding: 0 4px; }
.metric.clickable { cursor: pointer; border-radius: 6px; }
.metric.clickable:hover { background: var(--bg-2); }

/* ---------- logs ---------- */
.logs-layout { display: grid; grid-template-columns: 290px 1fr; gap: 14px; height: calc(100vh - 120px); min-height: 520px; }
.log-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.log-side-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.log-side-search i { color: var(--text-3); font-size: 18px; }
.log-side-search input { border: 0; background: transparent; padding: 4px 0; flex: 1; }
.log-sources { overflow: auto; flex: 1; padding: 4px 6px 10px; }
.log-host { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 12px 8px 4px; display: flex; justify-content: space-between; cursor: pointer; user-select: none; }
.log-src { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; width: 100%; border: 0; background: transparent; text-align: left; padding: 6px 8px; border-radius: 8px; color: var(--text-2); font-size: 13px; }
.log-src b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.log-src small { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.log-src small.err { color: var(--crit); } .log-src small.warn { color: var(--warn); }
.log-src:hover { background: var(--bg-2); }
.log-src.sel { background: var(--accent-soft); }
.log-src .mdi { font-size: 12px; color: var(--text-3); }
.log-all { grid-template-columns: 18px 1fr auto; margin: 6px 6px 0; width: calc(100% - 12px); }
.log-all .mdi { font-size: 16px; color: var(--accent); }
.log-stats { font-size: 11.5px; padding: 8px 14px; margin: 0; border-top: 1px solid var(--line); }
.log-main { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.log-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.log-title { font-weight: 600; margin-right: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.log-title small { color: var(--text-3); font-weight: 400; }
.seg-sm { grid-template-columns: repeat(3, auto); }
.seg-sm button { padding: 4px 10px; font-size: 12.5px; }
.seg-sm button.on { color: var(--text); }
.log-q { display: flex; align-items: center; gap: 6px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; }
.log-q i { color: var(--text-3); }
.log-q input { border: 0; background: transparent; padding: 6px 0; width: 160px; }
#logHours { padding: 6px 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; font-weight: 500; }
.chip-btn:hover { color: var(--text); }
.chip-btn.on { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.chip-btn.on .live-dot { background: var(--good); animation: pulse-g 1.6s infinite; }
@keyframes pulse-g { 50% { opacity: .35; } }
.log-lines { flex: 1; overflow: auto; font: 12px/1.6 var(--mono); padding: 8px 0; background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.ll { display: grid; grid-template-columns: 74px auto 1fr; gap: 10px; padding: 1px 14px; white-space: pre-wrap; word-break: break-word; }
.ll:hover { background: var(--bg-2); }
.ll time { color: var(--text-3); }
.ll .src { color: var(--accent-2); white-space: nowrap; cursor: pointer; }
.ll .src:hover { text-decoration: underline; }
.ll.lv-warn { background: color-mix(in srgb, var(--warn) 6%, transparent); }
.ll.lv-warn .m { color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.ll.lv-error { background: color-mix(in srgb, var(--crit) 8%, transparent); }
.ll.lv-error .m { color: color-mix(in srgb, var(--crit) 65%, var(--text)); }
.ll mark { background: color-mix(in srgb, var(--accent) 45%, transparent); color: inherit; border-radius: 3px; }
.ll.day { display: block; color: var(--text-3); text-align: center; padding: 8px; font-family: Inter, sans-serif; font-size: 11.5px; }
.log-empty { padding: 40px; text-align: center; color: var(--text-3); font-family: Inter, sans-serif; }
.row-mini.clickable { cursor: pointer; border-radius: 6px; }
.row-mini.clickable:hover { background: var(--bg-2); }

/* ---------- palette / modal ---------- */
.palette-backdrop { position: fixed; inset: 0; background: rgba(5,6,10,.55); backdrop-filter: blur(4px); z-index: 60; display: grid; place-items: start center; padding-top: 12vh; }
.palette { width: min(620px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette-input i { font-size: 20px; color: var(--text-3); }
.palette-input input { border: 0; background: transparent; flex: 1; font-size: 16px; padding: 0; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.palette li .app-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 18px; }
.palette li .app-icon img { width: 22px; height: 22px; }
.palette li small { color: var(--text-3); margin-left: auto; }
.palette li.sel { background: var(--accent-soft); }
.modal { width: min(440px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; padding: 20px; display: grid; gap: 10px; }
.modal h3 { margin: 0; display: flex; gap: 8px; align-items: center; }
.modal p { margin: 0; font-size: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal .ghost-btn { margin: 0; }
.err { color: var(--crit); min-height: 1em; }

/* ---------- drawer ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 40; background: var(--card); border-left: 1px solid var(--line-2);
  transform: translateX(105%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: -30px 0 60px -30px rgba(0,0,0,.6); }
.drawer:not(.open) { visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-head > div:last-child { display: flex; gap: 6px; }
.drawer-title { display: flex; gap: 10px; align-items: center; }
.drawer-title small { display: block; color: var(--text-3); font-size: 12px; }
.claw-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), #b26bff); font-size: 18px; }
.chat { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 92%; padding: 10px 13px; border-radius: 13px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--bg-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.assistant code { background: var(--card); }
.msg.sys { align-self: center; color: var(--text-3); font-size: 12.5px; text-align: center; max-width: 100%; }
.msg.typing::after { content: "▍"; animation: blink 1s infinite; color: var(--accent); }
.msg .progress { display: flex; flex-direction: column; gap: 8px; white-space: normal; }
.msg .progress + * { margin-top: 8px; }
.status-line { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.status-line i { color: var(--accent); }
.status-line span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-line small { color: var(--text-3); font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; white-space: normal; }
.step { display: grid; grid-template-columns: 16px 1fr; gap: 2px 7px; align-items: start; color: var(--text-2); }
.step i { font-size: 15px; line-height: 1.3; }
.step.done i { color: var(--good); }
.step.failed i { color: var(--warn); }
.step.running i { color: var(--accent); }
.step span { font-family: var(--mono); font-size: 12px; word-break: break-word; }
.step small { grid-column: 2; color: var(--text-3); }
.thinking { font-size: 12px; color: var(--text-3); font-style: italic; border-left: 2px solid var(--line-2); padding-left: 8px; max-height: 4.8em; overflow: hidden; white-space: normal; }
.steps-done { font-size: 12px; color: var(--text-3); margin-bottom: 6px; white-space: normal; }
.steps-done summary { cursor: pointer; }
.steps-done .steps { margin-top: 6px; }
.approval { border: 1px solid var(--warn); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; white-space: normal; }
.approval pre { margin: 0; white-space: pre-wrap; word-break: break-all; font: 12px var(--mono); background: var(--card); padding: 6px 8px; border-radius: 6px; }
.approval div { display: flex; gap: 6px; flex-wrap: wrap; }
.approval button { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--accent); color: #fff; font-size: 12.5px; }
.approval button.ghost { background: var(--bg-2); color: var(--text); }
.chat-input .send.stop { background: var(--crit); }
@keyframes blink { 50% { opacity: 0; } }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.chat-suggest button { border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; }
.chat-suggest button:hover { color: var(--text); border-color: var(--accent); }
.chat-input { display: flex; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.chat-input textarea { flex: 1; resize: none; max-height: 160px; }
.send { width: 40px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-size: 20px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--card-2); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 11px; z-index: 70; box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .brand-name, .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { min-width: 0; }
  .tab { padding: 6px 10px; }
}
@media (max-width: 1000px) {
  .tab span { display: none; }
  .tab { padding: 7px 14px; }
}
@media (max-width: 900px) {
  .search-trigger span, .search-trigger kbd, .claw-btn span, .brand-name { display: none; }
  .search-trigger { min-width: 0; }
  .two-col { grid-template-columns: 1fr; }
  .topbar { gap: 10px; }
}
@media (max-width: 900px) {
  .w-form { grid-template-columns: 1fr 1fr; }
  .w-form #wName, .w-form #wUrl { grid-column: 1 / -1; }
  .watches { grid-template-columns: 1fr; }
  .proj-list { grid-template-columns: 1fr; }
  .act-row { grid-template-columns: 1fr; gap: 2px; }
  .ex-panels { grid-template-columns: 1fr; }
  .ex-hint { display: none; }
  .logs-layout { grid-template-columns: 1fr; height: auto; }
  .log-side { max-height: 260px; }
  .log-main { height: 70vh; }
}
@media (max-width: 640px) {
  .tabs { position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 30; box-shadow: 0 10px 30px -10px rgba(0,0,0,.7); background: var(--card); }
  .tab span { display: none; }
  .tab { padding: 9px 18px; }
  .host-grid { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr 1fr; }
  .tile { grid-template-columns: 1fr; gap: 8px; }
  .tile-desc { display: none; }
  h1 { font-size: 23px; }
  main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .topbar { padding-top: max(12px, env(safe-area-inset-top)); }
}
