/* エドナ・リー 炎拳ファイター */
:root { --ink: #121212; --fire: #ff6a2a; --gold: #ffe04a; --sky: #2ab8d8; --red: #e8202a; --card: #fff8ee; --font: "M PLUS Rounded 1c", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0d2a3a; color: #fff; font-family: var(--font); overflow: hidden; overscroll-behavior: none; }
body { user-select: none; -webkit-user-select: none; touch-action: none; }
#app { position: fixed; inset: 0; }
#stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #071820; }
#cv { display: block; }
#ui { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#ui > * { pointer-events: auto; }
button { font-family: inherit; }
button:focus-visible, .slot:focus { outline: 4px solid var(--gold); outline-offset: 2px; }
.btn { border: 3px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); font-weight: 800; font-size: 17px; padding: 10px 20px; cursor: pointer; box-shadow: 0 4px 0 var(--ink); transition: transform .06s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.pri { background: linear-gradient(#ffd23a, #ff7a1a); }
.btn.big { font-size: 28px; padding: 14px 54px; border-width: 4px; }
.btn.small { font-size: 14px; padding: 6px 12px; box-shadow: 0 3px 0 var(--ink); }
.btn.wide { width: 100%; }
.btn.danger { background: #ff8a8a; }
.btn.on { background: var(--gold); }
.btn:disabled { opacity: .5; }
.dim { color: #b8c8d0; font-size: 14px; }
.chip { position: absolute; top: 12px; right: 12px; border: 3px solid var(--ink); background: #fff; color: var(--ink); border-radius: 99px; padding: 6px 14px; font-weight: 800; cursor: pointer; font-size: 14px; }
.topbar { display: flex; align-items: center; gap: 12px; width: 100%; position: relative; min-height: 46px; }
.topbar .chip { top: 0; right: 0; }
.back { border: 3px solid var(--ink); background: #fff; color: var(--ink); border-radius: 12px; padding: 6px 12px; font-weight: 800; cursor: pointer; }
.title { text-align: center; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; position: relative; padding: 16px; }
.title .cards { display: flex; gap: 18px; justify-content: center; }
.title .card { height: min(36vh, 300px); border: 4px solid var(--ink); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.title .c1 { transform: rotate(-6deg); animation: bob 3s ease-in-out infinite; }
.title .c2 { transform: rotate(6deg); animation: bob 3s ease-in-out -1.5s infinite; }
@keyframes bob { 50% { translate: 0 -8px; } }
.logo { margin: 0; line-height: 1; font-weight: 900; font-size: clamp(36px, 7vw, 68px); color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.logo small { font-size: .3em; letter-spacing: .5em; color: var(--gold); -webkit-text-stroke: 1.5px var(--ink); }
.logo b { font-size: .7em; color: var(--fire); font-style: italic; }
.hint { margin: 0; color: #e8f4f8; font-size: 14px; text-shadow: 0 2px 2px #000; }
.menu, .select, .result, .ending { background: rgba(8, 20, 32, .82); border: 4px solid var(--ink); border-radius: 22px; padding: 18px 22px; width: min(920px, 96vw); max-height: 96vh; overflow: auto; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.menu h2 { margin: 6px 0 14px; text-align: center; font-size: 26px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.mbtn { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; text-align: left; border: 3px solid var(--ink); border-radius: 16px; background: linear-gradient(#fff, #ffe8c8); color: var(--ink); padding: 12px; cursor: pointer; box-shadow: 0 4px 0 var(--ink); }
.mbtn i { grid-row: 1 / 3; font-style: normal; font-size: 30px; align-self: center; }
.mbtn b { font-size: 19px; }
.mbtn small { font-size: 12px; color: #5a4a3a; }
.mbtn:hover, .mbtn:focus { background: linear-gradient(#fff6a0, #ffb84a); }
.menu > .dim { text-align: center; margin: 14px 0 0; }
.select { width: min(1100px, 98vw); padding: 12px 16px; }
.select h2 { margin: 0; font-size: 22px; flex: 1; }
.select .mode { color: var(--gold); font-weight: 800; font-size: 14px; }
.select .body { display: grid; grid-template-columns: 1fr 340px; gap: 14px; margin-top: 10px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start; }
.slot { border: 3px solid var(--ink); border-radius: 14px; background: linear-gradient(#5ac8e8, #2a7aa8); cursor: pointer; padding: 4px; display: flex; flex-direction: column; align-items: center; color: #fff; font-weight: 800; font-size: 13px; white-space: pre-line; line-height: 1.2; min-height: 150px; }
.slot canvas { width: 96px; height: 112px; }
.slot.on, .slot:hover { background: linear-gradient(#ffd23a, #ff6a1a); color: var(--ink); }
.slot.boss { background: linear-gradient(#e84ab0, #5a1a8a); }
.slot.lock { background: #2a2a34; color: #888; }
.side { background: var(--card); color: var(--ink); border: 3px solid var(--ink); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.side .big { width: 100%; height: 190px; object-fit: contain; background: radial-gradient(#ffe8b0, #ffb060); border-radius: 10px; border: 2px solid var(--ink); }
.info .nm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.info .nm b { font-size: 20px; }
.info .nm small { color: #6a5a4a; }
.el { color: #fff; border: 2px solid var(--ink); border-radius: 99px; width: 30px; height: 30px; display: inline-grid; place-items: center; font-weight: 900; }
.stat { display: grid; gap: 3px; margin: 6px 0; }
.sb { display: grid; grid-template-columns: 40px 1fr; align-items: center; font-size: 12px; font-weight: 800; }
.sb i { height: 10px; background: #ddd; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; }
.sb i b { display: block; height: 100%; background: linear-gradient(90deg, #ffb21e, #ff3a2a); }
.trait { font-size: 13px; margin: 4px 0; line-height: 1.5; background: #fff; border: 2px dashed #c8a080; border-radius: 8px; padding: 6px; }
.moves { list-style: none; padding: 0; margin: 4px 0; font-size: 13px; }
.moves li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted #c8b8a8; padding: 2px 0; }
.moves li.sup b { color: var(--red); }
.quote { font-size: 13px; color: #8a3a1a; font-weight: 800; margin: 2px 0; }
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; height: 100%; background: linear-gradient(100deg, rgba(42,120,216,.85) 49.5%, rgba(232,32,42,.85) 50.5%); }
.vs .l, .vs .r { display: flex; flex-direction: column; align-items: center; animation: slideL .4s ease-out; }
.vs .r { animation-name: slideR; }
.vs canvas { width: min(34vw, 300px); height: auto; }
.vs b { font-size: clamp(20px, 3vw, 32px); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.vs .mid { text-align: center; max-width: 300px; }
.vs strong { display: block; font-size: clamp(60px, 10vw, 120px); font-style: italic; color: var(--gold); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; animation: pop .5s ease-out; }
.vs .mid p { font-weight: 800; text-shadow: 0 2px 3px #000; }
@keyframes slideL { from { transform: translateX(-60vw); } }
@keyframes slideR { from { transform: translateX(60vw); } }
@keyframes pop { from { transform: scale(3); opacity: 0; } }
#ui.scr-fight { pointer-events: none; }
.fight { position: absolute; inset: 0; pointer-events: none !important; }
.pausebtn { pointer-events: auto; position: absolute; top: calc(env(safe-area-inset-top) + 74px); left: 50%; transform: translateX(-50%); width: 44px; height: 36px; border-radius: 10px; border: 3px solid var(--ink); background: rgba(255,255,255,.85); font-weight: 900; cursor: pointer; }
.result, .ending { text-align: center; width: min(560px, 94vw); }
.result h2, .ending h2 { font-size: 34px; margin: 6px 0; color: var(--gold); -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; }
.score b { font-size: 30px; color: var(--gold); }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.ending .card { height: min(40vh, 300px); border: 4px solid var(--ink); border-radius: 10px; }
.gold { color: var(--gold); font-weight: 900; }
.rankbox { margin: 8px 0; }
.mwrap { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 12px; pointer-events: auto; }
.modal { background: var(--card); color: var(--ink); border: 4px solid var(--ink); border-radius: 18px; width: min(560px, 100%); max-height: 94vh; display: flex; flex-direction: column; box-shadow: 0 14px 40px rgba(0,0,0,.6); user-select: text; -webkit-user-select: text; touch-action: auto; }
.modal.howto { width: min(720px, 100%); }
.mhead { display: flex; align-items: center; padding: 10px 14px; border-bottom: 3px solid var(--ink); background: linear-gradient(#ffd23a, #ff8a2a); border-radius: 14px 14px 0 0; }
.mhead h2 { flex: 1; margin: 0; font-size: 20px; }
.x { border: 3px solid var(--ink); background: #fff; border-radius: 10px; width: 36px; height: 36px; font-size: 20px; font-weight: 900; cursor: pointer; }
.mbody { padding: 12px 16px; overflow: auto; }
.mbody h3 { margin: 12px 0 4px; }
.mbody ul { padding-left: 20px; margin: 4px 0; line-height: 1.6; }
.mbody .dim { color: #6a5a4a; }
.mfoot { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 14px; border-top: 2px solid #e0d0c0; }
.keys { border-collapse: collapse; width: 100%; font-size: 14px; }
.keys th, .keys td { border: 2px solid #d8c8b8; padding: 4px 8px; text-align: left; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.lbl { display: block; font-weight: 800; margin: 8px 0 4px; }
.mbody label { display: block; font-weight: 800; margin: 6px 0; }
.mbody input, .mbody select { display: block; width: 100%; font: inherit; font-size: 16px; padding: 9px 10px; border: 3px solid var(--ink); border-radius: 10px; margin-top: 4px; background: #fff; }
.mbody label small { display: block; font-weight: 500; color: #6a5a4a; font-size: 12px; }
.atabs { display: flex; gap: 6px; margin-bottom: 8px; }
.atab { flex: 1; border: 3px solid var(--ink); background: #eee; border-radius: 10px; padding: 8px; font-weight: 800; cursor: pointer; }
.atab.on { background: var(--gold); }
.err { color: #c81e1e; font-weight: 800; min-height: 1em; margin: 4px 0; }
.form { display: flex; flex-direction: column; gap: 6px; }
.form .btn { align-self: flex-start; }
details summary { cursor: pointer; font-weight: 800; margin: 8px 0; }
table.rank { width: 100%; border-collapse: collapse; }
table.rank td { padding: 5px 8px; border-bottom: 1px solid #e0d0c0; }
table.rank tr.me { background: #fff2a8; font-weight: 800; }
.rk { width: 44px; text-align: center; font-weight: 900; }
.sc { text-align: right; font-weight: 800; }
.savecmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.savecmp > div { border: 2px solid var(--ink); border-radius: 10px; padding: 8px; background: #fff; }
.toast { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; padding: 8px 16px; font-weight: 800; z-index: 99; transition: opacity .4s; }
.toast.gold { background: var(--gold); }
.toast.out { opacity: 0; }
#touch { position: absolute; inset: 0; pointer-events: none; display: none; z-index: 5; }
#touch.on { display: block; }
.stick { pointer-events: auto; position: absolute; left: calc(env(safe-area-inset-left) + 18px); bottom: 18px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.18); border: 3px solid rgba(255,255,255,.55); touch-action: none; }
.knob { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255,255,255,.75); border: 3px solid var(--ink); pointer-events: none; }
.tbtns { pointer-events: auto; position: absolute; right: calc(env(safe-area-inset-right) + 14px); bottom: 14px; display: grid; grid-template-columns: repeat(3, 66px); gap: 8px; touch-action: none; }
.tb { width: 66px; height: 66px; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 15px; color: var(--ink); background: rgba(255,255,255,.75); }
.tb-lp, .tb-lk { background: rgba(255,240,140,.85); }
.tb-hp, .tb-hk { background: rgba(255,150,80,.85); }
.tb-sp { background: rgba(255,90,60,.9); color: #fff; }
.tb-sa { background: rgba(90,200,255,.9); font-size: 13px; }
.tb.on { transform: scale(.92); filter: brightness(1.3); }
@media (max-width: 760px), (max-height: 520px) {
  .select .body { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(5, 1fr); }
  .slot { min-height: 0; font-size: 10px; }
  .slot canvas { width: 54px; height: 64px; }
  .side .big { display: none; }
  .select .mode { display: none; }
  .title .card { height: 26vh; }
  .logo { font-size: 34px; }
  .menu, .select, .result, .ending { padding: 10px; }
  .mgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .mbtn { padding: 8px; } .mbtn b { font-size: 15px; } .mbtn i { font-size: 22px; }
  .tb { width: 56px; height: 56px; font-size: 13px; } .tbtns { grid-template-columns: repeat(3, 56px); }
  .stick { width: 124px; height: 124px; }
}
/* 横長で 高さが ひくい 画面（スマホ横向き など）：キャラ表と 説明を 横に ならべる */
@media (max-height: 520px) and (min-width: 600px) {
  .select .body { grid-template-columns: 1fr 290px; gap: 8px; margin-top: 4px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .slot { flex-direction: row; gap: 4px; justify-content: flex-start; text-align: left; padding: 2px 6px; }
  .slot canvas { width: 40px; height: 48px; }
  .side { padding: 6px; gap: 2px; font-size: 12px; }
  .info .nm b { font-size: 16px; }
  .trait, .moves { font-size: 11px; }
  .quote { display: none; }
  .select h2 { font-size: 17px; }
  .topbar { min-height: 36px; }
  .select { padding: 8px 10px; }
}

/* 原画の 太い線・色えんぴつの 世界に 合わせた ホーム。 */
.scr-title { overflow-y:auto;overflow-x:hidden;touch-action:pan-y;align-items:flex-start!important;background:linear-gradient(#06152455,#06152477),url('img/stages/sky.webp') center/cover; }
.home { width:min(1280px,100%);min-height:100%;overflow-x:clip;padding:22px clamp(18px,4vw,60px) 15px;display:flex;flex-direction:column;position:relative;background:linear-gradient(90deg,rgba(5,18,32,.89),rgba(5,18,32,.25) 70%,rgba(5,18,32,.45)); }
.home-top {display:flex;justify-content:space-between;align-items:center;gap:12px;z-index:2;}
.home-brand {display:flex;align-items:center;gap:10px;font-size:12px;font-weight:900;letter-spacing:2px;}
.home-mark {display:grid;place-items:center;width:38px;height:38px;background:#fa6c29;border:2px solid #111;box-shadow:3px 3px 0 #06121f;color:#111;font-size:24px;transform:rotate(-6deg);letter-spacing:0;}
.home-top .chip {position:static;font-size:12px;border-radius:7px;padding:8px 12px;background:#132a3e;color:#fff;border-color:#4b7c91;}
.home-hero {display:grid;grid-template-columns:1fr 1.1fr;align-items:center;flex:1;min-height:340px;position:relative;}
.home-copy {position:relative;z-index:2;padding:24px 0;}
.home-eyebrow {font-size:12px;font-weight:800;letter-spacing:2px;color:#71d9ec;margin:0 0 18px;}
.home-logo {margin:0;line-height:1.2;display:flex;flex-direction:column;font-weight:900;filter:drop-shadow(4px 5px 0 #071422);}
.home-logo small {font-size:clamp(14px,1.7vw,22px);letter-spacing:7px;color:#ffd34c;margin-bottom:5px;}
.home-logo span {font-size:clamp(34px,4.8vw,64px);letter-spacing:-2px;color:#fff8dd;white-space:nowrap;}
.home-logo b {font-size:clamp(29px,4.1vw,56px);font-style:italic;color:#ff9d31;letter-spacing:1px;-webkit-text-stroke:1px #fbc34b;}
.home-lead {font-size:14px;line-height:1.9;color:#e4e8dd;margin:16px 0 20px;text-shadow:1px 2px 1px #071422;}
.home-actions {display:flex;align-items:center;gap:20px;}
.home-start {display:flex;align-items:center;justify-content:space-between;gap:50px;font-size:21px;border-radius:7px;padding:13px 25px;background:#ffb52f!important;box-shadow:4px 5px 0 #050f1d;}
.home-start:hover {background:#ffd34c!important;transform:translateY(-2px);}
.home-how {font-size:13px;background:none;border:0;border-bottom:1px solid #95b0b9;padding:8px 0;color:#e0eef0;cursor:pointer;font-weight:800;}
.home-support {font-size:10px;color:#a6c5d0;margin:15px 0 0;}
.home-art {height:100%;min-height:360px;position:relative;isolation:isolate;}
.home-ink {position:absolute;inset:15% -8% 5% -14%;background:repeating-linear-gradient(137deg,transparent 0 24%,#ff743c88 24% 31%,transparent 31% 43%,#18c8eb55 43% 48%,transparent 48% 70%);clip-path:polygon(3% 31%,77% 0,68% 15%,100% 9%,88% 82%,9% 100%,20% 83%,0 89%);transform:rotate(-5deg);}
.home-edna {position:absolute;width:74%;height:100%;object-fit:contain;filter:drop-shadow(5px 7px 0 #061422cc);}
.home-edna.fighter {left:-14%;top:4%;z-index:2;transform:rotate(-4deg);}
.home-edna.warrior {right:-14%;top:-2%;transform:scaleX(-1) rotate(-4deg);z-index:1;}
.home-art-label {position:absolute;bottom:10%;right:4%;padding:5px 13px;background:#112940;border:1px solid #498295;color:#b5eff5;font-size:11px;letter-spacing:3px;transform:rotate(-4deg);z-index:3;}
.home-roster {position:relative;z-index:3;border-top:1px solid #6ea4b855;padding:16px 0 0;}
.home-roster-head {display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;margin:0 0 8px;}
.home-roster-head>span {font-size:10px;color:#99c3cd;}
.home-fighters {display:grid;grid-template-columns:repeat(11,minmax(0,1fr));gap:7px;}
.home-fighter {border:1px solid #71b5ce66;border-radius:4px;background:linear-gradient(140deg,#163e55bb,#061727bb);color:#c8e4e9;min-width:0;padding:0 2px 7px;cursor:pointer;font:inherit;}
.home-fighter:hover,.home-fighter:focus-visible {background:#27586b;border-color:#ffd44d;outline:2px solid #ffd44d;}
.home-fighter canvas {display:block;width:100%;height:80px;object-fit:contain;}
.home-fighter span {display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:8px;font-weight:800;}
.home-foot {display:flex;justify-content:space-between;gap:12px;color:#91b0c1;font-size:9px;margin:13px 0 0;letter-spacing:1px;}
.grid {grid-template-columns:repeat(4,minmax(0,1fr));}
.slot {font-size:11px;}
.menu,.select,.result,.ending {border-color:#3b6a7e;border-radius:10px;background:linear-gradient(140deg,#0d2637f2,#071523ed);}
@media(min-width:1000px) and (min-height:850px){.home{padding-top:35px;padding-bottom:25px}.home-hero{min-height:500px}.home-fighter canvas{height:106px}.home-logo span{font-size:68px}.home-logo b{font-size:59px}}
@media(max-width:680px){.home{padding:15px 16px 12px}.home-top .chip{max-width:180px;font-size:10px}.home-brand{font-size:9px;letter-spacing:1px}.home-mark{width:30px;height:30px;font-size:21px}.home-hero{display:flex;flex-direction:column-reverse;min-height:0}.home-art{width:100%;height:240px;min-height:240px;margin-top:8px}.home-edna.fighter{left:-5%}.home-edna.warrior{right:-5%}.home-copy{padding:5px 0 20px;width:100%;text-align:center}.home-eyebrow{margin-bottom:8px;font-size:10px}.home-logo{align-items:center}.home-logo span{font-size:38px}.home-logo b{font-size:33px}.home-logo small{font-size:13px;letter-spacing:6px}.home-lead{font-size:12px;margin:10px 0 13px}.home-actions{justify-content:center;gap:18px}.home-start{font-size:18px;padding:11px 24px;gap:38px}.home-support{font-size:9px}.home-fighters{display:flex;overflow-x:auto;padding:2px 2px 7px;touch-action:pan-x}.home-fighter{flex:0 0 68px}.home-fighter canvas{height:78px}.home-roster-head{font-size:10px}.home-roster-head>span{font-size:9px}.home-foot{font-size:8px}.grid{grid-template-columns:repeat(4,minmax(0,1fr))}.home-art-label{bottom:3%;right:12%}}
@media(max-height:560px) and (min-width:681px){.home{padding:10px 24px}.home-hero{min-height:245px}.home-copy{padding:8px 0}.home-art{min-height:245px}.home-logo span{font-size:38px}.home-logo b{font-size:32px}.home-logo small{font-size:12px}.home-eyebrow{font-size:10px;margin-bottom:6px}.home-lead{font-size:11px;margin:8px 0}.home-start{font-size:16px;padding:8px 20px}.home-support{margin-top:9px;font-size:9px}.home-roster{padding-top:8px}.home-fighter canvas{height:58px}.home-roster-head{margin-bottom:4px}.home-foot{margin-top:7px}.home-top .chip{padding:5px 10px}.home-mark{width:28px;height:28px;font-size:19px}.home-brand{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
@media(max-width:680px){.select h2{font-size:17px}.select .topbar{gap:8px}.select .back{font-size:12px;padding:6px 9px}}
.language-picker{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:#cee5ee;white-space:nowrap}
.language-picker select{font:inherit;color:#fff;background:#102c40;border:1px solid #77a4b9;border-radius:6px;padding:6px 7px;max-width:145px;cursor:pointer}
.language-picker select:focus-visible{outline:2px solid #ffd44d;outline-offset:2px}
.home-top{flex-wrap:wrap;gap:8px}.home-account{flex-wrap:wrap;justify-content:flex-end}
html:not([data-language="ja"]) .home-logo span{font-size:clamp(28px,4.3vw,60px)}
html:not([data-language="ja"]) .home-logo b{font-size:clamp(20px,2.7vw,38px);line-height:1.12;letter-spacing:0}
html:not([data-language="ja"]) .home-mark{font-size:10px;letter-spacing:0}
html[data-language="hira"] .home-logo b{font-size:clamp(22px,3.2vw,44px)}
.mbtn b,.mbtn small,.btn,.nm small,.moves b{overflow-wrap:anywhere}
.tb{font-size:clamp(9px,1.8vw,13px)}
@media(max-width:680px){.home-top{justify-content:center}.home-account{justify-content:center;width:100%;gap:6px}.language-picker{font-size:10px}.language-picker select{max-width:125px;padding:5px}.home-top .chip{max-width:150px}.home-brand{display:none}html:not([data-language="ja"]) .home-logo span{font-size:36px}html:not([data-language="ja"]) .home-logo b{font-size:26px}.home-roster-head{flex-wrap:wrap;gap:6px}.home-foot{flex-wrap:wrap}}

.home-foot{align-items:center;flex-wrap:wrap;line-height:1.8}.home-foot>a{color:#ffdc74;font-weight:800;text-underline-offset:3px;white-space:nowrap}.game-intro{padding:32px;max-width:800px;height:100%;overflow:auto;line-height:1.9;touch-action:pan-y}.game-intro a{color:#ffdc74}

/* Visible-screen anchoring: browser focus zoom and address-bar changes cannot
   push the HUD or controls out of the visual viewport. */
html{--app-width:100%;--app-height:100%;--app-x:0px;--app-y:0px;--app-zoom:1;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{touch-action:manipulation}
html #app,html #opening-screen,html .mwrap{position:fixed;inset:auto;left:0;top:0;width:var(--app-width);height:var(--app-height);transform:translate(var(--app-x),var(--app-y)) scale(var(--app-zoom));transform-origin:0 0}
#app{overflow:hidden;isolation:isolate}
#ui{min-width:0;min-height:0}
#stage{touch-action:none;overflow:hidden}
.scr-title{touch-action:pan-y pinch-zoom}
button,a{touch-action:manipulation}
input,textarea,select,.language-picker select{font-size:16px!important}
.language-picker select{min-height:34px;padding:4px 7px}
.menu,.select,.result,.ending{max-width:98%;max-height:96%;touch-action:pan-y pinch-zoom}
.modal{max-height:94%;max-width:100%}.mbody{min-height:0}
.pausebtn{top:calc(var(--game-top,0px) + 64px * var(--game-scale,1))}
.touch-fight #touch{padding:0;touch-action:none}
.touch-fight .stick{width:var(--stick-size);height:var(--stick-size);bottom:calc(env(safe-area-inset-bottom) + 22px);left:calc(env(safe-area-inset-left) + 12px)}
.touch-fight .tbtns{grid-template-columns:repeat(3,var(--touch-button));gap:8px;bottom:calc(env(safe-area-inset-bottom) + 18px);right:calc(env(safe-area-inset-right) + 12px)}
.touch-fight .tb{width:var(--touch-button);height:var(--touch-button);font-size:13px;line-height:1.15;text-align:center;align-content:center;gap:0;overflow:hidden}
.touch-fight .tb>span{display:block}
html[data-language="hira"] .touch-fight .tb{font-size:11px}
.portrait.touch-fight #stage{top:env(safe-area-inset-top);bottom:calc(var(--touch-button) * 2 + 78px + env(safe-area-inset-bottom))}
.portrait.touch-fight .pausebtn{top:calc(var(--game-top,0px) + 540px * var(--game-scale,1) + 14px)}
.touch-fight .knob{width:54px;height:54px;margin:-27px 0 0 -27px}
/* Explicit name chunks prevent isolated final kana; ordinary prose still wraps. */
.fighter-name{display:inline;max-width:100%;white-space:normal;word-break:normal;overflow-wrap:normal;text-wrap:balance;line-break:strict}
.fighter-name .name-piece{display:inline}.fighter-name .atomic{white-space:nowrap}
.home-fighter>.fighter-name{display:block;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.4;min-height:2.8em;font-size:9px;padding:0 1px}
.home-fighter .name-piece{font-size:inherit;white-space:normal;overflow:visible;text-overflow:clip}
.home-fighter .name-piece.atomic{white-space:nowrap}
.slot{min-width:0}.slot>.fighter-name{font-size:inherit;line-height:1.4;white-space:normal}.slot small{font-size:.9em}
.slot>.fighter-name{font-size:10px}
.info .nm>b{min-width:0;max-width:100%}
.mbtn b,.mbtn small,.btn,.nm small,.moves b{overflow-wrap:break-word;word-break:normal;line-break:strict;text-wrap:pretty}
.trait,.quote,.vs p,.vs small,.result p,.ending p,.mbody p,.mbody li{line-break:strict;word-break:normal;overflow-wrap:break-word;text-wrap:pretty}
.moves li{align-items:start}.moves li>span{flex-shrink:0;max-width:55%;font-size:.9em;text-align:right}
.select h2,.result h2,.ending h2{text-wrap:balance;line-break:strict;line-height:1.4}
.phrase-word{white-space:nowrap}.result h2,.ending h2{font-size:clamp(24px,6vw,34px)}
.vs{grid-template-columns:minmax(0,1fr) minmax(170px,280px) minmax(0,1fr);overflow:hidden;padding:12px}
.vs .l,.vs .r{min-width:0;padding:0 12px;gap:3px}
.vs b{max-width:100%;text-align:center;font-size:clamp(12px,2.4vw,28px);line-height:1.45}
.vs .mid{min-width:0;max-width:100%}.vs .mid p{font-size:clamp(12px,1.6vw,17px);padding:0 6px}
.vs small{display:block;font-size:clamp(10px,1.4vw,14px)}
.vs canvas{max-width:100%}
@media(orientation:portrait){.vs{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto;align-content:center;gap:12px;padding:20px 12px}.vs .l{grid-column:1;grid-row:1}.vs .r{grid-column:2;grid-row:1}.vs canvas{width:min(39vw,210px)}.vs b{font-size:clamp(12px,3.7vw,18px)}.vs .mid{grid-column:1/-1;grid-row:2;width:min(100%,480px);margin:0 auto}.vs strong{font-size:54px;line-height:1.1;margin:4px 0 8px}.vs .mid p{font-size:16px;line-height:1.7;margin:12px 4px}.vs .mid small{font-size:12px;line-height:1.65}.home-fighters{gap:7px}.home-fighter{flex-basis:78px}.home-fighter canvas{height:82px}}
@media(max-width:360px){.touch-fight .tbtns{gap:6px;right:10px}.touch-fight .stick{left:10px}.home-account{gap:5px}.language-picker>span{display:none}.home-top .chip{max-width:140px}.home-fighter>.fighter-name{font-size:8px}.vs .mid p{font-size:14px}}
@media(max-width:400px){.select .grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Separate-device lobby and live connection state. */
.scr-online{overflow:auto!important;touch-action:pan-y}
.online-panel{width:min(680px,100%);margin:auto;padding:20px 20px 36px;box-sizing:border-box;background:rgba(5,18,30,.94);border-radius:16px;line-height:1.65}
.online-panel h2{font-size:clamp(22px,5vw,32px);margin:16px 0}
.online-panel label{display:block;margin:16px 0;font-weight:800}
.online-panel input,.online-panel select{display:block;width:100%;min-width:0;box-sizing:border-box;min-height:46px;margin-top:6px;padding:10px;border-radius:8px;font-size:16px}
.online-panel .row{display:flex;flex-wrap:wrap;gap:10px}.online-panel .row .btn{flex:1 1 180px}
.net-status{padding:12px;background:#143547;border-radius:8px;overflow-wrap:break-word;min-height:48px}
.net-code{display:block;font:900 clamp(23px,6vw,38px) monospace;letter-spacing:.08em;color:#ffe04a;text-align:center;margin:12px 0}
.net-room input{font-size:16px!important}.net-room:empty{display:none}.net-room .btn{margin-top:10px}
.net-live{position:fixed;top:calc(var(--game-top,0px) + 84px * var(--game-scale,1));left:50%;transform:translateX(-50%);max-width:90%;padding:3px 9px;border-radius:6px;background:#071925c9;color:#e1f9ff;font-size:clamp(10px,2.5vw,13px);text-align:center;pointer-events:none;z-index:8}
@media(max-width:480px){.online-panel{padding:14px 14px 28px;border-radius:0}.online-panel .dim{font-size:13px}.online-panel .row .btn{flex-basis:100%}}

/* Ranking filters remain usable on narrow phones. */
.rank-tabs{display:flex;flex-wrap:wrap;gap:7px;margin:4px 0 14px}.rank-tabs .btn{white-space:normal;flex:1 1 120px;min-width:0;line-height:1.5}.rank-mine{font-weight:800;color:#ffe04a}.rank-note{font-size:12px;line-height:1.8;margin-top:18px}.rankbox{overflow-x:auto}.rank th{font-size:12px;text-align:left;padding:8px 6px;color:#a6c9d9}.rank th:last-child{text-align:right}.rank td{overflow-wrap:anywhere}.rank td.sc{white-space:nowrap}.rank-position{color:#ffe04a;font-weight:800}
.rank-mine,.rank-position{color:#8a4200}.rank th{color:#36596a}

/* Challenges, mastery, and optional practice overlays. */
.journey{max-width:96%;max-height:94%;overflow:auto;color:#eaf8ff}.journey h3{color:#ffe396;margin:18px 0 8px}.journey-actions,.reward-grid,.trial-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.journey .btn,.reward-grid .btn,.trial-grid .btn{white-space:normal;line-height:1.5}.daily-goals,.mastery-grid,.badge-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(185px,1fr));gap:8px}.goal,.mastery-card,.achievement{border:1px solid #54859c;border-radius:9px;padding:10px;background:#102b3e;display:flex;flex-direction:column;gap:5px;min-width:0}.goal span{font-variant-numeric:tabular-nums}.goal progress{width:100%;accent-color:#ffd34c}.goal.done,.achievement.earned{border-color:#ffc756;background:#304033}.achievement:not(.earned){opacity:.7}.journey small,.journey .dim{color:#b8d7e6}.journey select{font:inherit;font-size:16px;max-width:100%;background:#fff;padding:7px}.mastery-level{color:#845300;font-size:12px;margin:7px 0}.trial-live,.survival-live{position:absolute;top:calc(var(--game-top,0px) + 115px);left:12px;z-index:4;max-width:min(300px,44vw);border:1px solid #80c9df;background:#082334e8;color:white;padding:8px;border-radius:8px;font-size:12px}.trial-live{display:flex;flex-direction:column;gap:6px}.trial-live .btn{font-size:11px;padding:4px 7px;min-height:30px;align-self:flex-start}.survival-live{top:calc(var(--game-top,0px) + 80px);font-size:12px;pointer-events:none!important}.trial-live span{line-height:1.5}@media(max-width:680px){.journey{padding:12px!important}.journey-actions,.trial-grid,.reward-grid{grid-template-columns:1fr}.mastery-grid,.badge-grid,.daily-goals{grid-template-columns:repeat(2,minmax(0,1fr))}.mastery-card,.achievement,.goal{padding:8px;font-size:12px}.journey .topbar{flex-wrap:wrap}.trial-live{max-width:48vw;font-size:10px;top:calc(var(--game-top,0px) + 50px);left:5px;padding:5px}.survival-live{top:calc(var(--game-top,0px) + 25px);left:5px;font-size:10px}.trial-live b{font-size:11px}.trial-live span{max-height:60px;overflow:auto}}

/* キャラ決定は 常に表示。キャラ表と説明だけを スクロールする。 */
.select{display:flex;flex-direction:column;max-height:96%;overflow:hidden;min-height:0}
.select>.topbar,.select>.pick-hint,.select>.select-actions{flex-shrink:0}
.select>.pick-hint{margin:8px 0 0;font-size:13px;line-height:1.5}
.select>.body{min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;padding:4px 4px 8px;align-items:start}
.select-actions{padding:10px 4px 5px;border-top:1px solid #54859c;margin-top:6px;background:#0a2030}
.select-actions .confirm-fighter{display:block;max-width:480px;min-height:48px;margin:0 auto;white-space:normal;line-height:1.4}
@media(max-height:520px){.select>.pick-hint{margin-top:3px;font-size:11px}.select-actions{padding-top:5px;margin-top:3px}.select-actions .confirm-fighter{min-height:44px;padding:6px 14px}}
.cpu-growth{font-size:12px;line-height:1.5;color:#71532c;margin:4px 0}

.slot.lock canvas{opacity:.9}.mastery-card.locked{border-style:dashed;background:#101e2a;color:#bbcbd5}.slot.lock{cursor:help}
.select{height:min(860px,96%)}
.select>.body{flex:1}
@media(min-width:761px) and (min-height:521px){
 .select .grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 .select .slot{min-height:116px;font-size:12px}.select .slot canvas{width:74px;height:86px}
 .select .side{position:sticky;top:0;align-self:start}
}
@media(max-width:599px),(max-width:760px) and (min-height:521px){
 .select>.body{display:flex;flex-direction:column;overflow:hidden;gap:8px}
 .select .grid{flex:0 0 45%;min-height:0;overflow:auto;padding:2px;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:100%}
 .select .side{position:static;flex:1;min-height:0;overflow:auto;width:100%;padding:8px;overscroll-behavior:contain;touch-action:pan-y pinch-zoom}
 .select .side .big{display:none}.select .info .nm b{font-size:16px}
}
@media(max-width:400px){.select .grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:599px),(max-width:760px) and (min-height:521px){.select .grid{grid-auto-rows:minmax(98px,auto)}.select .slot{min-height:98px}.select .slot canvas{flex-shrink:0}}
@media(min-width:761px),(min-width:600px) and (max-height:520px){
 .select>.body{overflow:hidden;grid-template-rows:minmax(0,1fr)}
 .select .grid{height:100%;min-height:0;overflow:auto;padding:3px;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;grid-auto-rows:minmax(116px,auto)}
 .select .side{position:static;height:100%;max-height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom}
 .select .side .big{height:135px;flex-shrink:0}
}
@media(min-width:600px) and (max-height:520px){.select .grid{grid-auto-rows:minmax(58px,auto)}}

/* Friend requests: readable forms and independent mobile scrolling. */
.scr-friends{overflow-y:auto!important;overscroll-behavior:contain;display:block!important;height:100%;padding:clamp(12px,3vw,28px);box-sizing:border-box}.friends-panel{max-width:900px;margin:auto;padding-bottom:env(safe-area-inset-bottom,20px)}.friends-panel>p{line-height:1.7}.friends-panel form{background:#152c3e;border:1px solid #4c7c92;padding:18px;border-radius:14px;margin:18px 0}.friends-panel label,.friend-invite label{display:grid;gap:8px}.friends-panel input,.friend-invite select{font:inherit;font-size:16px;max-width:100%;min-width:0;padding:12px;border-radius:8px}.friends-panel input{width:100%;box-sizing:border-box}.friend-lists section{margin:24px 0}.friend-card{border:1px solid #467184;border-radius:12px;padding:14px;margin:10px 0;display:grid;gap:12px}.friend-card strong{overflow-wrap:anywhere}.friend-card .row{display:flex;flex-wrap:wrap;gap:8px}.friend-card .btn{font-size:clamp(14px,2vw,17px);padding:10px 14px}.friend-invite{border-top:1px solid #456b7d;margin-top:16px;padding-top:12px;display:grid;gap:10px}.home-account{flex-wrap:wrap}.friends-panel>button{margin:4px}.friends-panel form .btn{margin-top:12px}

.scr-friends{background:#071b28}

/* CPU selector stays beside the confirmation action without hiding it. */
.cpu-choice{display:flex;align-items:center;justify-content:center;gap:8px;font-size:14px;min-width:0}.cpu-choice select{max-width:100%;min-width:110px;padding:6px 10px;border:2px solid #497e99;border-radius:8px;background:#102d3e;color:#fff;font:inherit}.select-actions .cpu-choice{margin-bottom:6px}.select-actions{flex-wrap:wrap}.select-actions .cpu-choice{flex:1 1 100%}.select-actions .confirm-fighter{flex:1 1 100%}@media(max-height:600px){.select-actions .cpu-choice{flex:0 1 auto;margin:0;font-size:12px}.select-actions .confirm-fighter{flex:1 1 auto;width:auto}.cpu-choice select{padding:3px 6px}}

/* Ensemble key art: keep every character visible, controls over the calm lower area. */
.home{width:min(1600px,100%);padding:12px clamp(8px,2vw,28px);background:#071725}.home-top{padding:2px 4px 10px}.ensemble-hero{display:block;flex:0 0 auto;width:100%;aspect-ratio:16/9;min-height:0;overflow:hidden;border:1px solid #6e9ba6;border-radius:8px}.ensemble-picture{display:block;position:absolute;inset:0}.ensemble-picture img{display:block;width:100%;height:100%;object-fit:contain}.ensemble-hero .home-copy{position:absolute;left:0;right:0;bottom:5%;padding:0 10px;text-align:center;width:100%;z-index:2}.ensemble-hero .home-logo{align-items:center;filter:drop-shadow(0 3px 2px #000) drop-shadow(0 0 10px #061827)}.ensemble-hero .home-logo small{font-size:clamp(9px,1.1vw,16px);letter-spacing:6px;margin:0}.ensemble-hero .home-logo span{font-size:clamp(25px,3.9vw,58px);letter-spacing:0;line-height:1.05}.ensemble-hero .home-logo b{font-size:clamp(22px,3.3vw,48px);line-height:1.12}.ensemble-hero .home-eyebrow,.ensemble-hero .home-lead,.ensemble-hero .home-support{display:none}.ensemble-hero .home-actions{justify-content:center;gap:18px;margin-top:9px}.ensemble-hero .home-start{font-size:clamp(14px,1.5vw,21px);padding:9px 24px;gap:35px}.ensemble-hero .home-how{text-shadow:0 2px 4px #000;color:#fff}.home-fighters{display:flex;overflow-x:auto;touch-action:pan-x;padding-bottom:6px}.home-fighter{flex:0 0 88px}.home-fighter canvas{height:80px}.home-roster{padding-top:9px;margin-top:9px}.home-foot{line-height:1.6}.select-actions{display:flex;justify-content:center;align-items:center;gap:5px}
@media(max-width:680px){.home-top{flex-wrap:wrap;gap:7px}.home-account{flex-wrap:wrap;justify-content:flex-end}.ensemble-hero{aspect-ratio:9/16;max-height:calc(100svh - 130px);min-height:440px}.ensemble-hero .home-copy{bottom:7%;padding:0 6px}.ensemble-hero .home-logo small{font-size:11px;letter-spacing:5px}.ensemble-hero .home-logo span{font-size:clamp(24px,7.7vw,38px)}.ensemble-hero .home-logo b{font-size:clamp(22px,7vw,34px);-webkit-text-stroke:.5px #fbc34b}.ensemble-hero .home-start{font-size:17px;padding:10px 23px;gap:25px}.ensemble-hero .home-how{font-size:12px}.home-fighter{flex-basis:68px}.home-foot{flex-wrap:wrap}}
@media(max-height:560px) and (min-width:681px){.ensemble-hero{width:min(100%,780px);margin:auto;aspect-ratio:16/9}.ensemble-hero .home-copy{bottom:4%}.ensemble-hero .home-logo small{font-size:9px}.ensemble-hero .home-logo span{font-size:27px}.ensemble-hero .home-logo b{font-size:24px}.ensemble-hero .home-start{padding:5px 18px;font-size:14px}.ensemble-hero .home-actions{margin-top:4px}}

@media(max-width:680px){.ensemble-hero{display:flex;flex-direction:column;aspect-ratio:auto;max-height:none;min-height:0}.ensemble-hero .ensemble-picture{position:relative;inset:auto;aspect-ratio:9/16;max-height:calc(100svh - 250px);width:100%;min-height:290px}.ensemble-hero .ensemble-picture img{object-fit:contain;object-position:center}.ensemble-hero .home-copy{position:relative;inset:auto;padding:12px 5px 16px;background:#071725}.ensemble-hero .home-logo span{font-size:clamp(24px,7vw,34px)}.ensemble-hero .home-logo b{font-size:clamp(22px,6.5vw,31px)}}
.mastery-card.locked small{line-height:1.8;white-space:normal}.toast{max-width:92vw;white-space:normal;line-height:1.7}

/* Solo festival panels */
.festival-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:14px}.festival-options article{padding:16px;border:1px solid #55788d;border-radius:12px;background:#102b3b}.festival-options article .btn{width:100%;margin-top:10px}.festival-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:8px}.festival-roster .btn{font-size:15px;white-space:normal;min-height:56px}.festival .btn:disabled{opacity:.4;cursor:default}.festival-bracket{display:grid;grid-template-columns:1fr 1fr;gap:8px}.festival-bracket>div{padding:12px;background:#173449;overflow-wrap:anywhere}.festival select{font-size:16px;max-width:100%}.festival label{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.festival p{line-height:1.8}

.rank-periods{display:flex;gap:10px;margin:0 0 16px}.rank-periods .btn{flex:1;min-width:0;white-space:normal;line-height:1.5}.rank-periods .btn.on{background:linear-gradient(#ffdb65,#ff9b23);color:#17212b;box-shadow:0 0 0 2px #bc6b12}.rank-tabs[hidden]{display:none!important}.rank-tabs .btn.on{outline:2px solid #bc6b12;outline-offset:-2px}

/* Wrap interface labels and card names at deliberate word boundaries. */
.text-unit,.fighter-name .name-piece.atomic{display:inline-block;white-space:nowrap;max-width:100%;vertical-align:baseline}.text-unit.flow-long,.player-unit{display:inline;white-space:normal;overflow-wrap:break-word}.player-unit:not(.flow-long){display:inline-block;white-space:nowrap}.fighter-name{overflow-wrap:normal;word-break:normal}.slot>.fighter-name{font-size:10px}.slot .name-fit-7{font-size:.9em}.slot .name-fit-8{font-size:.8em}.slot .name-fit-9{font-size:.7em}.rank-name{word-break:normal;overflow-wrap:break-word}.rank th:first-child{width:38px}.rank th:last-child{width:34%}.rank-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.rank-tabs .btn{font-size:12px;padding:7px 6px;min-height:44px}.rank-periods .btn{font-size:clamp(14px,3.8vw,17px);padding:9px 6px;line-height:1.6;min-height:48px}.rank-tabs .text-unit,.rank-periods .text-unit{max-width:none}.cpu-choice>span{flex-shrink:0;white-space:nowrap}.cpu-choice select{min-width:0}.festival-bracket .fighter-name{font-size:clamp(11px,3vw,15px)}

/* Japanese reading mode: preserve semantic wrapping and room for ruby. */
html[data-language="ruby"] ruby{ruby-align:center;ruby-position:over}
html[data-language="ruby"] rt{font-size:.52em;font-weight:500;letter-spacing:0;line-height:1}
html[data-language="ruby"] :is(button,.chip,.slot,.text-unit,.name-piece){line-height:1.9}
html[data-language="ruby"] :is(p,h1,h2,h3,label,td,th){line-height:2}
html[data-language="ruby"] .slot{min-height:0}

/* Safe interactive screens 2026-11-10 */
:root{--screen-top:env(safe-area-inset-top,0px);--screen-bottom:env(safe-area-inset-bottom,0px);--screen-left:env(safe-area-inset-left,0px);--screen-right:env(safe-area-inset-right,0px)}
@media(display-mode:standalone){:root{--screen-top:max(32px,env(safe-area-inset-top,0px));--screen-bottom:max(20px,env(safe-area-inset-bottom,0px))}}
#ui:not(.scr-fight):not(.scr-vs){top:var(--screen-top);bottom:var(--screen-bottom);left:var(--screen-left);right:var(--screen-right);height:auto;max-height:none}
#ui.scr-title{padding:0;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y pinch-zoom}
.home{min-height:100%;height:auto;flex-shrink:0;padding-bottom:24px}
.home-top{flex-shrink:0}
#ui.scr-friends{height:auto;padding:12px clamp(12px,3vw,28px) 28px;overflow-y:auto!important;touch-action:pan-y pinch-zoom;-webkit-overflow-scrolling:touch}
.friends-panel{padding-bottom:16px}
.friends-panel>button:first-child{position:sticky;top:0;z-index:5}
.mwrap{padding:calc(var(--screen-top) + 8px) calc(var(--screen-right) + 8px) calc(var(--screen-bottom) + 12px) calc(var(--screen-left) + 8px)}
.mwrap .modal{max-height:100%;min-height:0}.modal .mhead,.modal .mfoot{flex-shrink:0}.modal .mbody{min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
html #opening-screen{padding:var(--screen-top) var(--screen-right) var(--screen-bottom) var(--screen-left);overflow:hidden}
#opening-screen picture{min-height:0;max-height:100%}#opening-screen img{min-height:0;max-height:100%}
@media(orientation:portrait){
 #opening-screen{grid-template-rows:minmax(0,1fr) auto auto;gap:0}
 #opening-screen picture{height:100%;align-self:stretch}
 #opening-screen .opening-logo{padding:8px 8px 4px}
 #opening-screen .opening-status{margin:6px auto 12px;white-space:normal;max-width:94%;text-align:center}
}
@media(max-width:1024px) and (pointer:coarse),(max-width:680px){
 .home-account{width:100%;justify-content:center;gap:8px;min-width:0}
 .home-top .chip,.language-picker select{min-height:44px}
 .home-top .chip{max-width:100%;padding:8px 12px;font-size:12px}
 .language-picker{min-width:0}.language-picker select{max-width:180px}
 .friends-panel .btn{min-height:44px;white-space:normal;max-width:100%}
 .ensemble-hero{display:flex;flex-direction:column;aspect-ratio:auto;max-height:none;min-height:0}
 .ensemble-hero .ensemble-picture{position:relative;inset:auto;flex:none;width:100%;height:clamp(150px,calc(var(--app-height) - var(--screen-top) - var(--screen-bottom) - 310px),520px);min-height:0;max-height:none;aspect-ratio:auto}
 .ensemble-hero .ensemble-picture img{object-fit:contain;object-position:center}
 .ensemble-hero .home-copy{position:relative;inset:auto;flex:none;padding:12px 8px 18px;width:100%;background:#071725}
 .ensemble-hero .home-actions{flex-wrap:wrap;gap:14px}
 .ensemble-hero .home-start,.ensemble-hero .home-how{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
 .ensemble-hero .home-logo span{font-size:clamp(25px,6vw,38px)}
 .ensemble-hero .home-logo b{font-size:clamp(23px,5.5vw,34px)}
}
@media(max-width:1024px){.home-account button{min-height:44px}}
