/* Gold-edged navy frames. Dimensions and swipe behavior remain owned by layout CSS. */
.card,.pocket-battle .hand-rack .card{border:2px solid #dfbd78;border-radius:13px 13px 9px 9px;padding:4px;background:linear-gradient(125deg,#ae8b45,#f2d897 7%,#71532d 10%,#d6b777 12%,#071822 14%,#05131d 86%,#d6b777 96%,#f5db9c);box-shadow:inset 0 0 0 1px #46341f,inset 0 0 0 3px #d1b778,0 3px 9px #0009}
.card .cardhead,.pocket-battle .hand-rack .cardhead{position:relative;top:auto;left:auto;display:flex;align-items:center;justify-content:flex-start;gap:7px;background:linear-gradient(120deg,#705633 0%,#b89b61 24%,#05151e 25%);border-bottom:1px solid #c3a264;min-height:39px;height:39px;padding:2px 4px;text-shadow:0 1px 2px #000}
.card .cost,.pocket-battle .hand-rack .cost{position:relative;display:block;flex-shrink:0;transform:none;width:35px;height:35px;line-height:31px;border:2px solid #f4d698;border-radius:50%;color:#fff8dc;background:radial-gradient(circle at 30% 18%,#80eaff,#008bc3 27%,#074281 63%,#00182e);box-shadow:0 0 0 1px #342513,inset 0 0 0 2px #075b8d;font-size:27px;font-weight:400;text-align:center}
.card .cardhead .card-type,.pocket-battle .hand-rack .cardhead .card-type{display:block!important;flex:1;text-align:center;font-size:clamp(9px,2.4vw,15px);letter-spacing:.04em;overflow:visible;white-space:nowrap;color:#fff}.card.Offense .card-type,.pocket-battle .card.Offense .card-type{color:#f3aeb3}.card.Defense .card-type,.pocket-battle .card.Defense .card-type{color:#a9d3ff}.card.Nexus .card-type,.pocket-battle .card.Nexus .card-type{color:#afe2bc}.card .cardcode{display:none!important}
.card .card-art,.pocket-battle .hand-rack .card-art{border:1px solid #e0c58a;border-radius:0;margin:2px 2px 0;width:calc(100% - 4px);box-shadow:0 0 0 1px #433a29}.card .card-art:after{display:none}
.card>.rarity-label,.pocket-battle .hand-rack .card>.rarity-label{background:#05151f;border-top:1px solid #bda169;border-bottom:1px solid #bda169;text-align:left;padding:2px 6px;font-size:12px;line-height:16px;margin:0 2px}.card .cardbody,.pocket-battle .hand-rack .cardbody{background:linear-gradient(115deg,#e7dfc9,#f6f0e2 55%,#e7dec7);color:#121d25;margin:0 2px;padding:0 6px 5px;border:1px solid #b49b68;display:block;overflow:auto;touch-action:pan-x pan-y}
.card .cardbody h3,.pocket-battle .hand-rack .cardbody h3{display:block;background:linear-gradient(110deg,#122b36,#03131c);color:#fffbef;border:0;border-bottom:2px solid #c5aa6e;border-radius:0;margin:0 -6px 6px;padding:6px 2px;text-align:center;font-size:18px;line-height:1.35;box-shadow:none;text-shadow:0 1px 3px #000;font-weight:700}
.card .cardbody p,.pocket-battle .hand-rack .cardbody p{display:block;color:#14222c;font-size:13px;line-height:1.65}.freeze-text{color:#12639b;font-weight:700}.card .condition{color:#68573e}
.card .cardslots,.pocket-battle .hand-rack .cardslots{border-top:1px solid #d7bb7f;background:#051620;margin:0 2px 2px;padding:5px 2px;gap:5px}.card .cardslots .module-orb{border:2px solid #d3b575;box-shadow:0 0 0 1px #5f4b28}.card .cardslots small{color:#ecddb9}.pocket-battle .hand-rack .cardbody h3{font-size:15px}.pocket-battle .hand-rack .cardslots small{font-size:11px}
@media(max-width:500px){.pocket-battle .hand-rack .cardhead{gap:2px;padding:2px;height:35px;min-height:35px}.pocket-battle .hand-rack .cost{width:28px;height:28px;line-height:25px;font-size:23px}.pocket-battle .hand-rack .cardhead .card-type{font-size:9px;letter-spacing:0}}

.card .cardhead .card-rank,.pocket-battle .hand-rack .cardhead .card-rank{display:block;font-size:10px;line-height:13px;font-weight:400;letter-spacing:.02em;background:none;padding:0;border:0;color:#dddfdb}.card .cardhead .card-rank.rarity-Rare{color:#93c9f2}.card .cardhead .card-rank.rarity-Epic{color:#d0a7ef}.card .cardhead .card-rank.rarity-Legendary{color:#f7d58e}
.reward-cards{display:flex!important;flex-direction:row;flex-wrap:nowrap;gap:10px;align-items:stretch;width:100%;overflow-x:auto;touch-action:pan-x pan-y;padding:8px 3px 16px}
.reward-cards>.card{flex:1 0 0;min-width:0;width:calc((100% - 20px)/3);max-width:280px;margin:0;align-self:stretch}.reward-cards .cardbody{flex:1;min-height:150px}.reward-cards .card-art{height:120px}.reward-cards .cardbody h3{font-size:18px}
@media(max-width:500px){.reward-screen{padding-left:9px;padding-right:9px}.reward-cards{gap:6px}.reward-cards>.card{padding:3px}.reward-cards .cardhead{gap:2px;padding:2px;min-height:36px;height:36px}.reward-cards .cost{width:27px;height:27px;font-size:22px;line-height:23px}.reward-cards .cardhead .card-type{font-size:9px;letter-spacing:0}.reward-cards .card-art{height:66px}.reward-cards .cardbody{padding:0 4px 6px}.reward-cards .cardbody h3{font-size:15px;margin-left:-4px;margin-right:-4px}.reward-cards .cardbody p{font-size:12px}.reward-cards .cardslots small{font-size:10px}}

.pick-instruction{margin:20px 0 8px;font-size:16px;color:#fff4d5;text-align:center;line-height:1.6}.module-option .equipped-owner{display:inline-block;color:#ffe175;font-size:12px;line-height:1.5;margin-left:8px;font-weight:600}

.forest-map{max-width:1050px}.map-guidance{font-size:15px;color:#d4ebdb;margin-bottom:15px}.route-scroll{overflow-x:auto;touch-action:pan-x pan-y;border:1px solid #a0c8b554;background:#051c25c9;border-radius:12px;margin-bottom:18px}.floor-graph{position:relative;width:100%;height:390px}.floor-graph svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.floor-graph line{stroke:#84b8a7;stroke-width:.45;opacity:.45}.graph-node,.graph-entry{position:absolute;transform:translate(-50%,-50%);width:70px;text-align:center;background:#102d36;border:1px solid #678b8a;border-radius:8px;padding:9px 2px}.graph-node b,.graph-entry{font-size:25px}.graph-node span,.graph-entry small{display:block;font-size:12px;white-space:nowrap}.graph-node:disabled{opacity:.45}.graph-node.available{border-color:#e5d895;background:linear-gradient(#315659,#103038);box-shadow:0 0 15px #baf2ce35}.graph-node.visited{opacity:1;border-color:#94dbb5}.graph-node small{color:#b5ebbc}.graph-entry{border:0;background:#102a2deb}.graph-exit{width:62px}.graph-node:hover:not(:disabled){transform:translate(-50%,-50%);filter:brightness(1.25)}

@media(max-width:600px){.forest-map{padding-left:10px;padding-right:10px}.floor-graph{height:350px}.graph-node,.graph-entry{width:48px;padding:9px 1px}.graph-node b,.graph-entry{font-size:22px}.graph-node span,.graph-entry small{font-size:11px}.graph-exit{width:46px}.forest-map .section-heading h1{font-size:30px}.forest-map .muted{font-size:11px}}

.pocket-battle .enemy img.illustrated-sprite{object-fit:contain;object-position:center bottom;user-select:none;-webkit-user-drag:none}

.pocket-battle .combat-actions{display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr;align-items:center;gap:12px;padding:3px 8px}.pocket-battle .combat-actions .use-card{grid-column:1;grid-row:1;height:54px;border:1px solid #e4d2a0;border-radius:10px;background:linear-gradient(140deg,#274b5c,#0a2130);font-size:16px;color:#fff0ce}.pocket-battle .combat-actions .use-card:disabled{opacity:.45}.pocket-battle .combat-actions .nexus-peek{position:relative;inset:auto;transform:none;grid-column:2;grid-row:1;justify-self:center;width:64px;height:58px}.pocket-battle .combat-actions .endturn{grid-column:3;grid-row:1;justify-self:end;width:66px;height:62px;font-size:19px}.pocket-battle .enemies{padding:2px 2px 0;gap:6px}.pocket-battle .enemy .illustrated-sprite{max-width:none;width:115%;margin-left:-7.5%;height:100%;object-fit:contain}.pocket-battle .enemy{grid-template-rows:32px 18px 3px minmax(40px,1fr) 28px 15px;gap:1px}.pocket-battle .enemy-art{min-height:0}.pocket-battle .enemy h2{line-height:16px}
.floor-graph svg.route-icon{position:static;width:40px;height:44px;display:block;margin:0 auto 4px;color:#e3d6ab;filter:drop-shadow(0 1px 3px #b6eff733)}.graph-node,.graph-entry{border-radius:14px;padding:12px 2px;background:linear-gradient(145deg,#244449c9,#0b252dea)}.graph-node.available{border-color:#a0e8c6;box-shadow:0 0 18px #b1f1d526}.graph-node.visited{border-color:#a0e8c6}.graph-node.visited small{font-size:20px}.graph-exit{border-color:#dec98d}.graph-node:disabled{opacity:.5}.graph-node.visited:disabled{opacity:.85}.graph-entry{background:transparent}.route-scroll{background:#071f2ac7}.graph-node span{font-size:12px}.floor-graph line{stroke:#aedbd1;opacity:.36;stroke-width:.4}
@media(max-width:600px){.floor-graph svg.route-icon{width:34px;height:40px}.graph-node span{font-size:11px}.pocket-battle .combat-actions{gap:6px}.pocket-battle .combat-actions .use-card{font-size:14px}}

.shop-cards.reward-cards{display:flex!important;flex-wrap:nowrap;gap:6px;align-items:stretch}.shop-cards.reward-cards>div{flex:1 1 0;width:calc((100% - 12px)/3);min-width:0;display:flex;flex-direction:column}.shop-cards.reward-cards>div>.card{width:100%;max-width:none;min-width:0;flex:1;margin:0}.shop-cards .buy{width:100%;padding:10px 2px;font-size:12px}.graph-node.visited,.graph-node.visited:disabled{border:2px solid #ffe16a;box-shadow:0 0 12px #ffdc6038}.forest-map>.section-heading,.forest-map>.map-guidance{background:#041c2b70;border-radius:10px;padding:12px 14px;text-shadow:0 1px 3px #000}.forest-map>.section-heading{margin-bottom:8px}.forest-map>.map-guidance{margin-top:0}.forest-map>.section-heading .eyebrow{color:#b8ffeb}.forest-map>.section-heading h1,.forest-map>.section-heading h1 span,.forest-map>.map-guidance{color:#f3f7eb}.pocket-battle .enemy h2{display:flex;align-items:center;justify-content:center;text-align:center;align-self:stretch;margin:0;padding:0 3px;height:100%;box-sizing:border-box}

/* Rare treasures stay conspicuous in both reward rows and shop shelves. */
.reward-cards .card.rarity-Epic{--treasure-glow:#c77dff;--treasure-edge:#eccbff}
.reward-cards .card.rarity-Legendary{--treasure-glow:#ffc440;--treasure-edge:#fff2ac}
.reward-cards .card:is(.rarity-Epic,.rarity-Legendary){border-color:var(--treasure-edge);box-shadow:0 0 9px var(--treasure-glow),0 0 19px var(--treasure-glow),inset 0 0 6px var(--treasure-glow);animation:treasureGlow 2s ease-in-out infinite alternate}
@keyframes treasureGlow{to{box-shadow:0 0 13px var(--treasure-glow),0 0 29px var(--treasure-glow),inset 0 0 10px var(--treasure-glow)}}
@media(prefers-reduced-motion:reduce){.reward-cards .card:is(.rarity-Epic,.rarity-Legendary){animation:none}}
/* Selection changes only the marker, never monster brightness. */
.pocket-battle .enemy .illustrated-sprite,.pocket-battle .enemy.selected .illustrated-sprite{filter:none;transition:none}
.pocket-battle .combat-actions{position:relative}
.turn-confirm{position:absolute;inset:0;z-index:12;display:grid;grid-template-columns:1fr 70px 70px;align-items:center;gap:10px;padding:6px 12px;border:1px solid #e6cc86;border-radius:10px;background:#071d2bf5;box-shadow:0 0 18px #0008}
.turn-confirm p{margin:0;color:#fff3cf;font-size:14px}.turn-confirm button{min-height:44px;border:1px solid #bba976;border-radius:6px;background:#244657;color:#fff3cf}.turn-confirm button:last-child{background:#142d3b}
.discard-instruction{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:8;pointer-events:none;white-space:nowrap;padding:12px 20px;border:1px solid #dcc487;background:#071d2beb;color:#fff3d2;text-shadow:0 2px 3px #000;box-shadow:0 4px 20px #0008;font-size:clamp(16px,4vw,22px)}
/* Enlarge only the illustration; keep nameplates and gauges at their existing size. */
.pocket-battle .enemy .illustrated-sprite{transform:scale(1.5);transform-origin:center center;pointer-events:none}
.pocket-battle .enemy-art{isolation:isolate;z-index:0}
.pocket-battle .enemy h2,.pocket-battle .enemy-hp,.pocket-battle .enemy>.bar,.pocket-battle .enemy .intent,.pocket-battle .enemy-status{position:relative;z-index:2}
.skip-reward{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
.character-picker .character-reference{height:clamp(300px,52vh,520px);background-image:url('/assets/frodia-character.jpeg');background-size:cover;background-position:center 30%}
.frodia-vitals{isolation:isolate}

.tp-stars{flex-wrap:wrap}
.player-statuses{display:flex;flex-wrap:wrap;align-items:center;gap:3px;min-width:0}
.tp-stars .player-statuses .status{font-size:12px;line-height:18px;white-space:nowrap;margin:0;padding:0 4px;background:#071c2ad9;border:1px solid currentColor;border-radius:3px}
.player-statuses .shock{color:#ffdc57}.player-statuses .poison{color:#d19aff}.player-statuses .weak{color:#ff8585}.player-statuses .vulnerable{color:#85c3ff}

/* The final boss occupies the complete three-enemy formation. */
.pocket-battle.core-battle .enemies{padding:2px 6px 0;width:100%;margin:0}
.pocket-battle .enemy.forest-core{grid-column:1/-1;width:100%;max-width:none;grid-template-rows:26px 20px 8px minmax(0,1fr) 30px 20px;gap:2px}
.pocket-battle .enemy.forest-core h2{font-size:18px;letter-spacing:.12em;min-height:0;line-height:24px;color:#fff3ca;border-color:#d8c582;background:linear-gradient(90deg,#071b1ce8,#244439e6,#071b1ce8)}
.pocket-battle .enemy.forest-core>.bar{width:100%;height:8px;margin:0;box-shadow:0 0 0 1px #d5b97788,0 0 10px #bdaa4933}
.pocket-battle .enemy.forest-core .enemy-hp{justify-content:center;gap:5px;flex-wrap:nowrap;padding:0}
.pocket-battle .enemy.forest-core .enemy-art{width:100%;height:100%;min-height:0;margin:0;display:flex;align-items:center;justify-content:center}
.pocket-battle .enemy.forest-core .illustrated-sprite{width:100%;height:100%;margin:0;transform:none;object-fit:contain;object-position:center;filter:drop-shadow(0 5px 12px #020b08aa)}
.pocket-battle .enemy.forest-core .intent{flex-direction:row;justify-content:center;align-items:center;min-height:0}
.pocket-battle .enemy.forest-core .enemy-status{justify-content:center;min-height:0}
body.battle-mode .pocket-battle.core-battle{grid-template-rows:minmax(210px,1fr) 23px clamp(225px,30dvh,285px) 76px}
@media(max-height:680px) and (orientation:portrait){body.battle-mode .pocket-battle.core-battle{grid-template-rows:minmax(180px,1fr) 22px 225px 60px}}
@media(orientation:landscape) and (max-height:650px){body.battle-mode .pocket-battle.core-battle{grid-template-rows:minmax(0,1fr) 58px}}
