:root{color-scheme:dark;--bg:#101114;--panel:#1d1f25;--line:#3d404a;--muted:#aeb4c0;--green:#e8b53a;--ink:#eceef2}*{box-sizing:border-box}body{margin:0;background:repeating-linear-gradient(to bottom,#101114 0 6px,#15161a 6px 8px);color:var(--ink);font:16px/1.5 system-ui,sans-serif}main{max-width:1500px;margin:auto;padding:32px 40px}header,.toolbar,.action,.card-head{display:flex;justify-content:space-between;align-items:center;gap:16px}header{border-bottom:1px solid var(--line);padding-bottom:24px}.brand{font-weight:800;letter-spacing:.09em;display:flex;align-items:center;gap:12px;font-size:14px}.muted{color:var(--muted)}.ball{display:inline-block;width:26px;height:26px;border:3px solid var(--green);border-radius:50%;background:linear-gradient(0deg,transparent 43%,var(--green) 43%,var(--green) 57%,transparent 57%)}.tag{font-size:13px;color:var(--green);border:1px solid #537151;border-radius:20px;padding:5px 12px}.intro{padding:38px 0 20px}.eyebrow{font-size:12px;letter-spacing:.2em;color:var(--green);font-weight:700}h1{font-size:clamp(32px,4vw,54px);letter-spacing:-.04em;line-height:1.1;margin:18px 0}h1 span{color:var(--green)}.intro>p:last-child{max-width:680px;color:var(--muted)}.notice{background:#282719;border:1px solid #585239;padding:14px 18px;border-radius:10px;color:#eadfbb;font-size:14px}.toolbar{margin:24px 0}.toolbar p{font-size:14px;color:var(--muted)}button,input,select{font:inherit}button{cursor:pointer;border:1px solid var(--line);border-radius:8px;padding:10px 15px;color:var(--ink);background:linear-gradient(#353944,#23262e)}button:hover{filter:brightness(1.16)}button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--green);outline-offset:3px}.secondary{background:transparent;font-size:14px}.teams{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.team{background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:hidden}.team:first-child{border-color:#e8b53a}.card-head{padding:18px;border-bottom:1px solid var(--line)}h2{font-size:18px;margin:0}.card-head span{font-size:12px;color:var(--muted)}.pokemon{padding:16px;border-bottom:1px solid var(--line)}.row{display:flex;gap:10px;align-items:end}.row>label{flex:1;min-width:0}label{display:block;font-size:14px;color:var(--muted);margin-bottom:10px}input,select{display:block;width:100%;margin-top:5px;border:1px solid #4a4d57;border-radius:6px;padding:8px;background:#16171c;color:var(--ink);min-height:40px;font-size:14px}select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,#a8bacb 50%),linear-gradient(135deg,#a8bacb 50%,transparent 50%);background-position:calc(100% - 14px) 17px,calc(100% - 10px) 17px;background-size:4px 4px;background-repeat:no-repeat;padding-right:25px}.poke-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-size:12px;color:var(--green)}.mini{padding:3px 8px;font-size:13px;min-height:28px}.stats{display:grid;grid-template-columns:repeat(2,1fr);gap:0 10px}.types{font-size:12px;color:var(--green);margin:0 0 12px}.check{display:flex;align-items:center;gap:8px}.check input{width:16px;height:16px;min-height:0;margin:0}.add{margin:14px;width:calc(100% - 28px);background:transparent;border-style:dashed;font-size:14px}.action{margin:24px 0;background:linear-gradient(120deg,#20252e,#17191f);border:1px solid #4a4d57;padding:22px;border-radius:12px}.action p{font-size:14px;color:var(--muted);margin:4px 0 0}.primary{background:linear-gradient(#70b4ff,#2f7fd8);color:#fff;border:2px solid #215b9d;font-weight:800;white-space:nowrap;padding:14px 20px}.results-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.result{border:1px solid var(--line);background:var(--panel);padding:24px;border-radius:12px}.result.best{border-color:var(--green)}.result .score{font-size:38px;font-weight:800;color:var(--green);margin:12px 0 0}.result p{color:var(--muted);font-size:14px}.result .badge{font-size:12px;color:var(--green)}.bar{height:6px;background:#334354;margin:18px 0;border-radius:6px;overflow:hidden}.bar span{height:100%;display:block;background:var(--green)}.method{margin-top:30px;border-top:1px solid var(--line);padding-top:24px;color:var(--muted);font-size:14px}.method summary{cursor:pointer;color:var(--ink);font-size:16px}.method p{max-width:1000px}a{color:var(--green)}footer{font-size:12px;color:var(--muted);padding:30px 0}footer span{float:right}.error{padding:20px;background:#42262d;border-radius:10px}.empty{padding:20px;color:var(--muted);font-size:14px}@media(max-width:1150px){.teams{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){main{padding:20px 16px}.brand .muted{display:none}.teams,.results-grid{grid-template-columns:1fr}.action{align-items:stretch;flex-direction:column}.toolbar{align-items:start}.tag{font-size:11px}footer span{float:none;display:block}}

header{position:relative;background:linear-gradient(#2a2b31,#050506 70%);margin:-32px -40px 0;padding:14px 40px;border-bottom:3px solid #d8433a;box-shadow:0 3px 0 #050506}.brand{letter-spacing:0;gap:12px;flex-wrap:wrap}.brand img{image-rendering:pixelated}.brand .muted{font-size:12px;letter-spacing:.12em;margin-left:12px}.wordmark{font-size:25px;font-style:italic;font-weight:900;color:#f5bd27;text-shadow:-1px -1px #2f7fd8,2px 2px #245da0;letter-spacing:-.04em}.tag{background:#211c11;border-color:#8b6d27;color:#f5ce71}.intro{display:grid;grid-template-columns:1.1fr 1fr;gap:32px;align-items:center;padding:38px 0 28px}.intro-copy>p:last-child{color:var(--muted);max-width:620px}.intro h1{font-size:clamp(30px,3.6vw,48px)}.hero-art{position:relative;isolation:isolate;border:2px solid #4a4d57;box-shadow:inset 0 0 0 3px #101114,0 5px 0 #0006;border-radius:14px;overflow:hidden;height:230px;background:#18281e}.hero-art>#arena{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;image-rendering:pixelated;z-index:-2;filter:brightness(.7)}.hero-art:after{content:'';position:absolute;inset:0;background:linear-gradient(transparent 40%,#0b1716cc);z-index:-1}.hero-sprites{height:100%;display:flex;align-items:center;justify-content:center;padding-bottom:8px}.hero-sprites img{width:33%;max-width:170px;image-rendering:pixelated;filter:drop-shadow(0 7px 2px #0007)}.hero-sprites img:nth-child(2){transform:translateY(-10px)}.scene-caption{position:absolute;bottom:16px;left:0;right:0;text-align:center;font-size:11px;letter-spacing:.15em;font-weight:800;color:#fff}.notice{border-left:4px solid #e8b53a;background:#252119;color:#e3d6b3}.team{border-width:2px;box-shadow:0 4px 0 #0007}.card-head{background:linear-gradient(#373b45,#292c34);border-bottom:2px solid #101114}.team:first-child .card-head{background:linear-gradient(#574426,#392d1c)}.card-head h2{font-weight:800}.card-head span{background:#10111488;border-radius:20px;padding:2px 8px;color:#ddd}.portrait{display:flex;align-items:center;min-height:112px;gap:6px;margin:-5px -8px 12px;background:radial-gradient(ellipse at 30% 70%,#363d4266,transparent 65%);border-bottom:1px solid #33363e;padding-bottom:6px}.sprite{image-rendering:pixelated;object-fit:contain;flex:none;filter:drop-shadow(0 5px 1px #0005)}.portrait strong{font-size:17px;display:block;overflow-wrap:anywhere}.level-badge{display:block;font:700 12px ui-monospace,monospace;color:#d1bb83;margin:5px 0 8px}.type-chips{display:flex;flex-wrap:wrap;gap:4px}.type-chip{display:inline-block;font-size:11px;line-height:1.5;padding:2px 7px;border-radius:4px;font-weight:800;background:var(--type-color,#b8b6ac);color:#16171c;box-shadow:inset 0 -2px #0002}.type-chip[data-type=grass]{--type-color:#7ac74c}.type-chip[data-type=fire]{--type-color:#ee8130}.type-chip[data-type=water]{--type-color:#6390f0}.type-chip[data-type=poison]{--type-color:#a33ea1;color:white}.type-chip[data-type=electric]{--type-color:#f7d02c}.type-chip[data-type=flying]{--type-color:#a98ff3}.type-chip[data-type=ground]{--type-color:#d4a068}.type-chip[data-type=rock]{--type-color:#b6a136}.type-chip[data-type=bug]{--type-color:#a6b91a}.type-chip[data-type=ghost]{--type-color:#735797;color:white}.type-chip[data-type=psychic]{--type-color:#f95587}.type-chip[data-type=ice]{--type-color:#96d9d6}.type-chip[data-type=dragon]{--type-color:#6f35fc;color:white}.type-chip[data-type=dark]{--type-color:#705746;color:white}.type-chip[data-type=steel]{--type-color:#8e9fc4}.type-chip[data-type=fighting]{--type-color:#c22e28;color:white}.item-label{display:flex;align-items:center;gap:8px;min-height:24px}.item-label img{image-rendering:pixelated}.primary{box-shadow:0 3px 0 #122f53;text-shadow:0 1px #174477}.result{border-width:2px;box-shadow:0 3px 0 #0006}.result.best{background:linear-gradient(145deg,#30291b,#1d1f25)}.bar{background:#33363e}.bar span{background:linear-gradient(90deg,#2f7fd8,#78b8ff)}.mini{background:#17191f}.pokemon summary{font-size:14px;cursor:pointer}.empty{min-height:170px;display:flex;align-items:center;justify-content:center;text-align:center}.add:hover{border-color:#79b7ff;color:#b7d8ff}@media(min-width:1151px) and (max-width:1300px){.sprite{width:90px;height:100px}.portrait strong{font-size:15px}}@media(max-width:850px){.intro{grid-template-columns:1fr}.hero-art{height:190px}.hero-sprites img{max-width:160px}.intro{gap:12px}}@media(max-width:640px){header{margin:-20px -16px 0;padding:12px 16px}.wordmark{font-size:22px}.brand img{width:32px;height:32px}.intro{padding-top:22px}.hero-art{height:170px}.hero-sprites img{max-width:140px}.scene-caption{font-size:10px}.portrait{justify-content:start}.tag{max-width:125px;text-align:center}}

/* Interface mobile centrée, contrôles tactiles. */
main{width:100%;max-width:480px;margin:0 auto;padding:0;min-height:100dvh;background:var(--bg);box-shadow:0 0 40px #0005}header{margin:0;padding:12px 16px;width:100%}.intro{display:block;margin:0;padding:0}.hero-art{height:150px;border:0;border-bottom:2px solid var(--line);border-radius:0;box-shadow:none}.hero-sprites{padding:0}.hero-sprites img{width:130px;max-width:30%}.toolbar{margin:0;padding:12px;justify-content:flex-end}.teams{grid-template-columns:minmax(0,1fr);gap:12px;padding:0 12px}.results-grid{grid-template-columns:minmax(0,1fr)}.team{min-width:0}.action{margin:12px;padding:12px;justify-content:center}.primary{width:100%;min-height:48px;white-space:normal}#results{padding:0 12px 16px}#results:empty{padding:0}#save-status:empty{display:none}#save-status{margin:12px}button,.mini{min-height:44px}.mini{min-width:44px}input,select{min-height:44px;font-size:16px}.check{min-height:44px}.check input{width:20px;height:20px}.empty{min-height:0}@media(max-width:640px){header{margin:0;padding:10px 12px}.intro{padding:0}.hero-art{height:112px}.hero-sprites img{width:112px;max-width:32%}.teams{grid-template-columns:1fr;padding:0;gap:12px}.team{border-left:0;border-right:0;border-radius:0}.card-head{padding:14px 16px}.pokemon{padding:14px 16px}.action{margin:12px 0;border-radius:0;border-left:0;border-right:0}.results-grid{grid-template-columns:1fr}.result{padding:18px}}

/* Bureau en colonnes, mobile compact. */
main{max-width:1480px;margin:0 auto;min-height:100dvh}.teams{grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;gap:12px}.results-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hero-art{height:85px}.hero-sprites img{width:100px;max-width:30%}.hero-sprites{gap:24px}.toolbar{padding:8px 12px}.card-head{padding:10px 12px}.card-head h2{font-size:16px}.pokemon{padding:10px 12px}.poke-title{margin-bottom:2px}.portrait{min-height:72px;margin:0 0 8px;padding:0;gap:8px}.sprite{width:76px;height:76px}.portrait strong{font-size:15px}.dex-number{color:var(--muted);font-size:12px;font-weight:500}.level-badge{margin:2px 0 4px}.equipment{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.equipment label{min-width:0}.item-label{min-height:21px}.item-label img{width:20px;height:20px}label{margin-bottom:7px}input,select{margin-top:3px;padding:7px;font-size:14px}select{padding-right:22px}.stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding-top:4px}.stats label{font-size:12px;margin:0}.stats input{padding:5px;min-height:36px;font-size:14px}.add{margin:10px;width:calc(100% - 20px)}.action{margin:12px;max-width:none}.primary{width:auto;min-width:280px}.result{padding:16px}.result .score{font-size:32px;margin-top:4px}.result p{margin:4px 0}.bar{margin:10px 0}@media(min-width:641px) and (max-width:1100px){.teams{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){main{max-width:none}.teams{grid-template-columns:minmax(0,1fr);gap:10px}.results-grid{grid-template-columns:minmax(0,1fr)}.hero-art{height:64px}.hero-sprites img{width:80px}.pokemon{padding:10px 12px}.portrait{min-height:66px}.sprite{width:68px;height:68px}.card-head{padding:10px 12px}input,select{font-size:16px}.stats input{font-size:16px;min-height:44px}.primary{width:100%;min-width:0}.action{margin:10px 0}.check{margin-bottom:7px}}

.drag-handle{touch-action:none;user-select:none;cursor:grab;padding:4px 8px;min-height:44px;display:flex;align-items:center;gap:6px;background:transparent;border:1px solid transparent;font-size:12px;color:var(--green)}.drag-handle span{font-size:24px}.drag-handle:active{cursor:grabbing}.pokemon.dragging{opacity:.55}.pokemon.drop-before{box-shadow:inset 0 4px #e8b53a}.pokemon.drop-after{box-shadow:inset 0 -4px #e8b53a}.poke-title{gap:6px}.poke-title>div{display:flex;gap:4px}
