/* First-battle lessons use the same card art and numbers as the hand. */
.battle-hints {
  box-sizing:border-box; width:min(490px,calc(100% - 26px)); max-height:calc(100dvh - 24px);
  margin:auto; padding:clamp(16px,3vw,26px); overflow:auto; border:3px solid #69b5ce;
  border-radius:24px; background:#fffdf5; color:#213f52; box-shadow:0 8px 0 #27576c,0 18px 60px #112e4166;
  font-family:inherit; text-align:center;
}
.battle-hints::backdrop {background:rgb(13 36 54 / 60%)}
.hint-top,.hint-actions {display:flex;align-items:center;justify-content:space-between;gap:12px}
.hint-top {font-size:14px;font-weight:800;color:#37546d}
.hint-top span:last-child {background:#e5f3f6;border-radius:20px;padding:2px 12px;font-variant-numeric:tabular-nums}
.battle-hints h2 {font-weight:900;font-family:inherit;font-size:clamp(21px,4.8vw,29px);line-height:1.35;color:#21435c;margin:12px 0}
.battle-hints h2:focus {outline:none}
.battle-hints p {font-size:clamp(17px,3vw,20px);line-height:1.6;font-weight:750;text-align:left;color:#253f51;margin:14px 0;text-wrap:pretty}
.battle-hints p.hint-foot {font-size:16px;margin-top:-4px}
.hint-actions {margin-top:15px}
.hint-actions button {font:inherit;font-weight:800;min-height:44px;cursor:pointer}
.hint-actions [data-hint=skip] {border:0;padding:6px 10px;border-radius:10px;background:transparent;color:#405a72;text-decoration:underline;text-underline-offset:4px}
.hint-actions .btn {margin:0;min-width:122px}
.hint-diagram {
  box-sizing:border-box; display:flex;justify-content:center;align-items:center;gap:clamp(5px,1.7vw,15px);
  padding:18px 10px 12px;border:1px solid #a8d5db;border-radius:16px;color:#234b5f;
  background:radial-gradient(circle,#ffffffbd 1.3px,transparent 1.7px) 0 0/15px 15px,#e3f4f3;
}
.hint-diagram>span:not(.sprite) {font-size:clamp(18px,3vw,26px);font-weight:900}
.hint-card {box-sizing:border-box;position:relative;width:clamp(78px,20vw,113px);min-width:0;margin:0;border:2px solid #956e42;background:#fff5de;border-radius:9px;padding:4px;box-shadow:0 3px #a88d57;color:#303d4a}
.hint-card img {width:100%;aspect-ratio:1.35;display:block;object-fit:cover;border-radius:4px}
.hint-card figcaption {font-size:clamp(11px,2vw,13px);line-height:1.4;font-weight:850;margin-top:4px;text-align:center;text-wrap:balance}
.cost-example .hint-card {width:clamp(84px,22vw,130px)}
.battle-hints p,.note-page:has(.cost-example)>p {word-break:auto-phrase}
.hint-card>b {position:absolute;top:-10px;left:-5px;border:2px solid #ffcf68;background:#064b60;color:white;border-radius:50%;width:30px;height:30px;display:grid;place-items:center;font:bold 22px/1 system-ui}
.cost-total {display:grid;place-items:center;font:900 34px/1.1 system-ui;color:#174c60}
.cost-total small {font:800 12px/1.5 sans-serif}
.note-page .cost-example {margin-top:14px}
.hint-diagram .hint-pururu {width:88px;height:88px;margin:0;display:grid;place-items:center}
.hint-diagram .hint-pururu img {height:100%;width:100%}
.guard-example .guard-card {width:clamp(118px,32vw,152px);padding:5px;flex:none}
.guard-card figcaption {margin:0 0 5px;padding-left:12px;font-size:15px}
.guard-card img {aspect-ratio:1.9}
.guard-card-stats {display:grid;grid-template-columns:1fr 1fr;gap:4px;margin-top:5px}
.guard-card-stats span {display:grid;align-content:center;padding:2px 0;border-radius:5px;font-size:11px;font-weight:850;line-height:1.25;color:#614928;background:#f5e2b5}
.guard-card-stats strong {font:850 20px/1.1 system-ui}
.guard-card-stats .guard-stat {background:#d7f5fd;color:#075673;outline:3px solid #087593;outline-offset:-1px}
.guard-stat strong {font-size:26px}
.guard-example .guard-arrow {color:#087593}
.guard-result {display:grid;justify-items:center;align-content:center;gap:2px;color:#075673;font-weight:850;font-size:clamp(13px,3vw,16px)}
.guard-result strong {border:2px solid #087593;border-radius:10px;padding:0 10px;background:#d7f5fd;color:#075673;font:900 30px/1.2 system-ui}
.battle-hints[data-lesson=guard] p strong {color:#075673;text-decoration:underline;text-decoration-color:#60bbd0;text-underline-offset:3px}
.battle-hints[data-lesson=guard] p span {display:inline-block}
.modal.modal-end-check {width:min(420px,calc(100% - 24px))}
.modal-end-check .end-check p {font-size:18px;margin:0 0 18px}
.end-check>div {display:grid;grid-template-columns:1fr 1.3fr;gap:10px}
.end-check .btn {width:100%;margin:0;min-height:44px}
.energy-display.energy-meter {
  display:inline-flex;flex-direction:column;justify-content:center;align-items:center;gap:0;box-sizing:border-box;
  background:#fffdf5;color:#123c50;border:2px solid #176681;border-radius:16px;box-shadow:0 3px 0 #89bac9;
  font-family:inherit;font-variant-numeric:tabular-nums;line-height:1;
}
.is-battle .battle-controls .turn-bar .energy-meter {padding:6px 9px;min-width:min(100%,102px)}
.energy-meter .meter-label {color:#164d64;font-size:13px;font-weight:850;line-height:1.2;white-space:nowrap}
.energy-meter .meter-value {display:flex;align-items:center;justify-content:center;gap:4px}
.energy-meter .meter-value strong {font:900 clamp(34px,3vw,45px)/1 system-ui;color:#073f56}
.energy-meter .meter-value small {font:750 16px/1 system-ui;margin:0}
.energy-meter .meter-value svg {height:27px;width:20px;fill:#32bdd0;stroke:#0e657f}
.energy-meter[data-empty=true] .meter-value svg {fill:white;stroke:#4b6671}
@media (max-width:760px) and (min-height:511px), (max-width:539px) {
  .is-battle .battle-controls {grid-template-rows:30px auto 56px}
  .is-battle .battle-controls .turn-bar .energy-meter {min-width:88px;padding:3px 6px}
  .energy-meter .meter-value strong {font-size:30px}
}
@media (max-height:510px) and (min-width:540px) {
  .is-battle .battle-controls .turn-bar .energy-meter {flex-direction:row;gap:6px;padding:1px 6px;min-width:0}
  .energy-meter .meter-value strong {font-size:25px}
  .energy-meter .meter-value small {font-size:14px}
  .energy-meter .meter-value svg {width:13px;height:18px}
  .battle-hints {width:min(620px,94vw);padding:12px 18px}
  .battle-hints .hint-diagram {padding:9px}
  .battle-hints h2,.battle-hints p,.hint-actions {margin-block:7px}
  .battle-hints .hint-card {width:78px}
  .battle-hints .hint-pururu {height:55px;width:55px}
  .battle-hints[data-lesson=guard][open] {display:grid;grid-template-columns:minmax(0,0.95fr) minmax(0,1fr);column-gap:16px;align-items:center}
  .battle-hints[data-lesson=guard] > :where(.hint-top,h2,.hint-actions) {grid-column:1/-1}
  .battle-hints[data-lesson=guard] .hint-top {grid-row:1}
  .battle-hints[data-lesson=guard] h2 {grid-row:2}
  .battle-hints[data-lesson=guard] #hint-copy {grid-row:3}
  .battle-hints[data-lesson=guard] .hint-foot {grid-row:4}
  .battle-hints[data-lesson=guard] .hint-actions {grid-row:5}
  .battle-hints .guard-example {grid-column:1;grid-row:3/5;padding:12px 5px 8px;gap:5px}
  .battle-hints .guard-example .guard-card {width:112px}
  .guard-result>span:not(.sprite) {white-space:nowrap;font-size:13px}
  .battle-hints[data-lesson=guard] p {grid-column:2;font-size:16px;line-height:1.45;margin:3px 0}
}
@media (min-width:540px) and (max-height:380px) {
  .battle-hints[data-lesson=guard] .hint-top {grid-row:1;grid-column:1;justify-content:flex-start}
  .battle-hints[data-lesson=guard] h2 {grid-row:1;grid-column:2;text-align:left;font-size:20px}
  .battle-hints .guard-example {grid-row:2/4;padding-block:9px 6px}
  .battle-hints[data-lesson=guard] #hint-copy {grid-row:2}
  .battle-hints[data-lesson=guard] .hint-foot {grid-row:3}
  .battle-hints[data-lesson=guard] .hint-actions {grid-row:4}
}
