#welcome-tour {
  width: min(440px, calc(100% - 24px));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - var(--safe-bottom));
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #faf9f4;
  color: var(--ink);
  box-shadow: 0 22px 80px #121d2566;
}
#welcome-tour::backdrop { background: #14221999; backdrop-filter: blur(3px); }
#welcome-tour .tour-heading { display:grid; gap:16px; padding:18px 22px 0; background:#faf9f4; }
#welcome-tour .tour-heading h2 { margin:0; color:#000; font-size:clamp(22px,5.5vw,27px); line-height:1.13; text-wrap:balance; }
.tour-heading h2:focus { outline:none; }
.tour-progress { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin:0; padding:0; list-style:none; }
.tour-progress li { padding-top:5px; border-top:3px solid #d5d8d1; font-size:clamp(11px,3vw,13px); font-weight:500; line-height:1.3; color:#525b52; white-space:nowrap; }
.tour-progress li.completed { border-color:#77896d; }
.tour-progress li[aria-current=step] { border-color:var(--terra); color:#202720; font-weight:730; }
.tour-body { padding:16px 22px 20px; }
#welcome-tour[data-screen=welcome] .tour-heading h2 { font-size:clamp(26px,7vw,34px); }
.tour-picture { height:clamp(92px,19dvh,156px); margin:14px 22px 0; border-radius:12px; background:#e5e9df; overflow:hidden; }
.tour-picture:empty { display:none; }
.tour-cover { display:block; width:100%; height:100%; }
.tour-author { display:flex; align-items:center; gap:12px; }
.tour-portrait { flex:none; width:48px; height:48px; border-radius:50%; background:var(--sage); }
.tour-author strong,.tour-author span { display:block; line-height:1.35; }
.tour-author span { font-size:13px; color:var(--muted); }
.tour-lead { margin:14px 0 18px; font-size:16px; line-height:1.45; }
.tour-actions,.tour-footer { display:grid; gap:8px; }
#welcome-tour button:focus-visible { outline:3px solid #bf7547; outline-offset:2px; }
.tour-primary,.tour-secondary,.tour-watch,.tour-link,.tour-option { font:inherit; font-weight:650; line-height:1.25; border:0; color:var(--ink); }
.tour-primary,.tour-secondary,.tour-watch { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; min-height:47px; padding:10px 15px; border-radius:12px; }
.tour-primary { background:var(--terra); color:white; }
.tour-secondary { background:#e6eadf; color:#263c2e; }
.tour-watch { background:#2e4938; color:white; }
.tour-link { min-height:42px; padding:8px 6px; background:transparent; color:#385440; text-decoration:underline; text-underline-offset:3px; }
.tour-play { width:0; height:0; border-top:6px solid transparent; border-bottom:6px solid transparent; border-left:10px solid currentColor; }
.tour-device { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:2px 10px; margin-bottom:12px; }
.tour-device .tour-link { font-size:14px; padding-inline:0; }
.tour-options { display:grid; margin-bottom:10px; }
.tour-option { min-height:47px; display:flex; align-items:center; justify-content:space-between; padding:10px 8px; text-align:left; background:transparent; border-bottom:1px solid var(--line); }
.tour-option[aria-current=true] { background:#e3e9db; }
.tour-steps { padding:0; margin:16px 0 20px; counter-reset:instruction; list-style:none; }
.tour-steps li { counter-increment:instruction; display:grid; grid-template-columns:26px 1fr; gap:9px; align-items:baseline; margin:10px 0; font-size:15px; line-height:1.48; }
.tour-steps li::before { content:counter(instruction); text-align:center; background:#e1e7dc; border-radius:50%; color:#334b38; font-size:13px; line-height:25px; font-weight:700; }
.tour-copy-field { width:100%; padding:9px; border:1px solid var(--line); border-radius:9px; }
.tour-player { margin:12px auto 0; width:min(calc(100% - 24px),calc((100dvh - 236px - env(safe-area-inset-top,0px) - var(--safe-bottom)) * .5625)); aspect-ratio:9/16; background:#111912; overflow:hidden; border-radius:12px; }
.tour-player video { display:block; width:100%; height:100%; object-fit:contain; }
.tour-footer { padding:12px 16px; gap:3px; }
.tour-footer .tour-link { min-height:38px; }
.tour-status { margin:8px 0; font-size:14px; line-height:1.45; }
.tour-status:empty { display:none; }
@media(max-height:520px) {
  .tour-picture { height:100px; }
  .tour-author { gap:8px; }
  .tour-portrait { width:36px; height:36px; }
  .tour-lead { margin:8px 0; }
}
.tour-avatar { flex:none; line-height:0; }
.tour-avatar:empty { display:none; }
@media (orientation:landscape) and (max-height:500px) {
  #welcome-tour[open][data-screen=film] { display:grid; grid-template-columns:minmax(0, .8fr) minmax(0, 1fr); grid-template-rows:auto 1fr; align-items:start; width:min(680px, calc(100% - 24px)); }
  #welcome-tour[data-screen=film] .tour-heading { grid-column:2; grid-row:1; padding:16px 16px 0; }
  #welcome-tour[data-screen=film] .tour-player { grid-column:1; grid-row:1 / 3; margin:10px auto; width:min(calc(100% - 16px), calc((100dvh - 50px - var(--safe-bottom)) * .5625)); }
  #welcome-tour[data-screen=film] .tour-footer { grid-column:2; grid-row:2; align-self:center; }
}
