main.shell-main.brs-main {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.brs-sheet,
.brs-choice,
.brs-start,
.brs-gate-row,
.brs-actions button,
#brs-download {
  box-sizing: border-box;
}

.brs-sheet {
  width: min(640px, 100%);
  margin: 8px auto 28px;
  padding: 22px 18px 20px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(142, 36, 56, 0.08), transparent 72px),
    #e7e9ee;
  color: #1b1e26;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.brs-sheet [hidden] {
  display: none !important;
}

.brs-nameplate {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 18px;
}

.brs-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  margin: 0;
  border-radius: 16px;
  font-size: 1.45rem;
  font-weight: 760;
  letter-spacing: 0.03em;
}

.brs-plate-brat {
  background: #8e2438;
  color: #fff7f6;
}

.brs-plate-good {
  background: #f3e2c4;
  color: #2c2418;
}

.brs-title,
.brs-prompt,
.brs-type {
  margin: 0;
  color: #1b1e26;
  font-weight: 760;
  line-height: 1.28;
}

.brs-title {
  font-size: clamp(1.7rem, 4.4vw, 2.35rem);
}

.brs-lead,
.brs-skip,
.brs-sentence,
.brs-safe,
.brs-clip,
.brs-miss {
  color: #1b1e26;
  font-size: 1.05rem;
  line-height: 1.55;
}

.brs-lead {
  margin: 12px 0 0;
}

.brs-skip {
  margin: 8px 0 0;
  color: #5e4550;
}

.brs-gates {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.brs-gate-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #c9ced8;
  border-radius: 14px;
  background: #f7f8fb;
  color: #1b1e26;
  font-size: 1.05rem;
  cursor: pointer;
}

.brs-gate-row input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #8e2438;
}

.brs-miss {
  margin: 12px 0 0;
  color: #8e2438;
  font-weight: 700;
}

.brs-start,
.brs-actions button,
#brs-download {
  min-height: 52px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 740;
  cursor: pointer;
}

.brs-start,
#brs-share {
  width: 100%;
  margin-top: 16px;
  border: 0;
  background: #8e2438;
  color: #fff8f6;
}

.brs-start:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.brs-start:focus-visible,
.brs-actions button:focus-visible,
#brs-download:focus-visible,
.brs-choice:focus-visible,
.brs-gate-row:focus-within {
  outline: 3px solid #8e2438;
  outline-offset: 2px;
}

.brs-count {
  margin: 0 0 12px;
  color: #6e2433;
  font-size: 0.95rem;
  font-weight: 740;
  letter-spacing: 0.04em;
}

.brs-prompt {
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
}

.brs-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.brs-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  border: 1px solid #c5cad4;
  border-radius: 14px;
  background: #f7f8fb;
  color: #1b1e26;
  font-size: 1.08rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.brs-choice:hover {
  border-color: #8e2438;
  background: #fff;
}

.brs-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f0d5da;
  color: #6e2433;
  font-weight: 760;
}

.brs-choice.is-on {
  border-color: #8e2438;
  background: #3a1e26;
  color: #fff6f4;
}

.brs-choice.is-on .brs-n {
  background: #f3e2c4;
  color: #3a1e26;
}

.brs-meter {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 16px;
  background: #f4f5f8;
}

.brs-track-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: #1b1e26;
  font-weight: 740;
}

.brs-score {
  margin-left: auto;
  color: #1b1e26;
  font-variant-numeric: tabular-nums;
}

.brs-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #8e2438;
  color: #fff8f6;
  font-size: 0.86rem;
}

.brs-rail {
  position: relative;
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #d5d8e0;
}

.brs-tick {
  position: absolute;
  left: 47.22%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(27, 30, 38, 0.38);
}

.brs-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
}

.brs-fill-brat {
  background: linear-gradient(90deg, #6d1b2b, #a83248);
}

.brs-fill-good {
  background: linear-gradient(90deg, #e4cfaa, #f6e7cf);
}

.brs-kicker {
  margin: 0;
  color: #6e2433;
  font-size: 0.92rem;
  font-weight: 740;
}

.brs-type {
  margin-top: 4px;
  font-size: clamp(1.8rem, 4vw, 2.3rem);
}

.brs-sentence {
  margin: 10px 0 0;
}

.brs-say,
.brs-hard {
  margin: 14px 0 0;
  color: #1b1e26;
  line-height: 1.5;
}

.brs-say {
  padding: 12px 14px;
  border-left: 4px solid #8e2438;
  background: #f7f1e8;
}

.brs-say-label,
.brs-hard-label {
  display: block;
  margin-bottom: 4px;
  color: #6e2433;
  font-size: 0.82rem;
  font-weight: 740;
}

.brs-clip {
  margin: 12px 0 0;
  color: #3a3f4a;
}

.brs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.brs-actions button,
#brs-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid #c5cad4;
  background: #f7f8fb;
  color: #1b1e26;
  text-decoration: none;
}

#brs-share {
  width: auto;
  margin-top: 0;
  border: 0;
}

.brs-safe {
  margin: 14px 0 0;
  color: #3a3f4a;
  font-size: 0.95rem;
}

#brs-canvas {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  .brs-fill,
  .brs-choice {
    transition: none;
  }
}

@media (min-width: 720px) {
  .brs-sheet {
    padding: 28px 26px 24px;
  }
}
