.combat-card h2{font-size:clamp(18px,2.1vw,31px);line-height:1.05;overflow-wrap:anywhere}.pawn-heading>div:first-child{min-width:0;flex:1}.hp-readout{flex-shrink:0}.opponent-moves h2{overflow-wrap:anywhere;line-height:1.15}.typing-prompt{font-size:clamp(19px,2.05vw,29px);line-height:1.32;overflow-wrap:anywhere}.input-display{overflow-wrap:anywhere}.pet-card strong{font-size:clamp(11px,1.1vw,15px);overflow-wrap:anywhere}.pet-card span{overflow-wrap:anywhere}.combat-card.tier-1,.pet-card.tier-1{border-color:#a5ca54}.combat-card.tier-2,.pet-card.tier-2{border-color:#aebbc9;box-shadow:inset 0 0 0 1px #e8edf2}.combat-card.tier-3,.pet-card.tier-3{border-color:#d4ab43;box-shadow:inset 0 0 0 1px #ffecb1}.combat-card.tier-4,.pet-card.tier-4{border-color:#bca2e8;background-image:linear-gradient(120deg,#f8f8ed,#e7f8f3,#f4e8ff,#fff6db)}.hospital-panel h2{font-size:clamp(23px,2.5vw,34px)}.hospital-panel .pet-card{min-height:135px}.screen-top #map-view-button{padding:4px 8px;background:var(--theme-surface);color:var(--theme-ink);border:1px solid var(--theme-line);border-radius:4px;font-size:11px}.battle-actions{flex-wrap:wrap}.bar>span{max-width:100%}body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .journal,body[data-screen=witch-team] .journal{opacity:.55}body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .panel,body[data-screen=hospital] .panel{max-height:96%;overflow:auto}.collection-list{align-items:stretch}.pet-card div{overflow-wrap:anywhere}

body[data-screen=battle] .combat-card h2.long-name{font-size:clamp(17px,1.4vw,22px);line-height:1.12}

body[data-screen=battle] .combat-card.tier-1{border-color:#a5ca54}body[data-screen=battle] .combat-card.tier-2{border-color:#aebbc9}body[data-screen=battle] .combat-card.tier-3{border-color:#d4ab43}body[data-screen=battle] .combat-card.tier-4{border-color:#bca2e8}

body[data-screen=battle] .hp-readout{max-width:46%}body[data-screen=battle] .hp-readout strong{white-space:normal;font-size:clamp(18px,1.8vw,28px);line-height:1.1}

#collection-mini{flex-wrap:wrap}.hospital-panel .collection-list{margin-bottom:12px}
.full-card-panel{width:98%;padding:14px;max-height:98%;text-align:left}.full-card-panel>h2,.full-card-panel>p,.full-card-panel>.panel-eyebrow{text-align:center}.owned-card-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;align-items:start}.owned-card{min-width:0;border:2px solid var(--theme-line);border-radius:10px;background:var(--theme-paper);overflow:hidden;color:var(--theme-ink)}.owned-card.selected{outline:3px solid var(--theme-accent);outline-offset:1px}.original-pawn-card{display:block;width:100%;height:auto;image-rendering:auto}.card-run-details{padding:9px 10px}.card-run-details h3{font:700 15px/1.15 Georgia,serif;overflow-wrap:anywhere;margin:0 0 5px}.card-run-details .card-health{font-weight:700;font-size:12px;margin:0 0 6px}.card-attack-list{display:grid;gap:4px;font-size:11px}.card-special{font-size:11px!important;line-height:1.35!important;margin:7px 0 0!important}.owned-card>button{width:100%;min-height:34px;border:0;border-top:1px solid var(--theme-line);background:var(--theme-accent);color:var(--theme-paper);font-size:12px;padding:7px}.owned-card>button:disabled{background:var(--theme-surface);color:var(--theme-ink)}.owned-card>button kbd{padding:2px 5px;min-width:20px}.card-pages{display:flex;justify-content:center;align-items:center;gap:16px;margin:13px 0;font-size:12px}.card-pages button{border:1px solid var(--theme-line);background:var(--theme-paper);color:var(--theme-ink);padding:6px 10px;border-radius:5px}.portrait-card{min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px;background:var(--theme-surface)}.portrait-card canvas{width:100%;height:auto}.portrait-card strong{overflow-wrap:anywhere}.portrait-card span{font-size:11px;margin-top:6px}.attack-context{font-size:11px;line-height:1.35;margin:0 0 6px;color:var(--theme-ink);overflow-wrap:anywhere}body[data-screen=battle] input.input-display{display:block;width:100%;max-height:none;height:29px;border:1px solid var(--theme-line);border-radius:4px;background:var(--theme-paper);padding:4px 6px;font-size:12px}.typing-rating{font-weight:700;color:var(--theme-ink)}

body:is([data-screen=collection],[data-screen=witch-pick],[data-screen=witch-team],[data-screen=battle-team]) .console{grid-template-columns:minmax(0,1fr)}
body:is([data-screen=collection],[data-screen=witch-pick],[data-screen=witch-team],[data-screen=battle-team]) .journal,body:is([data-screen=collection],[data-screen=witch-pick],[data-screen=witch-team],[data-screen=battle-team]) .dialog{display:none}
body:is([data-screen=collection],[data-screen=witch-pick],[data-screen=witch-team],[data-screen=battle-team]) .viewport{height:calc(100vh - 190px);min-height:440px;aspect-ratio:auto}
.full-card-panel{height:98%}.original-pawn-card{width:auto;max-width:100%;height:clamp(280px,calc(100vh - 330px),450px);object-fit:contain;margin:0 auto}.card-pages{position:sticky;bottom:0;padding:7px;background:var(--theme-paper);border-top:1px solid var(--theme-line)}.full-card-panel .panel-eyebrow{margin-bottom:5px}.full-card-panel>h2{font-size:25px;margin-bottom:5px}.full-card-panel>p{margin:5px 0 10px;font-size:12px}


.card-story{margin-top:9px;border-top:1px solid var(--theme-line);padding-top:7px;font-size:12px}.card-story summary{cursor:pointer;font-weight:700;line-height:1.3;overflow-wrap:anywhere}.card-story p{font:14px/1.65 Georgia,serif;white-space:pre-line;margin:8px 0;overflow-wrap:anywhere}.power-pending{font-size:11px;color:var(--theme-ink);margin:5px 0}.card-story[open]{padding-bottom:4px}

/* The Pier is a deliberate trainer challenge, never a surprise encounter. */
.pirate-panel{max-width:820px;border-top:7px solid var(--theme-line)}.pirate-panel h2{color:var(--theme-ink)}.pirate-quote{font:italic 20px/1.5 Georgia,serif;color:var(--theme-ink)}.pirate-crew{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:20px 0}.pirate-crew>div{position:relative;text-align:center;background:var(--theme-surface);border:1px solid var(--theme-line);border-radius:12px;padding:10px}.pirate-crew canvas{height:82px;width:82px;object-fit:contain}.pirate-crew strong,.pirate-crew small{display:block}.pirate-crew small{margin-top:5px;font-size:12px}.crew-number{position:absolute;top:8px;left:10px;font:bold 13px monospace;color:var(--theme-ink)}.pirate-panel button:focus-visible{outline:3px solid var(--theme-accent);outline-offset:4px}.sailing-panel{text-align:center;max-width:640px}.voyage-sea{height:160px;margin:24px 0;background:repeating-linear-gradient(175deg,#579799 0 10px,#80b5ad 11px 13px,#579799 15px 31px);border-radius:55% 45% 20px 20px;overflow:hidden}.voyage-ship{display:inline-block;width:210px;height:155px;animation:brine-voyage 1.8s ease-in-out forwards}@keyframes brine-voyage{0%{transform:translateX(-210px) rotate(-5deg)}55%{transform:translateX(0) rotate(4deg)}100%{transform:translateX(210px) rotate(-3deg)}}@media(prefers-reduced-motion:reduce){.voyage-ship{animation:none}}@media(max-width:600px){.pirate-panel{padding:20px}.pirate-crew{gap:6px}.pirate-crew canvas{width:62px;height:62px}.pirate-quote{font-size:17px}}
.pirate-panel .pirate-crew{grid-template-columns:repeat(3,minmax(0,1fr))}
.pirate-panel .pirate-crew>div{min-width:0;overflow-wrap:anywhere}
.pirate-panel{container-type:inline-size}
@container(max-width:450px){.pirate-panel .pirate-crew{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container(max-width:260px){.pirate-panel .pirate-crew{grid-template-columns:1fr}}

/* Captain Brine shows the existing complete playing cards in deck order. */
.pirate-deck-panel{max-width:1080px}
.pirate-deck-panel .pirate-deck{list-style:none;padding:0;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:18px auto}
@container(max-width:780px){.pirate-deck-panel .pirate-deck{grid-template-columns:repeat(3,minmax(0,1fr))}}
.pirate-deck-card{min-width:0;margin:0;padding:0}
@container(max-width:450px){.pirate-deck-panel .pirate-deck{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
@container(max-width:260px){.pirate-deck-panel .pirate-deck{grid-template-columns:1fr;max-width:190px}}

@media(max-width:650px){body[data-screen=pirate] .console{grid-template-columns:minmax(0,1fr)}body[data-screen=pirate] .journal{display:none}body[data-screen=pirate] .pirate-deck-panel{width:96%;padding:16px}}

/* Battle switching uses only the real cards, a live HP bar, and their selection state. */
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .viewport{height:max(0px,calc(100dvh - 190px));min-height:0}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-team-picker{box-sizing:border-box;display:flex;flex-direction:column;gap:clamp(8px,1.3vh,14px);width:min(96%,1380px);height:min(100%,430px);max-height:100%;min-height:0;overflow:hidden;padding:clamp(10px,1.5vh,18px)}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-team-picker h2{flex:none;margin:0;text-align:center;font-size:clamp(18px,2vw,26px);line-height:1.1}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-team-picker>p{flex:none;margin:0;text-align:center;font-size:clamp(11px,.95vw,13px);line-height:1.2}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:clamp(7px,1vw,14px);align-content:center;justify-items:center;align-items:center;flex:1;min-height:0;width:100%}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-tile{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:5px;width:100%;max-width:190px;min-width:0;aspect-ratio:2/3;padding:4px;border:3px solid transparent;border-radius:12px;background:transparent;color:inherit;cursor:pointer;overflow:hidden}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-tile.selected{border-color:#f0b642;background:#f6e9c7;box-shadow:0 0 0 2px #442d70,0 5px 14px #24153b55}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-tile:focus-visible{outline:3px solid #32215c;outline-offset:3px}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-art{display:block;flex:1;min-width:0;min-height:0;width:100%;overflow:hidden;border-radius:7px}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-art .current-playing-card.full-illustrated-card{display:block;width:100%;height:100%;max-height:100%;aspect-ratio:2/3}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-art .current-playing-card.full-illustrated-card img.full-illustrated-card-image{display:block;width:100%;height:100%;object-fit:contain}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-art .card-stat-overlay{pointer-events:none}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-health{display:block;flex:none;width:100%;height:5px;overflow:hidden;border-radius:99px;background:#d3d0c8}
body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-health>span{display:block;height:100%;border-radius:inherit;background:#4f9a62}
@media(max-width:850px){body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:6px}body:is([data-screen=battle-team],[data-screen=witch-team],[data-screen=witch-pick]) .battle-pawn-tile{width:auto;height:100%;max-width:min(100%,150px);min-height:0}}