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

.aor-sheet {
  width: min(680px, 100%);
  margin: 12px auto 28px;
  padding: 28px 22px 26px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 120px),
    #f4efe6;
  color: #1c1916;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

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

.aor-folio {
  margin: 0 0 8px;
  color: #6f665c;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.aor-title,
.aor-label {
  margin: 0;
  color: #1c1916;
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti SC", "Noto Serif SC", serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.aor-title {
  font-size: clamp(1.85rem, 5vw, 2.55rem);
}

.aor-lead,
.aor-route,
.aor-second,
.aor-auth,
.aor-safety,
.aor-note,
.aor-order,
.aor-copied,
.aor-prompt,
.aor-tell,
.aor-now,
.aor-red {
  color: #1c1916;
}

.aor-lead {
  margin: 12px 0 0;
  max-width: 38em;
  font-size: 1.02rem;
  line-height: 1.55;
}

.aor-sheet[data-aor-stage="play"] .aor-lead,
.aor-sheet[data-aor-stage="result"] .aor-title,
.aor-sheet[data-aor-stage="result"] .aor-lead {
  display: none;
}

.aor-sheet[data-aor-stage="play"] .aor-title {
  font-size: 1.35rem;
}

.aor-sheet[data-aor-stage="play"] .aor-fan {
  margin-top: 14px;
}

.aor-fan {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  min-height: 168px;
  margin: 26px 0 8px;
  padding: 8px 28px 36px 8px;
}

.aor-sheet[data-aor-stage="entry"] .aor-fan {
  gap: 12px;
}

.aor-card {
  position: relative;
  width: 104px;
  height: 142px;
  border: 1px solid #1c1916;
  border-radius: 14px;
  background: #fffdf8;
  color: #1c1916;
  flex: 0 0 auto;
}

.aor-sheet[data-aor-stage="entry"] .aor-card {
  transform: rotate(var(--tilt));
}

.aor-card[data-aor-card="mouth"] { --tilt: -9deg; }
.aor-card[data-aor-card="hand"] { --tilt: 1deg; z-index: 1; }
.aor-card[data-aor-card="in"] { --tilt: 8deg; }

.aor-card-back,
.aor-card-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8px;
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti SC", serif;
  font-size: clamp(1.05rem, 3.4vw, 1.45rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  transition: opacity 0.22s ease;
}

.aor-card-back {
  color: #8a8176;
  letter-spacing: 0.08em;
}

.aor-sheet[data-aor-stage="entry"] .aor-card-face,
.aor-sheet.is-none[data-aor-stage="result"] .aor-card-face {
  opacity: 0;
}

.aor-sheet[data-aor-stage="entry"] .aor-card-back,
.aor-sheet.is-none[data-aor-stage="result"] .aor-card-back {
  opacity: 1;
}

.aor-sheet[data-aor-stage="play"] .aor-card-back,
.aor-sheet[data-aor-stage="result"]:not(.is-none) .aor-card-back {
  opacity: 0;
}

.aor-card.is-live {
  outline: 2px solid #1c1916;
  outline-offset: 4px;
}

.aor-sheet[data-aor-stage="result"] .aor-card[data-rank="1"] {
  transform: translateY(-12px);
  z-index: 2;
}

.aor-sheet.is-none[data-aor-stage="result"] .aor-card {
  opacity: 0.78;
}

.aor-stop-line {
  position: absolute;
  top: 14px;
  bottom: 42px;
  right: 6px;
  width: 3px;
  border-radius: 99px;
  background: #d23c3c;
  transform: scaleY(var(--aor-stop, 0));
  transform-origin: top center;
  transition: transform 0.22s ease;
}

.aor-order {
  margin: 18px 0 0;
  color: #6f665c;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: none;
}

.aor-label {
  margin-top: 4px;
  font-size: clamp(2rem, 6vw, 2.8rem);
}

.aor-route {
  margin: 8px 0 0;
  font-size: 1.08rem;
  line-height: 1.5;
  font-weight: 650;
}

.aor-second,
.aor-auth {
  margin: 6px 0 0;
  line-height: 1.5;
}

.aor-auth.is-valve {
  color: #9d2a2a;
  font-weight: 750;
}

.aor-entry,
.aor-play,
.aor-result {
  margin-top: 18px;
}

.aor-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.aor-mark,
.aor-begin,
.aor-choice,
.aor-actions button,
.aor-actions a {
  font: inherit;
  cursor: pointer;
}

.aor-mark {
  flex: 1 1 140px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px dashed #1c1916;
  background: transparent;
  color: #1c1916;
  font-weight: 700;
}

.aor-mark[aria-pressed="true"] {
  border-style: solid;
  background: #1c1916;
  color: #f6f1e8;
}

.aor-mark-halt[aria-pressed="true"] {
  background: #d23c3c;
  border-color: #d23c3c;
  color: #fffdf8;
}

.aor-note {
  margin: 14px 0 0;
  line-height: 1.5;
}

.aor-begin {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  border-radius: 999px;
  border: 1.5px solid #1c1916;
  background: transparent;
  color: #1c1916;
  font-size: 1.05rem;
  font-weight: 750;
}

.aor-begin:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.aor-begin:not(:disabled) {
  background: #1c1916;
  color: #f6f1e8;
}

.aor-prompt {
  margin: 0;
  min-height: 4.6em;
  font-size: 1.18rem;
  line-height: 1.45;
  font-weight: 650;
}

.aor-choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}

.aor-choice {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cfc6ba;
  background: #fffdf8;
  color: #1c1916;
  text-align: left;
  font-weight: 650;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.aor-choice:hover,
.aor-choice:focus-visible {
  border-color: #1c1916;
}

.aor-choice.is-on {
  background: #1c1916;
  border-color: #1c1916;
  color: #f6f1e8;
}

.aor-slip {
  margin-top: 16px;
  padding: 14px 16px 12px;
  border-radius: 16px;
  background: #fffdf8;
  border: 1px solid #1c1916;
}

.aor-tell {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 750;
}

.aor-now,
.aor-red {
  margin: 8px 0 0;
  line-height: 1.5;
}

.aor-red {
  padding-top: 8px;
  border-top: 2px solid #d23c3c;
  color: #9d2a2a;
}

.aor-safety {
  margin: 14px 0 0;
  color: #5e564e;
  font-size: 0.92rem;
  line-height: 1.5;
}

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

.aor-actions button,
.aor-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #1c1916;
  background: #fffdf8;
  color: #1c1916;
  font-weight: 700;
  text-decoration: none;
}

.aor-copied {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: #6f665c;
  font-size: 0.9rem;
}

.aor-mark:focus-visible,
.aor-begin:focus-visible,
.aor-choice:focus-visible,
.aor-actions button:focus-visible,
.aor-actions a:focus-visible {
  outline: 2px solid #d23c3c;
  outline-offset: 3px;
}

@media (min-width: 760px) {
  .aor-choices {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .aor-choice {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .aor-sheet {
    padding: 22px 14px 22px;
    border-radius: 18px;
  }

  .aor-fan {
    gap: 10px;
    padding-right: 18px;
  }

  .aor-card {
    width: 84px;
    height: 116px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .aor-card-back,
  .aor-card-face,
  .aor-stop-line,
  .aor-choice {
    transition: none;
  }
}
