/* Poncho's dashboard (the companion app, docs/PLAN_COMPANION.md). The game's "Old Stone" look, one dark theme.
   No third-party requests: the font and images are ours. */

@font-face {
  font-family: "Poncho Pixel";
  src: url("pixel.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #141b1b;
  --band: #1d2423;
  --title-bg: #2a261e;
  --slot: #3a362c;
  --panel: #4a463a;
  --text: #ffe8a8;
  --title: #ffd24a;
  --muted: #c0b088;
  --accent: #ffb020;
  --good: #8fd06b;
  --bad: #e8735a;
  --bronze: #8a6a3a;
  --pixel: "Poncho Pixel", ui-monospace, Consolas, monospace;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
.px { image-rendering: pixelated; }
p { margin: 0; }
h1, h2, .brand { font-family: var(--pixel); font-weight: 400; color: var(--title); word-spacing: 0.4em; margin: 0; }
h1 { font-size: 28px; line-height: 1.3; }
h2 { font-size: 22px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.top {
  display: flex; align-items: center; gap: 10px;
  background: var(--title-bg); border-bottom: 2px solid var(--bronze);
  padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
}
.brand { font-size: 18px; flex: 1; }
main { max-width: 520px; margin: 0 auto; padding: 20px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px)); }
.screen { display: flex; flex-direction: column; gap: 14px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }
.big { font-size: 22px; font-weight: 600; }
.mono { font-family: var(--mono); }
.label { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }
.msg { color: var(--bad); min-height: 1.5em; }

.card { background: var(--band); border: 2px solid var(--slot); border-radius: 6px; padding: 12px 14px; min-width: 0; }
#run-card.on { border-color: var(--good); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.meter { height: 8px; background: var(--slot); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.fill { height: 100%; width: 0; }
.fill.heat { background: var(--accent); }
.fill.heat.hot { background: var(--bad); }
.fill.mood { background: var(--good); }

.btn {
  font: inherit; font-weight: 600; color: var(--text);
  background: var(--panel); border: 2px solid var(--bronze); border-radius: 6px;
  padding: 10px 16px; min-height: 44px; cursor: pointer;
}
.btn.main { background: var(--accent); color: #1b1608; border-color: #c88410; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: default; }
.link { font: inherit; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; min-height: 44px; }
.row { display: flex; gap: 8px; }
input { font: inherit; flex: 1; min-width: 0; background: var(--band); color: var(--text); border: 2px solid var(--slot); border-radius: 6px; padding: 8px 10px; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--slot); }
.list .info { flex: 1; min-width: 0; }
.list .name { font-family: var(--mono); font-size: 15px; background: none; border: 0; color: var(--title); padding: 0; cursor: pointer; text-align: left; overflow-wrap: anywhere; }
.badge { font-size: 12px; font-weight: 600; color: #15240c; background: var(--good); border-radius: 4px; padding: 3px 8px; }
pre { margin: 8px 0 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 50vh; overflow: auto; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex;
  background: var(--title-bg); border-top: 2px solid var(--bronze);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab { flex: 1; font: inherit; font-weight: 600; background: none; border: 0; color: var(--muted); min-height: 56px; cursor: pointer; }
.tab.on { color: var(--title); }
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  max-width: 488px; margin: 0 auto; background: var(--panel); border: 2px solid var(--bronze); border-radius: 6px;
  padding: 10px 14px;
}
.toast.bad { border-color: var(--bad); }
