.area-page{width:min(1040px,calc(100% - 32px));margin:auto}.area-hero{padding:40px 0 24px}.area-hero h1{font-size:clamp(34px,5vw,54px);line-height:1.23;letter-spacing:-.045em;margin:10px 0}.area-hero p{color:var(--muted);font-size:18px;max-width:750px}.prep-label{display:inline-flex;border-radius:999px;background:#fff3d3;color:#785c18;padding:5px 12px;font-size:13px;font-weight:900;letter-spacing:.05em}.game-box{display:grid;grid-template-columns:1fr 1fr;gap:22px;background:#fff;border:1px solid var(--line);border-radius:26px;padding:clamp(18px,3vw,30px);box-shadow:var(--shadow)}.game-controls{background:#f2f8f7;border-radius:18px;padding:18px}.target-chip{display:inline-block;background:#153a50;color:#fff;border-radius:12px;padding:7px 12px;font-size:18px;font-weight:900}.tile-board-wrap{background:#edf8f7;border:1px solid #cce5e3;border-radius:18px;padding:16px;min-height:230px;display:flex;align-items:center;justify-content:center;overflow:hidden}.tile-board{display:grid;grid-template-columns:repeat(var(--cols,6),minmax(0,1fr));gap:4px;width:100%;max-width:456px}.unit-tile{aspect-ratio:1;border-radius:5px;background:linear-gradient(145deg,#7bd4d5,#35aabe);box-shadow:inset 0 0 0 1px #1386a2;animation:tile-in .22s ease-out both}.unit-tile:nth-child(3n){background:linear-gradient(145deg,#98e0d2,#50bca9);box-shadow:inset 0 0 0 1px #308e83}@keyframes tile-in{from{opacity:.25;transform:scale(.82)}to{opacity:1;transform:scale(1)}}.area-readout{font-size:28px;font-weight:950;letter-spacing:-.03em;margin:12px 0;color:#126b78}.area-readout small{font-size:16px;letter-spacing:0;color:var(--muted)}.range-row{margin:16px 0}.range-row label{display:flex;justify-content:space-between;gap:12px;font-weight:900}.range-row output{color:var(--blue)}.range-row input{width:100%;height:30px;accent-color:#168bd2;touch-action:pan-y}.game-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:15px}.game-btn{font:inherit;font-weight:900;border:0;border-radius:999px;padding:11px 17px;background:var(--teal);color:#fff;box-shadow:0 4px #0d605d;touch-action:manipulation}.game-btn.secondary{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line),0 4px #d4e3e5}.game-feedback{min-height:58px;margin-top:14px;padding:12px 14px;background:#f5f9fb;border-radius:14px;font-weight:800;color:#36586b}.game-feedback.success{background:#e8f8ed;color:#17664f}.unit-note{font-size:14px;color:var(--muted);margin:9px 0 0}.area-bridge{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:26px 0}.bridge-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:22px}.bridge-card.highlight{background:#16394f;color:#fff}.bridge-card.highlight p{color:#d2e5e8}.area-levels{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:15px 0 0;font-weight:900}.level-step{background:#edf7f4;padding:12px 15px;border-radius:12px}.level-arrow{color:var(--coral);font-size:23px}@media(max-width:740px){.game-box{grid-template-columns:1fr}.area-bridge{grid-template-columns:1fr}.tile-board-wrap{min-height:180px}.area-hero{padding-top:30px}}
.reshape {
  --shape-ink: #173e52;
  --shape-current: #117a88;
  --shape-fill: #8ed7dc99;
  --shape-gain: #49b8c4a6;
  --shape-loss: #f5cd7999;
  margin-block: 0 32px;
  padding: clamp(14px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.reshape h2 { margin: 0 0 5px; font-size: clamp(23px, 4vw, 31px); line-height: 1.22; }
.reshape p { margin: 0; }
.reshape-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.reshape-controls { min-width: 0; }
.reshape-constant {
  display: inline-flex;
  gap: 7px;
  align-items: baseline;
  border-radius: 10px;
  background: #e2f5ef;
  color: #145850;
  padding: 5px 11px;
  font-weight: 850;
}
.reshape-values { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.reshape-measure { min-width: 0; padding: 7px 10px; border-radius: 12px; background: #eff7f9; }
.reshape-measure span { display: block; }
.reshape-measure strong { color: var(--shape-ink); font-size: clamp(18px, 4vw, 25px); }
.reshape-controls .range-row { margin: 0 0 5px; }
.reshape-controls .range-row input { display: block; min-height: 42px; margin: 0; }
.reshape-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.reshape-presets button {
  min-height: 40px;
  padding: 5px 12px;
  border: 1px solid #b4d5d9;
  border-radius: 999px;
  background: #f2faf9;
  color: #18525d;
  font: inherit;
  font-weight: 700;
}
.reshape input:focus-visible, .reshape button:focus-visible { outline: 3px solid #106999; outline-offset: 3px; }
.reshape-result { margin-top: 13px !important; color: #155761; font-weight: 800; min-height: 3em; }
.reshape-plot {
  --current-width: 50%;
  --current-height: 33.333333%;
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
}
.reshape-grid {
  position: relative;
  isolation: isolate;
  width: min(100%, 320px);
  aspect-ratio: 1;
  border: 1px solid #a9ced1;
  border-radius: 8px 8px 2px 2px;
  margin-inline: auto;
  background:
    linear-gradient(to right, #c8e2e3 1px, transparent 1px),
    linear-gradient(to top, #c8e2e3 1px, transparent 1px),
    #f3fbf9;
  background-size: calc(100% / 12) calc(100% / 12);
}
.reshape-shape { position: absolute; bottom: 0; left: 0; }
.reshape-shape.current {
  width: var(--current-width);
  height: var(--current-height);
  border: 2px solid var(--shape-current);
  background: var(--shape-fill);
}
.reshape-shape.reference { width: 50%; height: calc(100% / 3); border: 2px dashed var(--shape-ink); }
.reshape-shape.gain {
  bottom: var(--gain-bottom, 0%);
  left: var(--gain-left, 0%);
  width: var(--gain-width, 0%);
  height: var(--gain-height, 0%);
  background: repeating-linear-gradient(135deg, var(--shape-gain) 0 4px, transparent 4px 8px);
}
.reshape-shape.loss {
  bottom: var(--loss-bottom, 0%);
  left: var(--loss-left, 0%);
  width: var(--loss-width, 0%);
  height: var(--loss-height, 0%);
  background: repeating-linear-gradient(45deg, var(--shape-loss) 0 4px, transparent 4px 8px);
}
.reshape-key { display: flex; justify-content: center; gap: 3px 12px; flex-wrap: wrap; color: #34525e; font-size: 13px; }
.reshape-key span { display: inline-flex; align-items: center; gap: 4px; }
.reshape-key i { display: inline-block; width: 13px; height: 10px; border: 2px solid var(--shape-current); }
.reshape-key .reference { border: 2px dashed var(--shape-ink); }
.reshape-key .gain { background: var(--shape-gain); border-color: #117a88; }
.reshape-key .loss { background: var(--shape-loss); border-color: #815419; }
.reshape-key .scale { width: 100%; justify-content: center; }
.reshape-explain { margin-top: 13px !important; padding: 10px 12px; border-radius: 12px; background: #fff6e2; }
@media (max-width: 699px) {
  .reshape-layout { gap: 9px; }
  .reshape-controls { display: contents; }
  .reshape-constant { justify-self: start; }
  .reshape-values { margin: 0; }
  .reshape-plot { grid-row: 3; }
  .reshape-result { margin-top: 2px !important; min-height: 0; }
}
@media (min-width: 700px) {
  .reshape-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 22px; }
  .reshape-controls { padding-inline: 4px 8px; }
}
