/* 🔮 The Tower of Madness's window (rpg/ui-tower.js): the dungeon board's family (world.css .dg-*) in the tower's violet. */
.tw-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.tw-pic { display: block; width: 100%; height: 100%; min-height: 210px; object-fit: cover; border-radius: 10px; border: 1px solid #4a3a6e; background: #0e0a16; }
.tw-you { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border: 1px solid #4a3a6e; border-radius: 10px; background: linear-gradient(180deg, #1e1730, #120e1c); }
.modal p.tw-k { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #b9a8d8; }
.tw-k em { margin-left: auto; font-style: normal; letter-spacing: 0; text-transform: none; color: #eedcff; font-size: 13px; }
.tw-stats > div { border-color: #3e3258; background: #171224; }
.tw-stats dd { color: #eedcff; }
.tw-you .btn, .tw-acts .btn { width: 100%; }
.tw-go:not(:disabled) { background: linear-gradient(180deg, #c9a2ff, #7d3fd6); color: #fff; border-color: #1e0c3a; box-shadow: inset 0 0 0 1px #e8d4ff, 0 3px 0 #3a1a6e; }
.tw-buy { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid #3e3258; }
.tw-toks { display: flex; flex-wrap: wrap; gap: 4px; }
.tw-tok { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 4px; border: 1px solid #4a3a6e; border-radius: 999px; background: #1a1428; color: #d8ccf0; font: inherit; font-size: 13px; cursor: pointer; }
.tw-tok img, .tw-tok svg { width: 18px; height: 18px; border-radius: 50%; }
.tw-tok.on { border-color: #c9a2ff; background: #2e1f4e; color: #fff; }
.tw-buys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.modal p.tw-msg { margin: 0; font-size: 13px; color: #d8ccf0; }
.modal p.tw-msg.err { color: #ff9a8a; } .modal p.tw-msg.ok { color: #9fe8a0; }
.modal p.tw-said { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; border: 1px solid #5a3f96; background: #221838; color: #eedcff; font-size: 15px; }
.tw-run, .tw-fell { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid #4a3a6e; border-radius: 10px; background: linear-gradient(180deg, #1e1730, #120e1c); }
.modal .tw-run h3, .modal .tw-fell h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 22px; color: #eedcff; }
.tw-run h3 small { font-family: system-ui, sans-serif; font-size: 13px; color: #b9a8d8; }
.tw-fell h3 { color: #ff9a8a !important; }
.tw-hp { position: relative; height: 18px; border-radius: 9px; background: #2a1414; border: 1px solid #5a2a2a; overflow: hidden; }
.tw-hp span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #3ab85a, #7fe08a); }
.tw-hp i { position: relative; display: block; text-align: center; font-style: normal; font-size: 12px; line-height: 16px; color: #fff; text-shadow: 0 1px 0 #000; }
.tw-foes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.tw-foes li { padding: 6px 10px; border-radius: 8px; border: 1px solid #3e3258; background: #171224; }
.tw-foes li.guard, .tw-foes li.boss { border-color: #7d3fd6; background: #2a1840; }
.tw-foes b { display: block; color: #ffe9b0; } .tw-foes small { color: #b9a8d8; font-size: 12px; }
.modal p.tw-pouch, .tw-fell p { margin: 0; font-size: 14px; color: #d8cfc4; } .tw-pouch em { color: #ffb24a; font-style: normal; }
.tw-acts { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px; }
.tw-buy-run { margin-top: 10px; padding: 0 12px 10px; border: 1px solid #3e3258; border-radius: 10px; }
.tw-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.tw-cols > section { min-width: 0; padding: 10px 12px; border: 1px solid #3c3330; border-radius: 10px; background: #171418; }
.modal .tw-cols h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0 0 8px; font-family: var(--display); font-weight: 400; font-size: 17px; color: #e8d4ff; }
.tw-cols h3 small { font-family: system-ui, sans-serif; font-size: 12px; color: #a99e92; }
.tw-grid { display: flex; flex-direction: column; gap: 3px; }
.tw-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; margin: 0; padding: 0; list-style: none; }
.tw-row li { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 2px 0 1px; border: 1px solid #332a3c; border-radius: 6px; background: #1a1520; }
.tw-row li small { font-size: 9px; line-height: 1.1; color: #8e8496; }
.tw-row li b { font-size: 14px; line-height: 1.15; }
.tw-row li i { position: absolute; top: -5px; right: -3px; font-style: normal; font-size: 11px; line-height: 1; }
.tw-row li.chest { border-color: #806128; background: #221a12; }
.tw-row li.guard { border-color: #7d3fd6; background: #2a1840; }
.tw-row li.done { opacity: 0.55; }
.tw-row li.here { outline: 2px solid #c9a2ff; outline-offset: 1px; opacity: 1; }
.tw-row .under b { color: #7fe08a; } .tw-row .even b { color: #ece6dc; } .tw-row .over b { color: #ffb24a; } .tw-row .far b { color: #ff6a5a; }
.tw-top { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.tw-top li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: 6px; background: #1d1824; }
.tw-top span { color: #ffd45c; font-weight: 800; } .tw-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #eedcff; } .tw-top em { font-style: normal; color: #c9a2ff; }
.modal p.tw-empty, .modal p.tw-note { margin: 0; font-size: 13px; color: #a99e92; }
@media (max-width: 760px) {
  .tw-head, .tw-cols, .tw-acts { grid-template-columns: minmax(0, 1fr); }
  .tw-pic { min-height: 0; height: auto; aspect-ratio: 16 / 10; }
  .tw-row li b { font-size: 12px; }
}
.tw-soon { display: flex; flex-direction: column; gap: 10px; }
.tw-soon .tw-pic { min-height: 0; height: auto; aspect-ratio: 1280 / 782; }
.modal p.tw-soon-k { margin: 0; font-family: var(--display); font-size: 22px; color: #c9a2ff; }
.tw-soon p { margin: 0; color: #d8cfc4; }
