

.sm-open {
  margin-left: auto;
  margin-right: 8px;
  padding: 12px 30px;
  font-size: 16px;
  letter-spacing: .02em;
}
.sm-open[hidden] { display: none; }


.sheet.howto.is-show { width: min(1440px, 98vw); height: 94vh; }
.sheet.howto.is-show .howto-wrap,
.sheet.howto.is-show .howto-none { display: none !important; }
.sm-stage { display: none; }
.sheet.howto.is-show .sm-stage {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  background: #1d1b19;
}


.sm-view { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.sm-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 720px;
  border: 0;
  background: #ececea;
  transform-origin: 0 0;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .45);
}
.sm-view.is-loading .sm-frame { visibility: hidden; }

.sm-view.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #f5a623;
  animation: sm-wait 1.2s ease-in-out infinite;
}
@keyframes sm-wait { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

.sm-fault {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(29, 27, 25, .92);
  color: #f2efe9;
  text-align: center;
  padding: 24px;
}
.sm-fault[hidden] { display: none; }
.sm-fault p { margin: 0; max-width: 34ch; font-size: 16px; line-height: 1.5; }

.sm-controls { background: #262321; color: #f2efe9; }
.sm-bar { height: 4px; background: rgba(255, 255, 255, .12); }
.sm-bar i { display: block; height: 100%; width: 0; background: #f5a623; transition: width .3s ease; }
.sm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 12px 18px 14px;
}
.sm-chapters, .sm-transport { display: flex; gap: 8px; flex-wrap: wrap; }

.sm-chapter, .sm-btn {
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: transparent;
  color: #f2efe9;
  padding: 9px 18px;
}
.sm-chapter:hover:not(:disabled), .sm-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.sm-chapter[aria-pressed="true"] { background: #f2efe9; color: #1d1b19; border-color: #f2efe9; }
.sm-btn:disabled { opacity: .35; cursor: default; }


.sm-btn.is-arming { position: relative; overflow: hidden; isolation: isolate; }
.sm-btn.is-arming::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(245, 166, 35, .6);
  transform: scaleX(0);
  transform-origin: left center;
  animation: sm-arm 5s linear forwards;
}
@keyframes sm-arm { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.sm-next { background: #f5a623; border-color: #f5a623; color: #1d1b19; font-weight: 600; padding: 9px 26px; }
.sm-next:hover:not(:disabled) { background: #ffb946; }
.sm-chapter:focus-visible, .sm-btn:focus-visible { outline: 3px solid #f5a623; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .sm-bar i { transition: none; }
  .sm-btn.is-arming::before { animation: none; }
}
