:root {
  --bg: #fbf3e8;
  --panel: #fffaf3;
  --ink: #4a3b33;
  --muted: #9a8578;
  --line: #eadccd;
  --accent: #e9895f;
  --accent-ink: #fff;
  --accent-soft: #fde3d4;
  --good: #7bb07b;
  --wall-top: #f6d9c4;
  --wall-bot: #f3cfb5;
  --floor-top: #c9926b;
  --floor-bot: #b47f5a;
  --bubble: #fff;
  --font: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(120, 80, 50, .10);
}


* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden;
  transition: background .4s, color .4s;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ---------- top bar ---------- */
.topbar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 10px 20px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 600; }
.brand-icon { font-size: 1.5rem; }
.stats { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
.level { display: flex; align-items: center; gap: 8px; min-width: 220px; }
.level-num { font-weight: 600; white-space: nowrap; }
.xpbar { flex: 1; height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; min-width: 90px; }
.xpfill { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .6s cubic-bezier(.2, .9, .3, 1.2); }
.xptext { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; white-space: nowrap; box-shadow: var(--shadow); }
.chip.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.18); } }
.controls { display: flex; gap: 8px; align-items: center; }
.icon-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; width: 38px; height: 38px; flex: none; }
.icon-btn.small { width: 32px; height: 32px; font-size: .85rem; }

/* ---------- stage: room in the middle, drawer on the side ---------- */
.stage { flex: 1; min-height: 0; display: flex; gap: 16px; padding: 0 16px 16px; }
.room-area { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.room-wrap { flex: 1; min-height: 0; display: grid; place-items: center; }
.room-box { position: relative; width: 320px; height: 180px; }
#room {
  display: block; width: 100%; height: 100%; border-radius: 10px;
  image-rendering: pixelated; image-rendering: crisp-edges;
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.hud {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  border: 0; border-radius: 0; padding: 4px 10px; font-size: .85rem;
  font-family: 'Pixelify Sans', var(--font); font-weight: 500;
  background: rgba(255, 250, 243, .94); color: #4a3b33;
  box-shadow: 0 -2px 0 0 #2a1430, 0 2px 0 0 #2a1430, -2px 0 0 0 #2a1430, 2px 0 0 0 #2a1430;
  white-space: pre;
}
.hud:hover { background: #fff; }
.sky-chip {
  position: absolute; right: 12px; top: 12px; z-index: 2; cursor: default;
  padding: 4px 10px; font-size: .85rem; white-space: pre;
  font-family: 'Pixelify Sans', var(--font); font-weight: 500;
  background: rgba(255, 250, 243, .94); color: #4a3b33;
  box-shadow: 0 -2px 0 0 #2a1430, 0 2px 0 0 #2a1430, -2px 0 0 0 #2a1430, 2px 0 0 0 #2a1430;
}
.set-pick { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; flex: 1; }
.set-pick select { width: 100%; }

/* under the room: quick add on the left, the menu on the right */
.bar { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.quick {
  display: flex; align-items: center; gap: 6px; flex: 0 1 440px; min-width: 240px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 99px; box-shadow: var(--shadow);
  padding: 5px 5px 5px 18px;
}
.quick:focus-within { border-color: var(--accent); }
.quick input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 7px 0; font-size: 1rem; }
.quick button { border: 0; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 8px 18px; font-weight: 600; }
.quick button:active { transform: scale(.96); }
.focus-btn {
  border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 7px 14px; font-weight: 600;
  box-shadow: var(--shadow); white-space: nowrap;
}
.focus-btn:hover { border-color: var(--accent); }
body.focus .focus-btn { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.dock {
  flex: none; align-self: center; display: flex; gap: 4px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 99px; box-shadow: var(--shadow);
}
.dock button {
  position: relative; display: flex; align-items: center; gap: 6px;
  border: 0; background: none; border-radius: 99px; padding: 9px 16px; font-weight: 600; color: var(--muted);
}
button:focus-visible, .quick input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dock button:hover { color: var(--ink); }
.dock button.on { background: var(--accent-soft); color: var(--ink); }
.badge {
  background: var(--accent); color: var(--accent-ink); border-radius: 99px;
  font-size: .7rem; min-width: 18px; padding: 1px 6px; text-align: center;
}
.badge:empty { display: none; }

.drawer {
  flex: 0 0 400px; min-height: 0; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  animation: slideIn .25s ease-out;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 6px 12px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0 0 0 6px; font-size: 1.2rem; flex: 1; display: none; }
.drawer-tabs { flex: 1; display: flex; gap: 2px; }
.drawer-tabs button {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px;
  border: 0; background: none; border-radius: 12px; padding: 6px 2px 5px; color: var(--muted); font-weight: 600; font-size: .74rem;
}
.drawer-tabs button i { font-style: normal; font-size: 1.15rem; line-height: 1.2; }
.drawer-tabs button:hover { background: var(--bg); color: var(--ink); }
.drawer-tabs button.on { background: var(--accent-soft); color: var(--ink); }
body.focus .drawer-tabs { display: none; }
body.focus .drawer-head h2 { display: block; }
body.focus .drawer-head { border-bottom: 0; padding: 16px 18px 4px; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 20px; }

/* ---------- focus mode: the task list is the page, the room is a small live window ---------- */
.mini-exit { display: none; }
body.focus .bar { display: none; }
body.focus .stage { justify-content: center; }
body.focus .drawer { flex: 1 1 auto; max-width: 720px; animation: none; }
body.focus .drawer-head h2 { font-size: 1.5rem; }
body.focus #drawerClose { display: none; }
body.focus .room-area { position: fixed; right: 20px; bottom: 20px; z-index: 20; width: 336px; flex: none; gap: 0; }
body.focus .room-wrap { flex: none; height: 189px; }

body.focus #room { box-shadow: 0 12px 32px rgba(40, 20, 30, .28), 0 0 0 2px var(--panel); }
body.focus .hud { display: none; }
body.focus .bubble { font-size: .7rem; padding: 2px 6px 3px; max-width: 180px; --px: 2px; }
body.focus .sky-chip { font-size: .68rem; padding: 1px 6px; right: 8px; top: 8px; }
body.focus .mini-exit {
  display: block; position: absolute; left: 8px; bottom: 8px; z-index: 3; border: 0;
  padding: 3px 8px; font: 500 .8rem 'Pixelify Sans', var(--font); color: #4a3b33; background: rgba(255, 250, 243, .94);
  box-shadow: 0 -2px 0 0 #2a1430, 0 2px 0 0 #2a1430, -2px 0 0 0 #2a1430, 2px 0 0 0 #2a1430;
}
@media (min-width: 1100px) { body.focus .stage { padding-right: 376px; } }

/* ---------- dragging an outfit onto a pet ---------- */
.shop-item.draggable { cursor: grab; }
.drag-ghost {
  position: fixed; z-index: 200; pointer-events: none; width: 44px; height: auto;
  transform: translate(-50%, -70%) rotate(-8deg); image-rendering: pixelated;
  filter: drop-shadow(0 6px 6px rgba(40, 20, 30, .3));
}
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none; }

@media (max-width: 900px) {
  body.focus .room-area { position: static; width: auto; }
  body.focus .room-wrap { height: 170px; }
  body { height: auto; overflow: auto; }
  .stage { flex-direction: column; padding: 0 12px 16px; }
  .room-wrap { flex: none; height: calc((100vw - 24px) * 9 / 16); }
  .drawer { flex: none; }
  .dock button span { display: none; }
  .level { min-width: 160px; }
}

/* ---------- tasks & bosses ---------- */
/* ---------- add form ---------- */
.add-form input[type="text"] {
  width: 100%; padding: 14px 16px; border-radius: calc(var(--radius) - 6px);
  border: 2px solid var(--line); background: var(--bg); outline: none; font-size: 1.05rem;
}
.add-form input[type="text"]:focus { border-color: var(--accent); }
.add-options { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 6px 14px; }
.seg button.on { background: var(--accent-soft); font-weight: 600; }
select { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 6px 12px; }
.add-btn {
  margin-left: auto; border: 0; background: var(--accent); color: var(--accent-ink);
  padding: 7px 22px; border-radius: 99px; font-weight: 600;
}
.add-btn:active { transform: scale(.96); }

/* ---------- task lists ---------- */
.list-title { font-size: 1.05rem; margin: 22px 0 8px; display: flex; gap: 8px; align-items: center; }
.count { color: var(--muted); font-weight: 400; font-size: .9rem; }
.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.task {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: calc(var(--radius) - 8px); background: var(--bg); border: 1px solid transparent;
  transition: transform .2s, opacity .3s, border-color .2s;
}
.task:hover { border-color: var(--line); }
.task.leaving { transform: translateX(30px); opacity: 0; }
.task.entering { animation: enter .3s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(-6px); } }
.check {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--accent); background: none; display: grid; place-items: center; font-size: .8rem;
}
.check:hover { background: var(--accent-soft); }
.done .check { background: var(--good); border-color: var(--good); color: #fff; }
.title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.done .title { text-decoration: line-through; color: var(--muted); }
.title[contenteditable="true"] { outline: 2px solid var(--accent); border-radius: 4px; padding: 0 4px; }
.tag { font-size: .72rem; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); white-space: nowrap; }
.tag.over { background: #f6c8c0; color: #8a2e1f; }
.tag.rep { background: none; border: 1px solid var(--line); color: var(--muted); }
.del, .undo { border: 0; background: none; color: var(--muted); opacity: 0; padding: 2px 6px; border-radius: 6px; }
.task:hover .del, .task:hover .undo, .del:focus, .undo:focus { opacity: 1; }
.del:hover { color: #c0503a; }
.empty { color: var(--muted); text-align: center; padding: 14px 0 0; margin: 0; }
.empty:empty { display: none; }
.later { margin-top: 18px; }
.later summary { cursor: pointer; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.later .task { opacity: .75; }
.done-title { color: var(--muted); }
@media (hover: none) { .del, .undo { opacity: .6; } }

/* ---------- bosses ---------- */
.boss-btn {
  border: 1px dashed var(--accent); background: none; color: var(--ink);
  padding: 6px 14px; border-radius: 99px; font-weight: 600;
}
.boss-btn:hover { background: var(--accent-soft); }
.boss-list { display: flex; flex-direction: column; gap: 10px; }
.boss {
  border: 2px solid var(--line); border-radius: calc(var(--radius) - 6px);
  padding: 12px 14px; background: var(--bg); transition: transform .3s, opacity .5s;
}
.boss-top { display: flex; align-items: center; gap: 12px; }
.boss-face { font-size: 2.6rem; line-height: 1; flex: none; filter: drop-shadow(0 3px 2px rgba(0,0,0,.2)); }
.boss.hit .boss-face { animation: shake .4s; }
@keyframes shake {
  20% { transform: translateX(-6px) rotate(-8deg); filter: brightness(2) drop-shadow(0 0 6px #f55); }
  50% { transform: translateX(6px) rotate(6deg); }
  80% { transform: translateX(-3px); }
}
.boss.defeated { transform: scale(.9) rotate(-2deg); opacity: 0; }
.boss.defeated .boss-face { animation: spinOut .8s forwards; }
@keyframes spinOut { to { transform: rotate(540deg) scale(0); } }
.boss-info { flex: 1; min-width: 0; }
.boss-name { font-weight: 600; overflow-wrap: anywhere; }
.boss-kind { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hp { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.hpbar { flex: 1; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.hpfill { height: 100%; background: linear-gradient(90deg, #e2564b, #f08a5d); border-radius: 99px; transition: width .5s cubic-bezier(.2,.9,.3,1.2); }
.hptext { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.boss .del { opacity: .5; }
.steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.step { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.step .check { width: 22px; height: 22px; }
.step.done .check { background: var(--good); border-color: var(--good); color: #fff; }
.step.done .title { text-decoration: line-through; color: var(--muted); }
.step-add { margin-top: 6px; width: 100%; border: 1px dashed var(--line); background: none; border-radius: 10px; padding: 7px 10px; outline: none; }
.step-add:focus { border-color: var(--accent); border-style: solid; }
.boss-hint { font-size: .82rem; color: var(--muted); margin: 8px 0 0; }
.dmg {
  position: absolute; font-weight: 800; color: #e2564b; font-size: 1.3rem;
  animation: floatUp .9s ease-out forwards; text-shadow: 0 1px 0 var(--panel);
}
.task .tobos { border: 0; background: none; opacity: 0; padding: 2px 6px; border-radius: 6px; }
.task:hover .tobos, .tobos:focus { opacity: .8; }
.task.stale .tobos { opacity: .8; }
@media (hover: none) { .task .tobos { opacity: .6; } }
.trophy.pop { animation: popIn .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes popIn { from { transform: scale(0); } }

.trophy-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.trophy { font-size: 1.4rem; width: 40px; height: 40px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.stat-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.stat-list li { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg); border-radius: 10px; }

/* ---------- speech bubble (positioned over the room canvas) ---------- */
/* pixel style: square corners cut by one "pixel", hard outline, stepped tail */
.bubble {
  --px: 3px; --line: #2a1430;
  position: absolute; z-index: 3; left: 30%; top: 50%;
  transform: translate(-50%, calc(-100% - 12px + 6px));
  background: var(--bubble); color: var(--ink); padding: 6px 12px 7px;
  font-family: 'Pixelify Sans', var(--font); font-weight: 400; font-size: clamp(.85rem, 1.6vw, 1.05rem); line-height: 1.25;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--line), 0 var(--px) 0 0 var(--line),
    calc(var(--px) * -1) 0 0 0 var(--line), var(--px) 0 0 0 var(--line),
    0 calc(var(--px) * 2) 0 0 rgba(42, 20, 48, .18);
  max-width: 260px; width: max-content; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s steps(2), transform .2s steps(2), left .1s linear, top .1s linear;
  -webkit-font-smoothing: none; font-smooth: never;
}
/* the tail: one pixel-sized block plus its pixels drawn with shadows */
.bubble::after {
  content: ''; position: absolute; left: 50%; top: 100%; width: var(--px); height: var(--px); margin-left: calc(var(--px) * -.5);
  background: var(--bubble);
  box-shadow:
    calc(var(--px) * -1) 0 0 0 var(--bubble), var(--px) 0 0 0 var(--bubble),
    0 var(--px) 0 0 var(--bubble),
    calc(var(--px) * -1) var(--px) 0 0 var(--line), var(--px) var(--px) 0 0 var(--line),
    0 calc(var(--px) * 2) 0 0 var(--line);
}
.bubble.show { opacity: 1; transform: translate(-50%, calc(-100% - 12px)); }
.bubble.left { transform: translate(-18%, calc(-100% - 12px + 6px)); }
.bubble.left.show { transform: translate(-18%, calc(-100% - 12px)); }
.bubble.left::after { left: 18%; }
.bubble.right { transform: translate(-82%, calc(-100% - 12px + 6px)); }
.bubble.right.show { transform: translate(-82%, calc(-100% - 12px)); }
.bubble.right::after { left: 82%; }

/* ---------- shop ---------- */
.tabs {
  display: flex; gap: 3px; margin: 0 -4px 8px; padding: 10px 4px 8px; position: sticky; top: 0; z-index: 2; background: var(--panel);
}
.tabs button {
  flex: 1; border: 1px solid var(--line); background: var(--bg); padding: 7px 6px; border-radius: 99px;
  font-weight: 600; font-size: .85rem; color: var(--muted); white-space: nowrap;
}
.tabs button:hover { color: var(--ink); border-color: var(--accent); }
.tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hint { color: var(--muted); font-size: .85rem; margin: 4px 0 10px; }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.shop.rooms { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.shop-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 6px; border-radius: calc(var(--radius) - 8px);
  background: var(--bg); border: 1px solid var(--line); text-align: center;
  transition: transform .15s, border-color .15s;
}
.shop-item .e { display: grid; place-items: center; min-height: 48px; width: 100%; }
.shop-item .n { font-size: .8rem; line-height: 1.15; }
.shop-item .p { font-size: .8rem; font-weight: 600; }
.shop-item .perk { font-size: .7rem; color: var(--good); line-height: 1.15; }
.shop-item.can:hover { transform: translateY(-2px); border-color: var(--accent); }
.shop-item.owned { opacity: .55; cursor: default; }
.shop-item.locked { opacity: .45; cursor: not-allowed; }
.shop-item.locked .e { filter: grayscale(1); }
.shop-item.poor { cursor: not-allowed; opacity: .75; }
.shop-item.poor .p { color: var(--muted); }
.shop-item.worn { border-color: var(--accent); border-width: 2px; background: var(--accent-soft); }
.shop-item.stored .e { opacity: .5; }
.pix, .pix-icon, .thumb { image-rendering: pixelated; image-rendering: crisp-edges; }
.pix-icon { height: 44px; width: auto; max-width: 92px; object-fit: contain; }
.pix-icon.wide { height: auto; width: 88px; }
.thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 6px; }

/* ---------- pets & eggs ---------- */
.incubator {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px; border-radius: calc(var(--radius) - 6px); background: var(--bg); border: 2px dashed var(--line);
}
.inc-info { flex: 1; min-width: 150px; }
.inc-info .hint { margin: 2px 0 6px; }
.egg-big { width: 48px; height: 60px; }
.egg-big.ready { animation: wobble .5s infinite; }
@keyframes wobble { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.egg-bag { display: flex; align-items: center; gap: 6px; width: 100%; }
.egg-bag .hint { margin: 0; }
.egg-small { width: 24px; height: 30px; }
.eggs .perk { color: var(--muted); }
.pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.pet-card {
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px;
  border-radius: calc(var(--radius) - 8px); background: var(--bg); border: 1px solid var(--line); font-size: .82rem;
}
.pet-card canvas { width: 64px; height: 80px; }
.pet-card.main { border: 2px solid var(--accent); background: var(--accent-soft); }
.pet-card.buddy { border: 2px dashed var(--accent); }
.pet-card.unknown b { color: var(--muted); }
.rar { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pet-btns { display: flex; gap: 4px; margin-top: 4px; }
.pet-btns button { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; width: 30px; height: 26px; font-size: .85rem; color: var(--muted); }
.pet-btns button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }


.trait-tag { font-size: .7rem; color: var(--muted); }
.eye-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; color: var(--muted); }
.eye-tag.rare { color: #c05ad8; font-weight: 700; }
.eye-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.pet-btns button.sell { width: auto; min-width: 30px; padding: 0 6px; }
.pet-btns button.sell.armed { background: #e2564b; border-color: #e2564b; color: #fff; font-weight: 700; }
.pet-btns button:disabled { opacity: .35; cursor: default; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 6px; }
.book-cell {
  display: flex; flex-direction: column; align-items: center; border-radius: 10px; background: var(--bg);
  border: 1px solid var(--line); border-bottom: 3px solid var(--rc, var(--line)); padding: 4px 2px 3px; font-size: .7rem; font-weight: 600;
}
.book-cell canvas { width: 40px; height: 50px; }
.book-cell span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.book-cell.unknown { border-bottom-color: var(--line); }
.book-cell.unknown span { color: var(--muted); }
.row-btns { display: flex; gap: 6px; margin: 0 0 10px; flex-wrap: wrap; }
.row-btns button { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: .82rem; color: inherit; cursor: pointer; }
.row-btns button:hover { border-color: var(--accent); }

/* ---------- breeding ---------- */
.breed-pair { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 4px; }
.breed-slot {
  width: 104px; height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: calc(var(--radius) - 8px); border: 2px dashed var(--line); background: var(--bg); font-size: .85rem; cursor: pointer;
}
.breed-slot.on { border: 2px solid var(--accent); background: var(--accent-soft); }
.breed-slot canvas { width: 64px; height: 80px; }
.breed-slot .hint { margin: 0; }
.breed-heart { font-size: 1.6rem; }
.breed-btn { display: block; width: 100%; margin: 4px 0 6px; }
.breed-btn:disabled { opacity: .5; cursor: default; }
.pet-card.mini { cursor: pointer; font: inherit; font-size: .8rem; color: inherit; }
.pet-card.mini canvas { width: 48px; height: 60px; }
.pet-card.tired { opacity: .45; }

/* ---------- pet look ---------- */
.look-now { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: calc(var(--radius) - 8px); background: var(--accent-soft); }
.look-now .hint { margin: 2px 0 0; }
.look-pets { display: flex; gap: 2px; }
.look-pets canvas { width: 48px; height: 60px; }
.look-now .look-pets canvas { width: 64px; height: 80px; }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.look-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; text-align: center;
  border-radius: calc(var(--radius) - 8px); background: var(--bg); border: 1px solid var(--line); color: inherit; font: inherit;
}
.look-card:hover { border-color: var(--accent); }
.look-card.on { border: 2px solid var(--accent); background: var(--accent-soft); }
.look-card .hint { margin: 0; font-size: .75rem; }
.look-mix { display: flex; flex-direction: column; gap: 8px; }
.mix-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mix-label { width: 72px; font-weight: 600; font-size: .85rem; }
.mix-row .seg button { padding: 5px 11px; font-size: .82rem; }

/* ---------- hatching ---------- */
.hatch { text-align: center; }
.hatch-body { padding: 26px 24px 20px; }
.hatch-stage { display: grid; place-items: center; height: 220px; border-radius: 14px; background: radial-gradient(circle, var(--accent-soft), transparent 70%); transition: background .3s; }
.hatch canvas { width: 160px; height: 200px; image-rendering: pixelated; }
.hatch.flash .hatch-stage { background: radial-gradient(circle, #fff, var(--accent-soft) 70%); }
.hatch.done .hatch-stage canvas { animation: popIn .5s cubic-bezier(.2, 1.6, .4, 1); }
.hatch h2 { margin: 12px 0 0; }
.rarity { margin: 4px 0 0; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.row.center { justify-content: center; }

/* ---------- effects ---------- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.float { position: absolute; font-weight: 600; color: var(--accent); white-space: nowrap; animation: floatUp 1.1s ease-out forwards; text-shadow: 0 1px 0 var(--panel); }
@keyframes floatUp { to { transform: translateY(-60px); opacity: 0; } }
.confetti { position: absolute; font-size: 1.4rem; animation: fall var(--d, 1.6s) ease-in forwards; }
@keyframes fall { to { transform: translate(var(--dx, 0), 70vh) rotate(var(--r, 180deg)); opacity: 0; } }
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 12px 22px; border-radius: 99px;
  opacity: 0; transition: opacity .3s, transform .3s; z-index: 60; font-weight: 600; max-width: calc(100vw - 32px); text-align: center; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- dialogs ---------- */
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .35); }
.settings-body { padding: 22px; }
.settings-body h2 { margin-top: 0; }
.muted { color: var(--muted); font-size: .9rem; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.row button, .file-btn { border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: 7px 16px; cursor: pointer; }
.danger { color: #c0503a; }

/* ---------- test mode ---------- */
.test-chip { border: 2px dashed #9a7bd8; background: #efe7ff; color: #5a3fa0; font-weight: 600; cursor: pointer; }

/* ---------- cats panel: the selected cat, filters, grid ---------- */
.cat-detail {
  display: grid; grid-template-columns: 88px 1fr; gap: 4px 12px; align-items: center;
  padding: 12px; border-radius: calc(var(--radius) - 6px); background: var(--bg); border: 1px solid var(--line);
}
.cd-pic { grid-row: span 1; display: grid; place-items: center; height: 104px; border-radius: 12px; background: radial-gradient(circle at 50% 60%, var(--accent-soft), transparent 72%); }
.cd-pic canvas { width: 80px; height: 100px; }
.cd-info { min-width: 0; }
.cd-name { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cd-name b { font-size: 1.2rem; }
.name-edit { display: inline-flex; align-items: center; gap: 4px; }
.name-edit .rename { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 4px; font-size: .95rem; }
.name-edit .rename:hover { color: var(--ink); }
.name-input { font: 600 1.1rem var(--font, inherit); width: 11em; padding: 2px 6px; border: 2px solid var(--line, #eadccd); border-radius: 6px; background: #fff; color: var(--ink); }
.cd-desc { margin: 2px 0 6px; font-size: .85rem; color: var(--muted); }
.cd-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cd-tags > * { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; }
.cd-acts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.act {
  border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 7px 10px; font-weight: 600; font-size: .85rem;
}
.act:hover:not(:disabled) { border-color: var(--accent); }
.act.on { background: var(--accent-soft); border-color: var(--accent); }
.act:disabled { opacity: .55; cursor: default; }
.act.on:disabled { opacity: 1; }
.act.sell.armed { background: #e2564b; border-color: #e2564b; color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0 8px; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--panel);
  border-radius: 99px; padding: 4px 10px; font-size: .8rem; font-weight: 600; color: var(--muted);
}
.chip-btn small { font-weight: 500; opacity: .8; }
.chip-btn:hover { color: var(--ink); }
.chip-btn.on { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.pet-card.mini { position: relative; }
.pet-card.sel { outline: 3px solid var(--accent); outline-offset: 1px; }
.pet-card .pin { position: absolute; top: 4px; right: 6px; font-size: .75rem; }
[data-ppane="collection"] .row-btns { margin-top: 12px; }
#petGrid, #breedGrid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
#petGrid .pet-card, #breedGrid .pet-card { padding: 6px 2px; font-size: .74rem; }
.breed-slot { width: 128px; height: auto; min-height: 128px; padding: 8px 6px; text-align: center; }
.breed-slot .hint { font-size: .74rem; line-height: 1.25; }

/* =====================================================================
   Pixel frame: hard 2px outlines with notched corners and a solid drop
   underneath, like the speech bubble in the room. Labels, numbers and
   buttons use the pixel font; task text, hints and inputs stay smooth.
   ===================================================================== */
:root {
  --edge: #4a2f3a;          /* dark outline for main frames and selected things */
  --edge-soft: #dcc3ad;     /* light outline for cards inside the panels */
  --drop: rgba(74, 47, 58, .16);
  --accent-dk: #c4683f;
  --pfont: 'Pixelify Sans', var(--font);
}
* {
  --e: var(--edge-soft);
  --pxb: 0 -2px 0 0 var(--e), 0 2px 0 0 var(--e), -2px 0 0 0 var(--e), 2px 0 0 0 var(--e);
}

/* everything square */
.drawer, dialog, .toast, .quick, .dock, .dock button, .focus-btn, .icon-btn, .chip, .test-chip,
.add-btn, .quick button, .boss-btn, .act, .tabs button, .chip-btn, .drawer-tabs button, .seg, .seg button, select,
.row button, .file-btn, .row-btns button, .task, .boss, .shop-item, .pet-card, .book-cell, .look-card, .breed-slot,
.incubator, .cat-detail, .cd-pic, .cd-tags > *, .stat-list li, .trophy, .look-now, .add-form input[type="text"], .step-add,
.xpbar, .xpfill, .hpbar, .hpfill, .badge, .tag, .check, .pet-btns button, #room, .thumb, .del, .undo, .tobos {
  border-radius: 0 !important;
}

/* big frames: dark outline + drop */
.drawer, dialog, .quick, .dock, #room {
  --e: var(--edge); border: 0;
  box-shadow: var(--pxb), 0 8px 0 0 var(--drop);
}
dialog { margin-top: 12vh; }
.toast { --e: var(--edge); box-shadow: var(--pxb), 0 6px 0 0 var(--drop); font-family: var(--pfont); font-weight: 400; font-size: 1.05rem; }
body.focus #room { box-shadow: 0 -3px 0 0 var(--edge), 0 3px 0 0 var(--edge), -3px 0 0 0 var(--edge), 3px 0 0 0 var(--edge), 0 10px 0 0 rgba(40, 20, 30, .22); }

/* small raised things: soft outline, a drop under them, they press down when clicked */
.chip, .focus-btn, .icon-btn, .act, .tabs button, .chip-btn, .row button, .file-btn, .row-btns button, .boss-btn,
.shop-item, .pet-card, .look-card, .seg, select, .pet-btns button {
  border: 0; box-shadow: var(--pxb), 0 5px 0 0 var(--drop);
}
.task, .boss, .book-cell, .breed-slot, .incubator, .cat-detail, .stat-list li, .trophy, .look-now, .cd-tags > * {
  border: 0; box-shadow: var(--pxb);
}
.task:hover { --e: var(--accent); }
.incubator { box-shadow: var(--pxb), inset 0 0 0 2px var(--panel), inset 0 0 0 4px var(--accent-soft); }
.book-cell { box-shadow: var(--pxb), inset 0 -3px 0 0 var(--rc, var(--line)); }
.book-cell.unknown { --rc: var(--line); }
.chip, .focus-btn, .icon-btn, .act, .tabs button, .chip-btn, .row button, .row-btns button, .add-btn, .quick button, .boss-btn, .shop-item.can, .pet-card.mini, .look-card {
  transition: transform .06s steps(1), box-shadow .06s steps(1);
}
.focus-btn:active, .icon-btn:active, .act:active:not(:disabled), .tabs button:active, .chip-btn:active, .row button:active,
.row-btns button:active, .shop-item.can:active, .pet-card.mini:active, .look-card:active, .boss-btn:active {
  transform: translateY(3px); box-shadow: var(--pxb), 0 2px 0 0 var(--drop);
}

/* main action buttons: accent fill, dark outline, darker drop */
.add-btn, .quick button {
  --e: var(--edge); border: 0; box-shadow: var(--pxb), 0 5px 0 0 var(--accent-dk);
  font-family: var(--pfont); font-weight: 400; font-size: 1.05rem; letter-spacing: .02em;
}
.add-btn:active, .quick button:active { transform: translateY(3px); box-shadow: var(--pxb), 0 2px 0 0 var(--accent-dk); }
.quick { padding: 6px 6px 6px 16px; margin: 0 4px 6px; }

/* selected / on states get the dark outline */
.tabs button.on, .chip-btn.on, .act.on, .shop-item.worn, .pet-card.main, .pet-card.sel, .look-card.on, .breed-slot.on,
.dock button.on, .drawer-tabs button.on, body.focus .focus-btn { --e: var(--edge); }
.pet-card.sel { outline: 0; box-shadow: var(--pxb), 0 0 0 4px var(--accent-soft), 0 5px 0 0 var(--drop); }
.shop-item.can:hover, .pet-card.mini:hover, .look-card:hover, .tabs button:hover, .chip-btn:hover, .act:hover:not(:disabled),
.row button:hover, .row-btns button:hover, .focus-btn:hover, .icon-btn:hover { --e: var(--accent); border: 0; }
.tabs button.on:hover, .chip-btn.on:hover, .act.on:hover { --e: var(--edge); }
.dock { padding: 6px; gap: 4px; margin-bottom: 6px; }
.dock button.on, .drawer-tabs button.on { box-shadow: var(--pxb); }

/* the pixel font for words that are big enough to read; numbers and small print stay smooth */
.brand-name, .level-num, .chip, .focus-btn, .dock button span, .drawer-tabs button span, .tabs button, .chip-btn,
.act, .row-btns button, .row button, .file-btn, .boss-btn, .list-title, .drawer-head h2, .settings-body h2, .hatch h2,
.cd-name b, .rarity, .breed-slot b, .look-card b, .shop-item .n, .later summary, .test-chip {
  font-family: var(--pfont); font-weight: 400;
}
.level-num b, .chip b, .chip-btn small, .shop-item .p { font-family: var(--font); font-weight: 600; }
.brand-name { font-size: 1.4rem; }
.list-title { font-weight: 400; font-size: 1.1rem; }
.drawer-tabs button span { font-size: .95rem; font-weight: 400; }
.tabs button { font-size: 1rem; font-weight: 400; }
.act { font-size: 1rem; font-weight: 400; }
.chip-btn { font-size: .95rem; font-weight: 400; }
.shop-item .n { font-size: .95rem; }
.dock button { padding: 8px 14px; font-size: 1.02rem; }
.dock button span { font-weight: 400; }

/* square check boxes */
.check { border: 0; box-shadow: 0 -2px 0 0 var(--accent), 0 2px 0 0 var(--accent), -2px 0 0 0 var(--accent), 2px 0 0 0 var(--accent); width: 22px; height: 22px; margin: 2px; font-family: var(--pfont); }
.done .check, .step.done .check { box-shadow: 0 -2px 0 0 var(--good), 0 2px 0 0 var(--good), -2px 0 0 0 var(--good), 2px 0 0 0 var(--good); }
.step .check { width: 18px; height: 18px; }

/* inputs: square with a pixel outline, smooth text inside */
.add-form input[type="text"], .step-add {
  border: 0; box-shadow: 0 -2px 0 0 var(--line), 0 2px 0 0 var(--line), -2px 0 0 0 var(--line), 2px 0 0 0 var(--line); margin: 2px 0;
}
.add-form input[type="text"]:focus, .step-add:focus {
  box-shadow: 0 -2px 0 0 var(--accent), 0 2px 0 0 var(--accent), -2px 0 0 0 var(--accent), 2px 0 0 0 var(--accent);
}
.step-add { margin-top: 8px; }

/* segmented, blocky bars */
.xpbar, .hpbar { --e: var(--edge); height: 10px; background: #ead9c6; box-shadow: var(--pxb); margin: 0 2px; }
.xpfill { background: repeating-linear-gradient(90deg, var(--accent) 0 5px, var(--accent-dk) 5px 6px); transition: width .4s steps(8); }
.hpfill { background: repeating-linear-gradient(90deg, #e2564b 0 5px, #b83a30 5px 6px); transition: width .4s steps(6); }
.badge { box-shadow: 0 0 0 2px var(--panel); font-family: var(--pfont); }

/* pixel icons */
.ico { font-style: normal; display: inline-grid; place-items: center; line-height: 1; }
.ui-ico { width: 24px; height: 24px; image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.focus-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; }
.focus-btn .ui-ico, .icon-btn .ui-ico { width: 20px; height: 20px; }
.icon-btn { display: grid; place-items: center; }
.drawer-tabs button i { font-size: 0; }

/* pixel scrollbar in the panel */
.drawer-body::-webkit-scrollbar { width: 12px; }
.drawer-body::-webkit-scrollbar-track { background: var(--bg); }
.drawer-body::-webkit-scrollbar-thumb { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--edge-soft); }
.drawer-body::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* details inside the panel */
.drawer-head { border-bottom: 2px solid var(--edge-soft); }
.cd-pic { background: var(--accent-soft); box-shadow: inset 0 -6px 0 0 rgba(74, 47, 58, .08); }

.hud, .sky-chip, .mini-exit { font-weight: 400; }
.add-options { gap: 8px; align-items: center; }
.add-options select { padding: 6px 8px; }
.add-options .seg button { padding: 6px 11px; }
.add-options .boss-btn { padding: 6px 10px; }
#addForm .add-btn { flex: 1 0 100%; margin: 6px 0 4px; padding: 9px; }
body.focus #addForm .add-btn { flex: 0 0 auto; margin: 0 0 0 auto; padding: 7px 22px; }

/* ---------- layout switch: Full / Mini / Focus ---------- */
.mode-seg { display: flex; gap: 2px; padding: 3px; background: var(--panel); --e: var(--edge-soft); box-shadow: var(--pxb), 0 5px 0 0 var(--drop); margin: 2px; }
.mode-seg button {
  display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; border-radius: 0;
  padding: 5px 10px; color: var(--muted); font-family: var(--pfont); font-size: 1rem; font-weight: 400;
}
.mode-seg button:hover { color: var(--ink); background: var(--bg); }
.mode-seg button.on { background: var(--accent-soft); color: var(--ink); --e: var(--edge); box-shadow: var(--pxb); }
.mode-seg .ui-ico { width: 20px; height: 20px; }
@media (max-width: 1000px) { .mode-seg button span { display: none; } .mode-seg button { padding: 5px 8px; } }
/* phones: nothing may be wider than the screen */
@media (max-width: 480px) {
  .hud { max-width: calc(100% - 24px); white-space: normal; text-align: left; }
  .dock { max-width: calc(100vw - 16px); }
  .dock button { padding: 8px 10px; }
  .dock button span:not(.badge) { display: none; }
}

/* Full: the room keeps its size; the menu pops up over it, right above the bar */
.stage { position: relative; }
body.mode-full:not(.focus) .drawer {
  position: absolute; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--bar-h, 64px) + 34px);
  width: min(640px, calc(100% - 32px)); max-height: min(620px, calc(100% - var(--bar-h, 64px) - 48px));
  box-shadow: var(--pxb), 0 8px 0 0 var(--drop), 0 18px 40px rgba(40, 20, 30, .22);
  animation: popUp .16s steps(4) both;
}
@keyframes popUp { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
/* a stepped pixel tail pointing down at the bar */
body.mode-full:not(.focus) .drawer::after {
  content: ''; position: absolute; left: var(--tail-x, 50%); bottom: -12px; width: 18px; height: 10px; margin-left: -9px;
  background: var(--panel);
  clip-path: polygon(0 0, 100% 0, 100% 20%, 78% 20%, 78% 60%, 61% 60%, 61% 100%, 39% 100%, 39% 60%, 22% 60%, 22% 20%, 0 20%);
  filter: drop-shadow(0 2px 0 var(--edge)) drop-shadow(2px 0 0 var(--edge)) drop-shadow(-2px 0 0 var(--edge));
}
body.mode-full:not(.focus) .drawer-tabs { display: none; }
body.mode-full:not(.focus) .drawer-head h2 { display: block; }
body.mode-full:not(.focus) .drawer-head { padding: 10px 10px 8px 14px; }
@media (max-width: 900px) {
  body.mode-full:not(.focus) .drawer {
    position: fixed; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 72vh; transform: none; animation: none;
  }
  body.mode-full:not(.focus) .drawer::after { display: none; }
}

/* Full: room as big as the space allows, a soft glow of the room fills the sides */
.room-wrap { position: relative; }
.room-box { z-index: 1; }
.room-glow { display: none; }
body.mode-full:not(.focus) .room-glow {
  display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  filter: blur(32px) saturate(1.25); opacity: .75;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
body.mode-full:not(.focus) .room-area { gap: 10px; }
body.mode-full:not(.focus) .stage { padding-bottom: 12px; }

/* ---------- bosses, weapons and classes ---------- */
.boss-face canvas { width: 54px; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.boss-kind { text-transform: capitalize; }
.trophy canvas { width: 34px; height: auto; image-rendering: pixelated; image-rendering: crisp-edges; }
.trophy canvas.demon-ico { width: auto; height: auto; max-width: 38px; max-height: 38px; }
.class-list { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.class-list li { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; background: var(--panel); border: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.class-list li b { color: var(--ink); font-weight: 500; font-size: .9rem; }
.class-list li.on { border-color: var(--accent); box-shadow: inset 3px 0 0 0 var(--accent); }
.shop-item.weapon .pix-icon { height: 48px; }
.shop-item.weapon { box-shadow: var(--pxb, none), inset 0 -3px 0 0 var(--rc, var(--line)); }
.pix-icon.unknown { filter: brightness(0) opacity(.25); }

/* ---------- big reveals: rare hatches and boss chests ---------- */
/* --rc = rarity color. t1 rare glow, t2 rays + shake, t3 rainbow rays */
.hatch-stage { position: relative; overflow: hidden; isolation: isolate; }
.hatch-stage canvas { position: relative; z-index: 1; }
.hatch-stage::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; margin: -260px 0 0 -260px; z-index: 0;
  background: repeating-conic-gradient(from 0deg, var(--rc) 0deg 9deg, transparent 9deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%); mask: radial-gradient(circle, #000 18%, transparent 62%);
  opacity: 0; transform: scale(.4); transition: opacity .4s, transform .6s cubic-bezier(.2, 1.4, .4, 1);
}
.hatch.charge .hatch-stage { animation: charge .5s ease-in-out infinite alternate; }
@keyframes charge { from { box-shadow: inset 0 0 0 0 transparent; } to { box-shadow: inset 0 0 50px 4px var(--rc); } }
.hatch.done .hatch-stage { animation: none; }
.hatch.t1.done .hatch-stage { background: radial-gradient(circle, color-mix(in srgb, var(--rc) 35%, transparent), transparent 70%); }
.hatch.t1.done .hatch-stage::before { opacity: .22; transform: scale(1); animation: rays 14s linear infinite; }
.hatch.t2.done .hatch-stage::before { opacity: .5; transform: scale(1); animation: rays 9s linear infinite; }
.hatch.t3.done .hatch-stage::before {
  opacity: .6; transform: scale(1); animation: rays 6s linear infinite;
  background: repeating-conic-gradient(from 0deg, #f25a5a 0deg 8deg, transparent 8deg 20deg, #f5c542 20deg 28deg, transparent 28deg 40deg, #5ac87a 40deg 48deg, transparent 48deg 60deg, #4a9be8 60deg 68deg, transparent 68deg 80deg, #c05ad8 80deg 88deg, transparent 88deg 100deg);
}
.hatch.t2.done .hatch-stage, .hatch.t3.done .hatch-stage { background: radial-gradient(circle, #fff 0, color-mix(in srgb, var(--rc) 45%, transparent) 30%, transparent 72%); }
@keyframes rays { from { rotate: 0deg; } to { rotate: 360deg; } }
.hatch.t2::backdrop, .hatch.t3::backdrop { background: rgba(28, 14, 34, .72); transition: background .4s; }
.hatch.flash.t2 .hatch-stage, .hatch.flash.t3 .hatch-stage { background: #fff; }
.hatch.boom { animation: boom .45s steps(6); }
@keyframes boom { 0%, 100% { translate: 0 0; } 20% { translate: -6px 3px; } 40% { translate: 5px -4px; } 60% { translate: -4px -2px; } 80% { translate: 3px 3px; } }
.hatch.t1.done .rarity, .hatch.t2.done .rarity, .hatch.t3.done .rarity { animation: stamp .45s cubic-bezier(.2, 1.5, .4, 1) both; display: inline-block; }
.hatch.t2.done .rarity, .hatch.t3.done .rarity { font-size: 1.25rem; text-shadow: 0 0 10px color-mix(in srgb, var(--rc) 70%, transparent); }
.hatch.t3.done .rarity { background: linear-gradient(90deg, #f25a5a, #f5c542, #5ac87a, #4a9be8, #c05ad8); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
@keyframes stamp { from { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hatch-stage::before, .hatch.boom, .hatch.charge .hatch-stage, .hatch .rarity { animation: none !important; }
}

/* ---------- cat trail ---------- */
.trail-hud { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.trail-hud .chip { font-size: .85rem; padding: 3px 9px; }
.trail-map { width: 100%; aspect-ratio: 320 / 140; display: block; image-rendering: pixelated; cursor: pointer; }
.trail-stop { display: grid; grid-template-columns: minmax(120px, 42%) 1fr; gap: 12px; align-items: center; margin-top: 10px; }
.trail-scene { width: 100%; aspect-ratio: 3 / 2; display: block; image-rendering: pixelated; }
.trail-stop h3 { margin: 0 0 4px; font-family: var(--pfont); font-weight: 400; font-size: 1.15rem; }
.trail-stop p { margin: 0; color: var(--muted); line-height: 1.4; font-size: .92rem; }
.trail-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.trail-way { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; }
.trail-way canvas { width: 22px; height: 22px; image-rendering: pixelated; }
#trailPick .hint { margin: 12px 0 8px; }
#trailPick > .trail-way { margin-top: 8px; }
.trail-trinkets { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.trinket { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 8px 6px; font-size: .78rem; line-height: 1.3; color: var(--muted); background: var(--panel); }
.trinket canvas { width: 40px; height: 40px; image-rendering: pixelated; }
.trinket.held canvas { width: 30px; height: 30px; }
.trinket b { color: var(--ink); font-weight: 600; font-size: .86rem; }
.trinket em { font-style: normal; color: var(--ink); font-weight: 600; }
.trinket.cant { opacity: .55; }
button.trinket { cursor: pointer; }
.trail-log { list-style: none; margin: 10px 0 0; padding: 0; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.trail-journal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.journal-page { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--panel); font-size: .85rem; color: var(--muted); opacity: .7; }
.journal-page.on { opacity: 1; }
.journal-page b { color: var(--ink); font-weight: 600; }
.journal-page .souv { font-size: .78rem; }

/* ---------- the arena (one screen left of the room) ---------- */
.cam-tab {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  border: 0; padding: 6px 9px; font-size: .8rem; font-weight: 500;
  background: rgba(255, 250, 243, .94); color: #4a3b33;
  box-shadow: 0 -2px 0 0 #2a1430, 0 2px 0 0 #2a1430, -2px 0 0 0 #2a1430, 2px 0 0 0 #2a1430;
}
.cam-tab:hover { background: #fff; }
.to-arena { left: 6px; }
.to-room { right: 6px; display: none; }
.to-map { right: 6px; }
.room-box.in-arena .to-map { display: none; }
/* the map select: the arena and every owned room as tiles */
.map-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; max-height: 56vh; overflow: auto; margin: 10px 0; padding: 2px; }
.map-tile { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 5px 5px 6px; border: 2px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); text-align: left; font-size: .8rem; cursor: pointer; }
.map-tile:hover, .map-tile:focus-visible { border-color: var(--accent); outline: none; }
.map-tile.on { border-color: var(--accent); background: var(--accent-soft); cursor: default; }
.map-tile .thumb { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; image-rendering: pixelated; border-radius: 4px; }
.map-tile .mt-arena { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; background: radial-gradient(circle at 50% 70%, #5a3a6a, #1a1222 70%); font-size: 1.8rem; }
.map-tile b { font-weight: 600; }
.map-tile small { color: var(--muted); font-size: .72rem; }
/* Shop › Rooms: the home badge / Make home link under a room card */
.room-card .mk-home { display: inline-block; margin-top: 4px; padding: 2px 8px; font-size: .78rem; font-weight: 500; color: var(--ink); background: var(--panel); box-shadow: 0 0 0 2px var(--ink); cursor: pointer; }
.room-card .mk-home:hover, .room-card .mk-home:focus-visible { background: #fff; outline: none; box-shadow: 0 0 0 2px var(--accent); }
.room-card .mk-home.on { cursor: default; background: transparent; box-shadow: none; }
.room-box.in-arena .to-arena { display: none; }
.room-box.in-arena .to-room { display: block; }
.room-box.in-arena .hud, .room-box.in-arena .sky-chip, .room-box.in-arena .bubble { visibility: hidden; }
/* a game-style boss bar, centered across the top of the arena */
.arena-hud {
  position: absolute; left: 50%; top: 10px; z-index: 2; transform: translateX(-50%); width: min(60%, 560px);
  display: none; flex-direction: column; align-items: stretch; gap: 5px; pointer-events: none;
  color: #f6ecf8; font-size: .85rem; line-height: 1.25; text-align: center; text-shadow: 0 1px 0 #120a18, 0 0 4px #120a18;
}
.arena-hud > * { pointer-events: auto; }
.room-box.in-arena .arena-hud { display: flex; }
.ah-head { display: flex; justify-content: center; gap: 10px; align-items: baseline; }
.ah-head b { font-family: 'Pixelify Sans', var(--font); font-weight: 400; font-size: 1.35rem; letter-spacing: .02em; }
.ah-head span { color: #d9c4e8; font-size: .8rem; white-space: nowrap; }
.ah-bar { position: relative; height: 26px; background: #120a18; overflow: hidden;
  box-shadow: 0 -3px 0 0 #120a18, 0 3px 0 0 #120a18, -3px 0 0 0 #120a18, 3px 0 0 0 #120a18; }
.ah-bar i { position: absolute; inset: 0 auto 0 0; width: 0; transition: width .5s ease; }
.ah-bar.hp i { background: linear-gradient(#f07a6a 0 30%, #e2564b 30% 80%, #b83a34 80%); }
.ah-bar.st { height: 14px; margin: 2px 12%; }
.ah-bar.st i { background: linear-gradient(#8ad8a6 0 35%, #6ac08a 35%); }
.ah-bar span { position: relative; display: block; padding: 0 8px; font-size: .95rem; font-weight: 600; line-height: 26px; color: #fff; text-shadow: 0 1px 0 #000; white-space: nowrap; }
.ah-bar.st span { font-size: .72rem; font-weight: 500; line-height: 14px; }
.ah-bar[hidden] { display: none; }
.ah-line { margin: 2px 0 0; color: #f0e4f6; font-size: .8rem; }
.ah-line:empty { display: none; }
.ah-btn { align-self: center; border: 0; padding: 5px 16px; background: #f5c542; color: #3a2a10; font-weight: 600; font-size: .85rem; text-shadow: none;
  box-shadow: 0 -2px 0 0 #120a18, 0 2px 0 0 #120a18, -2px 0 0 0 #120a18, 2px 0 0 0 #120a18; }
.ah-btn:disabled { background: #6a5a78; color: #d8cce0; cursor: default; }
.ah-btn[hidden] { display: none; }
body.focus .cam-tab, body.focus .arena-hud { display: none !important; }

.team-pick .tp-body { padding: 20px 20px 14px; }
.team-pick h2 { margin: 0 0 4px; font-family: 'Pixelify Sans', var(--font); font-weight: 400; font-size: 1.3rem; }
.tp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; max-height: 46vh; overflow: auto; margin: 10px 0; }
.tp-cat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 2px solid var(--line); border-radius: 8px; background: var(--panel); font-size: .74rem; }
.tp-cat canvas { width: 48px; height: 60px; image-rendering: pixelated; }
.tp-cat small { color: var(--muted); font-size: .68rem; }
.tp-cat.kid { opacity: .6; cursor: not-allowed; }
.tp-cat.on { border-color: var(--accent); background: var(--accent-soft); }
.tp-lock { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 4px; border: 2px dashed var(--line); border-radius: 8px; background: none; font-size: .74rem; color: var(--muted); }
.tp-cast { margin: 0; font-size: .85rem; }
/* the main action: orange like the other "go" buttons (.row button would otherwise paint it cream under white text) */
.row button.tp-send { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.row button.tp-send:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.row button.tp-send:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }
#tpCancel { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 6px 14px; }
/* a small room (phones): the arena HUD becomes a thin strip and the tabs move to the bottom corners */
.room-box { container-type: size; }
@container (max-width: 480px) {
  .arena-hud { top: 5px; width: 76%; gap: 3px; font-size: .68rem; }
  .ah-head b { font-size: 15px; }
  .ah-head span, .ah-line { display: none; }
  .ah-bar { height: 15px; }
  .ah-bar.st { height: 9px; margin: 1px 12%; }
  .ah-bar span { font-size: .66rem; line-height: 15px; padding: 0 4px; }
  .ah-bar.st span { font-size: .56rem; line-height: 9px; }
  .ah-btn { padding: 1px 8px; font-size: .68rem; }
  .cam-tab { top: auto; bottom: 4px; transform: none; padding: 2px 6px; font-size: .68rem; }
}
.ah-bar.flash i { background: #fff; }
.arena-float {
  position: absolute; z-index: 2; pointer-events: none; white-space: nowrap; transform: translate(-50%, 0);
  font: 400 1.05rem 'Pixelify Sans', var(--font); color: #fff;
  text-shadow: 0 2px 0 #2a1430, 2px 0 0 #2a1430, -2px 0 0 #2a1430, 0 -2px 0 #2a1430;
  animation: arena-float 1.4s ease-out forwards;
}
.arena-float.crit { color: #f5c542; font-size: 1.3rem; }
/* a new demon's name card, during its entrance */
.arena-title {
  position: absolute; left: 50%; top: 46%; z-index: 2; pointer-events: none; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: nowrap;
  color: #fff; text-shadow: 0 2px 0 #2a1430, 2px 0 0 #2a1430, -2px 0 0 #2a1430, 0 -2px 0 #2a1430;
  animation: arena-title 2.6s ease both; animation-delay: 1.3s; opacity: 0;
}
.arena-title b { font: 400 2rem 'Pixelify Sans', var(--font); letter-spacing: .04em; }
.arena-title.big b { font-size: 2.6rem; color: #ffe6a0; }
.arena-title span { font-size: .95rem; color: #e8d8f4; }
@keyframes arena-title { from { opacity: 0; letter-spacing: .4em; } 15% { opacity: 1; letter-spacing: .04em; } 80% { opacity: 1; } to { opacity: 0; } }
@container (max-width: 480px) { .arena-title b { font-size: 1.2rem; } .arena-title.big b { font-size: 1.4rem; } .arena-title span { font-size: .7rem; } }
@media (prefers-reduced-motion: reduce) { .arena-title { animation-duration: 2.4s; } }
@keyframes arena-float { from { transform: translate(-50%, 0); opacity: 1; } 70% { opacity: 1; } to { transform: translate(-50%, -34px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .arena-float { animation-duration: .01s; animation-delay: 1.2s; } }
.egg-bar { position: relative; height: 16px; margin-top: 5px; border-radius: 99px; background: var(--accent-soft); overflow: hidden; }
.egg-bar i { position: absolute; inset: 0 auto 0 0; transition: width .6s ease; }
.egg-bar.time i { background: #f2b880; }
.egg-bar.tasks i { background: #a8d8a0; }
.egg-bar span { position: relative; display: block; padding: 0 8px; font-size: .74rem; line-height: 16px; white-space: nowrap; }

/* ---------- the trading card: a new cat (hatch dialog after the reveal) ---------- */
.hatch.carded, .hatch.cardsize { width: min(620px, calc(100vw - 24px)); }
.hatch.carded .hatch-body { display: none; }
/* a cat's hatch already has the card's shape: same width, same stage, the egg and cat at the same spot and pixel size (3x) */
.hatch.cardsize .hatch-body { display: grid; grid-template-columns: 230px 1fr; grid-template-rows: 1fr auto auto auto 1fr; column-gap: 20px; padding: 0 20px 0 0; min-height: 360px; text-align: left; }
.hatch.cardsize .hatch-stage { grid-area: 1 / 1 / -1 / 2; height: auto; border-radius: 0; place-items: start center; padding-top: 56px; }
.hatch.cardsize #hatchTitle { grid-area: 2 / 2; margin: 0; }
.hatch.cardsize #hatchRarity { grid-area: 3 / 2; }
.hatch.cardsize #hatchText { grid-area: 4 / 2; }
.hatch.cardsize #hatchBtns { display: none; } /* the card brings its own buttons */
.hatch.cardsize canvas, .tc-stage canvas { width: 192px; height: 162px; image-rendering: pixelated; }
.tcard { display: grid; grid-template-columns: 230px 1fr; min-height: 360px; text-align: left; --tc: #8a9a7a; }
.tcard[hidden] { display: none; }
.tc-stage { position: relative; display: grid; place-items: start center; padding-top: 56px; min-height: 100%; padding-bottom: 28px; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--tc) 28%, #fff) 0, var(--accent-soft) 45%, transparent 78%); }
/* the band and the details ease in; the picture stays put */
.tcard:not([hidden]) .tc-side { animation: tcIn .45s ease-out both; }
.tcard:not([hidden]) .tc-band { animation: tcBand .45s ease-out both; }
@keyframes tcIn { from { opacity: 0; transform: translateX(10px); } }
@keyframes tcBand { from { transform: translateY(100%); } }
.tc-band { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font: 400 1rem var(--pfont); color: #fff; padding: 5px 4px; background: var(--tc); }
.tc-band.rainbow { background: linear-gradient(90deg, #ff6a6a, #f5c542, #6ac08a, #5aa8f0, #c05ad8); }
.tc-side { padding: 18px 20px 18px; display: grid; gap: 12px; align-content: start; }
.tc-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tc-btns button { font: 400 .95rem var(--pfont); border: 0; padding: 8px 12px; cursor: pointer; background: var(--panel); color: var(--ink); white-space: nowrap;
  box-shadow: 0 -2px 0 0 var(--edge), 0 2px 0 0 var(--edge), -2px 0 0 0 var(--edge), 2px 0 0 0 var(--edge), 0 4px 0 0 rgba(74,47,58,.2); }
.tc-btns button.go { background: var(--accent); color: #fff; }
/* the shared details block (card and the Cats panel) */
.cc { display: grid; gap: 10px; --tc: #8a9a7a; }
.cc-name .name-edit b { font: 400 1.9rem/1.1 var(--pfont); }
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: .82rem; background: #fff; border: 1px solid var(--line); border-radius: 99px; }
.cc-chip i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.cc-chip b { font-weight: 600; }
.cc-trait { display: grid; padding: 9px 12px 10px; background: color-mix(in srgb, var(--tc) 10%, #fff);
  box-shadow: 0 -2px 0 0 var(--tc), 0 2px 0 0 var(--tc), -2px 0 0 0 var(--tc), 2px 0 0 0 var(--tc); }
.cc-tier { font-size: .78rem; font-weight: 600; color: var(--tc); }
.cc-tn { font: 400 1.25rem var(--pfont); margin: 1px 0 2px; }
.cc-td { font-size: .9rem; }
.cc.mythic .cc-tier, .cc.mythic .cc-tn { background: linear-gradient(90deg, #ff6a6a, #f5c542, #6ac08a, #5aa8f0, #c05ad8, #ff6a6a); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: ccRainbow 3s linear infinite; }
@keyframes ccRainbow { to { background-position: 200% 0; } }
.cc-stats { display: grid; gap: 6px; }
.cc-stat { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 8px; font-size: .9rem; }
.cc-bar { position: relative; height: 12px; background: #efe3d4; }
.cc-bar i { position: absolute; inset: 0 auto 0 0; }
.cc-bar i.base { background: var(--c); }
.cc-bar i.plus { background: repeating-linear-gradient(90deg, var(--tc) 0 3px, color-mix(in srgb, var(--tc) 55%, #fff) 3px 6px); }
.cc-v { font-weight: 600; white-space: nowrap; }
.cc-v small { color: var(--tc); font-weight: 600; margin-left: 3px; }
.cc-kid { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.cc-kbar { flex: 1; min-width: 50px; height: 8px; background: #efe3d4; border-radius: 99px; overflow: hidden; }
.cc-kbar i { display: block; height: 100%; background: #f2b880; }
.cd-info .cc { margin-top: 10px; }
@media (max-width: 640px) {
  .tcard { grid-template-columns: 1fr; min-height: 0; }
  .tc-stage { min-height: 0; height: 170px; padding-top: 28px; }
  .tc-side { padding: 14px 16px 16px; }
  .hatch.cardsize .hatch-body { grid-template-columns: 1fr; grid-template-rows: auto; padding: 0 16px 18px; min-height: 0; text-align: center; }
  .hatch.cardsize .hatch-stage { grid-area: auto; height: 170px; padding-top: 28px; margin: 0 -16px; }
  .hatch.cardsize .hatch-body > * { grid-area: auto !important; }
  .hatch.cardsize #hatchTitle { margin-top: 12px; }
  .hatch.cardsize canvas, .tc-stage canvas { width: 128px; height: 108px; }
}
@media (prefers-reduced-motion: reduce) { .cc.mythic .cc-tier, .cc.mythic .cc-tn, .tcard .tc-side, .tcard .tc-band { animation: none; } }

/* ---------- outbreaks: the imp count and the hazard banner ---------- */
.imp-chip {
  position: absolute; right: 12px; top: 46px; z-index: 3;
  border: 0; padding: 4px 10px; font-size: .85rem; font-weight: 500; font-family: var(--font); cursor: pointer;
  background: #3a0e12; color: #ffd8c8;
  box-shadow: 0 -2px 0 0 #f5c542, 0 2px 0 0 #f5c542, -2px 0 0 0 #f5c542, 2px 0 0 0 #f5c542;
}
.imp-chip:hover { background: #5a161c; }
.room-box.in-arena .imp-chip { display: none; }
.imp-chip[hidden] { display: none; }
.ob-banner {
  position: absolute; left: 50%; top: 16%; z-index: 4; width: max-content; max-width: 86%;
  transform: translate(-50%, 0) scale(.9); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  padding: 8px 14px; text-align: center; font-size: .85rem; line-height: 1.35;
  background: #3a0e12; color: #ffd8c8;
  border: 4px solid transparent; border-image: repeating-linear-gradient(45deg, #f5c542 0 6px, #2a1430 6px 12px) 4;
}
.ob-banner b { display: block; font-family: 'Pixelify Sans', var(--font); font-weight: 400; font-size: 1.2rem; color: #ff6a5a; letter-spacing: .04em; }
.ob-banner span { display: block; }
.ob-banner.show { opacity: 1; transform: translate(-50%, 0); animation: ob-shake .45s steps(6) 2, ob-glow 1s steps(2) infinite .9s; }
@keyframes ob-shake { 0%, 100% { transform: translate(-50%, 0); } 25% { transform: translate(calc(-50% - 4px), 0); } 75% { transform: translate(calc(-50% + 4px), 0); } }
@keyframes ob-glow { 50% { background: #6a1218; } }
@media (prefers-reduced-motion: reduce) { .ob-banner.show { animation: none; } }
.shop-item.relic .pix-icon { height: 40px; }

/* ---------- cloud save: the header chip, the sign-in form, the "which save" picker ---------- */
.cloud-chip { cursor: pointer; }
.cloud-field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-size: .9rem; color: var(--muted); }
.cloud-field input { font: inherit; color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.cloud-field input:focus { outline: none; border-color: var(--accent); }
.cloud-err { min-height: 1.2em; margin: 6px 0 0; font-size: .85rem; color: #c0483c; }
.cloud-picks { display: grid; gap: 8px; margin: 12px 0 6px; }
.cloud-pick { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; border: 2px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.cloud-pick:hover { border-color: var(--accent); background: var(--accent-soft); }
.cloud-pick span { font-size: .85rem; color: var(--muted); }
.row button.danger:disabled { opacity: .45; cursor: not-allowed; }
