/* Полноширинные иллюстрированные уроки Учебного центра. */
body.d2-dark main.debut-main {
  --story-line:#304657; --story-accent:#91d4ff; --story-paper:#152c38; --story-ink:#e4f3f9;
  --story-muted:var(--d2-muted); --story-gutter:clamp(12px,2.6vw,42px); --story-radius:10px;
  --story-surface:color-mix(in srgb,var(--d2-panel) 78%,var(--d2-bg));
  margin:auto; padding:18px 0 48px;
}
.debut-main .story {
  font-family:Manrope,Inter,system-ui,sans-serif;line-height:1.62;color:var(--d2-text);
  background:var(--story-surface);border:1px solid var(--story-line);border-radius:var(--story-radius);
  padding-bottom:clamp(12px,2vw,28px);
}
.story > :is(section,.story-art-source){margin-inline:var(--story-gutter)}
.story a,.story-path a{color:var(--story-accent);text-decoration:underline;text-underline-offset:.24em}
.story :is(summary,a):focus-visible,.story-path a:focus-visible{outline:3px solid #57adc1;outline-offset:3px}
.story-path{display:flex;gap:10px;margin:0 0 15px;font-size:13px;color:var(--story-muted)}
.story-path a{color:inherit;text-decoration:none}
.story-cover{position:relative;isolation:isolate;overflow:hidden;background:#101b2b;color:#f2f7ff;border-radius:calc(var(--story-radius) - 1px) calc(var(--story-radius) - 1px) 0 0}
.story-cover>img{position:absolute;right:0;top:0;width:71%;height:100%;z-index:-2;object-fit:cover;object-position:center 16%}
.story-cover:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#101b2b 21%,#101b2bf8 29%,#101b2bce 38%,#101b2b39 56%,transparent 73%)}
.story-cover>div{padding:clamp(32px,4.8vw,68px) clamp(28px,4.4vw,62px);max-width:49%;box-sizing:border-box}
.story .story-byline,.story-heading>span,.voice-name{display:flex;gap:10px;align-items:center;margin:0 0 11px;font:800 12px/1.4 Manrope,sans-serif;text-transform:uppercase;letter-spacing:.12em}
.story .story-byline,.voice-name{color:#a8ddff}
.story-byline:before,.story-heading>span:before,.voice-name:before{content:"";width:24px;height:2px;background:currentColor;flex:none}
html body.d2-dark .debut-main .story-cover h1{margin:0 0 22px!important;font:650 clamp(50px,5.4vw,72px)/1.02 Oswald,Manrope,sans-serif!important;letter-spacing:-.025em!important;text-transform:uppercase!important;color:#f7fbff!important}
.story-cover h1 em{display:block;font-style:normal;color:#a1d9fa}
.story .story-lede{max-width:38ch;margin:0 0 24px;font-size:clamp(15px,1.4vw,18px);line-height:1.54;color:#dce7f3}
.story-cover a,.story-final>div>a:first-child{display:inline-flex;align-items:center;gap:18px;padding:10px 17px;border-radius:3px;background:#b1dfff;color:#10283a;text-decoration:none;font-weight:800}
.story-cover a:hover,.story-final>div>a:first-child:hover{background:#d4eeff}
.story-jumps{display:flex;flex-wrap:wrap;gap:4px clamp(18px,3.5vw,48px);padding:8px var(--story-gutter);border-bottom:1px solid var(--story-line)}
.story-jumps a{padding:6px 0;color:var(--d2-text);font-size:14px;font-weight:650;text-decoration:none}
.story-jumps a:hover,.story-path a:hover{text-decoration:underline}
.story :is(section,[id]){scroll-margin-top:82px}
.story-section,.story-final{margin:clamp(26px,3.6vw,48px) 0}
.story .story-heading h2,.story-final h2{margin:0 0 12px;font:600 clamp(26px,3.2vw,42px)/1.12 Oswald,Manrope,sans-serif;letter-spacing:0}
.story-heading>span{color:var(--story-accent)}
.story-intro,.story-note,.story-final>p{max-width:83ch}
.story .story-intro{margin:0 0 16px}
.story .story-note{font-size:14px;color:var(--story-muted);margin:14px 0 0}
.story-picks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start}
.story-picks details{border:1px solid var(--story-line);border-radius:4px;background:var(--d2-panel);overflow:hidden}
.story-picks summary{display:flex;align-items:center;gap:14px;min-height:72px;cursor:pointer;list-style:none}
.story-picks summary::-webkit-details-marker{display:none}
.story-picks summary:after{content:"+";font:500 22px/1 Manrope,sans-serif;margin-left:auto;padding-right:12px;color:var(--story-accent)}
.story-picks [open]>summary:after{content:"−"}
.story-picks img{width:30%;max-width:116px;height:72px;object-fit:cover}
.story-picks :is(small,b){display:block}
.story-picks small{font-size:12px;line-height:1.25;color:var(--story-muted)}
.story-picks b{font-size:clamp(15px,1.5vw,20px);line-height:1.35}
.story-picks details>div{padding:0 14px 12px;font-size:14px}
.story-spread,.story-line{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);align-items:center;gap:clamp(18px,3.6vw,54px)}
.story-replay,.story-line{grid-template-columns:minmax(0,1fr) minmax(0,1.08fr)}
.story-line{grid-template-areas:"intro frame" "board frame";row-gap:14px}
.story-line-intro{grid-area:intro;align-self:end;max-width:65ch}
.story-line-intro p{margin:0}
.story-line>.creep-board{grid-area:board;align-self:start;max-width:65ch}
.story-line>.story-frame{grid-area:frame}
.story-spread{padding-block:clamp(18px,3vw,40px);border-block:1px solid var(--story-line)}
.story-frame{margin:0;min-width:0;color:var(--d2-text)}
.story-frame img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover}
.story-frame figcaption{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:baseline;border-bottom:1px solid var(--story-line);padding:12px 2px;font:650 clamp(14px,1.25vw,17px)/1.45 Manrope,sans-serif}
.story-frame figcaption b{color:var(--story-accent);font:800 11px/1.4 Manrope,sans-serif;letter-spacing:.08em;text-transform:uppercase}
.story-copy{min-width:0;max-width:59ch}
.story-copy>p{margin:0 0 13px}
.story-copy>p:last-child{margin:0}
.story-item{display:flex;align-items:start;gap:12px;background:var(--d2-bg);border-radius:4px;padding:12px;margin:12px 0}
.story-item img{border-radius:3px;width:54px;height:auto}
.story-item p{margin:0;line-height:1.48;font-size:14px}
.story-item b{display:block;margin-bottom:4px}
.story-cue{border-inline-start:3px solid var(--story-accent);padding-left:12px;font-weight:600}
.story .creep-board h3{font:650 clamp(21px,2vw,28px)/1.2 Oswald,Manrope,sans-serif;margin:0 0 10px}
.creep-board{background:var(--story-paper);color:var(--story-ink);padding:16px 18px;border-radius:3px;border-inline-start:3px solid var(--story-accent)}
.creep-board p{margin:7px 0 12px;font-size:15px}
.creep-board small{display:block;margin-top:10px;font-size:12px;color:#b1c9d7}
.creep-row{display:grid;grid-template-columns:auto 1fr 56px;align-items:center;gap:10px;font-size:13px;margin:.6em 0;font-variant-numeric:tabular-nums}
.creep-row b{text-align:right}
.creep-row meter{appearance:none;width:100%;height:14px;background:#314957;border:0;border-radius:2px}
.creep-row meter::-webkit-meter-bar{height:14px;background:#314957;border:0;border-radius:2px}
.creep-row meter::-webkit-meter-optimum-value{background:#81d1b2}
.creep-row meter::-moz-meter-bar{background:#81d1b2}
.creep-board summary,.story-turn summary{cursor:pointer;padding:8px 0;font-weight:700}
.creep-board summary{color:#9ddaff}
.story-turn summary::marker{color:var(--story-accent)}
.story-turn details{border-block-start:1px solid var(--story-line)}
.story-turn details p{margin:0 0 12px;color:var(--story-muted)}
.story-final{padding:clamp(20px,3vw,36px);border-top:3px solid var(--story-accent);background:var(--d2-panel)}
.story-final p{margin:8px 0}
.story-final>div{display:flex;align-items:center;gap:12px 20px;flex-wrap:wrap;margin-top:18px}
html[data-theme=light] body.d2-dark main.debut-main{--story-line:#b4c5ce;--story-accent:#245b7c;--story-surface:color-mix(in srgb,var(--d2-bg) 45%,white)}
html[data-theme=light] .debut-main .story-cover :is(.story-byline,.story-lede){color:#dfedff!important}

/* Союзница в кадре целиком. Реплика остаётся за границей изображения. */
.lane-call{display:grid;grid-template-columns:minmax(0,2.05fr) minmax(0,1fr);align-items:stretch;margin:22px 0 0;background:#122236;color:#eff6ff}
.lane-call>img{display:block;align-self:center;width:100%;height:auto}
.lane-call figcaption{display:flex;flex-direction:column;justify-content:center;position:relative;padding:clamp(20px,3vw,46px);background:linear-gradient(125deg,#1c324b,#112032 75%)}
.lane-call blockquote{margin:0;color:#f3f8ff;font:650 clamp(22px,2.5vw,36px)/1.28 Manrope,system-ui,sans-serif;letter-spacing:-.035em}
.lane-glances{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(10px,2vw,26px);margin-top:clamp(12px,2vw,24px)}
.lane-glances img{aspect-ratio:2.5;object-position:center 51%}
.lane-glances .story-frame:last-child img{object-position:center 55%}
.tower-choice{margin:clamp(20px,3vw,36px) 0 0;display:grid;grid-template-columns:minmax(0,.85fr) repeat(2,minmax(0,1fr));gap:10px clamp(12px,2vw,26px);align-items:start}
.tower-choice h3{margin:5px 0;font:600 clamp(23px,2.3vw,32px)/1.2 Oswald,Manrope,sans-serif}
.tower-choice details{background:var(--d2-panel);border:1px solid var(--story-line);border-radius:3px}
.tower-choice details[open]{border-color:var(--story-accent)}
.tower-choice summary{min-height:44px;box-sizing:border-box;padding:12px 14px;line-height:1.45}
.tower-choice details p{padding:0 14px;margin:2px 0 16px}
@media(max-width:820px){
  .story-spread,.story-line{gap:18px}
  .story-cover>div{max-width:55%}
  .tower-choice{grid-template-columns:1fr 1fr}
  .tower-choice h3{grid-column:1/-1}
  .lane-call{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr)}
  .lane-call figcaption{padding:18px}
  .lane-glances .story-frame figcaption{display:block}
  .lane-glances figcaption b{display:block;margin-bottom:4px}
}
@media(max-width:680px){
  .story-spread,.story-line{grid-template-columns:minmax(0,1fr)}
  .story-line{grid-template-areas:"intro" "frame" "board"}
  .story-spread{padding-block:22px}
  .story-copy{max-width:none}
  .story-spread:not(.story-replay) .story-frame img{aspect-ratio:1.85;object-position:center 43%}
  .lane-call{grid-template-columns:1fr}
  .lane-call figcaption{padding:18px 20px}
  .lane-call blockquote{font-size:clamp(21px,4.5vw,27px);max-width:37ch}
  .lane-call .voice-name{margin-bottom:7px}
  .story-picks{gap:6px}.story-picks summary{gap:8px}
  .story-picks small{font-size:11px}
  .story-jumps{gap:2px 18px}
}
@media(max-width:680px){
  .story-cover{display:flex;flex-direction:column}
  .story-cover>img{position:static;z-index:auto;width:100%;height:auto;aspect-ratio:1.85;object-position:center 22%}
  .story-cover:after{display:none}
  .story-cover>div{max-width:none;padding:18px 20px 22px}
  html body.d2-dark .debut-main .story-cover h1{font-size:clamp(38px,10vw,50px)!important;margin-bottom:10px!important}
  .story-cover h1 em{display:inline}
  .story .story-byline{margin-bottom:6px}.story .story-lede{margin-bottom:16px}
}
@media(max-width:540px){
  .story-jumps{gap:2px 15px}.story-jumps a{font-size:13px}
  .story-picks{grid-template-columns:1fr}.story-picks summary,.story-picks img{min-height:0;height:52px}
  .lane-glances{gap:9px}
  .lane-glances img{aspect-ratio:1.23}
  .lane-glances .story-frame figcaption{font-size:14px;line-height:1.4}
  .tower-choice{grid-template-columns:1fr}
}
/* Миникарта и нижняя панель участвуют в разборе. */
.story-replay .story-frame img{aspect-ratio:auto;height:auto;object-fit:contain}
.story-art-source{font-size:13px;color:var(--story-muted);border-top:1px solid var(--story-line);margin-top:14px;padding:8px 0}
.story-art-source summary{cursor:pointer;font-weight:650;padding:6px 0}
.story-art-source p{max-width:80ch}

/* Края игровых кадров растворяются в той же поверхности, на которой набран текст. */
.story .story-cover{background:var(--story-surface)}
.story .story-cover>img{width:82%;object-position:60% 42%}
.story .story-cover:after{
  background:linear-gradient(90deg,var(--story-surface) 18%,color-mix(in srgb,var(--story-surface) 98%,transparent) 30%,transparent 65%),
    linear-gradient(0deg,var(--story-surface),transparent 18%);
}
html body.d2-dark .debut-main .story .story-cover h1{color:var(--d2-text)!important}
.story .story-cover h1 em{color:var(--story-accent)}
html[data-theme=light] .debut-main .story .story-cover .story-byline{color:var(--story-accent)!important}
html[data-theme=light] .debut-main .story .story-cover .story-lede{color:var(--d2-text)!important}
.modes-story .story-jumps{padding-inline:var(--story-gutter)}
.modes-story .story-spread{--fade-direction:90deg;border:0;padding-block:clamp(20px,2.6vw,38px)}
.modes-story .story-spread + .story-spread{border-top:1px solid var(--story-line)}
.modes-story .mode-picture-right{--fade-direction:270deg;grid-template-columns:minmax(0,1fr) minmax(0,1.08fr)}
.modes-story .story-spread .story-frame img{
  height:auto;aspect-ratio:auto;
  mask-image:linear-gradient(var(--fade-direction),#000 83%,transparent),linear-gradient(180deg,#000 87%,transparent);
  mask-composite:intersect;
}
.modes-story .story-frame figcaption{display:block;padding:8px 0;border:0;color:var(--story-muted)}
.modes-story .mode-table{overflow-x:auto;margin:16px 0 10px}
.modes-story table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums}
.modes-story :is(td,th){padding:9px clamp(4px,1.45vw,20px);border-bottom:1px solid var(--story-line);text-align:right}
.modes-story th:first-child{text-align:left}
.modes-story thead{background:var(--d2-panel-2);color:var(--d2-text)}
.modes-story caption{caption-side:bottom;padding:10px 0;text-align:left;font-size:13px;color:var(--story-muted)}
.modes-story td b{color:var(--story-accent)}
.modes-story .mode-drafts dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(15px,2.8vw,44px);margin:16px 0}
.modes-story .mode-drafts dl>div{border-top:1px solid var(--story-line);padding-top:10px}
.modes-story dt{font-weight:800}.modes-story dd{margin:5px 0 0}
:is(.modes-story,.settings-story) .mode-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}
:is(.modes-story,.settings-story) .mode-choices details{padding:0 14px;background:var(--d2-panel);border:1px solid var(--story-line);border-radius:4px}
:is(.modes-story,.settings-story) .mode-choices details[open]{border-color:var(--story-accent)}
:is(.modes-story,.settings-story) .mode-choices summary{min-height:44px}
@media(max-width:680px){
  .story .story-cover>img{width:100%;object-position:64% center;mask-image:linear-gradient(#000 77%,transparent)}
  .modes-story .mode-picture-right,.modes-story .mode-drafts dl,:is(.modes-story,.settings-story) .mode-choices{grid-template-columns:minmax(0,1fr)}
  .modes-story .story-spread .story-frame img{mask-image:linear-gradient(#000 91%,transparent)}
  .modes-story :is(th,td){font-size:clamp(12px,2.6vw,14px);line-height:1.4}
}
@media(max-width:360px){
  .modes-story .mode-table :is(th,td){padding-inline:2px}
}

.first-match-story .story-spread:not(.story-replay) .story-frame img,
.first-match-story .story-line .story-frame img{
  mask-image:linear-gradient(var(--frame-edge,90deg),#000 87%,transparent),linear-gradient(#000 92%,transparent);
  mask-composite:intersect
}
.first-match-story .story-line{--frame-edge:270deg}
.first-match-story .lane-call{background:#192d43}
.first-match-story .lane-call>img{mask-image:linear-gradient(90deg,#000 87%,transparent)}
.first-match-story .lane-call figcaption{background:linear-gradient(100deg,#192d43,#112032 85%)}
.first-match-story .lane-glances img{mask-image:linear-gradient(#000 94%,transparent)}

.settings-story .story-spread{border:0;padding-block:clamp(22px,3.1vw,48px)}
.settings-story .story-spread+.story-spread{border-top:1px solid var(--story-line)}
.settings-story .mode-picture-right{grid-template-columns:minmax(0,1fr) minmax(0,1.08fr)}
.settings-media{min-width:0;display:grid;gap:18px}
.settings-shot{min-width:0;margin:0}
.story .settings-enlarge{display:block;position:relative;text-decoration:none;color:var(--story-accent)}
.settings-stage{display:grid;place-items:center;box-sizing:border-box;padding:clamp(10px,2vw,29px);
  background:radial-gradient(ellipse closest-side at 50% 58%,color-mix(in srgb,var(--story-accent) 16%,var(--story-surface)),transparent 155%)}
.settings-image{position:relative;display:block;width:min(100%,var(--capture-width));min-width:0;
  border-radius:4px;outline:1px solid #52687280;box-shadow:0 6px 22px #030a1226}
.settings-image>img,.settings-full>img{display:block;width:100%;height:auto;border-radius:inherit}
.settings-target{position:absolute;box-sizing:border-box;pointer-events:none;border:2px solid #93f7ff;border-radius:4px;
  box-shadow:0 0 0 1px #082d38,inset 0 0 0 1px #082d38,0 0 8px #52c8db68}
.settings-open{display:flex;align-items:center;gap:6px;justify-content:flex-end;font-size:13px;font-weight:750}
.settings-enlarge:hover .settings-open{text-decoration:underline}
.settings-shot figcaption{border-top:1px solid var(--story-line);margin-top:6px;padding:7px 0 0;
  color:var(--story-muted);font-size:clamp(13px,1.05vw,15px);line-height:1.45}
.settings-dialog{box-sizing:border-box;width:fit-content;min-width:min(360px,92vw);max-width:min(94vw,1440px);
  max-height:92dvh;margin:auto;padding:clamp(12px,2vw,24px);overflow:auto;background:var(--story-surface);
  border:1px solid var(--story-line);border-radius:8px;color:var(--d2-text);box-shadow:0 24px 96px #0007}
.settings-dialog:not([open]){display:none}
.settings-dialog::backdrop{background:#030a12ce}
.settings-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 12px}
.settings-dialog-head h2{margin:0;font:600 clamp(20px,3vw,30px)/1.2 Oswald,Manrope,sans-serif}
.settings-dialog-head button{color:var(--d2-text);background:var(--d2-panel);border:1px solid var(--story-line);
  padding:8px 12px;min-height:42px;border-radius:4px;font:inherit;cursor:pointer}
.settings-dialog-head button:focus-visible{outline:2px solid var(--story-accent);outline-offset:2px}
.settings-full{position:relative;margin:auto;width:min(100%,var(--source-width,960px),calc(65dvh * var(--source-ratio,1.5)))}
.settings-dialog[open]{width:min(calc(var(--source-width,960px) + 48px),94vw,calc(65dvh * var(--source-ratio,1.5) + 48px))}
.settings-dialog p{font-size:14px;line-height:1.5;margin:10px 0 0}
@media(max-width:680px){
  .first-match-story .lane-call>img,.first-match-story .story-spread:not(.story-replay) .story-frame img,.first-match-story .story-line .story-frame img{mask-image:linear-gradient(#000 93%,transparent)}
  .first-match-story .lane-call figcaption{background:linear-gradient(#192d43,#112032)}
  .settings-story .mode-picture-right{grid-template-columns:minmax(0,1fr)}
  .settings-stage{padding:10px 2px}
  .settings-target{border-width:1.5px}
}


.hotkeys-story kbd{display:inline-block;min-width:1.7em;padding:.05em .4em;border:1px solid var(--story-line);border-bottom-width:3px;border-radius:4px;background:var(--d2-panel);color:var(--d2-text);text-align:center;font:700 .94em/1.4 Manrope,system-ui,sans-serif}
.hotkeys-story .hotkeys-chord{color:var(--story-muted);font-size:14px}
