:root {
  --night: #0b1020;
  --panel: rgba(18, 28, 52, .9);
  --line: rgba(186, 210, 255, .28);
  --moon: #d7e4ff;
  --glow: #8fd7ff;
  --lilac: #c7b0ff;
  --text: #f4f7ff;
  --muted: #a9b7d4;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-family: Palatino, "Iowan Old Style", "Palatino Linotype", serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--text); overflow: hidden; }
body {
  background:
    radial-gradient(70% 40% at 50% -10%, #24345f 0%, transparent 55%),
    radial-gradient(40% 30% at 100% 100%, #1a2748 0%, transparent 50%),
    var(--night);
}
#glass { height: 100%; max-width: 480px; margin: 0 auto; position: relative; }
.screen {
  position: absolute; inset: 0 0 calc(68px + var(--safe-b)) 0;
  padding: calc(12px + var(--safe-t)) 14px 12px;
  display: flex; flex-direction: column; gap: 10px; overflow: auto;
}
.hidden { display: none !important; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { margin: 0; color: var(--glow); letter-spacing: .08em; font-size: .75rem; }
h1, h2 { margin: 0; font-size: 1.2rem; color: var(--moon); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-weight: 700;
}
.pill img, .mini { width: 22px; height: 22px; object-fit: contain; }
.tag { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.35; }
.path, .list { display: flex; flex-direction: column; gap: 8px; }
.plot, .card {
  display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center;
  padding: 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line);
}
.plot img, .card img { width: 52px; height: 52px; object-fit: contain; }
.plot strong, .card strong { display: block; }
.plot span, .card span { color: var(--muted); font-size: .8rem; }
.plot.on { border-color: var(--glow); box-shadow: 0 0 18px rgba(143, 215, 255, .25); }
.plot.locked, .card.locked { opacity: .55; }
.btn {
  border: 0; border-radius: 16px; padding: 13px 16px; font: inherit; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn img { width: 22px; height: 22px; object-fit: contain; }
.btn.moon { background: linear-gradient(135deg, var(--moon), var(--glow)); color: #0b1020; }
.btn.ghost { background: transparent; color: var(--moon); border: 1px solid var(--line); }
.btn.danger { color: #ffb7c8; border-color: rgba(255, 183, 200, .4); }
.btn:disabled { opacity: .45; }
.card button {
  margin-top: 6px; border: 1px solid var(--line); background: transparent; color: var(--moon);
  border-radius: 10px; padding: 6px 8px; font: inherit; cursor: pointer;
}
.tog {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 14px;
  border-radius: 14px; background: var(--panel); border: 1px solid var(--line);
}
.dock {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(480px, 100%); display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 4px calc(8px + var(--safe-b)); background: rgba(8, 12, 24, .96);
  border-top: 1px solid var(--line); z-index: 8;
}
.dock button {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: .58rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.dock button img { width: 18px; height: 18px; object-fit: contain; }
.dock button.on { color: var(--glow); }
