/* Production UI: clear focus, bounded dialogs and generous board space. */
body.production22{--accent22:#ead18c;--panel22:#152d38;--text22:#edf1e2}
body.production22 #modal{padding:18px;background:#070e1bcc!important;backdrop-filter:blur(9px)}
body.production22 #modal .modal-card{background:linear-gradient(145deg,#213b48,#101e31)!important;border:1px solid #afc7b66b!important;border-radius:22px!important;box-shadow:0 24px 90px #0009,inset 0 1px #f4e0af22;max-height:calc(100dvh - 36px)!important;overflow:hidden!important}
body.production22 #modal-head{border-bottom:1px solid #bad4bd22;padding:16px 20px!important;min-height:58px;background:#162c3866}
body.production22 #modal-head h2{color:#f0d891!important;font-size:20px!important;font-weight:800;letter-spacing:-.02em}
body.production22 #modal-head>button{border:1px solid #b4cfc244!important;border-radius:11px!important;background:#334b5b!important;color:#eff4e7;width:36px;height:36px;flex:none}
body.production22 #modal-body{padding:18px!important;scrollbar-width:thin;scrollbar-color:#829c9588 transparent}
body.production22 #modal-body p{color:#cfddd3;line-height:1.7}
body.production22 #modal-body button{border-radius:11px;min-height:38px}
body.production22 #modal-body input,body.production22 #modal-body select{color:#edf1e2;background:#102837;border:1px solid #9bbcaf66;border-radius:9px;max-width:100%}
body.production22 #modal-body input::placeholder{color:#a8bdb4}
body.production22 .setting-row{gap:15px;flex-wrap:wrap}
body.production22 .setting-row select{min-height:40px}
body.production22 .muted22{font-size:12px;color:#a9c3b9!important}
.language-home22{position:absolute;top:18px;right:24px;z-index:4;display:flex;gap:8px;align-items:center;background:#172e3ac9;border:1px solid #b4c7ae44;border-radius:20px;padding:3px 8px;color:#a7c3b6;font:12px system-ui}
.language-home22 button{min-height:28px!important;min-width:26px;padding:3px!important;background:transparent!important;border:0!important;color:#edf0d9;font:700 11px system-ui}
body.production22 #modal.profile-modal22 .modal-card{width:min(1120px,96vw)!important;max-width:1120px!important}
.profile22{display:grid;grid-template-columns:minmax(210px,31%) minmax(0,1fr);gap:18px;min-height:460px}
.profile-preview22{position:relative;overflow:hidden;border:2px solid #7fbc9c;border-radius:16px;min-height:460px;background:#26453b;display:flex;flex-direction:column;justify-content:flex-end;padding:15px;isolation:isolate;text-align:center;box-shadow:inset 0 0 0 3px #092c3233}
.frame-gold{border-color:#e6c677!important}.frame-astral{border-color:#ac93e1!important}.frame-ember{border-color:#e8a170!important}.frame-jade{border-color:#83bd9a!important}
.profile-arena-art22{position:absolute;inset:0;z-index:-1;background:#173439}.profile-arena-art22 svg{height:100%;width:100%;object-fit:cover;transform:scale(1.16)}
.profile-arena-art22:after{content:'';position:absolute;inset:0;background:linear-gradient(#14243022,#102c3520 40%,#102637f5 90%)}
.profile-mini22{position:absolute;top:12px;left:12px;right:12px;display:flex;align-items:center;gap:9px;color:#e9e2c8;text-align:left;font-size:12px}
.profile-mini22>svg{width:46px!important;height:52px!important;border:1px solid #dae0b655;border-radius:24px;background:#203f3bcc;padding:4px}
.profile-mini22 b{padding:7px 9px;background:#102f32bb;border:1px solid #dcdfb944;border-radius:15px;line-height:1.4}
.profile-actors22{display:flex;align-items:flex-end;justify-content:center;gap:8px;margin-top:100px;margin-bottom:12px;min-height:180px}
.profile-actors22>svg{width:42%!important;height:190px!important;max-height:none!important;overflow:visible}
.profile-actors22>div{width:47%;height:150px;display:flex;align-items:flex-end}.profile-actors22 canvas{width:100%!important;height:140px!important;max-height:none!important;object-fit:contain}
.profile-name22 h3{margin:4px 0 9px!important;color:#fff2ca!important;font-size:26px!important;text-shadow:0 2px #122d30}
.profile-name22>span{display:inline-block;border-radius:14px;padding:4px 12px;background:#ead08c;color:#263e3d;font-size:11px;font-weight:800}
.profile-name22>button{display:block;margin:12px auto;background:#102f3c99;color:#fae0a6;min-width:46px}
.profile-preview22>small{font-size:10px;line-height:1.5;color:#c0d2c6;margin-top:10px}
.profile-library22{min-width:0;display:flex;flex-direction:column;gap:12px}
.profile-library22>nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;flex:none}
.profile-library22>nav>button{display:flex;align-items:center;gap:7px;text-align:left;min-width:0;padding:10px 9px!important;min-height:48px;color:#dce8df;background:#283b54;border:1px solid #a3bdd044;font-size:12px}
.profile-library22>nav>button .glyph9{width:21px;height:21px;flex:none}
.profile-library22>nav>button.selected{border:2px solid #e9cc81;box-shadow:inset 0 0 18px #dfbd3c1f}
.profile-content22{max-height:min(55dvh,540px);min-height:280px;overflow:auto;overscroll-behavior:contain;padding-right:5px;scrollbar-width:thin}
.profile-section22{margin:0 0 13px}.profile-section22>b{font-size:13px;color:#eddcaa}.profile-section22>p{font-size:11px!important;line-height:1.6!important;margin:5px 0!important}.profile-section22>button{font-size:11px;margin-top:7px}
.arena-gallery22{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.arena-card22{position:relative;min-width:0;padding:0 0 8px!important;background:#1d303f!important;border:1px solid #859f9b66!important;overflow:hidden;text-align:left;display:flex;flex-direction:column;gap:5px;color:#eee7d0}
.arena-card22.selected{border:2px solid #eacc7d!important;box-shadow:0 0 14px #e3c86922}.arena-card22.selected:after{content:'✓';position:absolute;right:6px;top:6px;width:19px;height:19px;background:#ead084;border-radius:50%;text-align:center;line-height:19px;color:#233941;font-weight:900}
.arena-card22>svg{display:block;width:100%;height:auto}.arena-card22>b{font-size:11px;line-height:1.3;padding:0 7px;min-height:27px}.arena-card22>span{display:flex;align-items:center;gap:4px;font-size:9px;color:#d0ddc7;padding:0 7px}.arena-card22>span img{width:13px;height:13px}.arena-card22>small{display:block;padding:0 7px;color:#b0c8bd;line-height:1.5;font-size:9px}
.trainer-choices22,.partner-choices22{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.trainer-choices22>button,.partner-choices22>button{background:#243d4b;border:1px solid #aec1a955;padding:8px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:0;font-size:10px}.trainer-choices22 svg{width:53px!important;height:80px!important}.partner-choices22 canvas{width:100%!important;height:72px!important;max-height:none!important;object-fit:contain}.cosmetic-choices22{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.cosmetic-choices22 button{padding:20px 12px;background:#243e4e;border:2px solid #a1b8ab55;display:flex;flex-direction:column;gap:12px}.cosmetic-choices22 small{font-size:10px;color:#b8cdbc}.profile22 button.selected{outline:1px solid #f0dc9e;outline-offset:-4px}.profile-load22{display:flex;align-items:center;gap:12px;margin:8px 0;width:100%}
.arena-guide22{background:transparent;border:0!important;color:#e9d29b;font-size:12px;min-width:22px;padding:0 4px!important;min-height:20px!important}.arena-guide-art22{max-width:400px;margin:auto}.arena-guide-art22 svg{width:100%}
body.production22 #modal.result-modal22 .modal-card{width:min(720px,95vw)!important}.result-hero22{position:relative;text-align:center;overflow:hidden;border-radius:17px;background:radial-gradient(ellipse at 50% 10%,#64553b66,transparent 70%),linear-gradient(#26474b66,#122c3a66);padding:22px 15px 15px;margin-bottom:17px;isolation:isolate}.result-rays22{position:absolute;inset:-100%;z-index:-1;opacity:.14;background:repeating-conic-gradient(from 0deg,#efd391 0deg 9deg,transparent 9deg 24deg);animation:ray22 60s linear infinite}.result-medal22{font-size:47px;color:#f5d58a;text-shadow:0 0 30px #edc57a77;line-height:1.1;margin:0 0 8px}.result-hero22>small{font:800 9px system-ui;letter-spacing:.24em;color:#d3c59d}.result-hero22 h2{font-size:clamp(24px,4vw,38px)!important;margin:6px 0!important;color:#fce6a9!important;letter-spacing:.04em;font-weight:900}.result-hero22 p{font-size:12px;margin:6px 0 12px!important}.defeat22{background:radial-gradient(ellipse at 50% 10%,#77627944,transparent),#162d3c}.defeat22 .result-medal22,.defeat22 h2{color:#cbc6e6!important}.defeat22 .result-rays22{opacity:.055}.celebration-rings .result-rays22{background:repeating-radial-gradient(circle,#f5d39411 0 30px,#f4dc9199 31px 32px,transparent 33px 65px)}.celebration-quiet .result-rays22{display:none}.result-team22{display:flex;justify-content:center;gap:9px;flex-wrap:wrap}.result-team22>span{display:flex;flex-direction:column;align-items:center;min-width:0;width:64px}.result-team22 canvas{width:64px!important;height:52px!important;max-height:none!important;object-fit:contain}.result-team22 small{color:#e4c77e;font-size:10px}.result-stats22{display:grid;grid-template-columns:repeat(3,1fr);max-width:380px;margin:14px auto 0;gap:10px}.result-stats22>span{border:1px solid #abc3b52e;border-radius:10px;padding:8px;font-size:10px;color:#bfd3c8;display:flex;flex-direction:column;gap:4px}.result-stats22 b{font:800 20px system-ui;color:#f1dfae}body.production22 .result-rank{border:1px solid #9ebaa22c;background:#29455255;border-radius:10px;padding:11px 14px;margin:7px 0;font-size:12px}.result-rank>b{color:#e7ce93}body.production22 #modal-body .primary{background:linear-gradient(#f5bf77,#df934e)!important;border:1px solid #ffdfa7!important;color:#202f36!important;box-shadow:0 3px 0 #8b5b32}
.evo-card22{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:radial-gradient(ellipse at 50% 45%,#5886a366,#172d43 65%);border:1px solid #ddd89a99;border-radius:26px;width:min(580px,92vw);padding:28px 18px;color:#e8e7c9;box-shadow:0 0 90px #6589ab66;max-height:94dvh}.evo-card22>small{font:800 9px system-ui;letter-spacing:.23em;color:#e9d594}.evo-card22>h2{font-size:30px;margin:10px 0 4px;color:#f4dda0}.evo-stage22{position:relative;width:min(360px,72vw);height:min(270px,35dvh);margin:6px auto}.evo-stage22>canvas{position:absolute;inset:0;width:100%!important;height:100%!important;object-fit:contain;image-rendering:auto}.evo-stage22>#evo-before6{animation:evo-before22 4.8s both}.evo-stage22>#evo-after6{animation:evo-after22 4.8s both}.evo-flash22{position:absolute;inset:-10%;border-radius:50%;background:radial-gradient(#fffbe6,#a8e8ee55 35%,transparent 66%);animation:evo-flash22 4.8s both;z-index:2;pointer-events:none}.evo-card22 h3{font-size:20px;margin:5px 0;line-height:1.4}.evo-card22 h3>span{color:#91c6cf;margin:0 6px}.evo-stars22{color:#f6d586;font-size:24px;letter-spacing:7px}.evo-progress22{width:min(220px,70%);height:3px;margin:17px 0;background:#72929c55;overflow:hidden;border-radius:2px}.evo-progress22 i{display:block;height:100%;background:#e6d498;animation:evo-progress22 4.8s linear both}.evo-card22>button{border:1px solid #c9d2ac77;border-radius:20px;background:#2c485ccc;color:#e6e9d1;min-height:40px;padding:8px 25px}.evo-orbit22{position:absolute;z-index:-1;width:330px;height:330px;border:1px solid #bce9dd66;border-radius:50%;box-shadow:0 0 25px #8ccad722;transform:rotateX(60deg);animation:orbit22 4s linear infinite}.evo-orbit22.second22{width:400px;height:400px;animation-direction:reverse}.greet22{animation:greet22 .8s ease}
@keyframes ray22{to{transform:rotate(360deg)}}@keyframes greet22{30%{transform:translateY(-9px)}60%{transform:translateY(0)}80%{transform:translateY(-4px)}}@keyframes orbit22{to{transform:rotateX(60deg) rotateZ(360deg)}}@keyframes evo-before22{0%,20%{opacity:1;transform:scale(.9);filter:brightness(1)}43%{opacity:1;transform:scale(1.03);filter:brightness(3)}49%,100%{opacity:0;transform:scale(.6);filter:brightness(5)}}@keyframes evo-after22{0%,48%{opacity:0;transform:scale(.5);filter:brightness(3)}61%{opacity:1;transform:scale(1.08);filter:brightness(1.5)}80%,100%{opacity:1;transform:scale(1);filter:brightness(1)}}@keyframes evo-flash22{0%,43%,67%,100%{opacity:0;transform:scale(.7)}49%,53%{opacity:1;transform:scale(1.2)}}@keyframes evo-progress22{from{width:0}to{width:100%}}
@media(max-width:760px){body.production22 #modal{padding:8px}body.production22 #modal .modal-card{max-height:calc(100dvh - 16px)!important;border-radius:16px!important}body.production22 #modal-head{padding:10px 13px!important;min-height:48px}body.production22 #modal-head h2{font-size:17px!important}body.production22 #modal-body{padding:12px!important}.profile22{grid-template-columns:minmax(100px,28%) minmax(0,1fr);gap:10px;min-height:340px}.profile-preview22{padding:8px;min-height:340px}.profile-mini22{top:7px;left:5px;right:5px;flex-direction:column;gap:4px}.profile-mini22 b{font-size:9px;padding:4px 5px}.profile-actors22{min-height:140px;gap:1px;flex-direction:column;align-items:center;margin-top:110px;margin-bottom:5px}.profile-actors22>svg{height:110px!important;width:70%!important}.profile-actors22>div{height:65px;width:100%;justify-content:center}.profile-actors22 canvas{height:65px!important}.profile-name22 h3{font-size:17px!important}.profile-name22>span{font-size:8px;padding:3px 6px}.profile-preview22>small{font-size:8px}.profile-library22>nav{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.profile-library22>nav>button{font-size:9px;padding:7px 4px!important;min-height:38px;gap:3px;justify-content:center;flex-direction:column}.profile-library22>nav>button .glyph9{width:15px;height:15px}.arena-gallery22{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.arena-card22>b{font-size:9px;min-height:23px}.arena-card22>small{font-size:8px}.profile-content22{max-height:58dvh}.trainer-choices22,.partner-choices22{grid-template-columns:repeat(2,minmax(0,1fr))}.cosmetic-choices22{grid-template-columns:1fr}.language-home22{top:8px;right:10px;font-size:10px}.language-home22 button{font-size:10px!important;min-height:22px!important}.result-hero22{padding:15px 9px}.result-hero22 h2{font-size:26px!important}.result-team22>span{width:44px}.result-team22 canvas{width:44px!important;height:42px!important}.result-team22{gap:4px}}
@media(orientation:landscape) and (max-height:550px){.profile22{grid-template-columns:minmax(140px,25%) minmax(0,1fr);min-height:240px}.profile-preview22{min-height:240px}.profile-mini22{flex-direction:row;left:8px;top:7px}.profile-mini22>svg{width:30px!important;height:34px!important}.profile-mini22 b{font-size:9px}.profile-actors22{flex-direction:row;margin-top:60px;min-height:100px}.profile-actors22>svg{height:105px!important;width:47%!important}.profile-actors22>div{width:48%;height:90px}.profile-actors22 canvas{height:90px!important}.profile-name22 h3{font-size:18px!important;margin:3px 0!important}.profile-name22>button{display:none}.profile-preview22>small{font-size:8px}.profile-library22>nav{grid-template-columns:repeat(7,minmax(0,1fr))}.profile-library22>nav>button{flex-direction:column;gap:3px;font-size:9px;min-height:40px!important;padding:5px 3px!important}.profile-library22>nav>button .glyph9{width:14px;height:14px}.profile-content22{max-height:52dvh;min-height:150px}.arena-gallery22{grid-template-columns:repeat(3,minmax(0,1fr))}.arena-card22>small{display:none}.arena-card22>b{font-size:10px;min-height:15px}.profile-section22>p{font-size:9px!important}.evo-card22{padding:12px}.evo-card22>h2{font-size:21px;margin:5px}.evo-stage22{height:35dvh;margin:0}.evo-card22 h3{font-size:15px}.evo-stars22{font-size:17px}.evo-progress22{margin:8px 0}.evo-card22>button{min-height:30px;padding:4px 18px}.result-hero22{padding:10px}.result-medal22{font-size:30px}.result-hero22 h2{font-size:24px!important}.result-team22 canvas{height:36px!important}.result-stats22{margin-top:8px}.result-stats22>span{padding:5px}}
@media(prefers-reduced-motion:reduce){.result-rays22,.evo-orbit22,.greet22{animation:none}.evo-stage22>#evo-before6{animation:none;display:none}.evo-stage22>#evo-after6{animation:none;opacity:1}.evo-flash22{display:none}}
.profile-preview22 svg.trainer-art19{overflow:hidden!important}.profile-actors22>svg{overflow:hidden!important}.profile-preview22 .profile-arena-art22 svg{max-width:none!important;max-height:none!important}.profile-preview22 .profile-actors22>svg{flex-shrink:0}.arena-guide22{display:none!important}
.profile-library22>nav>button>span{min-width:0;max-width:100%;overflow-wrap:anywhere;line-height:1.25}.profile-library22>nav{overflow:hidden}
.profile-library22>nav>button{font-size:11px!important;font-family:system-ui!important}.profile-library22>nav>button>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
@media(orientation:landscape) and (max-height:550px){.profile-library22>nav>button{font-size:9px!important}}
@media(orientation:portrait) and (max-width:600px){.profile22{grid-template-columns:minmax(0,1fr);min-height:0;gap:12px}.profile-preview22{height:155px!important;min-height:155px!important;max-height:155px;display:block;text-align:left;padding:10px}.profile-mini22{left:10px;right:10px;top:7px;flex-direction:row;align-items:center;gap:7px}.profile-mini22>svg{width:27px!important;height:33px!important}.profile-mini22 b{font-size:10px}.profile-actors22{position:absolute;left:16px;bottom:4px;width:115px;height:108px!important;min-height:0!important;margin:0!important;flex-direction:row;align-items:flex-end;justify-content:center;gap:6px}.profile-actors22>svg{height:104px!important;width:46px!important}.profile-actors22>div{height:65px!important;width:64px}.profile-actors22 canvas{height:65px!important;width:64px!important}.profile-name22{position:absolute;left:145px;right:9px;top:54px}.profile-name22 h3{font-size:20px!important}.profile-name22>span{font-size:9px}.profile-name22>button{display:none}.profile-preview22>small{position:absolute;left:145px;right:10px;bottom:12px;font-size:8px}.profile-library22>nav{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.profile-library22>nav>button{min-height:47px!important;font-size:10px!important;padding:6px 3px!important}.profile-content22{max-height:none;min-height:0;overflow:visible;padding:0}.profile-section22>p{font-size:10px!important}.arena-gallery22{grid-template-columns:repeat(2,minmax(0,1fr))}.arena-card22>b{font-size:11px}.arena-card22>small{font-size:9px;display:block}.trainer-choices22,.partner-choices22{grid-template-columns:repeat(3,minmax(0,1fr))}}
.help22{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.help22 article{display:flex;align-items:flex-start;gap:12px;border:1px solid #a7c7b333;border-radius:13px;padding:15px;background:#1d394333;min-width:0}.help22 article>span{font:800 21px system-ui;color:#dfc58b}.help22 article b{font-size:13px;color:#ecddb0}.help22 article p{font-size:11px!important;line-height:1.7;margin:7px 0 0!important}@media(max-width:600px){.help22{grid-template-columns:1fr}}
.result-hero22 h2,.evo-card22 h2,.evo-card22 h3,.profile-name22 h3{font-family:system-ui,sans-serif!important}.profile-name22>span{max-width:100%;line-height:1.4}.result-hero22{animation:result-enter22 .28s ease-out both}@keyframes result-enter22{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@media(orientation:portrait) and (max-width:600px){.profile-preview22>small{display:none}}@media(prefers-reduced-motion:reduce){.result-hero22{animation:none}}
body.production22 .pvp-result12{position:relative;text-align:center;background:radial-gradient(ellipse at top,#9c805933,transparent 70%),linear-gradient(#213d4b,#172939);border:1px solid #ddc68a66;border-radius:20px;padding:24px 16px;box-shadow:0 15px 50px #0005}body.production22 .pvp-result12:before{content:'✦';display:block;color:#f4d189;font-size:48px;text-shadow:0 0 24px #f4d18966;margin-bottom:8px}body.production22 .pvp-result12 h2{font:900 clamp(23px,4vw,36px)/1.2 system-ui!important;color:#f2dda0!important}body.production22 .pvp-roundresults12>div{border:1px solid #b3c8ac33;border-radius:10px;margin:7px 0;padding:12px;background:#243f4a99}
