/* 时间能量飞行棋：棋盘放大、规则缩短 */
.chess-body main{max-width:none;padding:0 18px 12px}
.chess-app{max-width:1880px;margin:auto}
.ch-head{display:flex;align-items:center;justify-content:center;gap:24px;margin:8px 0 10px;flex-wrap:wrap}
.chess-app h1{font-size:36px;margin:0}
.chess-app .lead{margin:0;padding:6px 16px;border-radius:14px;background:#fffdf3e6;box-shadow:0 2px 10px #0d3a2422;font-size:18px}
.ch-g{color:#0b7a3a}.ch-b{color:#c2410c}.ch-a{color:#1d6fb8}
.ch-layout{display:grid;grid-template-columns:1fr 300px;gap:16px;align-items:start}
.ch-board{position:relative;display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:calc((100vh - 255px)/3);min-height:480px;gap:10px;padding:12px;border-radius:22px;background:linear-gradient(135deg,#fffef4ee,#e7f8ecee);border:2px solid #cfe6d4;box-shadow:0 8px 26px #0d4a2a33}
.ch-cell{position:relative;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-weight:bold;color:#35553f;background:#fffdf3;border:3px solid #e7dcc0;box-shadow:inset 0 2px 4px #fff,0 3px 8px #2f4a3a1f;transition:.25s;overflow:hidden;padding:4px}
.ch-cell img{height:64%;max-width:92%;aspect-ratio:1;object-fit:contain}
.ch-cell small{font-size:clamp(15px,1.25vw,22px);line-height:1.15;text-align:center}
.ch-cell.good{background:linear-gradient(#f7fff6,#e3f7e6);border-color:#a9dcb7}
.ch-cell.bad{background:linear-gradient(#fff8f6,#ffe6df);border-color:#f2b9a8}
.ch-cell.good.active{background:linear-gradient(#effff0,#c9f0d2);border-color:#2fb35d;border-width:4px}
.ch-cell.bad.active{background:linear-gradient(#fff1ee,#ffcfc2);border-color:#e4573a;border-width:4px}
.ch-cell.again{background:linear-gradient(#f2f8ff,#d6e9ff);border-color:#5b9fe0;border-width:4px}
.ch-cell em{position:absolute;top:6px;right:6px;font-style:normal;font-size:clamp(13px,1vw,18px);padding:2px 8px;border-radius:10px;color:#fff;z-index:1}
.ch-cell em.up{background:#1f9d51}.ch-cell em.down{background:#d9481f}
.ch-cell.start{background:linear-gradient(#fffbe1,#ffe9a8);border-color:#e8b93a;font-size:26px;justify-content:flex-end;padding-bottom:12px}
.ch-cell.end{background:linear-gradient(#e9fff5,#a8ecc9);border-color:#2fb35d;font-size:26px;color:#0b5a2c}
.ch-cell.end img.ch-pool{width:92%;max-width:none;aspect-ratio:auto;height:62%}
.ch-cell.here{transform:scale(1.04);box-shadow:0 0 0 5px #ffd34d,0 6px 16px #0003}
.ch-pawn{position:absolute;width:clamp(90px,8vw,140px);height:clamp(90px,8vw,140px);object-fit:contain;transform:translate(-50%,-62%);transition:left .22s ease,top .22s ease;pointer-events:none;filter:drop-shadow(0 6px 6px #0004);z-index:3}
.ch-side{display:flex;flex-direction:column;gap:12px;align-items:stretch;padding:16px}
.ch-dice{width:120px;height:120px;margin:2px auto;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);padding:12px;border-radius:22px;background:#fff;border:3px solid #d8e2da;box-shadow:0 6px 16px #0d3a2433}
.ch-dice i{width:22px;height:22px;margin:auto;border-radius:50%}
.ch-dice i.on{background:#e3412b;box-shadow:inset 0 -3px 0 #a92a18}
.ch-dice.spin{animation:chShake .14s linear infinite}
@keyframes chShake{50%{transform:rotate(14deg) scale(1.05)}}
.ch-roll{font-size:30px;min-height:70px}
.ch-roll.pulse{animation:breathe 1s ease-in-out infinite;box-shadow:0 0 0 4px #ffd34d}
.ch-score{text-align:center;font-size:22px;font-weight:bold;color:#35553f}
.ch-score b{font-size:32px;color:#0b7a3a}
.ch-card{display:flex;gap:10px;align-items:center;padding:10px;border-radius:16px;background:#fff;border:3px solid #ddd;animation:fadein .4s ease-out}
.ch-card[hidden]{display:none}
.ch-card img{width:76px;height:76px;object-fit:contain;flex:none}
.ch-card b{font-size:21px;line-height:1.3}.ch-card p{font-size:19px;margin:4px 0 0;line-height:1.45}
.ch-card.good{border-color:#58c27a;background:#f2fff1}.ch-card.bad{border-color:#f08b6e;background:#fff4f1}.ch-card.again{border-color:#5b9fe0;background:#f2f8ff}
.ch-tools{display:flex;flex-direction:column;gap:8px;font-size:16px}
.ch-tools label{display:flex;gap:6px;align-items:center;font-weight:normal;margin:0}
.ch-tools input{width:auto}
@media(max-width:1100px){.ch-layout{grid-template-columns:1fr}.ch-board{grid-auto-rows:150px}}

/* Short wide classroom screens: keep feedback and the return button in view. */
@media(min-width:1101px) and (max-height:800px){
  .chess-body .ch-side{display:grid;grid-template-columns:88px minmax(0,1fr);gap:8px;padding:12px;align-items:center}
  .chess-body .ch-dice{grid-column:1;grid-row:1;width:88px;height:88px;padding:9px;margin:0;border-radius:18px}
  .chess-body .ch-dice i{width:16px;height:16px}
  .chess-body .ch-roll{grid-column:2;grid-row:1;font-size:27px;line-height:1.2;min-height:70px;padding:10px 7px;min-width:0}
  .chess-body .ch-score,.chess-body .ch-card,.chess-body .ch-tools,.chess-body .ch-side>#back{grid-column:1/-1}
  .chess-body .ch-card{padding:10px;min-width:0}
  .chess-body .ch-card img{display:none}
  .chess-body .ch-card b{font-size:21px;line-height:1.3}
  .chess-body .ch-card p{font-size:19px;line-height:1.4;margin-top:4px}
  .chess-body .ch-tools{gap:7px}
  .chess-body .ch-tools>button{font-size:21px;min-height:44px;line-height:1.25;padding:8px 10px}
  .chess-body .ch-tools label{font-size:16px;line-height:1.3}
  .chess-body .ch-side>#back{font-size:23px;min-height:50px;line-height:1.25;padding:10px 8px}
}
