:root { --bg:#0d1410; --panel:#141d18; --ink:#e8f2ea; --dim:#9db3a6; --accent:#8fd694; --accent2:#f0b64b; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-user-select: none; user-select: none; }
.boot { padding: 40px; color: var(--dim); font-size: 15px; }

.glade { display: flex; height: 100vh; width: 100vw; overflow: hidden; }
.stage { position: relative; flex: 1 1 auto; min-width: 0; background: #06110c; display: flex; align-items: center; justify-content: center; }
canvas#glade { width: 100%; height: 100%; object-fit: contain; touch-action: none; display: block; }

.hud-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between;
    pointer-events: none; gap: 10px; }
.mood { background: rgba(10,20,14,.62); backdrop-filter: blur(6px); border: 1px solid rgba(143,214,148,.25);
    padding: 7px 13px; border-radius: 999px; font-size: 15px; letter-spacing: .2px; }
.mood-fled { border-color: rgba(240,120,80,.5); color: #ffd7c2; }
.mood-feeding { border-color: rgba(240,182,75,.5); color: #ffe6ad; }
.clock { background: rgba(10,20,14,.62); backdrop-filter: blur(6px); border: 1px solid rgba(143,214,148,.18);
    padding: 7px 13px; border-radius: 999px; font-size: 13px; color: var(--dim); }
.hud-hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); pointer-events: none;
    background: rgba(10,20,14,.5); padding: 6px 12px; border-radius: 8px; font-size: 12px; color: var(--dim); white-space: nowrap; }

.lockbar { position: absolute; inset: 0; background: rgba(4,10,7,.4); display: flex; align-items: flex-end; justify-content: center;
    padding-bottom: 44px; }
.slidewrap { position: relative; width: min(80%, 420px); }
.slidewrap input[type=range] { width: 100%; height: 46px; }
.slidelabel { position: absolute; top: -26px; left: 0; right: 0; text-align: center; color: var(--accent); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }

.panel { flex: 0 0 300px; max-width: 300px; background: var(--panel); border-left: 1px solid #23312a;
    padding: 16px 16px 22px; overflow-y: auto; }
.panel h1 { margin: 0 0 2px; font-size: 21px; font-weight: 700; }
.panel h1 span { color: var(--accent); }
.tag { margin: 0 0 14px; color: var(--dim); font-size: 12px; }
.seg { border-top: 1px solid #26332c; padding: 12px 0; }
.lab { font-size: 12px; color: var(--dim); margin-bottom: 7px; }
.row { display: flex; gap: 8px; margin-bottom: 8px; }
.grid5 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
button { flex: 1; background: #1d2a23; color: var(--ink); border: 1px solid #2f4038; border-radius: 8px;
    padding: 9px 8px; font-size: 13px; cursor: pointer; transition: background .12s, border-color .12s; }
button:hover { background: #263630; }
button.on { background: #26492f; border-color: var(--accent); color: #eafce9; }
button.wide { flex: 1 1 100%; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 26px; touch-action: none; }

.stateline { display: flex; align-items: center; gap: 10px; }
.pill { padding: 4px 11px; border-radius: 999px; font-size: 12px; background: #24382c; border: 1px solid #365; }
.pill-fled { background: #4a2418; border-color: #a5502f; color: #ffd7c2; }
.pill-feeding { background: #4a3c14; border-color: #b5892f; color: #ffe6ad; }
.ar { font-size: 11px; color: var(--dim); display: flex; align-items: center; gap: 5px; }
.arbar { display: inline-block; width: 66px; height: 7px; background: #22302a; border-radius: 5px; overflow: hidden; }
.arfill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), #f06a3c); transition: width .1s; }
.note { font-size: 11px; color: var(--dim); line-height: 1.45; margin: 8px 0 0; }

@media (max-width: 760px) {
  .glade { flex-direction: column; }
  .panel { flex: 1 1 auto; max-width: none; border-left: none; border-top: 1px solid #23312a; }
  .stage { flex: 0 0 52vh; }
}
