*{box-sizing:border-box}body{margin:0;background:#edf3ef;color:#30483f;font-family:Arial,sans-serif;letter-spacing:0}header{max-width:1040px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:20px 22px 12px;gap:12px}small{font-size:9px;font-weight:bold;color:#718778}h1{font-size:27px;margin:7px 0}h1 span{font-size:14px;font-weight:normal;margin-left:10px;color:#69796d}.tools{display:flex;gap:7px}button{font:inherit;cursor:pointer;border:1px solid #cbd8ce;border-radius:5px;padding:10px 16px;background:#fff;color:#30564a;touch-action:none}button:hover{background:#dfece3}button:focus-visible{outline:3px solid #cb9e50;outline-offset:3px}button:disabled{opacity:.45;cursor:default}.tools button{width:41px;height:41px;padding:0;font-size:21px}main{max-width:1040px;margin:auto;padding:0 22px}.hud{display:flex;justify-content:space-between;gap:10px;font-size:12px;font-weight:bold;padding:10px 0 14px}.stage{position:relative;overflow:hidden;border-radius:6px;background:#97c395}#world{display:block;width:100%;height:auto;aspect-ratio:3/2;touch-action:none}.bottom{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:10px 0}#notice{font-size:13px;line-height:1.5;max-width:550px}.pad{display:grid;grid-template-columns:repeat(3,40px);grid-template-rows:repeat(2,33px);gap:3px}.pad button{padding:0;font-size:21px}.pad button:first-child{grid-column:2}.pad button:nth-child(2){grid-column:1}#battle{position:absolute;inset:0;background:#e4efdc;padding:18px;display:flex;flex-direction:column}.battle-head{display:flex;justify-content:space-between;align-items:center;font-size:11px;font-weight:bold;text-transform:uppercase}.battle-head button{padding:4px 12px;font-size:20px}.arena{position:relative;flex:1;min-height:0;background:linear-gradient(#bbdedb 0%,#e2ecd8 63%,#b8d3aa 64%);border-radius:5px;margin-top:10px}.arena canvas{position:absolute;width:30%;height:55%;object-fit:contain}#enemy-art{right:12%;top:2%}#friend-art{left:11%;bottom:1%}.enemy-stat,.friend-stat{position:absolute;width:35%;display:grid;gap:7px;font-size:13px}.enemy-stat{left:5%;top:10%}.friend-stat{right:5%;bottom:10%}.enemy-stat span,.friend-stat span{font-size:11px}progress{width:100%;height:12px;accent-color:#5b9870}#battle-log{height:40px;flex-shrink:0;font-size:14px;line-height:1.4;margin:15px 0 8px}.battle-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.battle-actions button{font-size:13px;font-weight:bold;padding:13px 5px}#attack{background:#477f6a;color:#fff}#catch{background:#c56d71;color:white}#overlay{position:fixed;inset:0;background:#ecf3e9ee;backdrop-filter:blur(5px);display:grid;place-items:center;padding:18px;overflow:auto}.dialog{max-width:720px;width:100%;text-align:center}h2{font-size:28px;margin:14px 0}#detail{font-size:14px;line-height:1.5}#choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:22px 0}.choice{display:flex;flex-direction:column;align-items:center;gap:7px;padding:10px 5px;border-radius:6px}.choice canvas{width:100%;height:130px;object-fit:contain}.choice strong{font-size:14px}.choice span{font-size:11px}#continue{background:#447b66;color:#fff;font-weight:bold}[hidden]{display:none!important}@media(max-width:620px){header{padding:14px 12px 8px}h1{font-size:22px}h1 span{display:block;font-size:11px;margin:5px 0 0}.tools button{width:35px;height:36px}main{padding:0 9px}.hud{font-size:10px;gap:6px}.bottom{gap:10px}#notice{font-size:11px}#battle{padding:9px}.stage:has(#battle:not([hidden])){min-height:425px}.battle-head{font-size:9px}.arena{min-height:230px}.enemy-stat,.friend-stat{font-size:12px;width:42%}.enemy-stat{top:8%;left:3%}.friend-stat{bottom:7%;right:3%}.arena canvas{width:43%;height:54%}#enemy-art{right:2%}#friend-art{left:0}.battle-actions{grid-template-columns:repeat(2,1fr);gap:5px}.battle-actions button{padding:10px 4px;font-size:12px}#battle-log{font-size:12px;height:36px;margin:8px 0}.choice canvas{height:90px}.choice strong{font-size:12px}#choices{gap:6px}h2{font-size:23px}}
/* Full-bleed 3D world and battle overlays. */
body{overflow:hidden;background:#c9e4eb}#world{position:fixed;inset:0;width:100%;height:100%;aspect-ratio:auto}header{position:fixed;inset:0 0 auto;z-index:2;max-width:none;padding:20px 24px;pointer-events:none;background:linear-gradient(#eff6ede6,transparent)}header .tools{pointer-events:auto}main{max-width:none;padding:0}.stage{position:static;border-radius:0;background:none;overflow:visible}.hud{position:fixed;top:105px;left:24px;z-index:2;justify-content:flex-start;flex-wrap:wrap;gap:10px 20px;max-width:calc(100% - 48px);padding:10px 14px;background:#f5f8eeea;border-radius:5px;pointer-events:none}#region-name{color:#406c67}.bottom{position:fixed;bottom:22px;left:24px;right:24px;z-index:2;padding:0;pointer-events:none}#notice{background:#f4f8eceb;padding:12px 16px;border-radius:5px;max-width:60%;margin:0}.pad{pointer-events:auto;grid-template-columns:repeat(3,46px);grid-template-rows:repeat(2,43px)}#battle{position:fixed;inset:0;z-index:3;background:none;padding:0;pointer-events:none}.battle-head{position:absolute;top:155px;left:24px;right:24px;color:#34564e}.battle-head button{pointer-events:auto;background:#f6f8ee}.arena{display:contents;background:none}.arena canvas{display:none}.enemy-stat,.friend-stat{position:absolute;background:#f9faeee8;padding:12px 16px;border-radius:5px;width:230px;pointer-events:none}.enemy-stat{top:205px;right:7%;left:auto}.friend-stat{bottom:165px;left:6%;right:auto}#battle-log{position:absolute;bottom:87px;left:50%;transform:translateX(-50%);width:min(680px,90%);height:auto;min-height:44px;background:#f6f8eef0;padding:12px 16px;border-radius:5px;margin:0}.battle-actions{position:absolute;bottom:26px;left:50%;transform:translateX(-50%);width:min(680px,90%);pointer-events:auto}body:has(#battle:not([hidden])) .bottom{display:none}#overlay{z-index:10;align-items:start;padding:30px 18px}.dialog{margin:auto;max-height:calc(100dvh - 60px);overflow:auto;padding:10px;max-width:850px}#choices{grid-template-columns:repeat(4,minmax(0,1fr))}.region-choice{min-height:66px;text-align:left;font-size:13px;line-height:1.4;padding:12px}.choice canvas{height:110px}
@media(max-width:650px){header{padding:12px}.hud{top:94px;left:12px;max-width:calc(100% - 24px);gap:7px 12px;font-size:10px;padding:8px 10px}.bottom{left:12px;right:12px;bottom:14px}#notice{font-size:10px;padding:9px;max-width:52%}.pad{grid-template-columns:repeat(3,41px);grid-template-rows:repeat(2,40px)}.battle-head{top:158px;left:12px;right:12px;font-size:10px}.enemy-stat{top:205px;right:12px;width:155px;padding:9px 11px}.friend-stat{left:12px;bottom:238px;width:155px;padding:9px 11px}.battle-actions{bottom:18px;width:calc(100% - 24px);grid-template-columns:repeat(2,1fr)}#battle-log{bottom:112px;width:calc(100% - 24px);font-size:12px;min-height:44px}.arena{min-height:0}.stage:has(#battle:not([hidden])){min-height:0}#choices{grid-template-columns:repeat(3,minmax(0,1fr))}.choice canvas{height:88px}.region-choice{font-size:11px;min-height:68px;padding:8px}.dialog{padding:4px}#overlay{padding:18px 8px}.battle-actions button{min-height:40px}}
/* Searchable, paginated national collection; cards remain a fixed size. */
#dex-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:18px 0}#dex-search,#dex-generation{font:inherit;border:1px solid #afc3b9;background:#fff;color:#304b42;border-radius:5px;padding:10px;min-width:0}#dex-search{flex:1;min-width:160px}#dex-generation{max-width:230px}#dex-tools label{display:flex;gap:6px;align-items:center;font-size:12px}#dex-owned{accent-color:#477f6a}#list-pagination{display:flex;justify-content:center;align-items:center;gap:20px;margin:20px 0}.dex-choice{min-height:187px;justify-content:flex-start}.dex-choice strong{min-height:34px;line-height:1.25;overflow-wrap:anywhere}.dex-choice span{line-height:1.3}#overlay[data-mode="team"] #dex-tools label{display:none}.dialog{scrollbar-gutter:stable}.tools{flex-shrink:0}#pokedex{font-size:16px}.hud{max-width:calc(100% - 48px)}
@media(max-width:650px){header{align-items:flex-start}h1{font-size:19px}.tools{gap:3px}.tools button{width:30px;height:34px;font-size:18px}#pokedex{font-size:13px}h1 span{font-size:10px}header small{font-size:7px}.hud{top:94px}#dex-tools{gap:7px}#dex-search{width:100%;flex-basis:100%}#dex-generation{font-size:12px;max-width:200px}.dex-choice{min-height:167px}.dex-choice strong{font-size:11px;min-height:30px}.dex-choice span{font-size:10px}#choices{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Cartoon refresh: clear white surfaces and colorful battle commands. */
button{border-color:#b7c8d3;color:#284c68}header small{color:#487986}h1{color:#315e87}#attack{background:#398b82}#catch{background:#df7279}#special{background:#f1ce6f;color:#445068}#heal{background:#e3eef8;color:#3e6f8a}.hud{background:#ffffffed;color:#365969;border:1px solid #d0e2e8}.enemy-stat,.friend-stat,#battle-log{background:#ffffffed;color:#355466}#overlay{background:#eef6f1f2}.choice{background:#fff;border:1px solid #c6d7e2;box-shadow:0 3px 0 #dce7e9}.choice:hover{background:#fff8e1}.choice canvas{height:130px}.choice strong{color:#2d5676}#overlay[data-mode="starter"] #choices{grid-template-columns:repeat(3,minmax(0,1fr))}#overlay[data-mode="starter"] .choice canvas{height:180px}#continue{background:#477eaf}.battle-actions button{border-bottom-width:3px}
@media(max-width:650px){.choice canvas{height:90px}#overlay[data-mode="starter"] .choice canvas{height:112px}}
.coop-panel{grid-column:1/-1;display:grid;gap:16px;text-align:left;min-width:0}.coop-panel label{display:grid;gap:6px}.coop-panel input{font:inherit;padding:10px;min-width:0;width:100%;box-sizing:border-box;border:1px solid #b7c8d3;border-radius:4px}.coop-panel .coop-follow{display:flex;align-items:center}.coop-follow input{width:auto}.coop-panel button{padding:12px}#online-status:empty{display:none}
@media(max-width:420px){header{gap:5px;padding-left:10px;padding-right:10px}header .tools{gap:2px}.tools button{width:27px}h1{font-size:17px}header small{font-size:6px}}
