main.shell-main.shsrc-main {
  width: min(680px, 100%);
  padding-left: 18px;
  padding-right: 18px;
  padding-bottom: 140px;
}

.shsrc-main [hidden] {
  display: none !important;
}

.shsrc-stage {
  margin: 8px auto 28px;
  padding: 22px 18px 26px;
  border-radius: 22px;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(231, 160, 106, 0.22), transparent 48%),
    linear-gradient(180deg, #322838 0%, #171821 72%);
  color: #f6efe6;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.shsrc-title {
  margin: 0 0 8px;
  font-size: clamp(1.85rem, 4.4vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #f8f1e8;
}

.shsrc-lead,
.shsrc-foot,
.shsrc-line,
.shsrc-red,
.shsrc-tell,
.shsrc-saved,
.shsrc-progress {
  margin: 0;
  color: #f3e0d2;
  font-size: 1.02rem;
  line-height: 1.55;
}

.shsrc-lead {
  margin-bottom: 16px;
}

.shsrc-mirrors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(10, 10, 16, 0.28);
}

.shsrc-mirrors.is-valve {
  box-shadow: inset 0 0 0 2px #d15a5a;
}

.shsrc-mirror {
  position: relative;
}

.shsrc-mirror i {
  position: relative;
  display: block;
  height: 104px;
  border-radius: 18px;
  border: 3px solid #d9d1c8;
  background:
    linear-gradient(165deg, rgba(255, 250, 242, 0.78) 0%, rgba(255, 244, 230, 0.05) 24%, transparent 42%),
    linear-gradient(180deg, rgba(231, 160, 106, calc(var(--glow, 0) * 0.92)), rgba(24, 18, 26, 0.05) 68%),
    linear-gradient(160deg, #514a58 0%, #1a1520 70%);
  box-shadow:
    inset 0 0 0 1px rgba(62, 54, 50, 0.85),
    inset 0 -16px 22px rgba(0, 0, 0, 0.32),
    0 0 calc(var(--glow, 0) * 18px) rgba(231, 160, 106, calc(var(--glow, 0) * 0.9));
  transition: box-shadow 0.22s ease, background 0.22s ease, height 0.22s ease;
}

.shsrc-mirror i::after {
  content: "";
  display: block;
  height: 18%;
  margin: 6px 16px 0;
  border-radius: 40% 40% 48% 48%;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.62), rgba(255, 252, 247, 0));
  pointer-events: none;
}

.shsrc-mark {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 24%;
  font-size: 1.7rem;
  line-height: 1;
  text-align: center;
  pointer-events: none;
}

.shsrc-mirror[data-dim="T"]:not(.is-bright) .shsrc-mark {
  filter: grayscale(1) brightness(4);
}

.shsrc-mirror b {
  position: absolute;
  z-index: 1;
  left: 4px;
  right: 4px;
  top: 64%;
  margin: 0;
  color: #f8f3ec;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.shsrc-stage[data-phase="ask"] .shsrc-title,
.shsrc-stage[data-phase="ask"] .shsrc-lead,
.shsrc-stage[data-phase="result"] .shsrc-title,
.shsrc-stage[data-phase="result"] .shsrc-lead {
  display: none;
}

.shsrc-stage[data-phase="ask"] .shsrc-mirror i {
  height: 86px;
}

.shsrc-stage[data-phase="ask"] .shsrc-mark {
  top: 16%;
  font-size: 1.25rem;
}

.shsrc-stage[data-phase="ask"] .shsrc-mirror b {
  top: 58%;
}

.shsrc-stage[data-phase="result"] .shsrc-mirror.is-bright i {
  height: 148px;
  border-color: #f3d7bf;
  background:
    linear-gradient(165deg, rgba(255, 252, 247, 0.55) 0%, rgba(255, 244, 230, 0) 36%),
    linear-gradient(180deg, #f6d7b8 0%, #e7a06a 100%);
}

.shsrc-stage[data-phase="result"] .shsrc-mirror.is-bright b {
  color: #241910;
  text-shadow: none;
}

.shsrc-stage[data-phase="result"] .shsrc-mirror.is-next i {
  height: 116px;
}

.shsrc-gate:not([hidden]),
.shsrc-ask:not([hidden]),
.shsrc-result:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shsrc-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 244, 232, 0.08);
  color: #f6efe6;
  font-size: 1.05rem;
}

.shsrc-check input {
  width: 22px;
  height: 22px;
  accent-color: #e7a06a;
  flex: 0 0 auto;
}

.shsrc-begin,
.shsrc-opt,
.shsrc-actions button,
.shsrc-download {
  font: inherit;
  cursor: pointer;
  border-radius: 14px;
}

.shsrc-begin {
  min-height: 54px;
  border: 1px solid #e7a06a;
  background: transparent;
  color: #f6efe6;
}

.shsrc-begin:disabled {
  cursor: default;
  opacity: 0.45;
}

.shsrc-begin:not(:disabled) {
  background: #e7a06a;
  color: #241910;
}

.shsrc-progress {
  font-variant-numeric: tabular-nums;
  color: #f0c9a4;
}

.shsrc-prompt {
  margin: 0;
  color: #f8f1e8;
  font-size: clamp(1.28rem, 3vw, 1.55rem);
  line-height: 1.45;
}

.shsrc-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.shsrc-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 76px;
  padding: 8px 4px;
  text-align: center;
  border: 1px solid rgba(36, 25, 16, 0.16);
  color: #241910;
  line-height: 1.15;
}

.shsrc-opt b {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}

.shsrc-opt span {
  font-size: 0.78rem;
  line-height: 1.2;
}

.shsrc-opt[data-n="1"] { background: #f6efe6; }
.shsrc-opt[data-n="2"] { background: #f0d0b0; }
.shsrc-opt[data-n="3"] { background: #e09a62; }
.shsrc-opt[data-n="4"] { background: #c2653c; color: #fff8f2; }
.shsrc-opt[data-n="5"] { background: #7a332c; color: #fff8f2; }

.shsrc-opt:hover,
.shsrc-opt:focus-visible {
  border-color: #f8f1e8;
}

.shsrc-opt.is-on {
  outline: 3px solid #f8f1e8;
  outline-offset: 1px;
}

.shsrc-kicker {
  margin: 0;
  color: #f0c9a4;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shsrc-type {
  margin: 0;
  color: #f8f1e8;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  line-height: 1.2;
}

.shsrc-red {
  color: #f0b4b0;
}

.shsrc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shsrc-actions button,
.shsrc-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  background: #f3e2d2;
  color: #241910;
  text-decoration: none;
}

.shsrc-copied {
  min-height: 1.2em;
  color: #f0c9a4;
}

.shsrc-begin:focus-visible,
.shsrc-opt:focus-visible,
.shsrc-actions button:focus-visible,
.shsrc-download:focus-visible,
.shsrc-check input:focus-visible {
  outline: 2px solid #f0c9a4;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  main.shell-main.shsrc-main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .shsrc-stage {
    padding: 16px 12px 20px;
  }

  .shsrc-mirror i {
    height: 112px;
  }

  .shsrc-stage[data-phase="ask"] .shsrc-mirror i {
    height: 96px;
  }

  .shsrc-mark {
    top: 26%;
    font-size: 1.35rem;
  }

  .shsrc-mirror b {
    top: 66%;
    font-size: 0.68rem;
  }

  .shsrc-options {
    gap: 6px;
  }

  .shsrc-opt {
    min-height: 70px;
    padding: 8px 2px;
  }

  .shsrc-opt b {
    font-size: 1rem;
  }

  .shsrc-opt span {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shsrc-mirror i {
    transition: none;
  }
}
