:root {
  color-scheme: dark;
  --bg: #16100d;
  --bg-deep: #100b09;
  --panel: #241a15;
  --panel-2: #2d211b;
  --line: #3d2e26;
  --text: #f7ece1;
  --muted: #c3ab9c;
  --dim: #98806f;
  --amber: #f0b26b;
  --amber-deep: #d9914b;
  --moss: #9ec48a;
  --blush: #e79a8b;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 320px;
  background:
    radial-gradient(140% 80% at 50% -20%, #33231a 0%, rgba(22, 16, 13, 0) 60%),
    var(--bg);
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--amber); }

.boot {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  gap: 16px;
  justify-items: center;
  color: var(--muted);
  font-size: 14px;
}
.boot-lamp {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffd8a3, #cf8b46 55%, rgba(207, 139, 70, 0) 72%);
  filter: blur(1px);
  animation: lamp-breathe 4s ease-in-out infinite;
}

.app {
  width: calc(100% - 28px);
  max-width: 430px;
  margin: 0 auto;
  padding: 16px 0 44px;
}

/* ---- top bar ---------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0 14px;
}
.top-title {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.top-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(45, 33, 27, 0.7);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 34px;
}
.top-btn.is-flat { border-color: transparent; color: var(--dim); padding-left: 0; cursor: default; }
.top-gap { width: 34px; }
.top-btn:active { transform: translateY(1px); }

/* ---- shared type ------------------------------------------------------ */

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}
.lede { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.small { margin-top: 10px; color: var(--dim); font-size: 12px; line-height: 1.5; }
.muted { color: var(--dim); font-size: 13px; line-height: 1.5; }
.formula {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(240, 178, 107, 0.08);
  border: 1px dashed rgba(240, 178, 107, 0.3);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.page { display: grid; gap: 18px; }
.page-head h1 { font-size: clamp(26px, 8vw, 34px); }

/* ---- the room ---------------------------------------------------------- */

.room {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(240, 178, 107, 0.16), rgba(36, 26, 21, 0) 62%),
    linear-gradient(180deg, #241a15 0%, #1d1511 62%, #191110 100%);
  box-shadow: var(--shadow);
  padding: 18px 16px 20px;
  min-height: min(660px, 86dvh);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lamp {
  position: absolute;
  inset: -40px 30% auto 30%;
  height: 220px;
  background: radial-gradient(ellipse at 50% 10%, rgba(255, 214, 165, 0.5), rgba(255, 214, 165, 0) 70%);
  filter: blur(6px);
  pointer-events: none;
  animation: lamp-breathe 7s ease-in-out infinite;
}

.floor {
  position: absolute;
  inset: auto 0 0 0;
  height: 130px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 2px, rgba(0, 0, 0, 0) 2px 44px),
    linear-gradient(180deg, rgba(70, 48, 36, 0.2), rgba(52, 35, 27, 0.85));
  border-top: 1px solid rgba(255, 220, 180, 0.08);
  pointer-events: none;
}

.room-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding-top: 6px;
}

.portrait-stand { position: relative; display: grid; place-items: center; }

.halo {
  position: absolute;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 178, 107, 0.36), rgba(240, 178, 107, 0) 68%);
  animation: lamp-breathe 6s ease-in-out infinite;
  pointer-events: none;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, hsl(var(--hue) 70% 72%), hsl(var(--hue) 55% 44%) 62%, hsl(var(--hue) 45% 26%));
  box-shadow: inset 0 -8px 18px rgba(0, 0, 0, 0.3), 0 10px 26px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 240, 220, 0.25);
  color: #1a120d;
  flex: none;
}
.avatar-xl { width: 118px; height: 118px; animation: idle-float 6.5s ease-in-out infinite; }
.avatar-lg { width: 74px; height: 74px; }
.avatar-md { width: 56px; height: 56px; }
.avatar-art { font-size: 44px; line-height: 1; }
.avatar-lg .avatar-art { font-size: 30px; }
.avatar-md .avatar-art { font-size: 24px; }
.avatar.is-placeholder .avatar-art {
  font-size: 44px;
  font-weight: 700;
  color: rgba(26, 18, 13, 0.72);
}
.avatar.is-placeholder { background: radial-gradient(circle at 36% 30%, hsl(var(--hue) 34% 62%), hsl(var(--hue) 30% 40%) 70%); }

.agent-name { font-size: clamp(24px, 7.5vw, 32px); margin-top: 6px; }
.agent-role { color: var(--muted); font-size: 13px; max-width: 30ch; }
.rank-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(240, 178, 107, 0.34);
  background: rgba(240, 178, 107, 0.12);
  color: #ffd9ad;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(240, 178, 107, 0.9);
}

.bubble {
  position: relative;
  max-width: 32ch;
  margin-top: 6px;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  background: rgba(247, 236, 225, 0.08);
  border: 1px solid rgba(247, 236, 225, 0.12);
}
.thought { color: #f3ddc8; font-size: 13px; line-height: 1.45; font-style: italic; }

.shelf { display: grid; gap: 8px; justify-items: center; width: 100%; }
.shelf-title {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.badges { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0; padding: 0; }
.badge {
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(158, 196, 138, 0.35);
  background: rgba(158, 196, 138, 0.12);
  color: #dbebd2;
}
.shelf-empty { color: var(--dim); font-size: 12px; }

.door-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}
.door {
  appearance: none;
  position: relative;
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #30231c, #241a15);
  color: var(--text);
  border-radius: 120px 120px 14px 14px;
  padding: 18px 12px 12px;
  display: grid;
  gap: 3px;
  font: inherit;
  min-height: 108px;
  align-content: start;
  box-shadow: inset 0 1px 0 rgba(255, 235, 215, 0.08), 0 8px 18px rgba(0, 0, 0, 0.3);
}
.door-light {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 4px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 14px rgba(240, 178, 107, 0.85);
  opacity: 0.65;
}
.door-title { font-size: 14px; font-weight: 600; margin-top: 10px; }
.door-line { font-size: 11px; color: var(--muted); line-height: 1.35; }
.door-meta { font-size: 10px; color: var(--dim); letter-spacing: 0.02em; margin-top: 4px; }
.door:active { transform: translateY(1px); }

/* the empty room ------------------------------------------------------- */

.room.is-empty { justify-items: center; text-align: center; padding-top: 26px; }
.empty-room-body { display: grid; gap: 12px; justify-items: center; max-width: 34ch; margin: auto 0; position: relative; }
.empty-room-body h1 { font-size: clamp(26px, 8vw, 33px); }
.front-doors { display: grid; gap: 10px; width: 100%; margin-top: 8px; }
.front-door {
  appearance: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
  border-radius: 160px 160px 16px 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #33251d, #241a15);
  color: var(--text);
  padding: 20px 16px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 235, 215, 0.08), 0 10px 22px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 4px;
}
.front-door-title { font-size: 16px; font-weight: 600; }
.front-door-line { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ---- hallway ---------------------------------------------------------- */

.hall { display: grid; gap: 16px; }
.hall-actions-row { display: flex; flex-wrap: wrap; gap: 8px; }
.hall-list { display: grid; gap: 10px; }
.hall-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}
.hall-card.is-current { border-color: rgba(240, 178, 107, 0.5); box-shadow: 0 0 0 1px rgba(240, 178, 107, 0.18) inset; }
.hall-body { display: grid; gap: 4px; min-width: 0; }
.hall-body h2 { font-size: 17px; }
.hall-role { color: var(--muted); font-size: 12px; line-height: 1.4; }
.hall-meta { color: var(--dim); font-size: 11px; }
.hall-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }

/* ---- cards, buttons, forms -------------------------------------------- */

.card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}
.card h2 { font-size: 16px; }
.card.is-danger { border-color: rgba(231, 154, 139, 0.4); }

.button {
  appearance: none;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 10px 14px;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.button-primary { background: linear-gradient(180deg, #f7c084, var(--amber-deep)); color: #2a1a10; border-color: rgba(255, 226, 190, 0.5); font-weight: 600; }
.button.is-danger { background: #3a2320; border-color: rgba(231, 154, 139, 0.55); color: #ffc8bd; }
.button[disabled] { opacity: 0.5; cursor: not-allowed; }
.button:active { transform: translateY(1px); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }

.stack-form { display: grid; gap: 10px; }
.stack-form label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
input, textarea {
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: #1c1410;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  min-height: 40px;
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid rgba(240, 178, 107, 0.8);
  outline-offset: 2px;
}

.file-pick {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(240, 178, 107, 0.45);
  background: rgba(240, 178, 107, 0.06);
  font-size: 12px;
  color: var(--muted);
}
input[type="file"] { padding: 8px; background: #1c1410; }

/* ---- the character sheet ---------------------------------------------- */

.sheet { display: grid; gap: 14px; }
.sheet-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.sheet-head h1 { font-size: clamp(22px, 6.6vw, 28px); }
.owner-label { color: var(--dim); font-size: 11px; margin-top: 4px; word-break: break-all; }
.sheet-role { color: var(--muted); font-size: 12px; margin-top: 4px; }

.rank-big { font-size: 22px; font-weight: 600; }
.rank-xp { font-size: 13px; color: var(--dim); font-weight: 400; }
.ladder { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
.ladder li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 12px;
  color: var(--dim);
}
.ladder li.done { color: var(--muted); }
.ladder li.now { border-color: rgba(240, 178, 107, 0.45); background: rgba(240, 178, 107, 0.1); color: #ffe0bb; }
.rung-dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid currentColor; }
.ladder li.done .rung-dot { background: var(--moss); border-color: var(--moss); }
.ladder li.now .rung-dot { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 8px rgba(240, 178, 107, 0.8); }
.rung-min { font-size: 11px; }

.meter { display: grid; gap: 6px; }
.meter-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.meter-top strong { color: var(--text); }
.meter-track { height: 10px; border-radius: 999px; background: #1b1310; border: 1px solid var(--line); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: var(--fill); background: linear-gradient(90deg, var(--amber-deep), var(--amber)); border-radius: 999px; }
.meter-note { font-size: 11px; color: var(--dim); }

.inputs { display: grid; gap: 6px; margin: 0; }
.inputs > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.inputs dt { color: var(--dim); }
.inputs dd { margin: 0; color: var(--muted); text-align: right; }

.xp-lines { display: grid; gap: 8px; }
.xp-lines > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #1d1511; border: 1px solid var(--line); }
.xp-lines span { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.xp-lines strong { font-size: 20px; }
.xp-lines small { font-size: 11px; color: var(--muted); }
.xp-lines .xp-total { border-color: rgba(240, 178, 107, 0.4); background: rgba(240, 178, 107, 0.1); }

.record-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.record-counts span { font-size: 12px; color: var(--muted); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: #1d1511; }
.record-counts strong { color: var(--text); }

.record-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.record-list li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #1d1511; }
.record-list strong { font-size: 13px; }
.record-line { font-size: 12px; color: var(--muted); line-height: 1.4; }
.record-when { font-size: 10px; color: var(--dim); }
.pass { color: var(--moss); font-size: 11px; margin-left: 4px; }
.fail { color: var(--blush); font-size: 11px; margin-left: 4px; }

.value-big { font-size: 24px; font-weight: 600; }
.price { font-size: 18px; font-weight: 600; }
.price-band { font-size: 12px; font-weight: 400; color: var(--amber); }

.key-slot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.key-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; background: var(--amber); box-shadow: 0 0 10px rgba(240, 178, 107, 0.8); }
.key-dot.reference { background: var(--muted); box-shadow: none; }
.key-slot strong { font-size: 13px; }
.key-slot p { font-size: 11px; color: var(--dim); line-height: 1.5; margin-top: 4px; }

.journey { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.journey li { display: grid; gap: 2px; padding-left: 12px; border-left: 2px solid rgba(240, 178, 107, 0.4); }
.journey-when { font-size: 10px; color: var(--dim); }
.journey-where { font-size: 13px; }
.journey-why { font-size: 11px; color: var(--muted); line-height: 1.4; }

.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- play places ------------------------------------------------------ */

.play-grid { display: grid; gap: 10px; }
.play-card, .job-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #2a1f19, #221812);
}
.play-card h2, .job-card h2 { font-size: 16px; }
.play-card p, .job-card p { color: var(--muted); font-size: 12px; line-height: 1.45; }
.play-meta { color: var(--dim) !important; font-size: 11px !important; }

.game-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(240, 178, 107, 0.4);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(240, 178, 107, 0.16), rgba(36, 26, 21, 0) 70%),
    var(--panel);
  box-shadow: var(--shadow);
}
.game-panel h2 { font-size: 18px; }
.question { font-size: 17px; line-height: 1.35; }
.options { display: grid; gap: 8px; }
.option {
  appearance: none;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  padding: 12px 14px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #1d1511;
  color: var(--text);
}
.option[disabled] { cursor: default; }
.option.is-right { border-color: rgba(158, 196, 138, 0.7); background: rgba(158, 196, 138, 0.16); }
.option.is-wrong { border-color: rgba(231, 154, 139, 0.6); background: rgba(231, 154, 139, 0.14); }
.feedback { font-size: 13px; }
.feedback.right { color: var(--moss); }
.feedback.wrong { color: var(--blush); }
.sprint-item { font-size: 20px; font-weight: 600; }
.teach-line { font-size: 14px; color: #f3ddc8; line-height: 1.5; padding: 12px; border-radius: 12px; background: rgba(247, 236, 225, 0.06); border-left: 3px solid var(--amber); }
.stars { display: flex; gap: 8px; }
.star {
  appearance: none;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #1d1511;
  color: var(--text);
}
.star:active { background: rgba(240, 178, 107, 0.2); }
.memory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.memory-card {
  appearance: none;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  min-height: 64px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #1a1310;
  color: transparent;
  line-height: 1.3;
}
.memory-card.is-up { color: var(--text); border-color: rgba(240, 178, 107, 0.6); background: rgba(240, 178, 107, 0.14); }
.memory-card.is-matched { color: var(--moss); border-color: rgba(158, 196, 138, 0.6); background: rgba(158, 196, 138, 0.14); }

/* ---- adopt and bring your own ----------------------------------------- */

.shelf-grid { display: grid; gap: 12px; }
.shelf-card {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #2b1f19, #221812);
  min-width: 0;
}
.shelf-card h2 { font-size: 17px; }
.shelf-card p { color: var(--muted); font-size: 12px; line-height: 1.45; }
.shelf-persona { color: #f0dccb !important; font-size: 13px !important; }
.adopt-confirm {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(240, 178, 107, 0.5);
  background: rgba(240, 178, 107, 0.08);
}
.adopt-confirm p { color: var(--muted); font-size: 12px; }

.preview-sheet { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }

.rules { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ---- the gate --------------------------------------------------------- */

.report {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
}
.report.ok { border: 1px solid rgba(158, 196, 138, 0.5); background: rgba(158, 196, 138, 0.12); color: #dcecd3; }
.report.bad { border: 1px solid rgba(231, 154, 139, 0.5); background: rgba(231, 154, 139, 0.12); color: #ffd3ca; }

.claim-table { display: grid; gap: 8px; margin-top: 8px; }
.claim-table table { width: 100%; border-collapse: collapse; font-size: 11px; }
.claim-table th, .claim-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.claim-table th { color: var(--dim); font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px; }
.claim-table td { color: var(--muted); word-break: break-word; }
.claim-table tr.disagrees td { color: #ffd3ca; }

.law { font-size: 14px; color: #ffe0bb; line-height: 1.45; }

.drill-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.drill-steps li { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #1d1511; font-size: 12px; }
.drill-steps li.ok strong { color: var(--moss); }
.drill-steps li.bad strong { color: var(--blush); }
.drill-verdict { font-size: 13px; padding: 10px 12px; border-radius: 12px; }
.drill-verdict.ok { background: rgba(158, 196, 138, 0.14); color: #dcecd3; }
.drill-verdict.bad { background: rgba(231, 154, 139, 0.14); color: #ffd3ca; }

.danger-confirm { display: grid; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid rgba(231, 154, 139, 0.45); background: rgba(231, 154, 139, 0.08); }
.danger-confirm p { color: #ffd3ca; font-size: 12px; line-height: 1.45; }

.empty-place { display: grid; gap: 10px; justify-items: start; padding: 18px; border-radius: var(--radius); border: 1px dashed rgba(240, 178, 107, 0.4); background: rgba(36, 26, 21, 0.7); }
.empty-place h2 { font-size: 18px; }
.empty-place p { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ---- SAMPLE labels ---------------------------------------------------- */

.tag {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 6px;
  vertical-align: middle;
  border: 1px solid rgba(231, 154, 139, 0.55);
  background: rgba(231, 154, 139, 0.14);
  color: #ffd0c6;
}

/* ---- notices --------------------------------------------------------- */

.notice {
  position: sticky;
  top: 8px;
  z-index: 5;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid rgba(240, 178, 107, 0.4);
  background: rgba(41, 30, 23, 0.96);
  color: #ffe2bd;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
.notice.bad { border-color: rgba(231, 154, 139, 0.55); color: #ffd3ca; }

/* ---- narrow phones: 320px must survive -------------------------------- */

@media (max-width: 360px) {
  .app { width: calc(100% - 20px); padding-top: 10px; }
  .room { padding: 14px 12px 16px; border-radius: 22px; gap: 14px; min-height: min(600px, 88dvh); }
  .avatar-xl { width: 96px; height: 96px; }
  .avatar-xl .avatar-art { font-size: 36px; }
  .halo { width: 128px; height: 128px; }
  .agent-name { font-size: 23px; }
  .door { padding: 15px 10px 10px; min-height: 98px; border-radius: 90px 90px 12px 12px; }
  .door-title { font-size: 13px; }
  .door-line { font-size: 10px; }
  .door-grid { gap: 8px; }
  .topbar { gap: 6px; }
  .top-btn { font-size: 11px; padding: 7px 9px; }
  .top-title { font-size: 10px; letter-spacing: 0.1em; }
  .card, .shelf-card, .play-card, .job-card, .game-panel { padding: 13px; }
  .page-head h1 { font-size: 24px; }
  .lede { font-size: 13px; }
  .sheet-head { grid-template-columns: minmax(0, 1fr); }
  .rank-big { font-size: 20px; }
  .record-counts span { font-size: 11px; }
  .claim-table th, .claim-table td { padding: 5px 6px; }
  .memory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 420px) {
  .door-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@keyframes idle-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.02); }
}

@keyframes lamp-breathe {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .avatar-xl, .halo, .lamp, .boot-lamp { animation: none; }
}
