/* Chapter 5: Dungeons & Datacenters (Hanoi, regex, spell, potions, dragon, Firewall). */
/* ---------- chapter 5: dungeons & datacenters ---------- */
.parch{background:#efe2c0;color:#3a2614;border-radius:4px;padding:18px 20px;font-size:14px;max-width:560px;margin:0 auto;box-shadow:inset 0 0 30px rgba(120,80,30,.25)}
.parch h4{margin:0 0 8px;font-family:var(--f-hand);font-size:26px}
.parch dl{display:grid;grid-template-columns:auto 1fr;gap:6px 14px;margin:0}
.parch dt{font-family:var(--f-mono);font-weight:600}
.parch dd{margin:0}
.runes{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:14px 0}
.rune{font-family:var(--f-hand);font-size:24px;font-weight:700;padding:6px 16px;border-radius:6px;border:2px solid #7a5434;background:#efe2c0;color:#3a2614}
.rune.on{background:#e8c766;border-color:#c9a24a;box-shadow:0 0 14px rgba(232,199,102,.6)}
.regex{font-family:var(--f-mono);font-size:22px;font-weight:600;text-align:center;color:#e8c766;background:#1d1630;border:2px solid #c9a24a;border-radius:6px;padding:8px}
.code5{font-family:var(--f-mono);font-size:14px;line-height:1.7;background:#1d1630;color:#e7e3f5;border-radius:6px;padding:14px 16px;overflow-x:auto}
.code5 div{white-space:pre}
.code5 .cm{color:#9f93c9}
.code5 select{font:inherit;background:#2c2348;color:#ffd166;border:1px dashed #ffd166;border-radius:4px;padding:2px 4px;max-width:100%}
.out5{font-family:var(--f-crt);font-size:22px;background:#05080c;color:var(--phosphor);border-radius:6px;padding:10px 14px;margin-top:10px;min-height:48px;white-space:pre-wrap}
.bottles{display:flex;align-items:flex-end;justify-content:center;gap:2px;flex-wrap:wrap;background:linear-gradient(#7a5434,#5a3b22);border-radius:6px;padding:16px 8px 10px}
.bottle{display:flex;flex-direction:column;align-items:center;gap:4px;width:52px}
.bottle .cork{width:14px;height:10px;background:#c9a24a;border-radius:2px}
.bottle .glass{width:40px;height:74px;border-radius:12px 12px 16px 16px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding-bottom:6px;box-shadow:inset -6px 0 0 rgba(255,255,255,.18);color:#fff;font-family:var(--f-mono);font-weight:600;font-size:15px;text-shadow:0 1px 2px rgba(0,0,0,.6)}
.bottle .lt{font-family:var(--f-hand);font-weight:700;font-size:22px;color:#efe2c0}
.swapb{align-self:center;width:26px;height:26px;border-radius:50%;border:1px solid #c9a24a;background:#2c2014;color:#e8c766;font-size:13px;padding:0;margin-bottom:34px}
.swapb:hover{background:#c9a24a;color:#2c2014}
.dialog.who-dragon{border-left-color:#3c8a4a} .dialog.who-dragon .who{color:#5fbf6a}
@media (max-width:600px){ .bottles{flex-wrap:nowrap;justify-content:safe center;overflow-x:auto;gap:0;padding:12px 4px 8px} .bottle{width:30px;flex:0 0 auto} .bottle .glass{width:24px;height:56px;font-size:11px} .bottle .lt{font-size:18px} .swapb{width:20px;height:20px;flex:0 0 auto;font-size:10px;margin-bottom:30px} }
.dragonbox{background:#13241a;border:2px solid #3c8a4a;border-radius:8px;padding:16px;display:grid;gap:10px}
.dsay{font-family:var(--f-crt);font-size:22px;color:#ff6b6b;min-height:2.4em}
.dhist{display:flex;flex-wrap:wrap;gap:6px}
.dhist span{font-family:var(--f-mono);font-size:12px;padding:3px 8px;border-radius:12px;background:#24402c;color:#cfe8d4}
.rules{display:grid;gap:6px;margin-top:10px}
.rule{display:flex;gap:8px;align-items:flex-start;font-size:14px;padding:8px 10px;border-radius:6px;background:#3a1414;border:1px solid #c8262c}
.rule.ok{background:#12301c;border-color:#2b8a3e}
.rule b{font-family:var(--f-mono);flex:0 0 auto}
.rule small{display:block;color:var(--muted);margin-top:2px}
.pwin{box-sizing:border-box;font-family:var(--f-mono);font-size:18px;width:100%;padding:10px 12px;background:#05080c;color:var(--phosphor);border:1px solid var(--line);border-radius:4px}
