@font-face {
  font-family: Pixel;
  src: url("assets/pixel.ttf");
}
* {
  box-sizing: border-box;
}
html {
  background: #0d100f;
  color: #d6d8cc;
}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  background: radial-gradient(ellipse at 50% 38%, #1b211a55, transparent 65%);
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid #e5ca87;
  outline-offset: 5px;
}
button:disabled {
  cursor: default;
}
.topbar {
  height: 85px;
  max-width: 1460px;
  padding: 0 50px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff0c;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #ece4cd;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 2px;
}
.brand > span:not(.brand-rune) {
  font-size: 13px;
  font-family: Arial;
  font-weight: 400;
  color: #a2a599;
  letter-spacing: 3px;
}
.brand-rune {
  font-size: 38px;
  color: #c6ab70;
  margin-right: 6px;
}
.brand sup {
  font-size: 12px;
  background: #bbad7713;
  border: 1px solid #bbad7733;
  color: #b8a574;
  padding: 5px 6px;
  font-family: Arial;
  letter-spacing: 1px;
  margin-left: 7px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 28px;
}
.version {
  font: 12px monospace;
  letter-spacing: 1.7px;
  color: #6e776f;
}
.icon-button {
  border: 1px solid #343a31;
  background: transparent;
  padding: 9px 12px;
  color: #a8afa1;
  font-size: 16px;
}
.icon-button span {
  font-size: 12px;
  margin-left: 7px;
}
main {
  max-width: 1340px;
  margin: auto;
  padding: 0 36px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 49px 0 34px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 2.3px;
  color: #969c87;
  font-weight: 600;
  margin: 0 0 17px;
}
.eyebrow > span {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #a9bd83;
  margin-right: 7px;
  box-shadow: 0 0 9px #a9bd8355;
}
h1 {
  font-family: Georgia, serif;
  font-size: clamp(30px, 3.5vw, 48px);
  letter-spacing: -1.8px;
  font-weight: 400;
  color: #eae7d9;
  margin: 0 0 14px;
}
h1 em {
  font-weight: 400;
  color: #c4ab74;
}
.subtitle {
  color: #92988d;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}
.experiment-mark {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #656e5b;
}
.experiment-mark > span {
  font-family: Georgia;
  font-size: 46px;
  color: #827b57;
}
.experiment-mark p {
  font-size: 12px;
  letter-spacing: 2px;
  line-height: 1.8;
}
.chambers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.chamber {
  --accent: #b494cd;
  --rgb: 180, 148, 205;
  background: #121713;
  border: 1px solid #343b31;
  position: relative;
}
.orbs {
  --accent: #8bb5cb;
  --rgb: 139, 181, 203;
}
.bosses {
  --accent: #d69a70;
  --rgb: 214, 154, 112;
}
.chamber:before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 38px;
  height: 2px;
  background: var(--accent);
  z-index: 2;
}
.chamber-head {
  padding: 21px 22px 18px;
  background: linear-gradient(100deg, rgba(var(--rgb), 0.055), transparent);
}
.category {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: bold;
}
.live-dot {
  float: right;
  font: 12px monospace;
  color: #7e8979;
  letter-spacing: 1px;
}
.live-dot:before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background: currentColor;
  margin-right: 6px;
  border-radius: 50%;
}
.running .live-dot {
  color: var(--accent);
}
h2 {
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  color: #e0dfd0;
  margin: 13px 0 6px;
}
.chamber-head p {
  font-size: 12px;
  color: #858e81;
  margin: 0;
}
.scene {
  position: relative;
  overflow: hidden;
  background: #0b0d0e;
  border-top: 1px solid #ffffff08;
  border-bottom: 1px solid #ffffff08;
  aspect-ratio: 300/296;
}
.scene:after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    transparent 0px,
    transparent 3px,
    #00000015 3px,
    #00000015 4px
  );
  box-shadow: inset 0 0 50px #00000055;
}
.scene canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
}

.result-row {
  padding: 18px 21px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 87px;
  gap: 6px;
}
.result-label {
  font-size: 12px;
  letter-spacing: 1.4px;
  color: #a8af9f;
}
.event-label {
  font-size: 12px;
  color: #707c6c;
  margin: 8px 0 0;
  line-height: 1.4;
  min-height: 13px;
}
.number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}
.number strong {
  font-family: Pixel, monospace;
  font-size: 34px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}
.number > span {
  color: #53604f;
  font-size: 12px;
}
.ticks {
  display: flex;
  gap: 4px;
  margin: 0 21px 18px;
}
.ticks i {
  height: 3px;
  background: #2a3228;
  flex: 1;
  transition: background 0.2s;
}
.ticks i.active {
  background: var(--accent);
  box-shadow: 0 0 7px rgba(var(--rgb), 0.25);
}
.controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 29px 0 27px;
  gap: 20px;
}
.probability {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #a7ad9b;
  font-size: 12px;
}
.small-rune {
  font-size: 30px;
  color: #857d5e;
}
.probability small {
  display: block;
  font-size: 12px;
  margin-top: 7px;
  color: #5f6d5c;
}
.roll-wrap {
  text-align: center;
}
#roll {
  color: #1d2118;
  background: #c4ae7a;
  border: 1px solid #e7d098;
  box-shadow:
    inset 0 0 0 3px #c4ae7a,
    inset 0 0 0 4px #72674766,
    0 5px 30px #c4ae7a0a;
  min-width: 290px;
  padding: 18px 23px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1.8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  transition:
    background 0.2s,
    transform 0.2s;
}
#roll:hover:not(:disabled) {
  background: #ddc68e;
  transform: translateY(-2px);
}
#roll:disabled {
  opacity: 0.6;
}
#roll span {
  font-size: 16px;
}
#roll-hint {
  color: #66725f;
  font-size: 12px;
  margin: 10px 0 0;
  letter-spacing: 0.3px;
}
.playback {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.playback button {
  border: 0;
  background: none;
  color: #9da78f;
  font-size: 12px;
  padding: 9px 0;
}
.playback button span {
  color: #5f6c58;
  margin-left: 5px;
}
#skip {
  color: #b3b79f;
}
#skip:disabled {
  color: #3e4939;
}
.journal {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 91px;
  border-top: 1px solid #2c3328;
  border-bottom: 1px solid #2c3328;
  padding: 19px 0;
}
.journal-title {
  min-width: 185px;
}
.journal-title .eyebrow {
  font-size: 12px;
  letter-spacing: 1.8px;
  color: #717f65;
}
.journal h3 {
  font-family: Georgia;
  font-size: 16px;
  font-weight: 400;
  color: #b0b7a4;
  margin: 8px 0 0;
}
.history {
  display: flex;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}
.empty {
  font-size: 12px;
  color: #56634f;
}
.history-entry {
  padding: 9px 12px;
  background: #151b14;
  border: 1px solid #30382a;
  font: 12px monospace;
  display: flex;
  align-items: center;
  gap: 11px;
}
.history-entry small {
  font: 12px Arial;
  color: #64705b;
  margin-right: 2px;
}
.history-entry span:nth-of-type(1) {
  color: #b494cd;
}
.history-entry span:nth-of-type(2) {
  color: #8bb5cb;
}
.history-entry span:nth-of-type(3) {
  color: #d69a70;
}
.text-button {
  color: #6e7c61;
  background: none;
  border: 0;
  font-size: 12px;
  padding: 8px;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 25px;
  padding: 25px 0 30px;
  color: #4c5946;
  font-size: 12px;
  letter-spacing: 1px;
}
.footer-cross {
  margin: 0 9px;
  color: #898262;
}
footer details {
  font-size: 12px;
  letter-spacing: 0;
  max-width: 350px;
  color: #87917a;
}
summary {
  cursor: pointer;
}
details p {
  line-height: 1.8;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (min-width: 1500px) {
  main {
    padding-top: 25px;
  }
  .scene {
    aspect-ratio: 300/320;
  }
}
@media (max-width: 1000px) {
  .topbar {
    padding: 0 25px;
  }
  .version {
    display: none;
  }
  main {
    padding: 0 23px;
  }
  .chambers {
    gap: 10px;
  }
  .chamber-head {
    padding: 18px 14px;
  }
  .result-row {
    padding: 15px 12px;
  }
  .event-label {
    font-size: 12px;
  }
  .ticks {
    margin-left: 12px;
    margin-right: 12px;
  }
  .probability {
    font-size: 12px;
  }
  .probability small {
    font-size: 12px;
  }
  .number strong {
    font-size: 29px;
  }
  .category {
    font-size: 12px;
  }
  .journal {
    gap: 18px;
  }
  .history-entry {
    gap: 8px;
    padding: 9px;
  }
  .journal-title {
    min-width: 150px;
  }
  .playback {
    gap: 10px;
  }
}
@media (max-width: 700px) {
  .topbar {
    height: 65px;
    padding: 0 17px;
  }
  .brand {
    font-size: 17px;
    gap: 6px;
  }
  .brand > span:not(.brand-rune) {
    font-size: 12px;
    letter-spacing: 2px;
  }
  .brand sup {
    display: none;
  }
  .brand-rune {
    font-size: 29px;
  }
  .icon-button {
    padding: 7px;
  }
  .icon-button span {
    font-size: 12px;
  }
  main {
    padding: 0 16px;
  }
  .intro {
    padding: 32px 0 25px;
  }
  .intro .eyebrow {
    font-size: 12px;
    letter-spacing: 1.5px;
  }
  h1 {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .subtitle {
    font-size: 12px;
    max-width: 290px;
  }
  .experiment-mark {
    display: none;
  }
  .chambers {
    gap: 6px;
  }
  .chamber-head {
    padding: 12px 8px;
  }
  .category {
    font-size: 12px;
    letter-spacing: 0.5px;
  }
  .live-dot {
    display: none;
  }
  h2 {
    font-size: 19px;
    margin: 9px 0 0;
  }
  .chamber-head p {
    display: none;
  }
  .scene {
    aspect-ratio: 300/560;
  }
  .scene canvas {
    object-fit: cover;
  }

  .result-row {
    padding: 12px 8px;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 9px;
    min-height: 91px;
  }
  .number strong {
    font-size: 31px;
  }
  .result-label {
    font-size: 12px;
    letter-spacing: 0.5px;
  }
  .event-label {
    display: none;
  }
  .ticks {
    margin: 0 8px 12px;
    gap: 2px;
  }
  .ticks i {
    height: 2px;
  }
  .controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 18px;
    padding: 23px 0;
  }
  .roll-wrap {
    order: -1;
    flex-basis: 100%;
  }
  #roll {
    width: 100%;
    justify-content: center;
    padding: 18px;
  }
  .probability {
    font-size: 12px;
  }
  .probability small {
    font-size: 12px;
  }
  .journal {
    flex-wrap: wrap;
    gap: 15px;
    padding: 19px 0;
  }
  .journal-title {
    width: 100%;
  }
  .history {
    gap: 6px;
  }
  .history-entry {
    font-size: 12px;
    padding: 8px;
    gap: 7px;
  }
  .history-entry small {
    display: none;
  }
  footer {
    flex-wrap: wrap;
    gap: 18px;
    font-size: 12px;
  }
  footer details {
    order: 2;
    flex-basis: 100%;
  }
  .text-button {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 13px;
  min-height: 30px;
}
#fullscreen {
  background: #161c15;
  color: #bfc3ad;
  border: 1px solid #394132;
  padding: 9px 12px;
  font-size: 16px;
  display: flex;
  gap: 9px;
  align-items: center;
}
#fullscreen span {
  font-size: 12px;
}
#fullscreen:hover {
  border-color: #c4ae7a;
  color: #e7d098;
}
.chamber {
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    opacity 0.25s;
}
.chamber.is-active {
  border-color: #e4bc61;
  box-shadow:
    0 0 0 1px #e4bc61,
    inset 0 0 0 1px #e4bc6122,
    0 0 30px #d7b25e19;
}
.chamber.is-active:before {
  background: #f8d680;
  width: 100%;
}
.chamber.is-active .live-dot {
  color: #e7c77e;
}
.chamber.is-active .live-dot:before {
  box-shadow: 0 0 7px #e7c77e;
}
.chamber.is-active .chamber-head {
  background: linear-gradient(110deg, #b9983c18, transparent);
}
.chamber.is-waiting .number strong {
  color: #54604f;
}
.running .chamber.is-waiting .scene:before {
  content: "WAITING";
  position: absolute;
  top: 13px;
  right: 13px;
  color: #c0c3b3;
  font: 12px monospace;
  letter-spacing: 1.4px;
  padding: 6px 8px;
  background: #0b0f10bb;
  z-index: 3;
}
.chamber.is-done .live-dot {
  color: #a0b08c;
}
.asset-credit {
  margin: 0 0 22px;
  color: #53604a;
  font-size: 12px;
  line-height: 1.7;
}
.asset-credit a {
  color: #78866a;
}
#stage:fullscreen,
#stage.expanded {
  width: 100%;
  height: 100dvh;
  max-width: none;
  background: #0d100f;
  padding: 20px 26px;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
#stage.expanded {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
body.has-expanded {
  overflow: hidden;
}
#stage:fullscreen .stage-bar,
#stage.expanded .stage-bar {
  flex-shrink: 0;
  margin-bottom: 16px;
}
#stage:fullscreen .chambers,
#stage.expanded .chambers {
  flex: 1;
  min-height: 230px;
  gap: 22px;
}
#stage:fullscreen .chamber,
#stage.expanded .chamber {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#stage:fullscreen .scene,
#stage.expanded .scene {
  flex: 1;
  min-height: 80px;
  aspect-ratio: auto;
}
#stage:fullscreen canvas,
#stage.expanded canvas {
  object-fit: contain;
  background: #080c0d;
}
#stage:fullscreen .chamber-head,
#stage.expanded .chamber-head {
  flex-shrink: 0;
}
#stage:fullscreen .result-row,
#stage.expanded .result-row {
  flex-shrink: 0;
}
#stage:fullscreen .controls,
#stage.expanded .controls {
  flex-shrink: 0;
  padding: 18px 0 0;
}
#stage:fullscreen #roll-hint,
#stage.expanded #roll-hint {
  margin-bottom: 0;
}
@media (max-width: 700px) {
  #fullscreen {
    padding: 7px 9px;
  }
  #stage:fullscreen,
  #stage.expanded {
    padding: 12px 10px;
  }
  #stage:fullscreen .chambers,
  #stage.expanded .chambers {
    gap: 7px;
  }
  #stage:fullscreen .controls,
  #stage.expanded .controls {
    gap: 10px;
  }
  #stage:fullscreen .chamber-head,
  #stage.expanded .chamber-head {
    padding: 11px 7px;
  }
  #stage:fullscreen .number,
  #stage.expanded .number {
    gap: 4px;
  }
  .running .chamber.is-waiting .scene:before {
    right: 6px;
    top: 8px;
    padding: 4px;
    font-size: 12px;
  }
  .chamber.is-active .live-dot {
    display: block;
    float: none;
    margin-top: 8px;
    font-size: 12px;
  }
  .chamber.is-active h2 {
    margin-top: 6px;
  }
}
.result-ledger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
  margin-top: 14px;
}
.result-ledger > details {
  border: 1px solid #30392c;
  background: #121810;
  padding: 11px 14px;
  color: #a4af97;
  font-size: 12px;
  min-width: 0;
}
.result-ledger summary {
  letter-spacing: 0.4px;
  list-style-position: inside;
}
.result-ledger summary span {
  float: right;
  color: #d3b87c;
  font: 12px monospace;
}
.result-ledger ol,
.result-ledger ul {
  padding-left: 20px;
  max-height: 160px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.9;
  margin-bottom: 10px;
}
.result-ledger a {
  color: #b9bc9c;
  text-underline-offset: 3px;
}
.result-ledger > details > a {
  font-size: 12px;
  color: #748765;
}
.pool-note {
  font-size: 12px;
  line-height: 1.6;
  color: #65765a;
  margin: 8px 0 0;
}
.boss-reference {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.boss-reference:hover {
  text-decoration: underline;
  color: #dfc184;
}
.boss-reference img {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
  object-fit: contain;
}
.boss-reference small {
  color: #7d8a70;
  font-size: 12px;
}
.history-entry {
  display: block;
  padding: 0;
  position: relative;
}
.history-entry > summary {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  align-items: center;
  list-style: none;
  cursor: pointer;
}
.history-entry > summary:after {
  content: "⌄";
  color: #76816a;
  margin-left: 4px;
}
.history-entry[open] {
  flex-basis: 100%;
  background: #12190f;
}
.history-entry[open] > summary {
  border-bottom: 1px solid #293323;
}
.history-entry .history-body {
  font: 12px Arial;
  padding: 12px 15px;
  line-height: 1.8;
}
.history-body ul {
  padding-left: 18px;
  margin: 7px 0 12px;
}
.history-body a {
  color: #b5bea2;
}
.history-body p {
  color: #78886b;
  margin: 0;
}
.history-entry summary > span:nth-of-type(1) {
  color: #b494cd;
}
.history-entry summary > span:nth-of-type(2) {
  color: #8bb5cb;
}
.history-entry summary > span:nth-of-type(3) {
  color: #d69a70;
}
#stage:fullscreen .result-ledger,
#stage.expanded .result-ledger {
  flex-shrink: 0;
  margin-top: 12px;
}
#stage:fullscreen .result-ledger ol,
#stage:fullscreen .result-ledger ul,
#stage.expanded .result-ledger ol,
#stage.expanded .result-ledger ul {
  max-height: 110px;
}
@media (max-width: 700px) {
  .result-ledger {
    gap: 7px;
    margin-top: 10px;
  }
  .result-ledger > details {
    padding: 9px 8px;
    font-size: 12px;
  }
  .boss-reference {
    display: block;
  }
  .boss-reference img {
    vertical-align: middle;
    margin-right: 5px;
  }
  .boss-reference small {
    display: block;
    font-size: 12px;
  }
  .result-ledger ol,
  .result-ledger ul {
    font-size: 12px;
    padding-left: 15px;
  }
  .history-entry > summary {
    padding: 8px;
    gap: 7px;
  }
  .history-entry small {
    display: none;
  }
}
.scene-result {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  pointer-events: none;
  background: radial-gradient(ellipse at center, #09100dde 0, #09100d99 25%, transparent 65%);
  animation: seal-appear 0.45s ease-out;
}
.scene-result[hidden] {
  display: none;
}
.result-seal {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid #b4a779;
  border-radius: 50%;
  outline: 1px solid #b4a77944;
  outline-offset: 6px;
  color: #e1cea0;
  background: #101710d9;
  font:
    48px Pixel,
    monospace;
  box-shadow: 0 0 28px #bbad5d12;
}
.result-caption {
  color: #e5d7b3;
  font:
    600 12px Arial,
    sans-serif;
  letter-spacing: 2px;
  text-shadow: 0 1px 5px #000;
}
.bosses .result-caption {
  font-size: 12px;
  letter-spacing: 1.5px;
}
@keyframes seal-appear {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (max-width: 700px) {
  .result-seal {
    width: 55px;
    height: 55px;
    font-size: 34px;
    outline-offset: 4px;
  }
  .result-caption,
  .bosses .result-caption {
    font-size: 12px;
    letter-spacing: 1px;
  }
  .scene-result {
    gap: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scene-result {
    animation: none;
  }
}

.result-ledger {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.orb-reference {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 5px 0 10px;
  line-height: 1.5;
}
.orb-reference > div {
  min-width: 0;
}
.orb-reference small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  color: #7d8a70;
}
.orb-reference small a {
  color: #8d9c88;
}
.orb-thumbnail {
  display: block;
  position: relative;
  width: 24px;
  height: 30px;
  overflow: hidden;
  flex-shrink: 0;
}
.orb-thumbnail .orb-icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 168px;
  height: 30px;
  max-width: none;
  image-rendering: pixelated;
}
.history-body .orb-reference {
  font: 12px Arial;
  line-height: 1.5;
}
@media (max-width: 700px) {
  .result-ledger {
    grid-template-columns: 1fr;
  }
  .orb-reference small {
    font-size: 12px;
  }
}

.result-seal {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.result-value {
  display: block;
  line-height: 1;
  transform: translate(0.03125em, 0.125em);
}

.stage-bar {
  flex-wrap: wrap;
  gap: 10px;
}
.stage-actions,
.audio-controls,
.volume-control {
  display: flex;
  align-items: center;
}
.stage-actions {
  gap: 16px;
}
.audio-controls {
  gap: 12px;
}
.audio-controls #sound {
  min-width: 100px;
  white-space: nowrap;
}
.volume-control {
  gap: 8px;
  color: #9ba68e;
  font-size: 12px;
}
.volume-control input {
  width: 105px;
  min-width: 55px;
  height: 24px;
  cursor: pointer;
  accent-color: #c4ae7a;
}
.volume-control input:focus-visible {
  outline: 2px solid #e5ca87;
  outline-offset: 3px;
}
.volume-control output {
  min-width: 32px;
  color: #c4ae7a;
  font: 12px monospace;
  font-variant-numeric: tabular-nums;
}
#stage:fullscreen .stage-bar,
#stage.expanded .stage-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #0d100f;
  padding: 6px 0 10px;
}
@media (max-width: 900px) {
  .stage-actions {
    gap: 10px;
  }
}
@media (max-width: 700px) {
  .stage-actions {
    width: 100%;
    justify-content: space-between;
  }
  .audio-controls {
    gap: 8px;
  }
  .audio-controls #sound {
    min-width: 85px;
    font-size: 14px;
  }
  .volume-control {
    gap: 5px;
  }
  .volume-control input {
    width: 85px;
  }
  .volume-control > span {
    display: none;
  }
  .volume-control output {
    font-size: 12px;
    min-width: 29px;
  }
  #fullscreen {
    white-space: nowrap;
  }
}

.audio-mixer {
  position: relative;
  color: #a8afa1;
  font-size: 12px;
}
.audio-mixer > summary {
  padding: 10px 7px;
  white-space: nowrap;
}
.audio-mixer[open] > summary {
  color: #e5ca87;
}
.mixer-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 40;
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #151c14;
  border: 1px solid #55543a;
  box-shadow: 0 8px 30px #0009;
  min-width: 240px;
}
.mixer-panel .volume-control {
  display: grid;
  grid-template-columns: 36px 1fr 32px;
  gap: 10px;
}
.mixer-panel .volume-control > span {
  display: block;
}
.mixer-panel input {
  width: 130px;
}
.mixer-panel output {
  text-align: right;
}
@media (max-width: 420px) {
  .audio-controls {
    gap: 5px;
  }
  .volume-control input {
    width: 65px;
  }
  .audio-controls #sound {
    min-width: 75px;
  }
  .stage-actions {
    gap: 5px;
  }
  .audio-mixer > summary {
    padding: 9px 3px;
  }
  #fullscreen {
    gap: 5px;
    padding: 7px;
  }
  #fullscreen span {
    font-size: 12px;
  }
}

#stage {
  margin-top: 24px;
}
.stage-bar {
  justify-content: flex-end;
}
#stage:fullscreen,
#stage.expanded {
  margin-top: 0;
}

.orb-reference .orb-location {
  display: block;
  color: #d2d8c4;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.orb-reference .orb-spell {
  margin-top: 5px;
  color: #7d8a70;
}
.orb-reference .orb-spell a {
  font-weight: 400;
  color: #8d9c88;
}

.map-credit {
  margin: 0 0 10px;
  color: #78866a;
  font-size: 12px;
  line-height: 1.7;
}
.map-credit a {
  color: #acb894;
  text-underline-offset: 3px;
}

@font-face {
  font-family: NoitaClassic;
  src: url("assets/classic/noita-blackletter.otf") format("opentype");
  font-display: swap;
}
.mode-switch {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid #454333;
  background: #0b100d;
  flex-shrink: 0;
}
.mode-switch button {
  border: 1px solid transparent;
  background: transparent;
  color: #8e9689;
  padding: 9px 13px;
  font-size: 12px;
}
.mode-switch button[aria-pressed="true"] {
  border-color: #a08a50;
  background: #bc9b4819;
  color: #e6cb8e;
}
.mode-switch button:disabled {
  opacity: 0.65;
}
.stage-bar {
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.classic-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  font-family: NoitaClassic, Georgia, serif;
  font-size: clamp(90px, 10vw, 150px);
  line-height: 1;
  color: #e3b135;
  text-shadow: 2px 3px 0 #000;
  pointer-events: none;
  font-variant-numeric: normal;
}
.classic-number[hidden] {
  display: none;
}
.classic-mode .chamber {
  --accent: #e3b135;
  --rgb: 227, 177, 53;
  background: #050505;
  border-color: #6c582c;
}
.classic-mode .chamber-head {
  background: #080907;
  text-align: center;
  padding: 18px 8px 15px;
}
.classic-mode .chamber-head h2 {
  font-family: NoitaClassic, Georgia, serif;
  color: #e3b135;
  font-size: clamp(22px, 3vw, 38px);
  margin: 0 0 8px;
}
.classic-mode .chamber-head .category,
.classic-mode .chamber-head .live-dot {
  display: none;
}
.classic-mode .chamber-head p {
  color: #a58d52;
  font-size: 12px;
}
.classic-mode .scene {
  aspect-ratio: 300/340;
  background: #000;
}
.classic-mode .scene:after {
  box-shadow: none;
  background: repeating-linear-gradient(
    transparent 0px,
    transparent 3px,
    #0000000d 3px,
    #0000000d 4px
  );
}
.classic-mode .result-row,
.classic-mode .ticks,
.classic-mode .result-ledger,
.classic-mode .playback {
  display: none;
}
.classic-mode #roll {
  font-family: NoitaClassic, Georgia, serif;
  font-size: 38px;
  color: #e3b135;
  background: #171b12;
  border: 2px solid #9c8547;
  letter-spacing: 0;
  padding: 10px 70px;
  min-width: 230px;
  box-shadow: inset 0 0 0 3px #050705;
}
.classic-mode #roll:hover {
  background: #282d1a;
}
.classic-mode .controls {
  grid-template-columns: 1fr auto 1fr;
}
.classic-mode .roll-wrap {
  grid-column: 2;
}
.classic-mode .probability {
  font-size: 12px;
}
.classic-mode .chambers {
  gap: 12px;
}
.classic-mode .chamber.is-active {
  box-shadow:
    0 0 0 1px #e3b135,
    0 0 18px #b08a2820;
}
@media (max-width: 700px) {
  .mode-switch {
    width: 100%;
  }
  .mode-switch button {
    flex: 1;
  }
  .classic-mode .chambers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  .classic-mode .chamber-head h2 {
    font-size: 18px;
  }
  .classic-mode .chamber-head p {
    display: none;
  }
  .classic-number {
    font-size: clamp(44px, 14vw, 90px);
  }
  .classic-mode .probability {
    display: none;
  }
  .classic-mode .controls {
    display: flex;
    justify-content: center;
  }
  .classic-mode #roll {
    min-width: 200px;
  }
}
.classic-mode .chamber-head {
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.classic-mode .chamber-head h2 {
  font-size: clamp(20px, 2.3vw, 29px);
}
@media (max-width: 700px) {
  .classic-mode .chamber-head {
    min-height: 76px;
  }
  .classic-mode .chamber-head h2 {
    font-size: clamp(14px, 3vw, 20px);
    margin: 0;
  }
}
.classic-mode #roll {
  justify-content: center;
  text-align: center;
  line-height: 1;
  min-height: 64px;
  padding: 10px 24px;
  gap: 0;
  margin-inline: auto;
  font-weight: 400;
}
.classic-mode .chamber-head p {
  display: none;
}
.classic-mode .chamber-head h2 {
  margin-bottom: 0;
}
.audio-controls #music-play {
  min-width: 112px;
  white-space: nowrap;
}
.audio-controls {
  flex-wrap: wrap;
}
.stage-actions {
  flex-wrap: wrap;
}
.chamber-head p[hidden] {
  display: none;
}
@media (max-width: 700px) {
  .audio-controls #music-play {
    min-width: 95px;
  }
  .audio-controls {
    flex: 1;
  }
  .stage-actions #fullscreen {
    margin-left: auto;
  }
}

.custom-settings {
  border: 1px solid #5d5837;
  background: linear-gradient(110deg, #b9983c0c, #131a14);
  padding: 22px;
  margin: 0 0 18px;
}
.custom-settings[hidden],
#custom-form[hidden],
#custom-summary[hidden] {
  display: none;
}
.custom-intro h3 {
  font:
    24px Georgia,
    serif;
  color: #e2cf9f;
  margin: 0 0 9px;
}
.custom-intro p {
  font-size: 12px;
  color: #9ba58f;
  line-height: 1.6;
  margin: 0 0 20px;
}
.custom-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.custom-inputs label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #d6d8cc;
  font-size: 12px;
}
.custom-inputs label > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.custom-inputs label > span small {
  font-size: 12px;
  color: #ac9c6d;
}
.custom-inputs input {
  width: 100%;
  font:
    24px Pixel,
    monospace;
  background: #0d120d;
  color: #e4ca8c;
  border: 1px solid #626343;
  padding: 12px 14px;
  accent-color: #c4ae7a;
}
.custom-inputs input:focus-visible {
  outline: 2px solid #e4ca8c;
  outline-offset: 2px;
}
.custom-inputs label > small {
  font-size: 12px;
  line-height: 1.7;
  color: #929c85;
}
.custom-inputs strong {
  color: #c9b982;
  font-weight: 500;
}
.custom-world-note {
  font-size: 12px;
  line-height: 1.8;
  color: #959e87;
  margin: 17px 0 0;
}
.custom-world-note a {
  color: #c4ae7a;
}
.custom-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.custom-submit p {
  color: #f0ad94;
  font-size: 12px;
  margin: 0;
}
.custom-settings button {
  background: #c4ae7a;
  color: #1d2118;
  border: 1px solid #e1cc94;
  padding: 12px 18px;
  font-size: 12px;
}
.custom-settings button:disabled {
  opacity: 0.5;
}
.custom-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.custom-summary .eyebrow {
  font-size: 12px;
  color: #b7a06a;
}
.custom-summary p {
  margin: 8px 0;
  color: #e2cf9f;
  font: 15px monospace;
}
.custom-summary small {
  font-size: 12px;
  color: #99a089;
  line-height: 1.7;
}
.custom-summary button {
  flex-shrink: 0;
  background: transparent;
  color: #c4ae7a;
}
.orb-world {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  background: #10150de6;
  border: 1px solid #8c89575c;
  padding: 7px 9px;
  color: #e3d39c;
  font: 12px monospace;
  pointer-events: none;
}
.orb-world[hidden],
.classic-mode .orb-world {
  display: none;
}
.mode-switch {
  flex-wrap: wrap;
}
.custom-mode .chamber-head p {
  min-height: 2.6em;
  line-height: 1.3;
}
@media (max-width: 700px) {
  .custom-settings {
    padding: 16px;
  }
  .custom-inputs {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .custom-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .custom-summary p {
    font-size: 12px;
  }
  .custom-submit {
    align-items: flex-start;
    flex-direction: column;
  }
  .custom-submit button {
    width: 100%;
  }
  .mode-switch button {
    padding: 9px 8px;
    font-size: 12px;
  }
  .orb-world {
    font-size: 12px;
    left: 6px;
    top: 6px;
    padding: 5px;
  }
}

.gods-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 22px;
  margin-bottom: 22px;
  align-items: start;
}
.gods-panel[hidden] {
  display: none;
}
.gods-mode .chambers,
.gods-mode .result-ledger,
.gods-mode .controls,
.gods-mode .journal {
  display: none;
}
.gods-oracle {
  border: 1px solid #695c39;
  background: #101410;
  text-align: center;
  overflow: hidden;
  padding-bottom: 24px;
}
.gods-heading {
  padding: 25px 20px 8px;
}
.gods-heading .eyebrow {
  color: #9b8d63;
  font-size: 12px;
  letter-spacing: 2px;
}
.gods-heading h2 {
  font:
    40px NoitaClassic,
    Georgia,
    serif;
  color: #e1c07d;
  margin: 12px 0 8px;
}
.gods-heading p {
  font-size: 12px;
  color: #969e8b;
  line-height: 1.7;
  margin: 0;
}
.gods-oracle canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.gods-banner {
  margin: 0 20px 22px;
  border: solid transparent;
  border-width: 16px 24px;
  border-image: url("assets/gods-message.png") 8 12 fill / 16px 24px / 0 stretch;
  image-rendering: pixelated;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow-wrap: anywhere;
}
.gods-banner-label {
  font:
    12px Arial,
    sans-serif;
  letter-spacing: 2px;
  color: #f0d39a;
  opacity: 0;
}
.gods-banner p {
  font:
    clamp(23px, 2.7vw, 34px)/1.3 NoitaClassic,
    Georgia,
    serif;
  color: #fff0c3;
  text-shadow: 1px 2px #421c06;
  margin: 0;
  white-space: pre-wrap;
  max-width: 100%;
}
.is-rolling .gods-banner {
  opacity: 0.8;
}
.is-chosen .gods-banner {
  animation: gods-reveal 0.65s ease-out;
}
.is-chosen .gods-banner-label {
  opacity: 1;
}
.gods-oracle > button {
  font:
    32px/1 NoitaClassic,
    Georgia,
    serif;
  color: #e3b135;
  background: #171b12;
  border: 2px solid #9c8547;
  box-shadow: inset 0 0 0 3px #050705;
  min-width: 210px;
  min-height: 62px;
  padding: 12px 24px;
  text-align: center;
}
.gods-oracle > button:hover {
  background: #282d1a;
}
.gods-oracle > button:disabled {
  opacity: 0.5;
}
.gods-oracle > p {
  font-size: 12px;
  color: #8f9982;
  line-height: 1.7;
  margin: 12px 20px 0;
}
.gods-management {
  padding: 23px;
  background: #131a13;
  border: 1px solid #424a36;
}
.gods-pool-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.gods-pool-heading h3 {
  font:
    22px Georgia,
    serif;
  color: #d4ccae;
  margin: 0;
}
.gods-pool-heading > span {
  font: 12px monospace;
  color: #b8a36d;
  white-space: nowrap;
}
.gods-management label {
  font-size: 12px;
  color: #b4bca5;
}
.gods-management textarea {
  display: block;
  resize: vertical;
  width: 100%;
  min-height: 85px;
  max-height: 220px;
  margin-top: 10px;
  background: #0b110b;
  color: #e1dfcc;
  border: 1px solid #505b43;
  padding: 12px;
  font:
    12px/1.6 Arial,
    sans-serif;
}
.gods-management textarea:focus-visible {
  outline: 2px solid #c4ae7a;
  outline-offset: 2px;
}
.gods-add-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.gods-add-row small {
  font-size: 12px;
  color: #79866d;
  line-height: 1.6;
}
.gods-add-row button {
  font-size: 12px;
  background: #c4ae7a;
  color: #1b2116;
  border: 1px solid #dcc58c;
  padding: 10px 13px;
  white-space: nowrap;
}
.gods-add-row button:disabled {
  opacity: 0.5;
}
.gods-feedback {
  font-size: 12px;
  line-height: 1.7;
  color: #cdbd89;
  min-height: 17px;
  margin: 12px 0;
}
.gods-pool-help {
  font-size: 12px;
  line-height: 1.7;
  color: #8b977f;
}
.gods-pool {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  max-height: 360px;
  overflow: auto;
  scrollbar-color: #726847 #141a12;
}
.gods-pool li {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #323b2b;
  padding: 12px 2px;
  min-height: 46px;
}
.gods-pool label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  line-height: 1.6;
}
.gods-pool label span {
  overflow-wrap: anywhere;
}
.gods-pool input {
  flex-shrink: 0;
  accent-color: #c4ae7a;
  width: 15px;
  height: 15px;
  margin-top: 1px;
  cursor: pointer;
}
.gods-pool li > small {
  font-size: 12px;
  color: #6f7e62;
  white-space: nowrap;
}
.gods-remove {
  border: 0;
  background: transparent;
  color: #bca282;
  font-size: 12px;
  padding: 7px 3px;
}
.gods-privacy {
  font-size: 12px;
  line-height: 1.8;
  color: #7c8b6e;
  border-top: 1px solid #343c2d;
  padding-top: 16px;
  margin-bottom: 0;
}
.gods-mode #stage:fullscreen .gods-panel,
.gods-mode #stage.expanded .gods-panel {
  flex: 1;
}
.gods-mode .mode-switch button[aria-pressed="true"] {
  color: #e6cb8e;
}
@keyframes gods-reveal {
  0% {
    opacity: 0.4;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 850px) {
  .gods-panel {
    grid-template-columns: 1fr;
  }
  .gods-management {
    padding: 18px;
  }
  .gods-oracle {
    max-width: 700px;
    width: 100%;
    margin: auto;
  }
  .gods-heading h2 {
    font-size: 35px;
  }
  .gods-banner p {
    font-size: 28px;
  }
  .gods-banner {
    margin-left: 12px;
    margin-right: 12px;
  }
  .gods-pool {
    max-height: 320px;
  }
  .mode-switch {
    width: 100%;
  }
  .mode-switch button {
    flex: 1;
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-chosen .gods-banner {
    animation: none;
  }
}

.gods-panel {
  position: relative;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
}
.gods-panel.pool-collapsed {
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
}
.gods-management {
  padding-top: 62px;
}
.gods-management[hidden] {
  display: none;
}
.gods-pool-toggle {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 12;
  background: #1c2418;
  color: #d4bd83;
  border: 1px solid #6b6244;
  padding: 10px 13px;
  font-size: 12px;
}
.pool-collapsed .gods-pool-toggle {
  right: 0;
  top: 0;
  writing-mode: vertical-rl;
  min-height: 160px;
  width: 36px;
  padding: 12px 8px;
}
.gods-oracle {
  max-width: none;
  width: 100%;
  min-width: 0;
}
.gods-count-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 13px 15px 17px;
}
.gods-count-controls label {
  font-size: 12px;
  color: #d0c6a5;
}
.gods-count-controls input {
  width: 66px;
  padding: 8px 6px 8px 10px;
  color: #e3c889;
  background: #0d130e;
  border: 1px solid #756747;
  font:
    18px Pixel,
    monospace;
}
.gods-count-controls input:focus-visible {
  outline: 2px solid #e5ca87;
  outline-offset: 2px;
}
.gods-count-controls small {
  font-size: 12px;
  color: #8d987f;
}
.gods-stage {
  position: relative;
  aspect-ratio: 960/500;
  overflow: hidden;
  background: #101410;
}
.gods-stage canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gods-popup {
  position: absolute;
  top: 3%;
  left: 50%;
  width: 82%;
  max-width: 820px;
  min-height: 74px;
  margin: 0;
  z-index: 5;
  transform: translateX(-50%);
  gap: 7px;
  pointer-events: none;
}
.gods-popup[hidden] {
  display: none;
}
.gods-popup #gods-result {
  font:
    clamp(16px, 1.7vw, 24px)/1.25 NoitaClassic,
    Georgia,
    serif;
}
.gods-popup .gods-banner-label {
  font-size: 12px;
  letter-spacing: 1.4px;
}
.is-chosen .gods-popup {
  animation: gods-popup-in 0.35s ease-out;
}
.gods-roll-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 12px 0;
}
.gods-roll-actions #gods-roll {
  font:
    30px/1 NoitaClassic,
    Georgia,
    serif;
  color: #e3b135;
  background: #171b12;
  border: 2px solid #9c8547;
  box-shadow: inset 0 0 0 3px #050705;
  min-width: 210px;
  min-height: 62px;
  padding: 12px 24px;
  text-align: center;
}
.gods-roll-actions #gods-roll:hover {
  background: #282d1a;
}
.gods-roll-actions #gods-roll:disabled {
  opacity: 0.5;
}
.gods-roll-actions #gods-skip {
  font-size: 12px;
  color: #b9b08e;
}
.gods-results {
  margin: 22px 20px 0;
  text-align: left;
  border-top: 1px solid #494631;
  padding-top: 16px;
}
.gods-results-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.gods-results h3 {
  font:
    16px Georgia,
    serif;
  color: #d5c7a0;
  margin: 0;
}
.gods-results-heading > span {
  font: 12px monospace;
  color: #b09e68;
}
.gods-results > p {
  font-size: 12px;
  color: #7f8e73;
  line-height: 1.7;
}
.gods-results ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 9px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 230px;
  overflow: auto;
}
.gods-results li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px;
  background: #171f15;
  border: 1px solid #424b34;
  min-width: 0;
}
.gods-results li p {
  font:
    12px/1.65 Arial,
    sans-serif;
  color: #d1d4bc;
  margin: 0;
  overflow-wrap: anywhere;
}
.gods-result-number {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 4px;
  border: 1px solid #8d794b;
  border-radius: 50%;
  font: 12px monospace;
  color: #dac28a;
}
.gods-mode #stage:fullscreen .gods-stage,
.gods-mode #stage.expanded .gods-stage {
  height: clamp(260px, calc(100dvh - 350px), 660px);
  aspect-ratio: auto;
}
.gods-mode #stage:fullscreen .gods-results ol,
.gods-mode #stage.expanded .gods-results ol {
  max-height: 130px;
}
.gods-mode #stage:fullscreen .gods-heading,
.gods-mode #stage.expanded .gods-heading {
  padding-top: 12px;
}
.gods-mode #stage:fullscreen .gods-heading h2,
.gods-mode #stage.expanded .gods-heading h2 {
  font-size: 32px;
  margin-top: 6px;
}
@keyframes gods-popup-in {
  from {
    opacity: 0.3;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
@media (max-width: 850px) {
  .gods-panel:not(.pool-collapsed) {
    grid-template-columns: minmax(0, 1fr);
  }
  .gods-panel:not(.pool-collapsed) .gods-pool-toggle {
    position: static;
    grid-row: 1;
    justify-self: end;
  }
  .gods-panel:not(.pool-collapsed) .gods-management {
    padding-top: 18px;
  }
  .gods-stage {
    min-height: 260px;
    aspect-ratio: auto;
    height: clamp(260px, 52vw, 480px);
  }
  .gods-results {
    margin-left: 12px;
    margin-right: 12px;
  }
  .gods-results ol {
    grid-template-columns: 1fr;
  }
  .gods-roll-actions {
    gap: 8px;
  }
  .gods-popup {
    width: 92%;
    border-width: 10px 18px;
    border-image-width: 10px 18px;
  }
  .gods-popup #gods-result {
    font-size: 17px;
  }
  .gods-popup .gods-banner-label {
    font-size: 12px;
  }
  .gods-count-controls {
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-chosen .gods-popup {
    animation: none;
  }
}
#gods-duplicates {
  background: transparent;
  color: #c7ba91;
  border: 1px solid #655c42;
  padding: 7px 10px;
  font-size: 12px;
}
#gods-duplicates[aria-pressed="true"] {
  background: #736033;
  color: #fff0bc;
}
#gods-next {
  background: #c4ae7a;
  color: #1d2117;
  border: 1px solid #e4ce93;
  padding: 13px 20px;
  font-size: 12px;
}
#gods-next[hidden] {
  display: none;
}
.gods-auto-control {
  display: flex;
  justify-content: center;
  gap: 7px;
  align-items: center;
  font-size: 12px;
  color: #a7b093;
  margin-top: 12px;
}
.gods-auto-control input {
  accent-color: #c4ae7a;
}
.compact-results .gods-results ol {
  max-height: none;
  overflow: visible;
}
.gods-mode #stage:fullscreen .compact-results .gods-results ol,
.gods-mode #stage.expanded .compact-results .gods-results ol {
  max-height: none;
  overflow: visible;
}

.gods-heading {
  padding: 12px 15px 0;
}
.gods-heading h2 {
  margin: 0;
  font-size: 32px;
}
.gods-count-controls {
  padding: 8px 12px;
}
.gods-stage canvas {
  object-fit: fill;
}
.gods-mode #stage:fullscreen,
.gods-mode #stage.expanded {
  padding: 8px 10px;
}
.gods-mode #stage:fullscreen .stage-bar,
.gods-mode #stage.expanded .stage-bar {
  margin-bottom: 6px;
  padding: 2px 0 5px;
}
.gods-mode #stage:fullscreen .gods-panel,
.gods-mode #stage.expanded .gods-panel {
  margin-bottom: 0;
  align-items: stretch;
}
.gods-mode #stage:fullscreen .gods-oracle,
.gods-mode #stage.expanded .gods-oracle {
  padding-bottom: 8px;
  display: flex;
  flex-direction: column;
}
.gods-mode #stage:fullscreen .gods-heading,
.gods-mode #stage.expanded .gods-heading {
  padding: 6px 10px 0;
}
.gods-mode #stage:fullscreen .gods-heading h2,
.gods-mode #stage.expanded .gods-heading h2 {
  font-size: 25px;
  margin: 0;
}
.gods-mode #stage:fullscreen .gods-stage,
.gods-mode #stage.expanded .gods-stage {
  height: auto;
  min-height: 250px;
  flex: 1;
  aspect-ratio: auto;
}
.gods-mode #stage:fullscreen .gods-roll-actions,
.gods-mode #stage.expanded .gods-roll-actions {
  padding: 7px 12px 0;
}
.gods-mode #stage:fullscreen #gods-roll,
.gods-mode #stage.expanded #gods-roll {
  min-height: 44px;
  font-size: 26px;
  padding: 7px 20px;
}
.gods-mode #stage:fullscreen .gods-auto-control,
.gods-mode #stage.expanded .gods-auto-control {
  margin-top: 5px;
}
.gods-mode #stage:fullscreen #gods-roll-hint,
.gods-mode #stage.expanded #gods-roll-hint {
  margin-top: 4px;
}
.gods-mode #stage:fullscreen .gods-results,
.gods-mode #stage.expanded .gods-results {
  margin-top: 7px;
  padding-top: 7px;
}
.gods-mode #stage:fullscreen #gods-results-empty,
.gods-mode #stage.expanded #gods-results-empty {
  margin: 5px 0;
}
.gods-mode #stage:fullscreen .gods-results li,
.gods-mode #stage.expanded .gods-results li {
  padding: 6px 9px;
}

.gods-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.gods-topline .gods-heading {
  padding: 0;
  text-align: left;
}
.gods-topline .gods-heading h2 {
  margin: 0;
  white-space: nowrap;
}
.gods-topline .gods-count-controls {
  padding: 0;
  justify-content: flex-end;
}
.gods-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 14px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.gods-bottomline #gods-roll-hint {
  margin: 0;
  max-width: 420px;
  text-align: left;
  font-size: 12px;
  color: #929e86;
  line-height: 1.6;
}
.gods-bottomline .gods-roll-actions {
  padding: 0;
  flex-wrap: wrap;
  gap: 12px;
}
.gods-bottomline .gods-auto-control {
  margin: 0;
  white-space: nowrap;
}
.gods-results {
  flex-shrink: 0;
}
.gods-count-controls {
  flex-shrink: 0;
}
.gods-mode #stage:fullscreen .gods-panel,
.gods-mode #stage.expanded .gods-panel {
  min-height: 0;
  flex: 1 1 0;
}
.gods-mode #stage:fullscreen .gods-oracle,
.gods-mode #stage.expanded .gods-oracle {
  min-height: 0;
  overflow: auto;
}
.gods-mode #stage:fullscreen .gods-stage,
.gods-mode #stage.expanded .gods-stage {
  flex: 1 1 0;
  min-height: 200px;
  height: auto;
}
.gods-mode #stage:fullscreen .gods-topline .gods-heading,
.gods-mode #stage.expanded .gods-topline .gods-heading {
  padding: 0;
}
.gods-mode #stage:fullscreen .gods-bottomline .gods-roll-actions,
.gods-mode #stage.expanded .gods-bottomline .gods-roll-actions {
  padding: 0;
}
.gods-mode #stage:fullscreen .gods-bottomline #gods-roll-hint,
.gods-mode #stage.expanded .gods-bottomline #gods-roll-hint {
  margin: 0;
}
.gods-mode #stage:fullscreen .gods-bottomline .gods-auto-control,
.gods-mode #stage.expanded .gods-bottomline .gods-auto-control {
  margin: 0;
}
.gods-mode #stage:fullscreen .stage-bar,
.gods-mode #stage.expanded .stage-bar {
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .gods-bottomline {
    justify-content: center;
  }
  .gods-bottomline #gods-roll-hint {
    width: 100%;
    max-width: none;
  }
  .gods-topline .gods-count-controls {
    justify-content: flex-start;
  }
  .gods-roll-actions #gods-roll {
    min-width: 130px;
  }
}

.gods-bottomline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}
.gods-bottomline .gods-roll-actions {
  display: contents;
}
.gods-bottomline #gods-roll-hint {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.gods-bottomline #gods-roll {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}
.gods-bottomline .gods-auto-control {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
}
.gods-bottomline #gods-next {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
}
.gods-bottomline #gods-skip {
  grid-column: 3;
  grid-row: 2;
  justify-self: start;
}
@media (max-width: 700px) {
  .gods-bottomline #gods-roll-hint {
    grid-column: 1/-1;
    grid-row: 3;
  }
  .gods-bottomline {
    gap: 8px;
  }
  .gods-bottomline #gods-roll {
    min-width: 120px;
  }
}

.gods-bottomline {
  grid-template-rows: 62px;
}
.gods-bottomline #gods-roll,
.gods-bottomline #gods-next {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: 210px;
  min-width: 210px;
  height: 62px;
  box-sizing: border-box;
}
.gods-bottomline #gods-next {
  z-index: 2;
  margin: 0;
}
.gods-mode #stage:fullscreen .gods-bottomline,
.gods-mode #stage.expanded .gods-bottomline {
  grid-template-rows: 44px;
}
.gods-mode #stage:fullscreen .gods-bottomline #gods-roll,
.gods-mode #stage:fullscreen .gods-bottomline #gods-next,
.gods-mode #stage.expanded .gods-bottomline #gods-roll,
.gods-mode #stage.expanded .gods-bottomline #gods-next {
  height: 44px;
  min-height: 44px;
}
.gods-results-heading {
  min-height: 32px;
}
.gods-results #gods-skip[hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 700px) {
  .gods-bottomline {
    grid-template-rows: 62px auto;
  }
  .gods-bottomline #gods-roll-hint {
    grid-row: 2;
  }
  .gods-bottomline #gods-roll,
  .gods-bottomline #gods-next {
    width: 150px;
    min-width: 150px;
  }
  .gods-mode #stage:fullscreen .gods-bottomline,
  .gods-mode #stage.expanded .gods-bottomline {
    grid-template-rows: 44px auto;
  }
}

.gods-results {
  height: 200px;
  min-height: 200px;
  max-height: 200px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gods-results-heading {
  flex-shrink: 0;
}
.gods-results #gods-results-empty {
  flex-shrink: 0;
}
.gods-results ol,
.compact-results .gods-results ol {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  align-content: start;
}
.gods-mode #stage:fullscreen .gods-results,
.gods-mode #stage.expanded .gods-results {
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  flex-shrink: 0;
}
.gods-mode #stage:fullscreen .compact-results .gods-results ol,
.gods-mode #stage.expanded .compact-results .gods-results ol {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.gods-tablet-symbol {
  width: 18px;
  height: 20px;
  object-fit: contain;
  image-rendering: pixelated;
  flex: 0 0 18px;
  align-self: center;
}
.gods-results li p {
  min-width: 0;
  flex: 1;
}

.gods-summary {
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: clamp(16px, 3vw, 32px);
  background: #10150fee;
  overflow: auto;
  scrollbar-color: #8b784c #10150f;
  text-align: left;
}
.gods-summary[hidden] {
  display: none;
}
.gods-summary h3 {
  margin: 0 0 20px;
  color: #e7c784;
  font:
    32px/1.2 NoitaClassic,
    Georgia,
    serif;
  text-align: center;
}
.gods-summary ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.gods-summary li {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  background: #24291eee;
  border: 1px solid #76633f;
  box-shadow: inset 0 0 0 2px #10150f;
}
.gods-summary .gods-tablet-symbol {
  width: 44px;
  height: 48px;
  flex-basis: 44px;
}
.gods-summary p {
  margin: 0;
  color: #f1ead5;
  font:
    23px/1.45 Arial,
    sans-serif;
  overflow-wrap: anywhere;
}
.gods-summary.many-challenges li {
  padding: 12px 16px;
}
.gods-summary.many-challenges p {
  font-size: 20px;
}
@media (max-width: 650px) {
  .gods-summary ol {
    grid-template-columns: 1fr;
  }
  .gods-summary p {
    font-size: 21px;
  }
}

.pillar-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  margin-bottom: 22px;
}
.pillar-panel[hidden] {
  display: none;
}
.pillar-mode .chambers,
.pillar-mode .result-ledger,
.pillar-mode .controls,
.pillar-mode .journal {
  display: none;
}
.pillar-oracle {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #695c39;
  background: #101410;
}
.pillar-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 14px 20px;
}
.pillar-topline h2 {
  font:
    30px/1 NoitaClassic,
    Georgia,
    serif;
  color: #e1c07d;
  margin: 0;
}
.pillar-topline label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #c7c1a8;
}
.pillar-topline small {
  font-size: 12px;
  color: #8e997e;
}
#pillar-count {
  width: 50px;
  padding: 8px;
  color: #e7cf8f;
  background: #171e14;
  border: 1px solid #71633e;
}
.pillar-stage {
  position: relative;
  min-height: 300px;
  aspect-ratio: 960/500;
  overflow: hidden;
  background: #141820;
}
.pillar-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}
.pillar-plaque {
  position: absolute;
  top: 3%;
  left: 3%;
  right: 53%;
  max-height: 31%;
  overflow: auto;
  padding: 14px 18px;
  border: 1px solid #b4965c;
  background: #14180fec;
  box-shadow: inset 0 0 0 3px #080c07;
}
.pillar-plaque[hidden] {
  display: none;
}
.pillar-plaque > span {
  font-size: 12px;
  color: #bba472;
  letter-spacing: 1px;
}
.pillar-plaque h3 {
  font:
    23px/1.25 NoitaClassic,
    Georgia,
    serif;
  color: #f5dfad;
  margin: 8px 0;
}
.pillar-plaque p {
  font:
    12px/1.5 Arial,
    sans-serif;
  color: #b6bea6;
  margin: 0 0 7px;
}
.pillar-plaque a {
  font-size: 12px;
  color: #d1b978;
}
.pillar-scene-label {
  position: absolute;
  inset: auto 8px 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: #d8c28e;
  font-size: 12px;
  letter-spacing: 1px;
  text-align: center;
  pointer-events: none;
}
.pillar-bottomline {
  display: grid;
  grid-template-columns: 1fr 210px 1fr;
  align-items: center;
  gap: 15px;
  min-height: 72px;
  padding: 10px 16px;
  border-top: 1px solid #4d4933;
}
.pillar-bottomline > p {
  font-size: 12px;
  line-height: 1.6;
  color: #9ca68c;
  margin: 0;
}
.pillar-bottomline > label {
  justify-self: end;
  font-size: 12px;
  color: #c8b987;
  white-space: nowrap;
}
.pillar-bottomline input {
  accent-color: #d4b16b;
}
.pillar-action {
  display: grid;
  min-height: 48px;
}
.pillar-action button {
  grid-area: 1/1;
  min-height: 48px;
  width: 210px;
  padding: 8px;
  border: 2px solid #9c8547;
  box-shadow: inset 0 0 0 3px #050705;
  font:
    28px/1 NoitaClassic,
    Georgia,
    serif;
  color: #e3b135;
  background: #171b12;
  text-align: center;
}
.pillar-action button[hidden] {
  display: none;
}
.pillar-action button:disabled {
  opacity: 0.45;
  cursor: default;
}
.pillar-results {
  height: 168px;
  min-height: 168px;
  max-height: 168px;
  padding: 12px 16px;
  border-top: 1px solid #4d4933;
  overflow: auto;
}
.pillar-results > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #b6a471;
}
.pillar-results h3 {
  margin: 0;
  color: #d5c7a0;
  font:
    16px Georgia,
    serif;
}
.pillar-results ol {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pillar-results li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px;
  border: 1px solid #424b34;
  background: #171f15;
}
.pillar-results strong {
  display: block;
  font:
    12px/1.4 Arial,
    sans-serif;
  color: #e1dec6;
  overflow-wrap: anywhere;
}
.pillar-results small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #859574;
}
.pillar-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  object-fit: contain;
  image-rendering: pixelated;
}
.pillar-management {
  min-width: 0;
  padding: 20px;
  border: 1px solid #424a36;
  background: #131a13;
}
.pillar-management h3 {
  color: #d4ccae;
  margin: 0 0 10px;
  font:
    22px Georgia,
    serif;
}
.pillar-management > p {
  font-size: 12px;
  line-height: 1.7;
  color: #96a183;
}
#pillar-active-count {
  color: #c9b784;
}
.pillar-pool-actions {
  display: flex;
  gap: 9px;
  margin-bottom: 14px;
}
.pillar-pool-actions button {
  border: 1px solid #5d6247;
  background: #1c2518;
  color: #c7c5a8;
  font-size: 12px;
  padding: 8px;
}
.pillar-pool {
  max-height: 520px;
  overflow: auto;
  scrollbar-color: #726847 #141a12;
}
.pillar-pool details {
  border-top: 1px solid #3e4732;
  padding: 10px 0;
}
.pillar-pool summary {
  font-size: 12px;
  color: #c9b887;
  cursor: pointer;
  line-height: 1.7;
}
.pillar-pool ul {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}
.pillar-pool label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font:
    12px/1.5 Arial,
    sans-serif;
  color: #b7c0a4;
  cursor: pointer;
}
.pillar-pool input {
  accent-color: #c4ae7a;
  flex-shrink: 0;
}
.pillar-pool label:has(input:not(:checked)) {
  opacity: 0.45;
}
.pillar-management .pillar-note {
  font-size: 12px;
  color: #79876d;
}
.pillar-pool-toggle {
  position: absolute;
  right: 12px;
  top: -26px;
  font:
    12px Arial,
    sans-serif;
  background: #11180f;
  color: #a99b74;
  border: 1px solid #424a36;
  padding: 5px 8px;
}
.pillar-panel.pool-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
.pillar-mode #stage:fullscreen,
.pillar-mode #stage.expanded {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: auto;
}
.pillar-mode #stage:fullscreen .pillar-panel,
.pillar-mode #stage.expanded .pillar-panel {
  flex: 1;
  min-height: 0;
  margin: 0;
}
.pillar-mode #stage:fullscreen .pillar-oracle,
.pillar-mode #stage.expanded .pillar-oracle {
  min-height: 0;
}
.pillar-mode #stage:fullscreen .pillar-stage,
.pillar-mode #stage.expanded .pillar-stage {
  flex: 1;
  min-height: 220px;
  aspect-ratio: auto;
}
.pillar-mode #stage:fullscreen .pillar-topline,
.pillar-mode #stage.expanded .pillar-topline {
  min-height: 54px;
  padding: 8px 16px;
}
.pillar-mode #stage:fullscreen .pillar-management,
.pillar-mode #stage.expanded .pillar-management {
  overflow: auto;
}
@media (max-width: 950px) {
  .pillar-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .pillar-topline {
    flex-wrap: wrap;
    gap: 12px;
  }
  .pillar-management {
    max-height: 430px;
    overflow: auto;
  }
  .pillar-topline small {
    display: none;
  }
}
@media (max-width: 550px) {
  .pillar-bottomline {
    grid-template-columns: 1fr 1fr;
  }
  .pillar-bottomline > p {
    grid-column: 1/-1;
  }
  .pillar-action button {
    width: 170px;
  }
  .pillar-results ol {
    grid-template-columns: 1fr;
  }
  .pillar-plaque h3 {
    font-size: 18px;
  }
  .pillar-plaque {
    padding: 9px;
  }
}

.pillar-icon {
  filter: brightness(1.7);
}
.pillar-topline {
  flex-wrap: wrap;
}
.pillar-topline h2 {
  margin-right: auto;
}
#pillar-draw-mode {
  max-width: 185px;
  background: #171e14;
  color: #e1ce9c;
  border: 1px solid #71633e;
  padding: 7px;
  font:
    12px Arial,
    sans-serif;
}
.pillar-topline #pillar-count-help {
  display: block;
  max-width: 180px;
  line-height: 1.5;
}
.pillar-management {
  padding-top: 58px;
}
.pillar-pool-toggle {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 12;
  background: #1c2418;
  color: #d4bd83;
  border: 1px solid #6b6244;
  padding: 10px 13px;
  font-size: 12px;
}
.pillar-panel.pool-collapsed {
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
}
.pool-collapsed .pillar-pool-toggle {
  right: 0;
  top: 0;
  writing-mode: vertical-rl;
  min-height: 160px;
  width: 36px;
  padding: 12px 8px;
}
.pillar-summary .pillar-icon {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}
.pillar-summary small {
  display: block;
  margin-top: 7px;
  color: #adba95;
  font:
    12px/1.4 Arial,
    sans-serif;
}
.pillar-summary ol {
  align-content: start;
}
@media (max-width: 950px) {
  .pillar-panel:not(.pool-collapsed) .pillar-pool-toggle {
    position: static;
    grid-row: 1;
    justify-self: end;
  }
  .pillar-panel:not(.pool-collapsed) .pillar-management {
    padding-top: 18px;
  }
  .pillar-panel.pool-collapsed {
    grid-template-columns: minmax(0, 1fr) 36px;
  }
}

.pillar-pool .pillar-restrictive {
  border-left: 3px solid #bd8548;
  padding-left: 9px;
  margin: 5px 0;
  background: #a7792820;
}
.pillar-pool .pillar-restrictive label {
  opacity: 1;
}
.pillar-restrictive input:not(:checked) ~ span {
  color: #adac94;
}
.pillar-pool .pillar-conflict {
  display: block;
  margin-top: 4px;
  color: #d6ad73;
  font:
    12px/1.5 Arial,
    sans-serif;
}
.pillar-restrictive-group > summary {
  color: #e0b77f;
}

.pillar-scene-label {
  text-shadow:
    1px 1px #211e15,
    -1px -1px #211e15;
}

.pillar-night-toggle {
  white-space: nowrap;
}
.pillar-night-toggle input {
  accent-color: #c4ae7a;
}

.pillar-plaque {
  right: auto;
  width: max-content;
  max-width: 44%;
}
.pillar-plaque::after {
  content: attr(data-sizing-text);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  white-space: pre;
  font:
    23px/1.25 NoitaClassic,
    Georgia,
    serif;
  pointer-events: none;
}
@media (max-width: 550px) {
  .pillar-plaque::after {
    font-size: 18px;
  }
}

.pillar-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pillar-summary > h3 {
  flex-shrink: 0;
}
.pillar-summary > ol {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}
.pillar-summary-footer {
  flex-shrink: 0;
  display: block;
  padding: 14px 0 0;
  margin-top: 15px;
  border-top: 1px solid #5e5638;
  text-align: center;
}
.pillar-summary-footer a {
  color: #d8c38c;
  font:
    12px/1.5 Arial,
    sans-serif;
  letter-spacing: 0;
}
.pillar-summary li > div {
  min-width: 0;
  width: 100%;
}
.pillar-card-details {
  margin-top: 10px;
}
.pillar-card-details > summary {
  color: #d8bd81;
  font:
    12px/1.5 Arial,
    sans-serif;
  cursor: pointer;
}
.pillar-achievement-card {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
}

.pillar-achievement-card > a {
  display: block;
}
.pillar-original-card {
  display: block;
  width: 100%;
  height: auto;
  max-width: 464px;
  margin: 0 auto;
  image-rendering: pixelated;
}

.pillar-summary li {
  align-items: flex-start;
  align-self: start;
}

.perk-mode .chambers,
.perk-mode .result-ledger,
.perk-mode .controls,
.perk-mode .journal {
  display: none;
}
.perk-pool {
  display: grid;
  gap: 6px;
  max-height: 560px;
  overflow: auto;
}
.perk-pool label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px;
  background: #19201b;
  font-size: 12px;
}
.perk-pool img,
#perk-results img,
#perk-summary-list img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  object-fit: contain;
}
#perk-count,
#perk-dupe-max {
  width: 48px;
  padding: 7px;
  background: #171e14;
  border: 1px solid #71633e;
  color: #e7cf8f;
}
#perk-panel .pillar-topline {
  flex-wrap: wrap;
  gap: 14px;
}
#perk-panel .pillar-topline [hidden] {
  display: none;
}
#perk-results li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.perk-duped {
  border-color: #e8c776 !important;
  box-shadow: inset 0 0 0 1px #d8b55e;
}
#perk-summary-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}
#perk-summary-list a {
  color: #ead59f;
}
.perk-plaque {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #161b16ed;
  border: 1px solid #c8a45e;
  padding: 12px 24px;
  color: #f0d997;
  text-align: center;
  font:
    22px NoitaClassic,
    serif;
  max-width: 85%;
}
.perk-mode #stage:fullscreen,
.perk-mode #stage.expanded {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: auto;
}
.perk-mode #stage:fullscreen #perk-panel,
.perk-mode #stage.expanded #perk-panel {
  flex: 1;
  min-height: 0;
  margin: 0;
}
.perk-mode #stage:fullscreen .perk-stage,
.perk-mode #stage.expanded .perk-stage {
  flex: 1;
  min-height: 240px;
  aspect-ratio: auto;
}
.perk-mode #stage:fullscreen .pillar-oracle,
.perk-mode #stage.expanded .pillar-oracle {
  min-height: 0;
}
#perk-panel.pool-collapsed {
  grid-template-columns: minmax(0, 1fr) 36px;
}
#perk-panel.pool-collapsed #perk-management {
  display: none;
}
#perk-panel .pillar-results {
  min-height: 105px;
}
#perk-summary footer {
  text-align: center;
  padding: 12px;
}

#perk-summary-list .perk-duped {
  grid-column: 1/-1;
  border: 3px solid #ffdc77 !important;
  background: linear-gradient(110deg, #60471e, #30291b) !important;
  box-shadow:
    inset 0 0 0 2px #9c782d,
    0 0 22px #f5c44b55;
  padding: 18px;
  color: #fff0b7;
}
#perk-summary-list .perk-duped img {
  width: 48px;
  height: 48px;
}
#perk-summary-list .perk-duped strong {
  color: #ffdf82;
  font-size: 17px;
}
#perk-summary-list .perk-duped a {
  color: #fff0bb;
  font-size: 21px;
}

/* Compact audio controls */
.audio-controls #sound,
.audio-controls #music-play {
  display: inline-grid;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  box-sizing: border-box;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}
.audio-controls #sound span,
.audio-controls #music-play span {
  display: none;
}
.audio-controls #sound[aria-pressed="false"] {
  color: #78816f;
  text-decoration: line-through;
}
.stage-actions {
  gap: 8px;
}
.stage-actions .audio-controls {
  gap: 6px;
  flex-wrap: nowrap;
}
.audio-controls > .volume-control {
  gap: 5px;
}
.audio-controls > .volume-control > span {
  display: none;
}
.audio-controls > .volume-control input {
  width: 70px;
}
.stage-actions #fullscreen {
  padding: 7px 9px;
  font-size: 12px;
  min-height: 30px;
}

/* Orb map links */
.orb-map-links {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: hidden;
}
.orb-map-links[hidden],
.classic-mode .orb-map-links {
  display: none;
}
.orb-map-link {
  position: absolute;
  display: block;
  pointer-events: auto;
  border-radius: 50%;
  color: #e8d8a8;
  text-decoration: none;
}
.orb-map-link:hover,
.orb-map-link:focus-visible {
  outline: 2px solid #d3b467;
  background: #d3b46718;
  box-shadow: 0 0 14px #e8c87966;
}
.orb-map-tooltip {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 150px;
  padding: 6px 8px;
  background: #111711f5;
  border: 1px solid #a28b56;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.orb-map-link:hover,
.orb-map-link:focus-visible {
  z-index: 1;
}
.orb-map-link:hover .orb-map-tooltip,
.orb-map-link:focus-visible .orb-map-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Fullscreen result lists */
.result-ledger .ledger-content > a {
  font-size: 12px;
  color: #748765;
}
#stage:is(:fullscreen, .expanded) .result-ledger {
  position: relative;
  z-index: 30;
}
#stage:is(:fullscreen, .expanded) .result-ledger > details {
  position: relative;
}
#stage:is(:fullscreen, .expanded) .result-ledger > details > summary {
  cursor: pointer;
}
#stage:is(:fullscreen, .expanded) .result-ledger > details[open] > summary {
  color: #e0c782;
}
#stage:is(:fullscreen, .expanded) .result-ledger .ledger-content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: -1px;
  right: -1px;
  max-height: min(60dvh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 14px;
  background: #111810fa;
  border: 1px solid #a58c53;
  box-shadow: 0 10px 35px #000a;
  font-size: 12px;
}
#stage:is(:fullscreen, .expanded) .result-ledger .ledger-content :is(ol, ul) {
  max-height: none;
  overflow: visible;
  margin-top: 0;
}

/* Perk playback controls */
#perk-skip {
  color: #b3b79f;
}
#perk-skip:disabled {
  color: #3e4939;
}
.perk-playback {
  flex-wrap: wrap;
  gap: 16px;
}
.perk-playback button {
  font-size: 12px;
}

/* Footer */
footer.site-footer,
.forge-credit {
  font-size: 12px;
}
footer.site-footer :is(details, summary, p, a) {
  font-size: inherit;
}
footer.site-footer > span {
  font-size: 10px;
}
