:root { --paper: #fbf8f1; --ink: #2b2b33; --ink-2: #5d5d6b; --red: #e2453c; --blue: #3d7be0; --yellow: #f6c431; --line: #c9daf2; --hand: 'Gaegu', cursive; --ui: 'Nunito', system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--ui); }
a { color: var(--blue); }
.top { padding: 28px max(16px, 5vw) 10px; background: repeating-linear-gradient(180deg, transparent 0 31px, var(--line) 31px 32px), var(--paper); border-bottom: 3px dashed #d8d2c3; }
.home { font-weight: 800; text-decoration: none; }
h1 { font-family: var(--hand); font-size: clamp(44px, 6vw, 72px); margin: 8px 0 0; line-height: 1; color: var(--red); }
h2 { font-family: var(--hand); font-size: 40px; margin: 36px 0 10px; }
h2 small { font-family: var(--ui); font-size: 14px; color: var(--ink-2); font-weight: 700; }
.lede { max-width: 820px; font-size: 17px; line-height: 1.5; }
.pipe { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 14px 0; counter-reset: s; }
.pipe li { counter-increment: s; background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 8px 12px; box-shadow: 3px 3px 0 var(--ink); }
.pipe li b { display: block; font-family: var(--hand); font-size: 22px; }
.pipe li b::before { content: counter(s) '. '; color: var(--red); }
.pipe li span { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.stats { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 800; margin: 8px 0 12px; }
.stats div b { display: block; font-family: var(--hand); font-size: 40px; color: var(--blue); line-height: 1; }
main { padding: 0 max(16px, 5vw) 40px; }
.row { display: grid; grid-template-columns: 160px 30px 160px 30px 1fr; align-items: center; gap: 6px; background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 12px; margin-bottom: 14px; box-shadow: 4px 4px 0 var(--ink); }
.row figure { margin: 0; text-align: center; }
.row figure img { width: 160px; height: 160px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid #ddd; }
.row figcaption, .cap { font-size: 12px; font-weight: 800; color: var(--ink-2); }
.arr { font-family: var(--hand); font-size: 34px; text-align: center; }
.viewer { position: relative; display: grid; grid-template-columns: 1fr 220px; gap: 10px; min-height: 260px; }
.viewer canvas { width: 100%; height: 260px; border-radius: 12px; background: radial-gradient(#fff, #eef2f8); display: block; }
.side h3 { font-family: var(--hand); font-size: 30px; margin: 0; }
.side p { font-size: 13px; margin: 2px 0 8px; color: var(--ink-2); }
.toggles { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.btn { border: 2px solid var(--ink); background: #fff; border-radius: 16px; padding: 3px 10px; font-weight: 800; font-size: 12px; cursor: pointer; }
.btn.on { background: var(--ink); color: #fff; }
.moves { display: flex; flex-wrap: wrap; gap: 4px; }
.moves .btn { font-size: 11px; padding: 2px 8px; }
.ids { font-size: 11px; color: var(--ink-2); margin-top: 8px; word-break: break-word; }
.dl { font-size: 13px; font-weight: 800; margin-top: 6px; display: block; }
.traps { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.trap { background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 12px; box-shadow: 4px 4px 0 var(--ink); }
.trap canvas { width: 100%; height: 240px; border-radius: 12px; background: radial-gradient(#fff, #eef2f8); display: block; }
.trap h3 { font-family: var(--hand); font-size: 30px; margin: 0; }
.trap .prompt { font-size: 12.5px; color: var(--ink-2); margin: 4px 0; }
.trap label { display: block; font-size: 12px; font-weight: 800; margin-top: 6px; }
.trap input[type=range] { width: 100%; }
.trap pre { font-size: 11px; background: #f4f1e8; padding: 6px 8px; border-radius: 8px; overflow: auto; max-height: 120px; }
.propgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.prop { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 10px; box-shadow: 3px 3px 0 var(--ink); }
.prop canvas { width: 100%; height: 170px; display: block; border-radius: 10px; background: radial-gradient(#fff, #eef2f8); }
.prop h4 { font-family: var(--hand); font-size: 24px; margin: 4px 0 0; }
.prop p { font-size: 12px; color: var(--ink-2); margin: 2px 0 0; }
.note { font-size: 13px; color: var(--ink-2); }
.tablewrap { overflow: auto; border: 2px solid var(--ink); border-radius: 12px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid #eee; white-space: nowrap; }
th { background: #f4f1e8; position: sticky; top: 0; }
td.ok { color: #2f8a52; font-weight: 800; } td.bad { color: var(--red); font-weight: 800; }
.foot { text-align: center; font-size: 13px; color: var(--ink-2); padding: 20px; border-top: 3px dashed #d8d2c3; }
@media (max-width: 860px) {
  .row { grid-template-columns: 1fr 1fr; }
  .row .arr { display: none; }
  .row .viewer { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .row figure img { width: 100%; height: auto; aspect-ratio: 1; }
}

.iters { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.iter { background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 14px; box-shadow: 4px 4px 0 var(--ink); }
.iter h3 { font-family: var(--hand); font-size: 28px; margin: 0 0 8px; }
.iter .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.iter figure { margin: 0; }
.iter figure img { width: 100%; aspect-ratio: 1; object-fit: contain; border: 1px solid #ddd; border-radius: 10px; background: #fff; }
.iter figure:has(img + img) { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.iter figure:has(img + img) figcaption { grid-column: 1 / -1; }
.iter figcaption { font-size: 12.5px; color: var(--ink-2); font-weight: 700; }
.iter p { font-size: 14px; }
@media (max-width: 860px) { .iters { grid-template-columns: 1fr; } }

.room { background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 12px; box-shadow: 4px 4px 0 var(--ink); }
.room img { width: 100%; border-radius: 10px; display: block; }
.room p { font-size: 14px; margin: 10px 4px 2px; }
