.page [hidden] {
  display: none !important;
}

:root {
  --leela-card-border: rgba(34, 48, 43, .18);
  --leela-card-border-soft: rgba(34, 48, 43, .12);
  --leela-card-radius-section: 24px;
  --leela-card-radius-card: 20px;
  --leela-card-radius-inner: 16px;
  --leela-card-radius-callout: 12px;
  --leela-card-pad-section: clamp(20px, 3.2vw, 32px);
  --leela-card-pad-card: clamp(16px, 2.2vw, 20px);
  --leela-card-pad-inner: clamp(14px, 1.8vw, 18px);
  --leela-card-gap-section: 18px;
  --leela-card-text: .875rem;
  --leela-card-meta: .75rem;
}

.leela-header__in {
  max-width: 1120px;
}

.leela-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.leela-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 36px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 80% 15%, rgba(196, 122, 63, .22), transparent 34%),
    radial-gradient(circle at 12% 110%, rgba(91, 138, 114, .28), transparent 34%),
    linear-gradient(135deg, #1c372e 0%, #22302b 54%, #2a3a33 100%);
  color: #fdfbf7;
  box-shadow: 0 22px 64px rgba(34, 48, 43, .16);
}

.leela-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 100%);
}

.leela-hero__copy,
.leela-orbit {
  position: relative;
  z-index: 1;
}

.leela-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--gold-light);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.leela-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: .75;
}

.leela-hero h1 {
  max-width: 620px;
  color: #fdfbf7;
  font-size: clamp(2.4rem, 5.8vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.045em;
}

.leela-hero h1 span {
  color: var(--gold-light);
}

.leela-hero__copy > p {
  max-width: 58ch;
  margin-top: 22px;
  color: rgba(253, 251, 247, .78);
  font-size: clamp(.94rem, 1.7vw, 1.06rem);
  line-height: 1.75;
}

.leela-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
}

.leela-text-link {
  color: #fdfbf7;
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(253, 251, 247, .35);
  padding-bottom: 3px;
  transition: border-color .18s, color .18s;
}

.leela-text-link:hover {
  color: var(--gold-light);
  border-color: currentColor;
}

.leela-text-link span {
  display: inline-block;
  margin-left: 4px;
  color: var(--gold-light);
}

.leela-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.leela-hero__tag {
  padding: 5px 10px;
  border: 1px solid rgba(253, 251, 247, .18);
  border-radius: 999px;
  color: rgba(253, 251, 247, .72);
  font-size: .7rem;
  letter-spacing: .04em;
}

.leela-orbit {
  align-self: center;
  justify-self: center;
  width: min(100%, 360px);
  color: var(--gold-light);
}

.leela-orbit svg {
  display: block;
  width: 100%;
  height: auto;
}

.leela-alert {
  position: fixed;
  top: calc(var(--header-h, 68px) + 10px);
  left: 50%;
  z-index: 90;
  width: max-content;
  max-width: min(calc(100vw - 32px), 760px);
  margin: 0;
  padding: 14px 18px;
  transform: translateX(-50%);
  border: 1px solid #dfb8ad;
  border-radius: var(--leela-card-radius-callout);
  background: var(--danger-dim);
  color: #963f33;
  font-size: .88rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  box-shadow: 0 8px 20px rgba(34, 48, 43, .06);
}

.leela-alert.is-ok {
  border-color: #c9dfd2;
  background: var(--green-dim);
  color: var(--primary);
}

.leela-gate {
  max-width: 680px;
  margin: 24px auto 0;
  padding: 34px;
}

.leela-gate h2 {
  margin-bottom: 8px;
}

.leela-gate p {
  max-width: 52ch;
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.7;
}

.leela-gate .btn-row {
  margin-top: 22px;
}

.leela-section-head {
  display: block;
  margin: 48px 0 18px;
}

.leela-section-head > div,
.leela-section-head .section-head__lead {
  width: 100%;
  max-width: none;
}

.leela-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.leela-mode-card {
  display: flex;
  flex-direction: column;
  padding: var(--leela-card-pad-card);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-card);
  box-shadow: none;
}

.leela-mode-card .mode-card__desc {
  flex: 1;
}

.leela-mode-card > .btn {
  align-self: flex-start;
  width: min(100%, 240px);
}

.leela-mode-card--soon {
  background: rgba(253, 251, 247, .56);
}

.leela-mode-card--soon .mode-card__name {
  color: var(--text-secondary);
}

.leela-mode-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 18px 0 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  font-weight: 500;
}

.leela-group-entry {
  margin-top: 18px;
  padding: var(--leela-card-pad-section);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-section);
  background:
    radial-gradient(circle at 100% 0%, rgba(196, 122, 63, .13), transparent 36%),
    linear-gradient(145deg, #fffdf8, #f5eee1);
  box-shadow: 0 14px 34px rgba(34, 48, 43, .08);
}

.leela-group-entry__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.leela-group-entry__head h3 {
  margin-top: 6px;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.leela-group-entry__head p {
  max-width: 72ch;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: var(--leela-card-text);
  line-height: 1.65;
}

.leela-group-entry__close {
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--leela-card-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, .68);
  color: var(--text-secondary);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.leela-group-entry__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.leela-field {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: .74rem;
  font-weight: 700;
}

.leela-field .input {
  min-height: 44px;
  background: rgba(255, 255, 255, .8);
}

.leela-field small {
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  font-weight: 400;
  line-height: 1.45;
}

.leela-group-consent,
.leela-group-ai-toggle,
.leela-solo-ai-toggle,
.leela-group-share-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: .74rem;
  line-height: 1.5;
  cursor: pointer;
}

.leela-group-consent input,
.leela-group-ai-toggle input,
.leela-solo-ai-toggle input,
.leela-group-share-consent input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: #205c4e;
}

.leela-group-ai-toggle {
  color: var(--primary);
  font-weight: 600;
}

.leela-solo-ai-toggle {
  margin: 16px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(32, 92, 78, .16);
  border-radius: 11px;
  background: rgba(47, 128, 107, .06);
  color: var(--primary);
  font-weight: 600;
}

.leela-group-entry__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.leela-group-entry__note {
  margin-top: 13px;
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  line-height: 1.5;
}

.leela-group-resume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: var(--leela-card-pad-card);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-inner);
  background: rgba(47, 128, 107, .07);
}

.leela-group-resume strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.leela-group-resume p {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: .8rem;
}

.leela-how {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-card);
  background: var(--surface);
  overflow: hidden;
}

.leela-how__item {
  padding: 24px;
  border-right: 1px solid var(--border);
}

.leela-how__item:last-child {
  border-right: 0;
}

.leela-how__num {
  display: block;
  margin-bottom: 34px;
  color: var(--accent-dark);
  font-family: var(--font-serif);
  font-size: .9rem;
}

.leela-how__item h3 {
  margin-bottom: 7px;
  font-size: 1.08rem;
}

.leela-how__item p {
  color: var(--text-secondary);
  font-size: .82rem;
  line-height: 1.65;
}

.leela-rules {
  margin-top: 38px;
  padding: var(--leela-card-pad-section);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-section);
  background:
    radial-gradient(circle at 100% 0%, rgba(196, 122, 63, .13), transparent 34%),
    linear-gradient(145deg, #fdf8ee, #f4eddf);
  box-shadow: 0 16px 44px rgba(34, 48, 43, .08);
}

.leela-rules__head {
  max-width: 760px;
}

.leela-rules__head h2 {
  margin-top: 7px;
  font-size: clamp(1.55rem, 3.6vw, 2.25rem);
}

.leela-rules__head > p {
  max-width: 72ch;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: .88rem;
  line-height: 1.7;
}

.leela-rules__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.leela-rule {
  position: relative;
  padding: 20px 20px 20px 62px;
  border: 1px solid var(--leela-card-border-soft);
  border-radius: var(--leela-card-radius-inner);
  background: rgba(255, 253, 248, .68);
}

.leela-rule__num {
  position: absolute;
  left: 19px;
  top: 20px;
  color: var(--accent-dark);
  font-family: var(--font-serif);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
}

.leela-rule h3 {
  margin-bottom: 7px;
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.leela-rule p {
  color: var(--text-secondary);
  font-size: .84rem;
  line-height: 1.62;
}

.leela-rule b {
  color: var(--text);
  font-weight: 650;
}

.leela-rule.is-highlighted {
  border-color: rgba(196, 122, 63, .58);
  background:
    radial-gradient(circle at 100% 0, rgba(216, 149, 67, .15), transparent 38%),
    rgba(255, 253, 248, .94);
  box-shadow: 0 12px 30px rgba(109, 69, 27, .14);
}

.leela-safety {
  margin-top: 18px;
  padding: var(--leela-card-pad-section);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-section);
  background:
    radial-gradient(circle at 92% 0%, rgba(91, 138, 114, .16), transparent 32%),
    rgba(253, 251, 247, .82);
}

.leela-safety__head {
  max-width: 760px;
}

.leela-safety__head h2 {
  margin-top: 7px;
  font-size: clamp(1.4rem, 3vw, 1.95rem);
}

.leela-safety__head > p {
  max-width: 70ch;
  margin-top: 9px;
  color: var(--text-secondary);
  font-size: .86rem;
  line-height: 1.68;
}

.leela-safety__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.leela-safety__item {
  padding: var(--leela-card-pad-inner);
  border: 1px solid var(--leela-card-border-soft);
  border-radius: var(--leela-card-radius-inner);
  background: rgba(255, 255, 255, .58);
}

.leela-safety__item h3 {
  margin-bottom: 7px;
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 700;
}

.leela-safety__item p {
  color: var(--text-secondary);
  font-size: .84rem;
  line-height: 1.62;
}

.leela-history {
  margin-top: 38px;
}

.leela-history__list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.leela-history-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-inner);
  background: var(--surface);
}

.leela-history-item__title {
  min-width: 0;
}

.leela-history-item__title strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
}

.leela-history-item__title span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
}

.leela-history-item__status {
  color: var(--text-secondary);
  font-size: var(--leela-card-meta);
  white-space: nowrap;
}

.leela-history-item .btn {
  min-height: 40px;
  padding: 0 14px;
  font-size: var(--leela-card-meta);
}

.leela-game-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 34px 0 18px;
}

.leela-back {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: .78rem;
  cursor: pointer;
  transition: color .18s;
}

.leela-back:hover {
  color: var(--primary);
}

.leela-game-head__status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-dim);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.leela-game-head h2 {
  margin-top: 8px;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.leela-game-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.leela-group-room {
  width: min(100%, var(--leela-game-content-width, 100%));
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) minmax(270px, .55fr);
  grid-template-areas:
    "identity members controls"
    "share share controls";
  gap: 10px 18px;
  align-items: start;
  margin: 0 auto 18px;
  padding: 16px 18px;
  box-sizing: border-box;
  min-width: 0;
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-card);
  background:
    radial-gradient(circle at 100% 0%, rgba(196, 122, 63, .12), transparent 34%),
    rgba(253, 251, 247, .94);
  box-shadow: 0 8px 20px rgba(34, 48, 43, .06);
}

.leela-group-room__label {
  display: block;
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.leela-group-room__status {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 26px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(32, 92, 78, .08);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.leela-group-room__status[data-state="paused"],
.leela-game-head__status[data-state="paused"] {
  background: rgba(196, 122, 63, .12);
  color: var(--accent-dark);
}

.leela-group-room__status[data-state="finished"],
.leela-game-head__status[data-state="finished"] {
  background: rgba(34, 48, 43, .08);
  color: var(--text-secondary);
}

.leela-group-room__identity {
  grid-area: identity;
  display: grid;
  align-content: start;
  gap: 2px;
  min-width: 0;
}

.leela-group-room__identity strong {
  color: var(--primary);
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", Consolas, monospace);
  font-size: 1.16rem;
  line-height: 1.15;
  letter-spacing: .13em;
}

.leela-group-room__share {
  grid-area: share;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.leela-group-room__share-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.leela-group-room__link {
  width: 100%;
  min-height: 32px;
  padding: 0 9px;
  overflow: hidden;
  border-color: var(--leela-card-border-soft);
  background: rgba(255, 255, 255, .62);
  color: var(--text-secondary);
  font-family: var(--font-mono, ui-monospace, "SFMono-Regular", Consolas, monospace);
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leela-copy {
  flex: 0 0 auto;
  max-width: 100%;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: .72rem;
  font-weight: 700;
  white-space: normal;
  text-align: right;
  cursor: pointer;
}

.leela-copy:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.leela-group-room__members {
  grid-area: members;
  align-self: stretch;
  min-width: 0;
}

.leela-group-room__members-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: .75rem;
}

.leela-group-room__members-head span {
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
}

.leela-group-room__member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 31px;
}

.leela-group-member {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 5px 8px 5px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--text-secondary);
  font-size: .75rem;
}

.leela-group-member.is-current {
  border-color: rgba(196, 122, 63, .55);
  background: rgba(196, 122, 63, .1);
  color: var(--text);
}

.leela-group-member__token {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: var(--token-color, #d89543);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}

.leela-group-member__host {
  color: var(--accent-dark);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.leela-group-member__action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: .75rem;
  text-decoration: underline;
  cursor: pointer;
}

.leela-group-room__controls {
  grid-area: controls;
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: stretch;
  align-self: stretch;
  min-width: 0;
}

.leela-group-room__buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.leela-group-room__controls .btn {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  font-size: .72rem;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.leela-group-turn-timer {
  color: var(--accent-dark);
  font-size: var(--leela-card-meta);
  font-weight: 700;
  white-space: nowrap;
}

.leela-group-turn-timer.is-warning {
  color: var(--danger);
}

.leela-group-privacy {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  line-height: 1.5;
}

.leela-group-private {
  border-color: rgba(91, 138, 114, .3);
}

.leela-group-public {
  border-color: rgba(196, 122, 63, .32);
  background: rgba(255, 248, 236, .88);
}

.leela-group-share-consent {
  margin-top: 9px;
  padding: 9px 10px;
  border: 1px solid rgba(196, 122, 63, .18);
  border-radius: 10px;
  background: rgba(255, 255, 255, .58);
}

.leela-turn-item__member {
  color: var(--accent-dark);
  font-weight: 700;
}

.leela-turn-item__shared {
  margin-top: 7px !important;
  padding: 7px 9px;
  border-left: 2px solid rgba(196, 122, 63, .62);
  border-radius: 2px 7px 7px 2px;
  background: rgba(196, 122, 63, .08);
  color: var(--text) !important;
}

.leela-turn-item__ai {
  margin-top: 6px !important;
  color: #205c4e !important;
  font-size: .72rem !important;
}

.leela-game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.leela-game-rail {
  display: grid;
  gap: 12px;
  min-width: 0;
  align-content: start;
}

.leela-board-panel,
.leela-session-support {
  border: 1px solid var(--leela-card-border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.leela-board-panel {
  padding: var(--leela-card-pad-card);
  border-radius: var(--leela-card-radius-section);
  background:
    radial-gradient(circle at 8% 4%, rgba(222, 168, 96, .14), transparent 24%),
    linear-gradient(145deg, rgba(255, 252, 245, .98), rgba(246, 235, 214, .94));
}

.leela-board-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding: 2px 2px 14px;
  color: var(--text-secondary);
  font-size: var(--leela-card-meta);
}

.leela-board-meta b {
  color: var(--text);
}

.leela-board-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
}

.leela-board-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.leela-legend-line {
  display: inline-block;
  width: 24px;
  height: 3px;
  border-radius: 999px;
}

.leela-legend-line--rise {
  background: #d1923f;
  box-shadow: 0 0 7px rgba(209, 146, 63, .65);
}

.leela-legend-line--return {
  background: repeating-linear-gradient(90deg, #6c4b8d 0 5px, transparent 5px 8px);
}

.leela-board-meta__hint {
  margin-left: auto;
  flex: 1 1 220px;
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  line-height: 1.35;
  text-align: right;
}

.leela-board {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 5px;
  aspect-ratio: 9 / 8;
  padding: 14px;
  border: 1px solid rgba(231, 201, 163, .58);
  border-radius: var(--leela-card-radius-card);
  overflow: hidden;
  background:
    radial-gradient(circle at 9% 10%, rgba(131, 111, 226, .25), transparent 27%),
    radial-gradient(circle at 91% 16%, rgba(199, 148, 229, .2), transparent 25%),
    radial-gradient(circle at 72% 88%, rgba(58, 180, 173, .24), transparent 29%),
    radial-gradient(circle at 14% 84%, rgba(231, 165, 99, .14), transparent 24%),
    linear-gradient(145deg, #071222 0%, #111a3b 46%, #0a2a35 100%);
  box-shadow:
    inset 0 0 0 5px rgba(255, 244, 216, .05),
    inset 0 0 54px rgba(3, 7, 22, .34),
    0 18px 48px rgba(24, 26, 74, .24);
  contain: layout paint;
}

.leela-board::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 8%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(
      from 0deg,
      rgba(246, 218, 164, .18) 0deg 2deg,
      transparent 2deg 30deg
    );
  mask-image: radial-gradient(circle, transparent 0 29%, #000 30% 31%, transparent 32% 61%, #000 62% 63%, transparent 64%);
  opacity: .36;
  pointer-events: none;
}

.leela-board::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 32%, rgba(255, 238, 193, .72) 0 1px, transparent 1.5px),
    radial-gradient(circle at 73% 21%, rgba(211, 223, 255, .7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 84% 72%, rgba(255, 215, 162, .64) 0 1px, transparent 1.5px),
    radial-gradient(circle at 31% 86%, rgba(214, 238, 221, .62) 0 1px, transparent 1.5px),
    radial-gradient(circle at 47% 44%, rgba(245, 228, 255, .5) 0 1px, transparent 1.4px),
    radial-gradient(circle at 62% 57%, rgba(185, 241, 236, .52) 0 1px, transparent 1.4px);
  opacity: .72;
  pointer-events: none;
}

.leela-board-scene {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .93;
  pointer-events: none;
}

.leela-board-arrows {
  position: absolute;
  z-index: 7;
  inset: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  overflow: visible;
  pointer-events: none;
  contain: layout style;
}

.leela-arrow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .74;
  transition: opacity .2s, stroke-width .2s;
}

.leela-arrow--rise {
  stroke: #ffd477;
  stroke-width: 3;
}

.leela-arrow--return {
  stroke: #c4a1f0;
  stroke-width: 2.7;
  stroke-dasharray: 7 5;
}

.leela-arrow.is-active {
  opacity: 1;
  stroke-width: 5.5;
}

.leela-board-link__shaft,
.leela-board-link__fletching,
.leela-board-link__snake-body,
.leela-board-link__snake-tongue {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.leela-arrow--rise .leela-board-link__shaft {
  stroke: #ffd477;
  stroke-width: 3.2;
}

.leela-arrow--rise .leela-board-link__fletching {
  stroke: #ffe4a7;
  stroke-width: 2.2;
}

.leela-arrow--return .leela-board-link__snake-body {
  stroke: #c4a1f0;
  stroke-width: 3.1;
  stroke-dasharray: 7 5;
}

.leela-board-link__snake-head {
  fill: #b18be0;
  stroke: #f1e5ff;
  stroke-width: 1.1;
}

.leela-board-link__snake-eye {
  fill: #231637;
}

.leela-arrow--return .leela-board-link__snake-tongue {
  stroke: #f3c3d8;
  stroke-width: 1.3;
}

.leela-board-link__snake-tail {
  fill: #d7c1f2;
}

.leela-arrow.is-active .leela-board-link__shaft,
.leela-arrow.is-active .leela-board-link__snake-body {
  stroke-width: 5.2;
  stroke-dasharray: none;
}

.leela-board-cell {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  aspect-ratio: 1;
  min-width: 0;
  padding: 3px;
  border: 1px solid rgba(220, 235, 255, .46);
  border-radius: 11px;
  background: rgba(216, 229, 255, .12);
  color: #fffdf2;
  font-family: var(--font-serif);
  font-size: clamp(.66rem, 1.25vw, .88rem);
  font-weight: 600;
  text-shadow:
    0 1px 2px rgba(2, 8, 20, 1),
    0 0 4px rgba(2, 8, 20, 1),
    0 0 10px rgba(2, 8, 20, .92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    inset 0 0 18px rgba(171, 207, 255, .08),
    0 3px 8px rgba(0, 0, 0, .24);
  transition: transform .16s, border-color .16s, background-color .16s, color .16s, box-shadow .16s;
}

.leela-board-cell__number {
  color: #ffe3a5;
  font-family: var(--font-sans);
  font-size: clamp(.52rem, .8vw, .66rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .04em;
}

.leela-board-cell__title {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: rgba(255, 253, 242, .92);
  font-family: var(--font-serif);
  font-size: clamp(.46rem, .68vw, .58rem);
  font-weight: 500;
  line-height: 1.08;
  text-align: center;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.leela-board-token {
  position: absolute;
  z-index: 11;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: clamp(15px, 1.8vw, 21px);
  height: clamp(15px, 1.8vw, 21px);
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  background: var(--token-color, #d89543);
  color: #fff;
  font-family: var(--font-sans);
  font-size: clamp(.45rem, .72vw, .59rem);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  box-shadow:
    0 0 0 2px rgba(5, 12, 25, .7),
    0 0 10px rgba(255, 255, 255, .45);
  pointer-events: none;
}

.leela-board-token.is-current {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, .9),
    0 0 13px var(--token-color, #d89543);
}

.leela-board-cell[data-row="0"] { background: linear-gradient(145deg, rgba(255, 225, 164, .26), rgba(220, 168, 105, .1)); }
.leela-board-cell[data-row="1"] { background: linear-gradient(145deg, rgba(175, 232, 207, .23), rgba(91, 161, 158, .08)); }
.leela-board-cell[data-row="2"] { background: linear-gradient(145deg, rgba(178, 222, 242, .25), rgba(94, 141, 201, .09)); }
.leela-board-cell[data-row="3"] { background: linear-gradient(145deg, rgba(241, 190, 208, .22), rgba(174, 107, 164, .08)); }
.leela-board-cell[data-row="4"] { background: linear-gradient(145deg, rgba(209, 193, 245, .24), rgba(132, 105, 191, .09)); }
.leela-board-cell[data-row="5"] { background: linear-gradient(145deg, rgba(251, 214, 164, .26), rgba(206, 137, 95, .1)); }
.leela-board-cell[data-row="6"] { background: linear-gradient(145deg, rgba(174, 232, 215, .22), rgba(82, 157, 147, .08)); }
.leela-board-cell[data-row="7"] { background: linear-gradient(145deg, rgba(255, 230, 164, .26), rgba(222, 166, 94, .1)); }

.leela-board-cell::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 247, 221, .56);
}

.leela-board-cell[data-kind="pause"]::after { background: #4f8d79; }
.leela-board-cell[data-kind="practice"]::after { background: #617fae; }
.leela-board-cell[data-kind="action"]::after { background: #c06d47; }
.leela-board-cell[data-kind="question"]::after { background: #8b6cae; }

.leela-board-cell::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 4px;
  background: radial-gradient(circle, rgba(2, 8, 22, .2), transparent 68%);
  pointer-events: none;
}

.leela-board-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 244, 214, .9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .7),
    0 5px 12px rgba(0, 0, 0, .28);
}

.leela-board-cell.is-visited {
  border-color: rgba(244, 195, 105, .82);
  color: #fff8e3;
  box-shadow:
    inset 0 0 0 2px rgba(255, 248, 224, .25),
    0 0 12px rgba(244, 195, 105, .22);
}

.leela-board-cell.is-current {
  z-index: 6;
  border-color: #ffe4a8;
  background: linear-gradient(145deg, #cb6a43, #a74e36);
  color: #fff;
  box-shadow:
    0 0 0 2px rgba(255, 224, 156, .58),
    0 0 24px rgba(255, 202, 112, .72);
  transform: translateY(-2px) scale(1.05);
}

.leela-board-cell.is-current::before {
  border-color: rgba(255, 245, 216, .55);
}

.leela-board-cell.is-journey-origin {
  z-index: 8;
  animation: leela-journey-origin-pulse 620ms cubic-bezier(.18, .78, .22, 1) both;
}

.leela-board-cell.is-journey-origin::before {
  animation: leela-journey-origin-ring 620ms ease-out both;
}

@keyframes leela-journey-origin-pulse {
  0% {
    border-color: rgba(255, 244, 214, .9);
    box-shadow:
      inset 0 0 0 2px rgba(255, 248, 224, .35),
      0 0 0 0 rgba(255, 214, 140, .65);
  }

  55% {
    border-color: #ffe4a8;
    box-shadow:
      inset 0 0 0 2px rgba(255, 248, 224, .5),
      0 0 0 11px rgba(255, 214, 140, .2),
      0 0 28px rgba(255, 202, 112, .72);
  }

  100% {
    border-color: rgba(244, 195, 105, .82);
    box-shadow:
      inset 0 0 0 1px rgba(255, 248, 224, .12),
      0 0 12px rgba(244, 195, 105, .18);
  }
}

@keyframes leela-journey-origin-ring {
  0% {
    opacity: .9;
    box-shadow: 0 0 0 0 rgba(255, 224, 164, .62);
  }

  70% {
    opacity: .35;
    box-shadow: 0 0 0 14px rgba(255, 224, 164, 0);
  }

  100% {
    opacity: 0;
    box-shadow: 0 0 0 18px rgba(255, 224, 164, 0);
  }
}

.leela-board-cell.is-arrow-source,
.leela-board-cell.is-arrow-target {
  color: #fff8df;
  text-shadow: 0 1px 4px rgba(20, 28, 24, .85);
}

.leela-board-cell.is-arrow-source {
  box-shadow:
    inset 0 0 0 2px rgba(255, 216, 127, .48),
    0 0 18px rgba(244, 195, 105, .62);
}

.leela-board-cell.is-arrow-target {
  box-shadow:
    inset 0 0 0 2px rgba(211, 187, 238, .6),
    0 0 20px rgba(169, 138, 208, .52);
}

.leela-board-cell.is-finish {
  border: 2px double rgba(255, 230, 172, .9);
}

.leela-board-cell.is-goal {
  box-shadow:
    inset 0 0 0 2px rgba(255, 244, 205, .28),
    0 0 16px rgba(255, 219, 139, .42);
}

.leela-board-cell.is-entry-start {
  border-color: rgba(173, 231, 255, .72);
}

.leela-board-cell.is-finish::after {
  content: "✦";
  right: 4px;
  bottom: 2px;
  width: auto;
  height: auto;
  color: #704a18;
  background: transparent;
  font-size: .62rem;
}

.leela-board-cell.is-current.is-finish::after {
  color: #fff3cf;
}

.leela-roll-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--leela-card-gap-section);
  margin-top: 16px;
  padding: var(--leela-card-pad-card);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-card);
  background: var(--cream);
}

.leela-entry-attempt {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  box-sizing: border-box;
  border: 1px solid rgba(196, 122, 63, .3);
  border-left: 3px solid var(--gold);
  border-radius: var(--leela-card-radius-callout);
  background: rgba(216, 149, 67, .09);
}

.leela-entry-attempt__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.leela-entry-attempt__copy strong {
  color: var(--accent-dark);
  font-size: .8rem;
  line-height: 1.3;
}

.leela-entry-attempt__copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--leela-card-meta);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.leela-dice {
  --dice-size: 80px;
  --dice-half: 40px;
  --dice-core-half: 39px;
  position: relative;
  display: grid;
  place-items: center;
  width: 100px;
  height: 96px;
  flex: none;
  perspective: 360px;
  perspective-origin: 50% 36%;
  isolation: isolate;
}

.leela-dice::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 1px;
  width: 62px;
  height: 14px;
  border-radius: 50%;
  background: rgba(67, 41, 19, .3);
  filter: blur(8px);
  transform: translateX(-50%);
}

.leela-dice__scene {
  width: var(--dice-size);
  height: var(--dice-size);
  transform: rotateX(-58deg) rotateY(-32deg);
  transform-style: preserve-3d;
}

.leela-dice__cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform: rotateY(-24deg) rotateX(90deg);
  transform-style: preserve-3d;
  transition: transform .48s cubic-bezier(.16, .82, .2, 1);
}

.leela-dice[data-value="2"] .leela-dice__cube {
  transform: rotateY(-24deg);
}

.leela-dice[data-value="3"] .leela-dice__cube {
  transform: rotateY(-24deg) rotateZ(-90deg);
}

.leela-dice[data-value="4"] .leela-dice__cube {
  transform: rotateY(-24deg) rotateZ(90deg);
}

.leela-dice[data-value="5"] .leela-dice__cube {
  transform: rotateY(-24deg) rotateX(180deg);
}

.leela-dice[data-value="6"] .leela-dice__cube {
  transform: rotateY(-24deg) rotateX(-90deg);
}

.leela-dice__core-face {
  position: absolute;
  inset: -2px;
  border: 1px solid rgba(48, 29, 14, .9);
  border-radius: 4px;
  background:
    radial-gradient(circle at 30% 22%, rgba(189, 139, 82, .7), transparent 34%),
    linear-gradient(145deg, #9b6a3b 0%, #714824 52%, #3f260f 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 226, 180, .28),
    inset 0 -2px 4px rgba(24, 13, 5, .5),
    0 0 0 1px rgba(74, 44, 20, .68),
    0 0 3px rgba(255, 238, 202, .34);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.leela-dice__core-face[data-core-face="1"] {
  transform: translateZ(var(--dice-core-half));
}

.leela-dice__core-face[data-core-face="6"] {
  transform: rotateY(180deg) translateZ(var(--dice-core-half));
}

.leela-dice__core-face[data-core-face="3"] {
  transform: rotateY(90deg) translateZ(var(--dice-core-half));
}

.leela-dice__core-face[data-core-face="4"] {
  transform: rotateY(-90deg) translateZ(var(--dice-core-half));
}

.leela-dice__core-face[data-core-face="2"] {
  transform: rotateX(90deg) translateZ(var(--dice-core-half));
}

.leela-dice__core-face[data-core-face="5"] {
  transform: rotateX(-90deg) translateZ(var(--dice-core-half));
}

.leela-dice__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 2px solid rgba(91, 55, 26, .66);
  border-radius: 6px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .95), transparent 31%),
    radial-gradient(circle at 72% 84%, rgba(205, 168, 119, .24), transparent 42%),
    linear-gradient(145deg, #fffdf7 0%, #faf0dc 46%, #ead6b7 100%);
  background-clip: padding-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .92),
    inset 1px 0 0 rgba(255, 255, 255, .64),
    inset -1px -1px 0 rgba(105, 65, 31, .18),
    inset 0 -4px 8px rgba(132, 84, 45, .16),
    inset 0 0 0 2px rgba(255, 255, 255, .38),
    inset 0 0 0 3px rgba(120, 76, 38, .1),
    0 0 0 1px rgba(83, 52, 27, .78),
    0 2px 3px rgba(64, 40, 20, .16);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.leela-dice__face::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 0;
  border-radius: 3px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .18), transparent 42%, rgba(145, 95, 52, .07));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
  pointer-events: none;
}

.leela-dice__face[data-face="1"] {
  transform: translateZ(var(--dice-half));
}

.leela-dice__face[data-face="6"] {
  transform: rotateY(180deg) translateZ(var(--dice-half));
}

.leela-dice__face[data-face="3"] {
  transform: rotateY(90deg) translateZ(var(--dice-half));
}

.leela-dice__face[data-face="4"] {
  transform: rotateY(-90deg) translateZ(var(--dice-half));
}

.leela-dice__face[data-face="2"] {
  transform: rotateX(90deg) translateZ(var(--dice-half));
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .82), transparent 31%),
    linear-gradient(145deg, #f7edda 0%, #eeddc1 52%, #dec6a1 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, .46),
    inset 0 0 0 3px rgba(120, 76, 38, .1),
    inset 0 0 16px rgba(132, 84, 45, .2),
    0 0 0 1px rgba(83, 52, 27, .72);
}

.leela-dice__face[data-face="5"] {
  transform: rotateX(-90deg) translateZ(var(--dice-half));
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .72), transparent 31%),
    linear-gradient(145deg, #f2e6d1 0%, #e5d1b0 52%, #d4ba91 100%);
}

.leela-dice__face[data-face="3"],
.leela-dice__face[data-face="4"] {
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .8), transparent 31%),
    linear-gradient(145deg, #faf3e5 0%, #f0dfc3 54%, #dec7a3 100%);
}

.leela-dice__pip {
  position: absolute;
  z-index: 1;
  width: 19%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #5c4b3a 0%, #241d17 48%, #090807 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .24),
    inset 0 -1px 1px rgba(0, 0, 0, .5),
    0 1px 2px rgba(78, 49, 23, .34);
}

.leela-dice__face[data-face="1"] .leela-dice__pip {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.leela-dice__face[data-face="2"] .leela-dice__pip:nth-child(1) {
  left: 19%;
  top: 19%;
}

.leela-dice__face[data-face="2"] .leela-dice__pip:nth-child(2) {
  right: 19%;
  bottom: 19%;
}

.leela-dice__face[data-face="3"] .leela-dice__pip:nth-child(1) {
  left: 19%;
  top: 19%;
}

.leela-dice__face[data-face="3"] .leela-dice__pip:nth-child(2) {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.leela-dice__face[data-face="3"] .leela-dice__pip:nth-child(3) {
  right: 19%;
  bottom: 19%;
}

.leela-dice__face[data-face="4"] .leela-dice__pip:nth-child(1),
.leela-dice__face[data-face="5"] .leela-dice__pip:nth-child(1) {
  left: 17%;
  top: 17%;
}

.leela-dice__face[data-face="4"] .leela-dice__pip:nth-child(2),
.leela-dice__face[data-face="5"] .leela-dice__pip:nth-child(2) {
  right: 17%;
  top: 17%;
}

.leela-dice__face[data-face="4"] .leela-dice__pip:nth-child(3),
.leela-dice__face[data-face="5"] .leela-dice__pip:nth-child(4) {
  left: 17%;
  bottom: 17%;
}

.leela-dice__face[data-face="4"] .leela-dice__pip:nth-child(4),
.leela-dice__face[data-face="5"] .leela-dice__pip:nth-child(5) {
  right: 17%;
  bottom: 17%;
}

.leela-dice__face[data-face="5"] .leela-dice__pip:nth-child(3) {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(1),
.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(2),
.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(3) {
  left: 22%;
}

.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(4),
.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(5),
.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(6) {
  right: 22%;
}

.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(1),
.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(4) {
  top: 15%;
}

.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(2),
.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(5) {
  top: 50%;
  transform: translateY(-50%);
}

.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(3),
.leela-dice__face[data-face="6"] .leela-dice__pip:nth-child(6) {
  bottom: 15%;
}

.leela-dice[data-value="0"] .leela-dice__pip {
  opacity: .24;
}

.leela-dice.is-rolling::before {
  animation: leela-dice-shadow .72s ease-in-out 1;
}

.leela-dice.is-rolling .leela-dice__scene {
  animation: leela-dice-bob .72s ease-in-out 1;
}

.leela-dice.is-rolling .leela-dice__cube {
  animation: leela-dice-tumble .72s cubic-bezier(.37, .02, .3, 1) 1;
  will-change: transform;
}

@keyframes leela-dice-tumble {
  0% {
    transform: rotateY(-24deg) rotateX(90deg) rotateZ(-4deg) scale(1);
  }
  24% {
    transform: rotateY(138deg) rotateX(236deg) rotateZ(32deg) scale(1.08);
  }
  49% {
    transform: rotateY(-74deg) rotateX(438deg) rotateZ(-38deg) scale(.96);
  }
  74% {
    transform: rotateY(224deg) rotateX(656deg) rotateZ(30deg) scale(1.07);
  }
  100% {
    transform: rotateY(-24deg) rotateX(810deg) rotateZ(-4deg) scale(1);
  }
}

@keyframes leela-dice-bob {
  0%, 100% { transform: rotateX(-58deg) rotateY(-32deg) translateY(0); }
  28% { transform: rotateX(-58deg) rotateY(-32deg) translateY(-9px) rotate(-2deg); }
  58% { transform: rotateX(-58deg) rotateY(-32deg) translateY(-3px) rotate(1.5deg); }
}

@keyframes leela-dice-shadow {
  0%, 100% { opacity: .32; transform: translateX(-50%) scaleX(.86); }
  40% { opacity: .14; transform: translateX(-50%) scaleX(.58); }
}

.leela-dice__value {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.leela-roll-panel__copy {
  min-width: 0;
  flex: 1;
}

.leela-roll-panel__copy strong {
  display: block;
  font-size: .875rem;
}

.leela-roll-panel__copy p {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  line-height: 1.45;
}

.leela-board-reopen {
  justify-self: start;
  width: auto;
  min-height: 40px;
  margin-top: 2px;
  padding: 0 12px;
  font-size: var(--leela-card-meta);
}

.leela-request-panel--top {
  display: grid;
  grid-template-columns: minmax(190px, .42fr) minmax(0, 1.58fr);
  column-gap: 24px;
  align-items: start;
  padding: var(--leela-card-pad-card);
  border-radius: var(--leela-card-radius-card);
}

.leela-request-panel--top .leela-request-panel__head {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
}

.leela-request-panel--top .leela-request-panel__summary,
.leela-request-panel--top .leela-request-fields {
  grid-column: 2;
}

.leela-request-panel--top .leela-request-fields {
  grid-template-columns: minmax(0, 1fr) minmax(190px, .6fr);
  align-items: start;
  margin-top: 0;
}

.leela-request-panel--top .leela-request-fields .leela-field {
  grid-row: 1 / span 2;
}

.leela-request-panel--top .leela-request-panel__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: baseline;
}

.leela-request-panel--top .leela-request-panel__summary p {
  flex: 1 1 260px;
}

.leela-session-support {
  padding: var(--leela-card-pad-card);
  border-radius: var(--leela-card-radius-card);
}

.leela-session-support__grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: start;
  gap: 18px;
}

.leela-session-support__notes {
  display: grid;
  gap: 14px;
}

.leela-session-support .leela-turns {
  padding-top: 0;
}

.leela-note-block {
  padding: var(--leela-card-pad-inner);
  border: 1px solid var(--leela-card-border-soft);
  border-radius: var(--leela-card-radius-inner);
  background: var(--cream);
}

.leela-note-block__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.leela-note-block__head label {
  font-size: .875rem;
  font-weight: 700;
}

.leela-note-block__head span {
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
}

.leela-note-input {
  min-height: 112px;
  resize: vertical;
  background: var(--surface);
  font-size: .86rem;
}

.leela-note-block .btn {
  margin-top: 12px;
}

.leela-ai-block {
  padding: var(--leela-card-pad-inner);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-inner);
  background:
    radial-gradient(circle at 100% 0%, rgba(190, 132, 70, .14), transparent 45%),
    linear-gradient(145deg, #f7f1e7, #fffdf8);
}

.leela-ai-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.leela-ai-block__head strong {
  color: var(--green-dark, #22302b);
  font-family: var(--font-serif);
  font-size: 1.06rem;
}

.leela-ai-block__head span {
  color: var(--gold-dark, #9b663d);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.leela-ai-block__intro,
.leela-ai-block__privacy {
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  line-height: 1.55;
}

.leela-ai-block__intro {
  margin-top: 8px;
}

.leela-ai-consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  margin-top: 12px;
  color: var(--text);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
}

.leela-ai-consent input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #205c4e;
}

.leela-ai-block__privacy {
  margin-top: 6px;
  font-size: .72rem;
}

.leela-ai-block .btn {
  margin-top: 12px;
}

.leela-ai-response {
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 3px solid #2f806b;
  border-radius: 4px var(--leela-card-radius-callout) var(--leela-card-radius-callout) 4px;
  background: rgba(47, 128, 107, .08);
}

.leela-ai-response.is-fallback {
  border-left-color: #b4874f;
  background: rgba(180, 135, 79, .09);
}

.leela-ai-response.is-crisis {
  border-left-color: #b9473f;
  background: rgba(185, 71, 63, .1);
}

.leela-ai-response__source {
  display: block;
  color: #205c4e;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.leela-ai-response.is-fallback .leela-ai-response__source {
  color: #8b602f;
}

.leela-ai-response.is-crisis .leela-ai-response__source {
  color: #9f352f;
}

.leela-ai-response p {
  margin-top: 7px;
  color: var(--text);
  font-size: .875rem;
  line-height: 1.62;
}

.leela-turns {
  padding: 4px 2px 0;
}

.leela-turns__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(32, 92, 78, .12);
}

.leela-turns__head > div {
  display: grid;
  gap: 3px;
}

.leela-turns__head strong {
  font-family: var(--font-serif);
  font-size: .94rem;
  font-weight: 600;
}

.leela-turns__subtitle {
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  line-height: 1.35;
}

.leela-turns__head span {
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
}

.leela-turns__list {
  display: grid;
  gap: 0;
  max-height: 260px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.leela-turn-item {
  position: relative;
  padding: 13px 2px 14px 21px;
  border-bottom: 1px solid rgba(32, 92, 78, .1);
  background: transparent;
}

.leela-turn-item:last-child {
  border-bottom: 0;
}

.leela-turn-item::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 2px;
  width: 7px;
  height: 7px;
  border: 2px solid rgba(196, 122, 63, .45);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(196, 122, 63, .07);
}

.leela-turn-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.leela-turn-item__number {
  color: var(--text-secondary);
  font-size: var(--leela-card-meta);
  font-weight: 700;
  letter-spacing: .04em;
}

.leela-turn-item__dice {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(32, 92, 78, .16);
  border-radius: 7px;
  background: rgba(255, 255, 255, .66);
  color: var(--primary);
  font-family: var(--font-serif);
  font-size: .82rem;
  font-weight: 700;
}

.leela-turn-item__cell {
  margin-top: 3px !important;
  color: var(--text) !important;
  font-family: var(--font-serif);
  font-size: .86rem !important;
  font-weight: 600 !important;
  line-height: 1.38 !important;
}

.leela-turn-item p {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: var(--leela-card-meta);
  line-height: 1.48;
}

.leela-turn-item__events {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.leela-turn-item p.leela-turn-item__arrow {
  margin-top: 0;
  color: #8a5d24;
  font-weight: 600;
}

.leela-turn-item p.leela-turn-item__arrow.is-return {
  color: #72518f;
}

.leela-turn-item p.leela-turn-item__entry {
  margin-top: 0;
  color: #8a5d24;
  font-weight: 600;
}

.leela-turn-item p.leela-turn-item__waiting {
  margin-top: 0;
  color: #945b43;
}

.leela-turn-item p.leela-turn-item__extra {
  color: #8a5d24;
  font-weight: 600;
}

.leela-turn-item__note {
  margin: 10px 0 0;
  padding: 9px 10px 9px 12px;
  border: 0;
  border-left: 2px solid rgba(196, 122, 63, .42);
  border-radius: 0 8px 8px 0;
  background: rgba(196, 122, 63, .065);
}

.leela-turn-item__note-label {
  display: block;
  margin-bottom: 3px;
  color: var(--accent-dark);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.leela-turn-item__note p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 0;
  color: var(--text-secondary);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.leela-turn-item.is-empty {
  padding: 12px 0;
  border-bottom: 0;
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  font-style: italic;
}

.leela-turn-item.is-empty::before {
  display: none;
}

.leela-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 30px;
  color: var(--text-muted);
  font-size: .76rem;
  text-align: center;
}

.leela-footer a {
  color: inherit;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  cursor: not-allowed;
}

@media (min-width: 921px) {
  .leela-game-active .leela-shell {
    width: min(1420px, calc(100% - 32px));
    padding-top: 6px;
    padding-bottom: 12px;
  }

  .leela-game-active .leela-game-head {
    align-items: center;
    margin: 0 0 6px;
  }

  .leela-game-active .leela-game-head h2 {
    margin-top: 2px;
    font-size: clamp(1.42rem, 1.95vw, 1.65rem);
    line-height: 1.08;
  }

  .leela-game-active .leela-back {
    margin-bottom: 3px;
  }

  .leela-game-active .leela-footer {
    display: none;
  }

  .leela-game-active .leela-board-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding: var(--leela-card-pad-card);
  }

  .leela-game-active .leela-board-meta {
    padding-bottom: 0;
  }

  .leela-game-active .leela-board {
    width: min(100%, calc(112.5dvh - 252px));
    justify-self: center;
  }

  .leela-roll-panel {
    margin-top: 0;
  }

  .leela-board-reopen {
    margin-top: 0;
  }
}

@media (min-width: 1181px) {
  .leela-game-active .leela-shell {
    --leela-game-rail-width: 344px;
    --leela-game-column-gap: 22px;
    --leela-board-width: min(
      calc(100vw - 444px),
      calc(112.5dvh - 252px)
    );
    --leela-game-content-width: calc(
      var(--leela-board-width) + 42px +
      var(--leela-game-rail-width) + var(--leela-game-column-gap)
    );
  }

  .leela-game-active .leela-game-head,
  .leela-game-active .leela-game-layout {
    width: min(100%, var(--leela-game-content-width));
    margin-inline: auto;
  }

  .leela-game-active .leela-group-room {
    grid-template-columns:
      140px
      minmax(240px, 1fr)
      minmax(300px, .9fr)
      280px;
    grid-template-areas: "identity members share controls";
    align-items: stretch;
  }

  .leela-game-active .leela-game-layout {
    grid-template-columns:
      minmax(0, calc(var(--leela-board-width) + 42px))
      var(--leela-game-rail-width);
    justify-content: center;
    column-gap: var(--leela-game-column-gap);
  }

  .leela-game-active .leela-board {
    width: min(100%, var(--leela-board-width));
  }

  .leela-game-active .leela-game-rail {
    position: sticky;
    top: 10px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100dvh - 150px);
    overflow-y: auto;
    padding-right: 3px;
    scrollbar-gutter: stable;
  }

  .leela-game-active .leela-game-rail > * {
    flex: 0 0 auto;
  }

  .leela-game-active .leela-game-rail .leela-request-panel--top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: var(--leela-card-pad-card);
    border-radius: var(--leela-card-radius-card);
  }

  .leela-game-active .leela-game-rail .leela-request-panel__head {
    display: flex;
    grid-column: auto;
    grid-row: auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .leela-game-active .leela-game-rail .leela-request-panel__head .btn {
    min-height: 36px;
    padding: 0 12px;
    font-size: .75rem;
  }

  .leela-game-active .leela-game-rail .leela-request-panel__summary,
  .leela-game-active .leela-game-rail .leela-request-fields {
    grid-column: auto;
    grid-row: auto;
  }

  .leela-game-active .leela-game-rail .leela-request-panel__summary {
    display: grid;
    gap: 5px;
  }

  .leela-game-active .leela-game-rail .leela-request-panel__summary p {
    margin: 0;
    font-size: .8rem;
    line-height: 1.52;
  }

  .leela-game-active .leela-game-rail .leela-request-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }

  .leela-game-active .leela-game-rail .leela-request-fields .leela-field {
    grid-row: auto;
  }

  .leela-game-active .leela-game-rail .leela-request-panel__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .leela-game-active .leela-game-rail .leela-roll-panel {
    display: grid;
    grid-template-columns: 102px minmax(0, 1fr);
    grid-template-areas:
      "dice copy"
      "controls controls";
    align-items: center;
    gap: 9px 12px;
    padding: var(--leela-card-pad-card);
    border-radius: var(--leela-card-radius-card);
    background:
      radial-gradient(circle at 0% 0%, rgba(196, 122, 63, .12), transparent 48%),
      rgba(255, 253, 248, .9);
  }

  .leela-game-active .leela-game-rail .leela-dice {
    grid-area: dice;
    justify-self: center;
  }

  .leela-game-active .leela-game-rail .leela-roll-panel__copy {
    grid-area: copy;
  }

  .leela-game-active .leela-game-rail .leela-manual-dice,
  .leela-game-active .leela-game-rail .leela-entry-attempt,
  .leela-game-active .leela-game-rail .leela-roll-panel > .btn:not(.leela-board-reopen) {
    grid-column: 1 / -1;
    width: 100%;
  }

  .leela-game-active .leela-game-rail .leela-board-reopen {
    justify-self: start;
    width: auto;
    min-height: 40px;
    margin: 0;
    padding: 0 12px;
    border-color: rgba(32, 92, 78, .16);
    background: rgba(255, 253, 248, .58);
    font-size: var(--leela-card-meta);
  }

  .leela-game-active .leela-session-support {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    min-height: 0;
    padding: var(--leela-card-pad-card);
    border: 1px solid var(--leela-card-border);
    border-radius: var(--leela-card-radius-card);
    background: var(--surface);
    box-shadow: var(--shadow-md);
  }

  .leela-game-active .leela-session-support__grid {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
  }

  .leela-game-active .leela-session-support .leela-turns {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    min-height: 0;
    padding: 0;
  }

  .leela-game-active .leela-turns__list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 260px;
    overflow-y: auto;
  }

  .leela-game-active .leela-turns__head {
    flex: 0 0 auto;
  }
}

@media (min-width: 1181px) and (max-height: 820px) {
  .leela-game-active .leela-group-room {
    grid-template-columns: 140px minmax(0, 1fr) minmax(240px, .7fr);
    grid-template-areas:
      "identity members controls"
      "share share controls";
  }
}

@media (max-width: 1180px) {
  .leela-game-active .leela-game-layout {
    display: flex;
    flex-direction: column;
  }

  .leela-game-active .leela-game-rail {
    display: contents;
  }

  .leela-game-active .leela-request-panel--top {
    order: 1;
  }

  .leela-game-active .leela-board-panel {
    order: 2;
  }

  .leela-game-active .leela-game-rail .leela-roll-panel {
    order: 3;
  }

  .leela-game-active .leela-board-reopen {
    order: 4;
  }

  .leela-game-active .leela-session-support {
    order: 5;
  }

  .leela-game-active .leela-session-support__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .leela-hero {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 18px;
  }

  .leela-board-cell {
    font-size: .62rem;
  }

  .leela-board {
    padding: 10px;
    gap: 4px;
  }

  .leela-board-arrows {
    inset: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
  }

  .leela-board-meta__hint {
    width: 100%;
    margin-left: 0;
  }

  .leela-group-room {
    grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr);
    grid-template-areas:
      "identity controls"
      "members members"
      "share share";
  }

  .leela-group-room__controls {
    justify-items: stretch;
  }

  .leela-group-room__buttons {
    justify-content: stretch;
  }
}

@media (max-width: 720px) {
  .leela-shell {
    width: min(100% - 28px, 1120px);
    padding-top: 16px;
  }

  .leela-header__in {
    height: 62px;
  }

  .leela-header__in .nav-link {
    display: none;
  }

  .leela-hero {
    grid-template-columns: 1fr;
    padding: 28px 22px 24px;
    border-radius: 24px;
  }

  .leela-hero h1 {
    font-size: clamp(2.55rem, 13vw, 3.7rem);
  }

  .leela-orbit {
    display: none;
  }

  .leela-mode-grid,
  .leela-how,
  .leela-rules__grid,
  .leela-safety__grid,
  .leela-group-entry__grid {
    grid-template-columns: 1fr;
  }

  .leela-mode-card {
    min-height: 0;
  }

  .leela-how__item {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .leela-how__item:last-child {
    border-bottom: 0;
  }

  .leela-how__num {
    margin-bottom: 14px;
  }

  .leela-game-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-top: 22px;
  }

  .leela-game-head__actions {
    width: 100%;
  }

  .leela-game-head__actions .btn {
    flex: 1;
  }

  .leela-game-layout {
    grid-template-columns: 1fr;
  }

  .leela-request-panel--top,
  .leela-session-support__grid {
    grid-template-columns: 1fr;
  }

  .leela-request-panel--top .leela-request-panel__head,
  .leela-request-panel--top .leela-request-panel__summary,
  .leela-request-panel--top .leela-request-fields {
    grid-column: 1;
    grid-row: auto;
  }

  .leela-request-panel--top .leela-request-fields {
    grid-template-columns: 1fr;
    margin-top: 12px;
  }

  .leela-request-panel--top .leela-request-fields .leela-field {
    grid-row: auto;
  }

  .leela-board-panel {
    padding: var(--leela-card-pad-card);
    border-radius: var(--leela-card-radius-card);
  }

  .leela-board {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 5px;
    padding: 7px;
    border-radius: 15px;
  }

  .leela-board-arrows {
    inset: 7px;
    width: calc(100% - 14px);
    height: calc(100% - 14px);
  }

  .leela-board-cell {
    border-radius: 7px;
    font-size: .58rem;
  }

  .leela-roll-panel {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .leela-roll-panel__copy {
    min-width: 160px;
  }

  .leela-roll-panel .btn {
    width: 100%;
  }

  .leela-manual-dice__grid {
    grid-template-columns: repeat(3, minmax(44px, 1fr));
  }

  .leela-session-support {
    padding: var(--leela-card-pad-card);
    border-radius: var(--leela-card-radius-card);
  }

  .leela-history-item {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .leela-history-item__status {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .leela-history-item .btn {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .leela-group-entry {
    padding: var(--leela-card-pad-section);
  }

  .leela-group-entry__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .leela-group-resume {
    align-items: stretch;
    flex-direction: column;
  }

  .leela-group-room {
    grid-template-columns: 1fr;
    grid-template-areas:
      "identity"
      "members"
      "share"
      "controls";
    gap: 14px;
    padding: 16px;
  }

  .leela-group-room__controls {
    justify-items: stretch;
  }

  .leela-group-room__buttons {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

}

.leela-request-setup {
  margin-top: 18px;
  padding: var(--leela-card-pad-section);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-section);
  background:
    radial-gradient(circle at 100% 0%, rgba(196, 122, 63, .13), transparent 36%),
    linear-gradient(145deg, #fffdf8, #f5eee1);
  box-shadow: 0 14px 34px rgba(34, 48, 43, .08);
}

.leela-request-setup h3 {
  margin-top: 6px;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.leela-request-setup p {
  max-width: 72ch;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: var(--leela-card-text);
  line-height: 1.65;
}

.leela-request-fields {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.leela-request-fields textarea.input {
  min-height: 88px;
  resize: vertical;
  line-height: 1.55;
}

.leela-request-fields em {
  color: var(--text-muted);
  font-style: normal;
  font-weight: 400;
}

.leela-dice-choice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: var(--leela-card-pad-inner);
  border: 1px solid var(--leela-card-border-soft);
  border-radius: var(--leela-card-radius-inner);
  background: rgba(255, 255, 255, .56);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color .16s, background-color .16s;
}

.leela-dice-choice:hover {
  border-color: rgba(32, 92, 78, .38);
  background: rgba(255, 255, 255, .82);
}

.leela-dice-choice input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--primary);
}

.leela-dice-choice span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.leela-dice-choice strong {
  color: var(--text);
  font-size: .8rem;
}

.leela-dice-choice small {
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  line-height: 1.5;
}

.leela-dice-choice--compact {
  padding: 12px 14px;
}

.leela-request-panel {
  padding: var(--leela-card-pad-card);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-card);
  background:
    linear-gradient(135deg, rgba(47, 128, 107, .09), rgba(196, 122, 63, .06)),
    var(--cream);
}

.leela-request-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.leela-request-panel__label {
  display: block;
  color: var(--primary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.leela-request-panel__head strong {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  font-weight: 500;
}

.leela-request-panel__summary {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.leela-request-panel__summary p {
  margin: 0;
  color: var(--text-secondary);
  font-size: .84rem;
  line-height: 1.55;
}

.leela-request-panel__summary strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.leela-request-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.leela-manual-dice {
  display: grid;
  flex: 1 1 100%;
  gap: 7px;
  padding: 14px 16px;
  border: 1px solid rgba(196, 122, 63, .28);
  border-radius: var(--leela-card-radius-callout);
  background: rgba(255, 248, 235, .72);
}

.leela-manual-dice[hidden] {
  display: none;
}

.leela-manual-dice > span {
  color: var(--text-secondary);
  font-size: .72rem;
  font-weight: 700;
}

.leela-manual-dice__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(34px, 1fr));
  gap: 6px;
}

.leela-manual-dice__value {
  min-height: 36px;
  border: 1px solid rgba(196, 122, 63, .34);
  border-radius: 9px;
  background: #fffdf8;
  color: var(--primary);
  font: 800 .9rem/1 var(--font-sans);
  cursor: pointer;
  transition: transform .14s, border-color .14s, background-color .14s;
}

.leela-manual-dice__value:hover:not(:disabled) {
  border-color: var(--gold);
  background: #fff5df;
  transform: translateY(-1px);
}

.leela-manual-dice__value:disabled {
  cursor: wait;
  opacity: .58;
}

.leela-game-summary {
  margin-top: 22px;
  padding: var(--leela-card-pad-section);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-section);
  background:
    radial-gradient(circle at 100% 0%, rgba(196, 122, 63, .16), transparent 38%),
    linear-gradient(145deg, #fffdf8, #f2eadb);
}

.leela-game-summary__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.leela-summary-card {
  padding: var(--leela-card-pad-inner);
  border: 1px solid var(--leela-card-border-soft);
  border-radius: var(--leela-card-radius-inner);
  background: rgba(255, 255, 255, .68);
}

.leela-summary-card--wide {
  grid-column: 1 / -1;
}

.leela-summary-card h3 {
  margin: 0 0 7px;
  color: var(--primary);
  font-family: var(--font-serif);
  font-size: 1rem;
}

.leela-summary-card p,
.leela-summary-card li {
  color: var(--text-secondary);
  font-size: .84rem;
  line-height: 1.6;
}

.leela-summary-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 720px) {
  .leela-game-summary__grid {
    grid-template-columns: 1fr;
  }

  .leela-summary-card--wide {
    grid-column: auto;
  }

  .leela-request-panel__head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  .leela-shell {
    width: calc(100% - 20px);
  }

  .leela-hero {
    padding: 24px 18px 20px;
  }

  .leela-hero__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .leela-hero__actions .btn {
    width: 100%;
  }

  .leela-text-link {
    align-self: flex-start;
  }

  .leela-board {
    gap: 4px;
  }

  .leela-board-token {
    width: 14px;
    height: 14px;
    font-size: .43rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leela-orbit svg,
  .leela-dice.is-rolling::before,
  .leela-dice.is-rolling .leela-dice__scene,
  .leela-dice.is-rolling .leela-dice__cube {
    animation: none;
  }

  .leela-dice__cube,
  .leela-board-cell,
  .leela-board-token,
  .leela-text-link,
  .leela-back {
    transition: none;
  }

  .leela-journey.is-opening .leela-journey__panel,
  .leela-journey.is-open .leela-journey__panel {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .leela-journey.is-opening::backdrop,
  .leela-journey.is-open::backdrop {
    opacity: 1;
    transition: none;
  }

  .leela-board-cell.is-journey-origin {
    animation: none;
  }
}

@media (max-width: 620px) {
  .leela-section-head {
    margin-top: 34px;
  }
}

.leela-gate__actions {
  align-items: center;
}

.leela-gate__actions [hidden] {
  display: none !important;
}

.leela-access {
  display: grid;
  grid-template-columns: minmax(180px, .55fr) minmax(0, 1.45fr);
  gap: var(--leela-card-gap-section);
  margin-top: 24px;
  padding: var(--leela-card-pad-section);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-section);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.leela-access h2 {
  margin-top: 6px;
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
}

.leela-access__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leela-access__list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.65;
}

.leela-access__list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
}

.leela-access__list strong {
  color: var(--primary);
}

@media (max-width: 720px) {
  .leela-access {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: var(--leela-card-pad-section);
  }

  .leela-access__list {
    grid-template-columns: 1fr;
  }

  .leela-gate__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .leela-gate__actions .btn {
    justify-content: center;
    width: 100%;
  }
}

.leela-journey {
  box-sizing: border-box;
  width: min(980px, calc(100vw - 32px));
  max-width: 980px;
  max-height: min(92vh, 900px);
  margin: auto;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: var(--text);
}

.leela-journey::backdrop {
  background: rgba(20, 31, 27, .68);
}

.leela-journey__panel {
  box-sizing: border-box;
  width: 100%;
  max-height: min(92vh, 900px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: var(--leela-card-pad-section);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-section);
  background:
    radial-gradient(circle at 92% 5%, rgba(216, 149, 67, .12), transparent 28%),
    linear-gradient(150deg, #fffdf9 0%, #f8f4ed 100%);
  box-shadow: 0 28px 80px rgba(20, 31, 27, .28);
  transform-origin: 50% 50%;
  filter: blur(0);
}

.leela-journey.is-opening .leela-journey__panel {
  opacity: 0;
  transform:
    translate(var(--journey-origin-x, 0px), var(--journey-origin-y, 0px))
    scale(var(--journey-origin-scale, .16));
  filter: blur(5px);
}

.leela-journey.is-opening::backdrop {
  opacity: 0;
}

.leela-journey.is-open .leela-journey__panel {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  filter: blur(0);
  transition:
    transform 520ms cubic-bezier(.18, .78, .22, 1),
    opacity 240ms ease-out,
    filter 300ms ease-out;
  will-change: transform, opacity, filter;
}

.leela-journey.is-open::backdrop {
  opacity: 1;
  transition: opacity 260ms ease-out;
}

.leela-journey.is-opening .leela-journey__panel,
.leela-journey.is-open .leela-journey__panel {
  will-change: transform, opacity, filter;
}

.leela-journey__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.leela-journey__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.leela-journey__head h2 {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  line-height: 1.12;
}

.leela-journey__close {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  color: var(--text-secondary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.leela-journey__close:hover,
.leela-journey__close:focus-visible {
  border-color: var(--gold);
  color: var(--primary);
  outline: none;
}

.leela-journey__loading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 180px;
  padding: var(--leela-card-pad-card);
  border: 1px solid var(--leela-card-border-soft);
  border-radius: var(--leela-card-radius-inner);
  background: rgba(255, 255, 255, .62);
  color: var(--text-secondary);
}

.leela-journey__loading p {
  margin: 0;
  line-height: 1.55;
}

.leela-journey__spinner {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 2px solid rgba(216, 149, 67, .25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: leela-journey-spin .8s linear infinite;
}

@keyframes leela-journey-spin {
  to { transform: rotate(360deg); }
}

.leela-journey__block {
  display: grid;
  gap: 10px;
  padding: var(--leela-card-pad-card);
  border: 1px solid var(--leela-card-border-soft);
  border-radius: var(--leela-card-radius-inner);
  background: rgba(255, 255, 255, .66);
}

.leela-journey__block + .leela-journey__block {
  margin-top: 12px;
}

.leela-journey__block--cell {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(247, 241, 231, .8));
}

.leela-journey__block--interpretation,
.leela-journey__block--feedback,
.leela-journey__block--guide {
  border-color: rgba(216, 149, 67, .3);
  background:
    radial-gradient(circle at 100% 0, rgba(216, 149, 67, .1), transparent 34%),
    rgba(255, 255, 255, .74);
}

.leela-journey__label {
  color: var(--gold);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.leela-journey__text,
.leela-journey__list {
  margin: 0;
  color: var(--text-secondary);
  font-size: .92rem;
  line-height: 1.7;
  white-space: pre-line;
}

.leela-journey__text.leela-journey__lead,
.leela-journey__text.leela-journey__question {
  color: var(--primary);
  font-size: .97rem;
}

.leela-journey__text.leela-journey__answer {
  color: var(--text);
  font-size: .96rem;
  line-height: 1.78;
}

.leela-journey__text.leela-journey__sanskrit {
  color: var(--text-muted);
  font-size: .76rem;
  letter-spacing: .03em;
}

.leela-journey__text.leela-journey__note {
  color: var(--text-muted);
  font-size: .8rem;
  font-style: italic;
}

.leela-journey__list {
  display: grid;
  gap: 7px;
  padding-left: 18px;
}

.leela-journey__list li::marker {
  color: var(--gold);
}

.leela-journey__reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  align-items: start;
  gap: 16px;
  margin-top: 14px;
}

.leela-journey__block--cell {
  gap: 15px;
}

.leela-journey__cell-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(196, 122, 63, .16);
}

.leela-journey__cell-number {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border: 1px solid rgba(196, 122, 63, .26);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .92), transparent 48%),
    linear-gradient(145deg, #f7e2b8, #e8c58e);
  color: #6d451b;
  font: 600 1.85rem/1 var(--font-serif);
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, .38),
    0 8px 18px rgba(109, 69, 27, .12);
}

.leela-journey__cell-hero-copy {
  min-width: 0;
}

.leela-journey__cell-hero-copy .leela-journey__sanskrit {
  margin: 0;
}

.leela-journey__signals {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leela-journey__signals li {
  padding: 6px 10px;
  border: 1px solid rgba(196, 122, 63, .17);
  border-radius: 999px;
  background: rgba(255, 249, 238, .82);
  color: var(--text-secondary);
  font-size: .78rem;
  line-height: 1.35;
}

.leela-journey__detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.leela-journey__detail {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border: 1px solid var(--leela-card-border-soft);
  border-radius: var(--leela-card-radius-callout);
  background: rgba(247, 252, 249, .68);
}

.leela-journey__question-card {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  border-radius: 4px var(--leela-card-radius-callout) var(--leela-card-radius-callout) 4px;
  background: rgba(216, 149, 67, .07);
}

.leela-journey__composer {
  position: sticky;
  top: 0;
  display: grid;
  gap: 12px;
  padding: var(--leela-card-pad-card);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-card);
  background:
    radial-gradient(circle at 100% 0, rgba(216, 149, 67, .14), transparent 38%),
    linear-gradient(150deg, #edf7f1, #fffdf8 68%);
  box-shadow: 0 14px 30px rgba(32, 92, 78, .08);
}

.leela-journey__composer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.leela-journey__composer-meta {
  display: grid;
  justify-items: end;
  gap: 7px;
  flex: 0 0 auto;
}

.leela-journey__composer-head h3 {
  margin: 4px 0 0;
  color: var(--primary);
  font-family: var(--font-serif);
  font-size: 1.22rem;
  line-height: 1.2;
}

.leela-journey__composer-prompt {
  margin: 0;
  color: var(--text-secondary);
  font-size: .84rem;
  line-height: 1.55;
}

.leela-journey__composer .leela-journey__textarea {
  min-height: 154px;
  border-color: rgba(32, 92, 78, .2);
  background: rgba(255, 255, 255, .8);
}

.leela-journey__privacy-note {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(32, 92, 78, .1);
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
  line-height: 1.5;
}

.leela-journey__composer-actions {
  display: grid;
  gap: 8px;
}

.leela-journey__composer-actions .btn {
  width: 100%;
}

.leela-journey__block--guide {
  position: relative;
  gap: 14px;
  overflow: hidden;
  padding: var(--leela-card-pad-card);
  border-color: var(--leela-card-border);
  background:
    radial-gradient(circle at 100% 0, rgba(216, 149, 67, .13), transparent 35%),
    linear-gradient(145deg, #fffdf8, #f4f8f2);
  animation: leela-journey-guide-reveal 420ms cubic-bezier(.18, .78, .22, 1) both;
}

.leela-journey__block--guide::after {
  content: "“";
  position: absolute;
  right: 18px;
  top: -24px;
  color: rgba(196, 122, 63, .1);
  font-family: var(--font-serif);
  font-size: 8rem;
  line-height: 1;
  pointer-events: none;
}

.leela-journey__response-quote {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 14px 16px;
  border-left: 2px solid rgba(32, 92, 78, .42);
  border-radius: 3px var(--leela-card-radius-callout) var(--leela-card-radius-callout) 3px;
  background: rgba(32, 92, 78, .055);
}

.leela-journey__response-quote .leela-journey__text {
  color: var(--text-secondary);
  font-size: .84rem;
  font-style: italic;
}

.leela-journey__block--guide .leela-journey__answer {
  position: relative;
  z-index: 1;
}

@keyframes leela-journey-guide-reveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.leela-journey__counter {
  color: var(--text-muted);
  font-size: var(--leela-card-meta);
}

.leela-journey__textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  line-height: 1.6;
}

.leela-journey__textarea:focus {
  border-color: var(--gold);
  outline: 3px solid rgba(216, 149, 67, .16);
}

.leela-journey__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.leela-journey__actions .btn {
  flex: 1 1 220px;
}

.leela-rule-event {
  box-sizing: border-box;
  width: min(620px, calc(100vw - 32px));
  max-width: 620px;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--leela-card-radius-section);
  overflow: hidden;
  background: transparent;
  color: var(--text);
}

.leela-rule-event::backdrop {
  background: rgba(20, 31, 27, .62);
}

.leela-rule-event__panel {
  box-sizing: border-box;
  display: grid;
  gap: 14px;
  padding: var(--leela-card-pad-section);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-section);
  background:
    radial-gradient(circle at 100% 0, rgba(216, 149, 67, .15), transparent 34%),
    linear-gradient(150deg, #fffdf9 0%, #f8f4ed 100%);
  box-shadow: 0 28px 80px rgba(20, 31, 27, .3);
}

.leela-rule-event__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.leela-rule-event__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.leela-rule-event__head h2 {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.15;
}

.leela-rule-event__outcome {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(196, 122, 63, .24);
  border-radius: var(--leela-card-radius-callout);
  background: rgba(216, 149, 67, .1);
  color: var(--primary);
  font-size: .92rem;
  font-weight: 650;
  line-height: 1.55;
}

.leela-rule-event__outcome[hidden] {
  display: none;
}

.leela-rule-event__text {
  color: var(--text-secondary);
  font-size: .92rem;
  line-height: 1.7;
}

.leela-rule-event__link {
  justify-self: start;
  color: var(--accent-dark);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(196, 122, 63, .4);
  text-underline-offset: 4px;
}

.leela-rule-event__link:hover,
.leela-rule-event__link:focus-visible {
  color: var(--primary);
}

.leela-rule-event__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.leela-rules-dialog {
  box-sizing: border-box;
  width: min(980px, calc(100vw - 32px));
  max-width: 980px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--leela-card-radius-section);
  overflow: hidden;
  background: transparent;
  color: var(--text);
}

.leela-rules-dialog::backdrop {
  background: rgba(20, 31, 27, .68);
}

.leela-rules-dialog__panel {
  box-sizing: border-box;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: var(--leela-card-pad-section);
  border: 1px solid var(--leela-card-border);
  border-radius: var(--leela-card-radius-section);
  background:
    radial-gradient(circle at 100% 0, rgba(216, 149, 67, .14), transparent 32%),
    linear-gradient(150deg, #fffdf9 0%, #f6f0e7 100%);
  box-shadow: 0 30px 90px rgba(20, 31, 27, .34);
}

.leela-rules-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.leela-rules-dialog__head h2 {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
}

.leela-rules-dialog__lead {
  max-width: 64ch;
  margin: 10px 0 20px;
  color: var(--text-secondary);
  font-size: .88rem;
  line-height: 1.65;
}

.leela-rules-dialog__list {
  margin-top: 0;
}

.leela-rules-dialog__list .leela-rule {
  scroll-margin: 26px;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}

.leela-history-item__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 720px) {
  .leela-journey {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .leela-journey__panel {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 18px var(--leela-card-pad-card) calc(22px + env(safe-area-inset-bottom));
    border-radius: var(--leela-card-radius-card);
  }

  .leela-rule-event {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .leela-rule-event__panel {
    max-height: calc(100dvh - 16px);
    overflow-y: auto;
    padding: 18px var(--leela-card-pad-card);
    border-radius: var(--leela-card-radius-card);
  }

  .leela-rules-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .leela-rules-dialog__panel {
    max-height: calc(100dvh - 16px);
    padding: 18px var(--leela-card-pad-card) calc(22px + env(safe-area-inset-bottom));
    border-radius: var(--leela-card-radius-card);
  }

  .leela-rules-dialog__list {
    grid-template-columns: 1fr;
  }

  .leela-board-cell__title {
    display: none;
  }

  .leela-journey__reading-layout {
    grid-template-columns: 1fr;
  }

  .leela-journey__composer {
    position: static;
  }

  .leela-journey__detail-grid {
    grid-template-columns: 1fr;
  }

  .leela-journey__cell-number {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    font-size: 1.5rem;
  }

  .leela-journey__block {
    padding: var(--leela-card-pad-card);
  }

  .leela-journey__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .leela-journey__actions .btn {
    flex-basis: auto;
    width: 100%;
  }

  .leela-history-item {
    grid-template-columns: 1fr auto;
  }

  .leela-history-item__status {
    grid-column: 1;
    grid-row: 2;
  }

  .leela-history-item__actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leela-journey__spinner {
    animation: none;
  }

  .leela-journey.is-opening .leela-journey__panel,
  .leela-journey.is-open .leela-journey__panel {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .leela-journey.is-opening::backdrop,
  .leela-journey.is-open::backdrop {
    opacity: 1;
    transition: none;
  }

  .leela-board-cell.is-journey-origin {
    animation: none;
  }

  .leela-board-cell.is-journey-origin::before,
  .leela-journey__block--guide {
    animation: none;
  }
}

#hp-cb {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000;
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: #22302B;
  color: #fff;
  font-family: Inter, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 -8px 28px rgba(20, 31, 27, .22);
}

#hp-cb .in {
  display: flex;
  max-width: 980px;
  margin: 0 auto;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

#hp-cb .tx {
  flex: 1 1 520px;
  min-width: 0;
  color: #d9e4de;
}

#hp-cb .tt {
  margin-bottom: 3px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

#hp-cb .tx a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#hp-cb .yes,
#hp-cb .no {
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 9999px;
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

#hp-cb .yes {
  border: 0;
  background: #A9622F;
}

#hp-cb .no {
  border: 1px solid rgba(255, 255, 255, .55);
  background: transparent;
}

#hp-cb .no:hover {
  border-color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .12);
}

@media (max-width: 560px) {
  #hp-cb {
    padding: 14px;
  }

  #hp-cb .in {
    align-items: stretch;
    gap: 10px;
  }

  #hp-cb .yes,
  #hp-cb .no {
    flex: 1 1 0;
  }
}
