:root {
  color-scheme: dark;
  --ink: #f5f2ea;
  --muted: #b1aca0;
  --amber: #ffcf45;
  --border: #333029;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
  background: #0b0b0d;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(1100px, calc(100% - 80px)); margin-inline: auto; }
.masthead { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 13px; letter-spacing: .13em; white-space: nowrap; }
.brand-icon { display: inline-flex; align-items: center; gap: 3px; color: var(--amber); }
.brand-icon::before { content: ""; position: absolute; width: 21px; height: 2px; background: currentColor; }
.brand-icon i { z-index: 1; width: 9px; height: 7px; border: 2px solid currentColor; background: #0b0b0d; }
.status { color: var(--muted); font-size: 11px; text-align: right; }
.status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; background: #ffcf45; vertical-align: 1px; }
.status[data-state="ok"]::before { background: #a9ce87; }
.overview { margin: 43px 0 22px; }
h1 { font-family: "Archivo Black", "Arial Black", system-ui, sans-serif; margin: 0 0 9px; font-size: clamp(29px, 6vw, 57px); font-weight: 950; letter-spacing: -.065em; line-height: 1.02; }
h1 span { color: var(--amber); }
.overview p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.stage {
  position: relative;
  height: clamp(230px, 34vw, 330px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  background: radial-gradient(ellipse at 50% 53%, #30251a 0%, #191719 32%, #111114 66%);
}
.stage::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: linear-gradient(#eee0bf0b 1px, transparent 1px), linear-gradient(90deg,#eee0bf0b 1px,transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at center, black 10%, transparent 86%);
}
.stage::after {
  position: absolute;
  inset: 9px;
  content: "";
  pointer-events: none;
  --edge: #a18043;
  background: linear-gradient(var(--edge),var(--edge)) top left / 11px 1px,
    linear-gradient(var(--edge),var(--edge)) top left / 1px 11px,
    linear-gradient(var(--edge),var(--edge)) top right / 11px 1px,
    linear-gradient(var(--edge),var(--edge)) top right / 1px 11px,
    linear-gradient(var(--edge),var(--edge)) bottom left / 11px 1px,
    linear-gradient(var(--edge),var(--edge)) bottom left / 1px 11px,
    linear-gradient(var(--edge),var(--edge)) bottom right / 11px 1px,
    linear-gradient(var(--edge),var(--edge)) bottom right / 1px 11px;
  background-repeat: no-repeat;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.portrait { width: 90px; height: 146px; position: relative; filter: drop-shadow(6px 5px 0 #0e0c0d); }
.portrait i { position: absolute; display: block; }
.cap { inset: 0 12px auto; height: 24px; background: #222126; border-top: 5px solid #424047; z-index: 1; }
.cap::after { content: ""; position: absolute; inset: 12px -7px auto; height: 7px; background: #121014; }
.face { inset: 19px 17px auto; height: 42px; background: #c28861; border-bottom: 7px solid #8a5d4b; }
.glasses { inset: 28px 10px auto; height: 14px; border-inline: 28px solid var(--amber); background: #c79522; }
.hoodie { inset: 59px 5px auto; height: 43px; background: #222126; border: solid #38363c; border-width: 5px 12px 0; }
.legs { inset: 102px 17px auto; height: 30px; border-inline: 25px solid #303037; }
.shoes { inset: 132px 11px auto; height: 10px; border-inline: 31px solid #989389; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 15px; }
.card { min-width: 0; padding: 16px 14px; border: 1px solid var(--border); background: #131316; }
.card-heading { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.card h2 { font-size: 12px; margin: 0; font-weight: 650; line-height: 1.3; }
.metric-icon { position: relative; display: inline-block; width: 15px; height: 13px; flex: none; color: var(--amber); }
.metric-icon::before, .metric-icon::after { content: ""; position: absolute; }
.people::before { width: 5px; height: 5px; background: currentColor; top: 0; left: 3px; box-shadow: 6px 2px 0 -1px currentColor; }
.people::after { width: 10px; height: 5px; background: currentColor; bottom: 1px; box-shadow: 5px 0 0 -1px currentColor; }
.play { border: 2px solid currentColor; }
.play::before { border: 3px solid transparent; border-left: 4px solid currentColor; top: 2px; left: 4px; }
.chat { border: 2px solid currentColor; height: 10px; }
.chat::after { background: currentColor; width: 4px; height: 3px; left: 1px; bottom: -4px; }
.mail { border: 2px solid currentColor; }
.mail::before { width: 6px; height: 6px; transform: rotate(45deg); border: solid currentColor; border-width: 0 2px 2px 0; top: -1px; left: 2px; }
.number { margin: 11px 0 6px; font-size: clamp(26px, 4vw, 40px); font-weight: 750; letter-spacing: -.085em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; line-height: 1; }
.period { margin: 0; color: var(--amber); font-size: 11px; line-height: 1.45; }
.detail { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.period:empty, .detail:empty { display: none; }
footer { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; padding: 19px 0 27px; line-height: 1.6; }
@media (max-width: 800px) {
  main { width: min(100% - 40px, 680px); }
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 430px) {
  main { width: calc(100% - 24px); }
  .masthead { min-height: 54px; }
  .overview { margin-top: 28px; }
  .metrics { gap: 8px; }
  .card { padding: 11px; }
  footer { flex-wrap: wrap; }
}
.login { width: min(100%, 520px); margin: clamp(50px, 12vh, 120px) auto; padding: clamp(22px, 5vw, 44px); border: 1px solid var(--border); background: #131316; }
.login > .brand-icon { margin-bottom: 20px; }
.login p { font-size: 13px; line-height: 1.5; color: var(--muted); }
.login .button { display: inline-block; border: 0; cursor: pointer; font-family: inherit; margin-top: 12px; padding: 12px 17px; background: var(--amber); color: #111; text-decoration: none; font-size: 13px; font-weight: 750; }
.login .button:hover { background: #ffe18a; }
.login .button:focus-visible, .logout:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.login-error:empty { display: none; }
.login .login-error { color: #ffbb9f; margin-bottom: 0; }
.masthead aside { display: flex; align-items: center; gap: 14px; }
.logout { appearance: none; border: 0; padding: 5px 0; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; white-space: nowrap; }
.logout:hover { color: var(--ink); }
.login label { display: block; margin: 22px 0 7px; font-size: 12px; color: var(--muted); }
.login input { display: block; width: 100%; max-width: 350px; padding: 12px; border: 1px solid #73654c; border-radius: 0; background: #0b0b0d; color: var(--ink); font: inherit; }
.login input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
