:root{--ink:#eaf3ed;--mute:#99aca4;--deep:#061e1a;--edge:#245148;--lime:#dce77d;--teal:#63d7bd;--coral:#ff8574;--court:#2d6758}*{box-sizing:border-box}body{margin:0;background:var(--deep);color:var(--ink);font-family:Manrope,Arial,sans-serif}.app-shell{min-height:100vh;background:radial-gradient(circle at 54% 39%,#17473b 0,#0c2b25 42%,#061e1a 80%);display:flex;flex-direction:column}header{height:72px;display:flex;align-items:center;padding:0 30px;border-bottom:1px solid var(--edge);background:#071f1b}.brand{padding:0;border:0;background:none;color:var(--ink);font:500 17px 'DM Mono';letter-spacing:2px;cursor:pointer;display:flex;align-items:center;gap:9px}.brand span{display:grid;place-items:center;width:27px;height:27px;border:1px solid var(--lime);border-radius:50%;color:var(--lime);font-size:13px}header p{margin-left:28px;padding-left:28px;border-left:1px solid var(--edge);font-size:12px;color:var(--mute)}.back{margin-left:auto;border:0;background:none;color:var(--lime);font:600 12px Manrope;cursor:pointer}.screen{flex:1}.hidden{display:none!important}.welcome{padding:clamp(45px,8vw,115px) max(25px,12vw);display:grid;grid-template-columns:1fr minmax(380px,465px);align-items:center;gap:11vw}.intro{max-width:520px}.eyebrow{margin:0 0 14px;font:500 10px 'DM Mono';letter-spacing:1.45px;text-transform:uppercase;color:#91ae9f}.intro h1{font-size:clamp(37px,4.7vw,65px);line-height:1.05;letter-spacing:-3px;margin:0 0 25px}.intro em{color:var(--lime);font-style:normal}.intro>p:last-child{color:#afc2b8;font-size:15px;line-height:1.65}.card{background:#10342c;border:1px solid #326257;border-radius:8px;padding:31px;box-shadow:0 22px 50px #0003}h2{margin:0;color:#f2f8f4;font-size:20px;letter-spacing:-.5px}#formats{display:grid;gap:9px;margin:23px 0}#formats button{display:flex;gap:15px;align-items:center;padding:14px;border:1px solid #326257;border-radius:6px;background:#0d2b25;color:var(--ink);text-align:left;cursor:pointer}#formats button:hover,#formats .selected{border-color:var(--lime);background:#174139}#formats b{color:var(--lime);font:500 13px 'DM Mono';width:38px}#formats strong,#formats small{display:block}#formats strong{font-size:13px}#formats small{font-size:11px;color:#91a89d;margin-top:2px}.primary,.secondary{border-radius:5px;padding:13px 15px;font:700 12px Manrope;cursor:pointer}.primary{background:var(--lime);color:#12261f;border:1px solid var(--lime)}.primary:disabled{cursor:not-allowed;opacity:.42}.secondary{color:#d9ebe2;background:transparent;border:1px solid #49776a}.wide{width:100%}.editor{display:grid;grid-template-columns:225px minmax(380px,1fr) 245px}.steps,.actions{background:#061c18a8;padding:29px 20px;border-right:1px solid var(--edge)}.actions{border-left:1px solid var(--edge);border-right:0}.steps h2{font-size:17px;margin-bottom:20px}.steps h2 button{border:0;background:transparent;color:var(--mute);cursor:pointer}.step{display:flex;gap:10px;width:100%;align-items:center;text-align:left;border:1px solid transparent;color:#c7dbd1;background:transparent;border-radius:5px;padding:10px;cursor:pointer}.step.active{background:#19473d;border-color:#397164}.step b{font:11px 'DM Mono';color:var(--lime)}.step strong,.step small{display:block}.step strong{font-size:12px}.step small{font-size:10px;color:#91a89d;margin-top:2px}.add{margin-top:14px;width:100%;padding:10px;background:transparent;border:1px dashed #4f776c;border-radius:5px;color:var(--lime);font:600 11px Manrope;cursor:pointer}.hint{font-size:10px;line-height:1.6;color:#8ba69a;margin-top:26px}.stage{padding:26px 5vw 15px;display:flex;flex-direction:column;align-items:center;min-width:0}.stagehead{display:flex;width:min(100%,620px);justify-content:space-between;align-items:end;margin-bottom:14px}.stagehead h1{font-size:23px;letter-spacing:-.7px;margin:0}.mode{font:600 10px Manrope;color:#b9d1c7;padding:7px 10px;background:#164138;border-radius:20px}.mode:first-letter{color:var(--lime)}.courtwrap{height:min(65vh,700px);width:auto;aspect-ratio:6.1/13.4;position:relative;filter:drop-shadow(0 18px 20px #0004);touch-action:none}.court,.trails{position:absolute;inset:0;width:100%;height:100%}.base{fill:var(--court);stroke:#b1cbb9;stroke-width:3}.line{fill:none;stroke:#e2eee4;stroke-width:3}.faint{stroke:#e2eee4;stroke-width:3;opacity:.62}.net{stroke:#e9f1e8;stroke-width:8;filter:drop-shadow(0 3px 2px #0005)}.trails{overflow:visible;pointer-events:none}.netlabel{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font:9px 'DM Mono';letter-spacing:2px;color:#e6f2e9;text-shadow:0 1px #1e463b}.piece{position:absolute;transform:translate(-50%,-50%);border:0;background:none;color:white;text-align:center;padding:0;touch-action:none}.player{cursor:grab}.drag{cursor:grabbing;z-index:2}.disc{display:grid;place-items:center;width:40px;height:40px;border:2px solid #ffffffd1;border-radius:50%;font:700 13px Manrope;box-shadow:0 4px 7px #071f1888}.own .disc{background:#2baf94}.enemy .disc{background:#e76459}.piece small{display:block;font:600 9px Manrope;margin-top:4px;text-shadow:0 1px 2px #17372f}.shuttle{width:23px;height:23px;border-radius:50%;background:#fff8c7;border:3px solid #31564a;box-shadow:0 2px 4px #18362e;cursor:grab}.instruction{margin:13px 0 0;color:#a7bcb2;font-size:11px}.actions h2{margin-bottom:10px}.actions>p:not(.eyebrow){font-size:11px;line-height:1.6;color:#9eb5ab;margin-bottom:22px}.actions .secondary{margin-top:9px}.expiry{display:flex;gap:9px;margin-top:24px;padding-top:19px;border-top:1px solid var(--edge);color:#96b0a5;font-size:10px;line-height:1.55}.expiry:first-letter{color:var(--lime);font-size:15px}.timeline{height:72px;padding:0 30px;align-items:center;gap:16px;background:#071e1a;border-top:1px solid var(--edge)}.play{width:36px;height:36px;border:0;border-radius:50%;background:var(--lime);color:#173027;cursor:pointer}.timeline span{width:82px;color:#b6cbc1;font:10px 'DM Mono'}.timeline input{flex:1;accent-color:var(--lime)}.speed{background:transparent;color:#acc5ba;border:1px solid #487369;padding:6px 8px;font:10px 'DM Mono';cursor:pointer}.speed.active{background:#1d493e;color:white}.modal{position:fixed;inset:0;display:grid;place-items:center;background:#020f0cab;z-index:10;padding:18px}.modal .card{width:min(100%,470px)}.modal h2{margin-bottom:9px}.modal p:not(.eyebrow){font-size:12px;color:#aac1b6;line-height:1.55}.link{display:flex;margin:20px 0 11px}.link input{min-width:0;flex:1;border:1px solid #4d776c;background:#08231e;color:#cfe2d8;padding:11px;font-size:11px;border-radius:4px 0 0 4px}.link button{border:0;background:var(--lime);color:#193028;font:700 11px Manrope;padding:0 12px;border-radius:0 4px 4px 0;cursor:pointer}.toast{position:fixed;bottom:90px;left:50%;transform:translate(-50%,20px);opacity:0;transition:.22s;background:var(--lime);color:#13291f;padding:10px 14px;border-radius:4px;font:700 12px Manrope;z-index:20}.toast.show{transform:translate(-50%,0);opacity:1}@media(max-width:850px){.welcome{grid-template-columns:1fr;padding:50px 22px;gap:35px}.editor{grid-template-columns:1fr}.steps,.actions{border:0;border-bottom:1px solid var(--edge)}.actions{order:3}.stage{order:2;padding:24px 16px}.steps{order:1}.hint{display:none}.courtwrap{height:auto;width:min(100%,330px);aspect-ratio:6.1/13.4}.timeline{padding:0 15px;gap:9px}.timeline span,header p{display:none}.stagehead{max-width:330px}.instruction{text-align:center}.actions{padding:22px}.intro h1{letter-spacing:-2px}}
/* Product identity on the entry screen */
.intro::before{content:'Бадминтон';display:block;margin:0 0 18px;color:var(--lime);font:600 14px 'DM Mono',monospace;letter-spacing:2px;text-transform:uppercase}

/* ===== Дополнения к базовым стилям (бывшие стили из app.js, порядок каскада сохранён) ===== */

/* Фишки и волан */
.ghost{opacity:.24!important;filter:grayscale(1);pointer-events:none;z-index:0}.ghost .disc{border-style:dashed}.piece:not(.ghost){z-index:1}
.shuttle{width:48px!important;height:48px!important;overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;filter:none!important;cursor:grab!important;touch-action:none!important;transform:translate(-50%,-50%) rotate(var(--turn,0deg))!important}.shuttle.drag{cursor:grabbing!important}.shuttle img{position:absolute!important;width:42px!important;height:42px!important;left:3px!important;top:3px!important;object-fit:contain!important;mix-blend-mode:normal!important;pointer-events:none;user-select:none}.shuttle:focus-visible{outline:3px solid #fff!important;outline-offset:2px!important;border-radius:8px!important}

/* Подписи сторон корта */
#court::before,#vCourt::before,#court::after,#vCourt::after{position:absolute;left:calc(100% + 14px);z-index:3;color:#e9f4ed;font:700 14px Manrope;white-space:nowrap;text-shadow:0 1px 3px #061e1a}#court::before,#vCourt::before{content:"Соперники";top:25%}#court::after,#vCourt::after{content:"Мы";top:75%}

/* Доступность: крупные кнопки и текст */
body{font-size:16px}button{min-height:48px;font-size:16px!important;line-height:1.25;transition:opacity .15s ease,transform .15s ease}button:not(.piece):active{opacity:.8;transform:scale(.98)}button:focus-visible{outline:4px solid #fff!important;outline-offset:3px}.eyebrow{font-size:12px!important;letter-spacing:1.3px!important;color:#c2d8cd!important}header p{font-size:15px!important}.back{min-height:48px;font-size:15px!important}.intro>p:last-child{font-size:18px!important;line-height:1.6}.card h2,.actions h2{font-size:25px!important}.card{padding:34px}.primary,.secondary{min-height:54px;font-size:17px!important}#formats button{min-height:76px!important;padding:16px!important}#formats b{font-size:16px!important}#formats strong{font-size:17px!important}#formats small{font-size:14px!important;margin-top:5px!important}.steps,.actions{padding:32px 25px}.step{min-height:66px!important;padding:12px!important}.step b{font-size:14px!important}.step strong{font-size:15px!important}.step small{font-size:13px!important;margin-top:5px!important}.add{min-height:52px!important;font-size:16px!important}.hint{font-size:13px!important;line-height:1.6!important}.stagehead h1{font-size:29px!important}.mode{font-size:14px!important;padding:10px 13px!important}.instruction{font-size:14px!important;line-height:1.6!important}.expiry{font-size:13px!important;line-height:1.65!important}.piece .disc{width:48px!important;height:48px!important;font-size:16px!important}.piece small{font-size:12px!important}.link input{font-size:14px!important}.link button{font-size:15px!important;min-height:48px!important}
.ui-icon{width:1.05em;height:1.05em;vertical-align:-.17em;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;margin-right:.38em}.icon-only .ui-icon{margin:0}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

/* Шаг «Старт» */
.start-step b{display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--lime);border-radius:50%;font-size:10px!important;line-height:1;color:var(--lime)}.start-step.active b{background:var(--lime);color:#163027}.start-step strong{font-size:17px!important}.start-step small{font-size:13px!important}

/* Один экран без глобального скролла */
html,body{width:100%;height:100%;overflow:hidden}.app-shell{height:100dvh;min-height:0;overflow:hidden}header{flex:0 0 72px}.screen{min-height:0;overflow:hidden}.editor{min-height:0;overflow:hidden}.editor .stage{min-height:0;overflow:hidden}.courtwrap{height:min(58vh,calc(100dvh - 285px))}.editor .courtwrap{height:min(68vh,calc(100dvh - 210px))}.timeline{display:flex;flex:0 0 84px;min-height:0}
.actions{padding:30px 20px!important}.actions h2{margin:0 0 20px!important;font-size:22px!important}.actions .wide{min-height:54px!important;white-space:nowrap}.actions .secondary{margin-top:10px!important}.actions .expiry{margin-top:20px!important;padding-top:16px!important;gap:7px!important;font-size:12px!important;line-height:1.45!important}.actions .expiry span{white-space:nowrap}
@media(max-height:760px) and (min-width:851px){.steps,.actions{padding:18px}.step{min-height:52px!important;padding:8px!important}.step small{font-size:11px!important;margin-top:2px!important}.add{min-height:46px!important}.hint{margin-top:14px}.stage{padding-top:16px}.stagehead{margin-bottom:8px}.courtwrap{height:min(54vh,calc(100dvh - 230px))}.instruction{margin-top:8px}}

/* Таймлайн */
.timeline{height:84px!important;gap:10px!important}.play{display:grid!important;place-items:center!important;padding:0!important;width:52px!important;height:52px!important;font-size:19px!important}.play .ui-icon{margin:0!important}.speed{min-width:58px!important;min-height:44px!important;font-size:15px!important;order:0}.play,.next-step{order:1!important}
.timeline-slider{order:2;flex:1;min-width:40px;height:22px;appearance:none;background:transparent;cursor:pointer}.timeline-slider::-webkit-slider-runnable-track{height:6px;border-radius:4px;background:repeating-linear-gradient(to right,#31594f 0,#31594f calc(var(--step-size,100%) - 2px),#98b4a8 calc(var(--step-size,100%) - 2px),#98b4a8 var(--step-size,100%))}.timeline-slider::-moz-range-track{height:6px;border-radius:4px;background:#31594f}.timeline-slider::-webkit-slider-thumb{appearance:none;width:18px;height:18px;border-radius:50%;margin-top:-6px;background:var(--lime);border:2px solid #173b31}.timeline-slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:var(--lime);border:2px solid #173b31}

/* Логотип */
.brand span{display:flex!important;align-items:center!important;justify-content:center!important;width:28px!important;height:28px!important;line-height:28px!important;text-align:center!important;padding:0!important;transform:translateY(-1px)}

/* Название сценария в центре шапки */
header{position:relative}
#topScenario{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:4px;color:var(--ink);font:600 17px Manrope;white-space:nowrap}
#topScenario .top-scenario-edit{min-height:36px!important;width:36px;padding:0;border:0;border-radius:0;background:transparent;color:var(--lime);display:grid;place-items:center}
#topScenario .top-scenario-input{width:220px;color:var(--ink);background:#08251f;border:1px solid var(--lime);border-radius:4px;padding:7px 9px;font:600 16px Manrope}

/* Окно ссылок */
.modal .card{max-height:100%;overflow-y:auto}
.link-block{margin-top:18px}.link-block label{display:block;color:#cfe2d8;font-size:13px;margin-bottom:7px}.link-block .link{margin:0}.link-block .note{margin:8px 0 0!important;font-size:12px;line-height:1.5}
.modal .card .secondary{margin-top:22px}

/* Главная: вертикальный свайп */
.welcome{height:calc(100dvh - 72px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}

/* Мобильная версия */
@media(max-width:850px){
header{flex-basis:64px;height:64px}
#topScenario{font-size:14px;max-width:38vw;overflow:hidden}.back-text{display:none}.back .ui-icon{margin:0;width:1.4em;height:1.4em}header{padding:0 14px}.top-scenario-name{overflow:hidden;text-overflow:ellipsis}.top-scenario-input{max-width:38vw!important}
#court::before,#vCourt::before,#court::after,#vCourt::after{left:calc(100% + 1px);right:auto;bottom:auto;font-size:12px;color:#cfe2d8;writing-mode:vertical-rl;transform:translateY(-50%);letter-spacing:.5px}#court::before,#vCourt::before{top:25%}#court::after,#vCourt::after{top:75%}
.editor{display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}
.steps{padding:8px 14px;display:flex;align-items:center;gap:8px}.steps .eyebrow{display:none}.steps #stepList{display:flex;flex:1;min-width:0;gap:5px;margin:0;padding:0;overflow:hidden}.steps .step{min-height:48px!important;min-width:0!important;flex:1;padding:6px!important;gap:4px!important}.steps .step b,.steps .step small{display:none!important}.steps .step strong{font-size:13px!important;white-space:nowrap}.steps .add{margin:0;width:auto;flex:none;white-space:nowrap;padding:0 14px;min-height:48px!important}.hint{display:none}
.stage{padding:6px 16px 8px;justify-content:flex-start}.stagehead{width:100%;max-width:360px;margin-bottom:6px;align-items:center}.stagehead .eyebrow{display:none}.stagehead>div{min-width:0;flex:1}.stagehead h1{font-size:16px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.3px}.mode{font-size:12px!important;padding:6px 10px!important;white-space:nowrap;flex:none;margin-left:10px;line-height:1.2}.courtwrap,.editor .courtwrap{height:min(calc(100dvh - 275px),calc((100vw - 32px)*2.19));width:auto!important}#vCourt{height:min(calc(100dvh - 205px),calc((100vw - 32px)*2.19))!important}.instruction{display:none}
.actions{padding:6px 16px!important;display:grid;grid-template-columns:1fr 1fr;gap:8px}.actions .eyebrow,.actions h2,.actions>p,.actions .expiry{display:none}.actions .secondary{margin-top:0!important}.actions .wide{min-height:42px!important;font-size:14px!important;padding:0 8px}
.timeline{position:sticky;bottom:0;flex-basis:56px!important;height:56px!important;padding:0 14px;gap:8px!important}.timeline .play{width:40px!important;height:40px!important;min-height:40px!important}.timeline .speed{min-width:46px!important;min-height:36px!important;padding:4px!important;font-size:13px!important}.timeline-slider{min-width:32px}
.welcome{height:calc(100dvh - 64px);padding:36px 18px 36px}.welcome .card{padding:22px 18px}#formats button{min-height:64px!important}.wide{min-height:48px}
.modal{align-items:end;padding:0}.modal .card{width:100%;border-radius:13px 13px 0 0;padding:24px 18px}
}
