/*
  Sekhema's Sandbox — Obsidian UI Skin
  Version 88

  Reusable primitives:
    .ui-obsidian-panel   large framed content surface
    .ui-obsidian-modal   modal/dialog surface
    .ui-ornate-button    major action/selection button
    .ui-ornate-divider   decorative horizontal divider
    .ui-ornate-banner    wide header/banner surface
*/

.theme-obsidian {
  --obsidian-black: #080a0d;
  --obsidian-panel: rgba(13, 15, 19, .965);
  --obsidian-panel-soft: rgba(18, 20, 25, .93);
  --obsidian-gold: #c8a45d;
  --obsidian-gold-bright: #ead08a;
  --obsidian-gold-dim: rgba(200, 164, 93, .38);
  --obsidian-line: rgba(200, 164, 93, .24);
  --obsidian-shadow: 0 24px 70px rgba(0, 0, 0, .58);
  --obsidian-texture: url("assets/ui/obsidian/obsidian-texture.webp");
  --obsidian-panel-art: url("assets/ui/obsidian/panel-frame.webp");
  --obsidian-modal-art: url("assets/ui/obsidian/modal-frame.webp");
  --obsidian-button-art: url("assets/ui/obsidian/button-frame.webp");
  --obsidian-button-hover-art: url("assets/ui/obsidian/button-frame-hover.webp");
  --obsidian-divider-art: url("assets/ui/obsidian/section-divider.webp");
  --obsidian-banner-art: url("assets/ui/obsidian/header-banner.webp");
  --obsidian-header-frame-hires: url("assets/ui/obsidian/header-frame-hires.png");
  --obsidian-item-frame-hires: url("assets/ui/obsidian/item-frame-hires.png");
  --grim-heading-font: Copperplate, "Copperplate Gothic Light", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --grim-body-font: Cambria, "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.theme-obsidian body,
body.theme-obsidian {
  background-color: var(--obsidian-black);
  background-image:
    radial-gradient(circle at 50% -12%, rgba(205, 164, 82, .15), transparent 34rem),
    linear-gradient(180deg, rgba(8, 10, 13, .48), rgba(5, 6, 8, .91)),
    var(--obsidian-texture);
  background-size: auto, auto, 940px 940px;
  background-position: center top, center, center top;
  background-attachment: fixed, fixed, fixed;
}

body.theme-obsidian::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 28%, rgba(0, 0, 0, .38) 100%),
    linear-gradient(90deg, rgba(0,0,0,.24), transparent 18%, transparent 82%, rgba(0,0,0,.24));
}

.theme-obsidian ::selection {
  color: #17120a;
  background: #d8b56a;
}

/* Reusable framed surfaces */
.theme-obsidian .ui-obsidian-panel,
.theme-obsidian .panel,
.theme-obsidian .challenge-target-card,
.theme-obsidian .challenge-score-card,
.theme-obsidian .challenge-empty,
.theme-obsidian .challenge-status-panel,
.theme-obsidian .reverse-plan-card,
.theme-obsidian .reverse-simple-route {
  border-color: var(--obsidian-line);
  background-color: var(--obsidian-panel);
  background-image:
    linear-gradient(180deg, rgba(12, 14, 18, .78), rgba(8, 10, 13, .9)),
    var(--obsidian-panel-art);
  background-position: center, center;
  background-size: 100% 100%, 100% 100%;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(239, 208, 139, .055),
    inset 0 0 42px rgba(0, 0, 0, .44),
    var(--obsidian-shadow);
}

.theme-obsidian .panel {
  border-radius: 10px;
}

.theme-obsidian .item-panel,
.theme-obsidian .currency-panel,
.theme-obsidian .metric-panel,
.theme-obsidian .history-panel,
.theme-obsidian .assumptions-panel {
  padding: 22px;
}

/* Header banner */
.theme-obsidian .ui-ornate-banner,
.theme-obsidian .topbar {
  position: relative;
  min-height: 122px;
  margin: 18px 0 20px;
  padding: 29px 56px 28px;
  align-items: center;
  background-image:
    linear-gradient(90deg, rgba(8, 10, 13, .22), rgba(8, 10, 13, .02), rgba(8, 10, 13, .22)),
    var(--obsidian-banner-art);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .42));
}

.theme-obsidian .topbar h1,
.theme-obsidian .entrance-card h1 {
  color: #f2e5c3;
  text-shadow: 0 2px 0 #15110a, 0 0 22px rgba(205, 168, 91, .16);
}

.theme-obsidian .topbar .eyebrow,
.theme-obsidian .entrance-game {
  color: #d6b56e;
  text-shadow: 0 1px 0 rgba(0,0,0,.9);
}

/* Home screen */
.theme-obsidian .entrance-screen {
  background-image:
    radial-gradient(circle at 50% 31%, rgba(206, 170, 93, .16), transparent 35%),
    linear-gradient(180deg, rgba(6, 8, 10, .56), rgba(3, 4, 6, .9)),
    var(--obsidian-texture);
  background-position: center, center, center;
  background-size: auto, auto, 940px 940px;
}

.theme-obsidian .entrance-card {
  width: min(1040px, 96vw);
  padding: 64px 64px 58px;
  border-color: rgba(222, 190, 118, .28);
  border-radius: 13px;
  background-color: rgba(10, 12, 15, .96);
  background-image:
    linear-gradient(180deg, rgba(11, 13, 17, .62), rgba(6, 8, 10, .84)),
    var(--obsidian-modal-art);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 34px 110px rgba(0, 0, 0, .74), inset 0 0 55px rgba(0,0,0,.42);
}

.theme-obsidian .entrance-version {
  color: rgba(231, 212, 167, .54);
}

.theme-obsidian .mode-toggle,
.theme-obsidian .home-info-action {
  color: #ddceb0;
  border: 1px solid rgba(200, 164, 93, .32);
  background: linear-gradient(180deg, rgba(45, 39, 29, .72), rgba(19, 18, 16, .92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 5px 16px rgba(0,0,0,.26);
}

.theme-obsidian .mode-toggle:hover,
.theme-obsidian .home-info-action:hover {
  color: #f1dfb3;
  border-color: rgba(232, 199, 123, .6);
  box-shadow: 0 0 18px rgba(207, 166, 82, .13);
}

/* Reusable ornate action frame. Border-image is nine-sliced so it scales to varied controls. */
.theme-obsidian .ui-ornate-button,
.theme-obsidian .primary-home-choice,
.theme-obsidian .choice-btn {
  border-style: solid;
  border-color: transparent;
  border-image-source: var(--obsidian-button-art);
  border-image-slice: 24% 13% fill;
  border-image-width: 20px 25px;
  border-image-outset: 0;
  border-image-repeat: stretch;
  border-radius: 0;
  color: #e8dec8;
  background: linear-gradient(180deg, rgba(18, 20, 24, .82), rgba(8, 10, 13, .9));
  box-shadow: 0 11px 24px rgba(0, 0, 0, .32);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.theme-obsidian .primary-home-choice {
  min-height: 174px;
  padding: 29px 33px;
}

.theme-obsidian .choice-btn {
  border-image-width: 13px 18px;
  padding: 13px 20px;
  background: linear-gradient(180deg, rgba(18, 20, 24, .8), rgba(9, 11, 14, .92));
}

.theme-obsidian .ui-ornate-button:hover:not(:disabled),
.theme-obsidian .primary-home-choice:hover:not(:disabled),
.theme-obsidian .choice-btn:hover:not(:disabled) {
  border-image-source: var(--obsidian-button-hover-art);
  color: #fff0c2;
  background: linear-gradient(180deg, rgba(43, 34, 20, .72), rgba(13, 13, 13, .92));
  box-shadow: 0 13px 34px rgba(0, 0, 0, .42), 0 0 27px rgba(214, 165, 67, .14);
  filter: saturate(1.06);
  transform: translateY(-2px);
}

.theme-obsidian .primary-home-choice strong {
  color: #f2dfaf;
  text-shadow: 0 2px 0 rgba(0,0,0,.9);
}

.theme-obsidian .primary-home-choice span {
  color: #aaa391;
}

/* Standard controls keep the skin without becoming visually heavy. */
.theme-obsidian .btn {
  border-color: rgba(197, 161, 88, .24);
  color: #ddd5c4;
  background: linear-gradient(180deg, rgba(35, 36, 39, .96), rgba(15, 17, 20, .98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 5px 12px rgba(0,0,0,.18);
}

.theme-obsidian .btn:hover:not(:disabled) {
  color: #f1e2be;
  border-color: rgba(225, 191, 115, .56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 16px rgba(197, 151, 66, .12);
}

.theme-obsidian .btn.primary {
  color: #19130a;
  border-color: #d3ae61;
  background: linear-gradient(180deg, #ead18f, #b98d3f);
  text-shadow: 0 1px 0 rgba(255,255,255,.3);
}

.theme-obsidian input,
.theme-obsidian select,
.theme-obsidian textarea,
.theme-obsidian .reverse-input {
  color: #e5dcc8;
  background-color: rgba(5, 7, 9, .82);
  background-image: linear-gradient(180deg, rgba(255,255,255,.014), transparent);
  border-color: rgba(192, 157, 89, .24);
  box-shadow: inset 0 7px 18px rgba(0,0,0,.26);
}

.theme-obsidian input:focus,
.theme-obsidian select:focus,
.theme-obsidian textarea:focus {
  border-color: rgba(228, 193, 116, .7);
  box-shadow: 0 0 0 3px rgba(201,168,92,.12), inset 0 7px 18px rgba(0,0,0,.24);
}

/* Reusable modal surfaces */
.theme-obsidian .ui-obsidian-modal,
.theme-obsidian dialog,
.theme-obsidian .home-info-card,
.theme-obsidian .legal-disclosure-card {
  border-color: rgba(219, 183, 108, .3);
  border-radius: 12px;
  background-color: rgba(10, 12, 15, .98);
  background-image:
    linear-gradient(180deg, rgba(11, 13, 17, .68), rgba(7, 9, 11, .86)),
    var(--obsidian-modal-art);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 34px 105px rgba(0,0,0,.72), inset 0 0 46px rgba(0,0,0,.34);
}

.theme-obsidian .home-info-card,
.theme-obsidian .legal-disclosure-card {
  padding: 42px 48px;
}

.theme-obsidian .home-info-overlay,
.theme-obsidian .legal-disclosure-overlay,
.theme-obsidian dialog::backdrop {
  background: rgba(2, 3, 4, .8);
  backdrop-filter: blur(7px) saturate(.74);
}

/* Section separators */
.theme-obsidian .ui-ornate-divider,
.theme-obsidian .divider {
  height: 18px;
  margin: 11px 0;
  background: var(--obsidian-divider-art) center / 100% 100% no-repeat;
  opacity: .68;
}

.theme-obsidian .panel-heading::after,
.theme-obsidian .home-info-card h2::after,
.theme-obsidian .legal-disclosure-card h2::after {
  content: "";
  display: block;
  height: 13px;
  width: min(520px, 100%);
  margin: 9px 0 -3px;
  background: var(--obsidian-divider-art) center / 100% 100% no-repeat;
  opacity: .45;
}

.theme-obsidian .panel-heading::after {
  display: none;
}

/* Crafting workspace details */
.theme-obsidian .item-card {
  border-color: rgba(205, 167, 88, .44);
  background-image:
    linear-gradient(rgba(4,5,7,.84), rgba(7,8,11,.91)),
    var(--obsidian-texture);
  background-size: auto, 700px 700px;
  box-shadow:
    inset 0 0 0 1px rgba(244, 216, 153, .035),
    inset 0 0 44px rgba(201,168,92,.07),
    0 14px 36px rgba(0,0,0,.44);
}

.theme-obsidian .currency-group,
.theme-obsidian .currency-card,
.theme-obsidian .metric,
.theme-obsidian .message-bar,
.theme-obsidian .badge,
.theme-obsidian .count-chip,
.theme-obsidian .reverse-summary-grid div,
.theme-obsidian .reverse-mod-card,
.theme-obsidian .reverse-route-step,
.theme-obsidian .reverse-route-overview > div,
.theme-obsidian .reverse-match-details {
  border-color: rgba(195, 159, 86, .18);
  background-color: rgba(9, 11, 14, .82);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.018), rgba(0,0,0,.08)),
    var(--obsidian-texture);
  background-size: auto, 620px 620px;
}

.theme-obsidian .currency-group > summary,
.theme-obsidian .reverse-route-phase h4,
.theme-obsidian .reverse-simple-route h4,
.theme-obsidian .challenge-target-mods h4 {
  color: #d6b66d;
}

.theme-obsidian .currency-card:hover,
.theme-obsidian .reverse-route-step:hover {
  border-color: rgba(219, 181, 105, .42);
}

.theme-obsidian .challenge-status-panel.success,
.theme-obsidian .challenge-score-card.success,
.theme-obsidian .item-panel.challenge-success {
  box-shadow: 0 0 0 1px rgba(115, 214, 140, .5), 0 0 44px rgba(54, 173, 84, .18), var(--obsidian-shadow);
}

/* Keep ornate framing restrained on small viewports. */
@media (max-width: 820px) {
  .theme-obsidian .topbar {
    min-height: auto;
    padding: 30px 34px;
    background-size: cover;
  }

  .theme-obsidian .entrance-card {
    padding: 46px 32px 40px;
  }

  .theme-obsidian .primary-home-choice {
    min-height: 150px;
  }

  .theme-obsidian .home-info-card,
  .theme-obsidian .legal-disclosure-card {
    padding: 34px 30px;
  }
}

@media (max-width: 520px) {
  body.theme-obsidian {
    background-size: auto, auto, 680px 680px;
  }

  .theme-obsidian .entrance-card {
    padding: 38px 22px 32px;
  }

  .theme-obsidian .primary-home-choice {
    border-image-width: 15px 18px;
    padding: 24px 22px;
  }

  .theme-obsidian .item-panel,
  .theme-obsidian .currency-panel,
  .theme-obsidian .metric-panel,
  .theme-obsidian .history-panel,
  .theme-obsidian .assumptions-panel {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-obsidian .ui-ornate-button,
  .theme-obsidian .primary-home-choice,
  .theme-obsidian .choice-btn,
  .theme-obsidian .btn {
    transition: none;
  }
}


/* Version 84 — clarity-safe framing, grim typography, and grouped setup menus */
body.theme-obsidian,
.theme-obsidian button,
.theme-obsidian input,
.theme-obsidian select,
.theme-obsidian textarea,
.theme-obsidian dialog {
  font-family: var(--grim-body-font);
}

.theme-obsidian h1,
.theme-obsidian h2,
.theme-obsidian h3,
.theme-obsidian h4,
.theme-obsidian .eyebrow,
.theme-obsidian .entrance-game,
.theme-obsidian .primary-home-choice strong,
.theme-obsidian .choice-btn strong,
.theme-obsidian .currency-group > summary,
.theme-obsidian .history-tab,
.theme-obsidian .btn.primary {
  font-family: var(--grim-heading-font);
  font-weight: 700;
  letter-spacing: .045em;
}

.theme-obsidian .eyebrow,
.theme-obsidian .entrance-game {
  letter-spacing: .16em;
}

/* The header now uses a true nine-sliced high-resolution frame. Corners and
   engravings retain their original pixels instead of being stretched across
   the full workspace width. */
.theme-obsidian .topbar {
  isolation: isolate;
  overflow: visible;
  background-image:
    linear-gradient(90deg, rgba(8, 10, 13, .92), rgba(18, 18, 18, .72), rgba(8, 10, 13, .92)),
    var(--obsidian-texture);
  background-size: auto, 720px 720px;
  background-position: center;
  background-repeat: no-repeat, repeat;
  filter: none;
  box-shadow: 0 18px 34px rgba(0,0,0,.42), inset 0 0 35px rgba(0,0,0,.45);
}

.theme-obsidian .topbar::before {
  content: "";
  position: absolute;
  inset: -9px -12px;
  z-index: 0;
  pointer-events: none;
  border: 44px solid transparent;
  border-image-source: var(--obsidian-header-frame-hires);
  border-image-slice: 150 265 150 265;
  border-image-width: 38px 58px;
  border-image-outset: 2px;
  border-image-repeat: stretch;
  filter: drop-shadow(0 13px 20px rgba(0,0,0,.52));
}

.theme-obsidian .topbar > * {
  position: relative;
  z-index: 1;
}

/* The current-item workspace uses its own high-resolution nine-sliced frame.
   The dark content surface remains CSS-rendered, so the frame never has to be
   scaled as one large bitmap. */
.theme-obsidian .item-panel {
  isolation: isolate;
  overflow: visible;
  border-color: transparent;
  background-color: rgba(10, 12, 15, .965);
  background-image:
    linear-gradient(180deg, rgba(15, 16, 20, .86), rgba(7, 9, 12, .96)),
    var(--obsidian-texture);
  background-size: auto, 720px 720px;
  background-position: center;
  background-repeat: no-repeat, repeat;
  box-shadow: 0 26px 68px rgba(0,0,0,.58), inset 0 0 45px rgba(0,0,0,.43);
}

.theme-obsidian .item-panel::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: 0;
  pointer-events: none;
  border: 52px solid transparent;
  border-image-source: var(--obsidian-item-frame-hires);
  border-image-slice: 160 180 160 180;
  border-image-width: 43px 46px;
  border-image-outset: 1px;
  border-image-repeat: stretch;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,.48));
}

.theme-obsidian .item-panel > * {
  position: relative;
  z-index: 1;
}

/* Craft selection is intentionally centered as a browse-first menu. */
.theme-obsidian #choiceDialog.craft-item-dialog .dialog-card,
.theme-obsidian #choiceDialog.craft-item-dialog .dialog-card > h2,
.theme-obsidian #choiceDialog.craft-item-dialog .dialog-description,
.theme-obsidian #choiceDialog.craft-item-dialog .choice-level-control,
.theme-obsidian #choiceDialog.craft-item-dialog .choice-btn {
  text-align: center;
}

.theme-obsidian #choiceDialog.craft-item-dialog .choice-btn strong,
.theme-obsidian #choiceDialog.craft-item-dialog .choice-btn span {
  text-align: center;
}

/* Add-specific-modifier grouping. Desecrated setup choices are kept in a
   separate collapsed section until the user opens it or searches for them. */
.theme-obsidian .modifier-choice-section {
  margin: 10px 0;
  border: 1px solid rgba(199, 162, 88, .24);
  background: rgba(6, 8, 11, .58);
  box-shadow: inset 0 0 22px rgba(0,0,0,.24);
}

.theme-obsidian .modifier-choice-section > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 15px;
  color: #d8ba76;
  font-family: var(--grim-heading-font);
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
}

.theme-obsidian .modifier-choice-section[open] > summary {
  border-bottom-color: rgba(199, 162, 88, .2);
}

.theme-obsidian .modifier-choice-section > summary::-webkit-details-marker {
  display: none;
}

.theme-obsidian .modifier-choice-section > summary::after {
  content: "+";
  float: right;
  color: rgba(236, 205, 137, .7);
}

.theme-obsidian .modifier-choice-section[open] > summary::after {
  content: "−";
}

.theme-obsidian .modifier-choice-section-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.theme-obsidian .modifier-choice-section.desecrated-section {
  border-color: rgba(112, 190, 145, .32);
  background: rgba(8, 25, 18, .48);
}

.theme-obsidian .modifier-choice-section.desecrated-section > summary {
  color: #93cfaa;
}

/* Reverse Craft now prioritizes a short, action-only list. */
.theme-obsidian .reverse-simple-route ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 1.5rem;
}

.theme-obsidian .reverse-simple-route li {
  padding: 10px 12px;
  border: 1px solid rgba(196, 160, 87, .18);
  background: rgba(5, 7, 10, .58);
}

.theme-obsidian .reverse-simple-route li b,
.theme-obsidian .reverse-simple-route li span {
  display: block;
}

.theme-obsidian .reverse-simple-route li span {
  margin-top: 3px;
  color: #d9cfba;
}

@media (max-width: 820px) {
  .theme-obsidian .topbar::before {
    inset: -5px;
    border-width: 34px;
    border-image-width: 30px 38px;
  }

  .theme-obsidian .item-panel::before {
    inset: -4px;
    border-width: 40px;
    border-image-width: 34px;
  }
}


/* Version 85 — unified outer framing and workspace alignment */

/* One ornate frame sits at the true outer edge of the home card. */
.theme-obsidian .entrance-card {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border: 0;
  background-color: rgba(10, 12, 15, .97);
  background-image:
    linear-gradient(180deg, rgba(15, 16, 20, .84), rgba(6, 8, 11, .95)),
    var(--obsidian-texture);
  background-size: auto, 720px 720px;
  background-position: center;
  background-repeat: no-repeat, repeat;
  box-shadow: 0 34px 110px rgba(0, 0, 0, .74), inset 0 0 55px rgba(0,0,0,.42);
}

.theme-obsidian .entrance-card::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: 0;
  pointer-events: none;
  border: 54px solid transparent;
  border-image-source: var(--obsidian-item-frame-hires);
  border-image-slice: 160 180 160 180;
  border-image-width: 46px 50px;
  border-image-outset: 1px;
  border-image-repeat: stretch;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,.56));
}

.theme-obsidian .entrance-card > * {
  position: relative;
  z-index: 1;
}

.theme-obsidian .entrance-byline {
  margin: -5px 0 4px;
  color: rgba(188, 166, 119, .46);
  font-size: .68rem;
  letter-spacing: .095em;
}

.theme-obsidian .entrance-version {
  margin: 4px 0 24px;
  color: rgba(176, 164, 139, .36);
  font-size: .64rem;
  letter-spacing: .1em;
}

/* Currency Library uses the same nine-sliced outer frame as Current Item. */
.theme-obsidian .currency-panel {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border-color: transparent;
  background-color: rgba(10, 12, 15, .965);
  background-image:
    linear-gradient(180deg, rgba(15, 16, 20, .86), rgba(7, 9, 12, .96)),
    var(--obsidian-texture);
  background-size: auto, 720px 720px;
  background-position: center;
  background-repeat: no-repeat, repeat;
  box-shadow: 0 26px 68px rgba(0,0,0,.58), inset 0 0 45px rgba(0,0,0,.43);
}

.theme-obsidian .currency-panel::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: 0;
  pointer-events: none;
  border: 52px solid transparent;
  border-image-source: var(--obsidian-item-frame-hires);
  border-image-slice: 160 180 160 180;
  border-image-width: 43px 46px;
  border-image-outset: 1px;
  border-image-repeat: stretch;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,.48));
}

.theme-obsidian .currency-panel > * {
  position: relative;
  z-index: 1;
}

/* Current Item and its workspace selector are centered inside the frame. */
.theme-obsidian .item-panel > .panel-heading {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.theme-obsidian .item-panel > .panel-heading > div:first-child {
  width: 100%;
}

.theme-obsidian .item-panel .item-selector-stack {
  align-items: center;
  justify-items: center;
}

.theme-obsidian .item-panel .boot-selector-label {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.theme-obsidian .item-panel .save-base-controls {
  width: min(250px, 100%);
  justify-items: stretch;
}

.theme-obsidian .item-panel .badge-row {
  justify-content: center;
}

/* Setup modifier choices use centered title and detail copy at every tier. */
.theme-obsidian .setup-modifier-dialog .choice-btn,
.theme-obsidian .setup-modifier-dialog .choice-btn strong,
.theme-obsidian .setup-modifier-dialog .choice-btn span {
  width: 100%;
  text-align: center;
}

.theme-obsidian .setup-modifier-dialog .choice-btn {
  justify-items: center;
  align-content: center;
}

@media (max-width: 820px) {
  .theme-obsidian .entrance-card::before {
    inset: -6px;
    border-width: 40px;
    border-image-width: 34px 38px;
  }

  .theme-obsidian .currency-panel::before {
    inset: -4px;
    border-width: 40px;
    border-image-width: 34px;
  }
}

/* Version 86 — differentiated work zones and resilient secondary windows */
.theme-obsidian {
  --obsidian-currency-frame-hires: url("assets/ui/obsidian/currency-frame-blue-gold.png");
  --obsidian-secondary-frame-hires: url("assets/ui/obsidian/secondary-frame-red-gold.png");
}

/* Currency Library: blue-steel and aged-gold nine-slice frame. */
.theme-obsidian .currency-panel {
  background-image:
    linear-gradient(180deg, rgba(11, 20, 34, .9), rgba(5, 10, 18, .97)),
    var(--obsidian-texture);
  box-shadow: 0 26px 68px rgba(0,0,0,.62), inset 0 0 52px rgba(26, 77, 128, .13);
}

.theme-obsidian .currency-panel::before {
  border-image-source: var(--obsidian-currency-frame-hires);
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.52)) drop-shadow(0 0 11px rgba(52, 104, 168, .12));
}

.theme-obsidian .currency-panel > .panel-heading {
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 14px;
}

.theme-obsidian .currency-panel > .panel-heading > div {
  width: 100%;
  text-align: center;
}

.theme-obsidian .currency-panel > .panel-heading h2 {
  margin-inline: auto;
  color: #c9d9ef;
  text-shadow: 0 1px 0 #03070c, 0 0 18px rgba(82, 133, 196, .15);
}

.theme-obsidian .currency-panel > .panel-heading .count-chip {
  margin-inline: auto;
}

.theme-obsidian .normal-currency-section + .normal-currency-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(111, 153, 205, .14);
}

/* Current Item heading sits clear of the top frame. */
.theme-obsidian .item-panel > .panel-heading {
  margin-top: 18px;
  padding-top: 12px;
}

.theme-obsidian .item-panel > .panel-heading .eyebrow {
  margin-bottom: 7px;
}

/* All secondary and tertiary windows use the same red/bronze nine-slice. */
.theme-obsidian dialog {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.theme-obsidian .dialog-card,
.theme-obsidian .home-info-card,
.theme-obsidian .modifier-browser-card,
.theme-obsidian .legal-disclosure-card {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border: 0;
  background-color: rgba(15, 8, 9, .985);
  background-image:
    linear-gradient(180deg, rgba(35, 12, 15, .74), rgba(8, 7, 10, .96)),
    var(--obsidian-texture);
  background-size: auto, 720px 720px;
  background-position: center;
  background-repeat: no-repeat, repeat;
  box-shadow: 0 34px 105px rgba(0,0,0,.74), inset 0 0 54px rgba(97, 17, 23, .16);
}

.theme-obsidian .dialog-card::before,
.theme-obsidian .home-info-card::before,
.theme-obsidian .modifier-browser-card::before,
.theme-obsidian .legal-disclosure-card::before {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: 0;
  pointer-events: none;
  border: 52px solid transparent;
  border-image-source: var(--obsidian-secondary-frame-hires);
  border-image-slice: 160 180 160 180;
  border-image-width: 43px 46px;
  border-image-outset: 1px;
  border-image-repeat: stretch;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.58)) drop-shadow(0 0 12px rgba(130, 35, 42, .12));
}

.theme-obsidian .dialog-card > *,
.theme-obsidian .home-info-card > *,
.theme-obsidian .modifier-browser-card > *,
.theme-obsidian .legal-disclosure-card > * {
  position: relative;
  z-index: 1;
}

.theme-obsidian .dialog-card > .eyebrow,
.theme-obsidian .home-info-card > .entrance-game,
.theme-obsidian .modifier-browser-card .eyebrow {
  color: #c98f86;
}

.theme-obsidian .dialog-card > h2,
.theme-obsidian .home-info-card > h2,
.theme-obsidian .modifier-browser-card h2 {
  color: #ead2bd;
  text-shadow: 0 1px 0 #140607, 0 0 18px rgba(165, 55, 55, .12);
}

/* Setup choices remain centered and the button always receives pointer input. */
.theme-obsidian #addSpecificModifierBtn {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.theme-obsidian .setup-modifier-dialog .choice-btn,
.theme-obsidian .setup-modifier-dialog .choice-btn strong,
.theme-obsidian .setup-modifier-dialog .choice-btn span {
  text-align: center;
  justify-content: center;
}

.theme-obsidian .craft-item-dialog .choice-btn span:empty {
  display: none;
}

@media (max-width: 820px) {
  .theme-obsidian .dialog-card::before,
  .theme-obsidian .home-info-card::before,
  .theme-obsidian .modifier-browser-card::before,
  .theme-obsidian .legal-disclosure-card::before {
    inset: -5px;
    border-width: 40px;
    border-image-width: 34px 38px;
  }

  .theme-obsidian .item-panel > .panel-heading {
    margin-top: 10px;
    padding-top: 8px;
  }
}

/* Version 87 — scroll-safe framed windows, dialog cleanup, and abyssal Well of Souls */
.theme-obsidian {
  --obsidian-well-frame-hires: url("assets/ui/obsidian/well-of-souls-frame-green.png");
}

/* Keep every secondary window inside its ornate frame while the content area scrolls. */
.theme-obsidian dialog {
  max-height: min(94vh, 960px);
}

.theme-obsidian .dialog-card {
  box-sizing: border-box;
  width: 100%;
  max-height: min(88vh, 900px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 58px 54px 42px;
}

.theme-obsidian .dialog-card > h2,
.theme-obsidian .dialog-card > p,
.theme-obsidian .dialog-card > .eyebrow {
  flex: 0 0 auto;
  text-align: center;
}

.theme-obsidian .dialog-card > h2 {
  margin: 0 0 9px;
  line-height: 1.2;
}

.theme-obsidian .dialog-options {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3px 9px 9px 2px;
  margin: 14px 0 10px;
}

.theme-obsidian .dialog-option-list {
  min-width: 0;
}

.theme-obsidian .dialog-cancel,
.theme-obsidian .dialog-secondary {
  flex: 0 0 auto;
  align-self: center;
  width: min(300px, 100%);
  margin: 8px auto 0;
  text-align: center;
}

/* Suggestion dialog: one Cancel control, centered title, and contained editor. */
.theme-obsidian #choiceDialog.suggestion-dialog,
.theme-obsidian #choiceDialog.bug-report-dialog {
  width: min(760px, calc(100% - 34px));
}

.theme-obsidian #choiceDialog.suggestion-dialog .dialog-card > h2,
.theme-obsidian #choiceDialog.bug-report-dialog .dialog-card > h2 {
  text-align: center;
}

.theme-obsidian .issue-report-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.theme-obsidian .issue-report-text {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.theme-obsidian .issue-report-actions {
  justify-content: center;
}

.theme-obsidian .issue-report-contact {
  text-align: center;
}

/* Craft/base and setup windows remain clear of the top and bottom frame ornaments. */
.theme-obsidian #choiceDialog.craft-item-dialog .dialog-card,
.theme-obsidian #choiceDialog.setup-modifier-dialog .dialog-card {
  padding-top: 66px;
  padding-bottom: 44px;
}

.theme-obsidian #choiceDialog.craft-item-dialog .dialog-card > h2,
.theme-obsidian #choiceDialog.setup-modifier-dialog .dialog-card > h2,
.theme-obsidian #choiceDialog.setup-modifier-dialog .dialog-card > p {
  text-align: center;
}

/* Patch Notes, Reverse Craft, Challenge, and Guide content scroll inside the frame. */
.theme-obsidian .home-info-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(880px, 94vw);
  max-height: min(88vh, 900px);
  min-height: 0;
  overflow: hidden;
  padding: 58px 54px 44px;
}

.theme-obsidian .home-info-card > .entrance-game,
.theme-obsidian .home-info-card > h2 {
  flex: 0 0 auto;
  text-align: center;
}

.theme-obsidian .home-info-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 10px 8px 2px;
}

.theme-obsidian .home-info-overlay.reverse-compact .home-info-card,
.theme-obsidian .home-info-overlay.challenge-mode .home-info-card,
.theme-obsidian .home-info-overlay.patch-notes-mode .home-info-card {
  max-height: min(90vh, 930px);
}

.theme-obsidian .home-info-overlay.reverse-compact .home-info-content,
.theme-obsidian .home-info-overlay.challenge-mode .home-info-content,
.theme-obsidian .home-info-overlay.patch-notes-mode .home-info-content {
  overflow-y: auto;
}

.theme-obsidian .home-info-close {
  top: 22px;
  right: 24px;
  z-index: 4;
}

/* Modifier browser follows the same fixed-frame / scrolling-content model. */
.theme-obsidian .modifier-browser-card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 920px);
  overflow: hidden;
  padding: 58px 50px 42px;
}

.theme-obsidian .modifier-browser-content {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

/* Currency search is the only normal-library filter and sits centered. */
.theme-obsidian .currency-panel .library-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.theme-obsidian .currency-panel #currencySearch {
  width: min(640px, 100%);
  margin: 0 auto;
  text-align: center;
}

/* Larger, green abyssal Well of Souls reveal surface. */
.theme-obsidian #choiceDialog.well-of-souls-dialog {
  width: min(790px, calc(100% - 28px));
  max-height: min(94vh, 960px);
}

.theme-obsidian #choiceDialog.well-of-souls-dialog .dialog-card {
  min-height: min(640px, 86vh);
  padding: 76px 62px 50px;
  background-color: rgba(4, 18, 12, .985);
  background-image:
    radial-gradient(circle at 50% 22%, rgba(44, 133, 87, .16), transparent 42%),
    linear-gradient(180deg, rgba(7, 39, 25, .86), rgba(3, 13, 9, .97)),
    var(--obsidian-texture);
  box-shadow: 0 36px 112px rgba(0,0,0,.78), inset 0 0 70px rgba(34, 139, 82, .16);
}

.theme-obsidian #choiceDialog.well-of-souls-dialog .dialog-card::before {
  border-image-source: var(--obsidian-well-frame-hires);
  filter: drop-shadow(0 20px 32px rgba(0,0,0,.64)) drop-shadow(0 0 16px rgba(45, 151, 90, .18));
}

.theme-obsidian #choiceDialog.well-of-souls-dialog .dialog-card > .eyebrow {
  color: #91c9a7;
  margin-top: 4px;
}

.theme-obsidian #choiceDialog.well-of-souls-dialog .dialog-card > h2 {
  color: #d8eadc;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin-top: 5px;
}

.theme-obsidian #choiceDialog.well-of-souls-dialog .dialog-card > p {
  color: #aec8b7;
  font-size: .9rem;
  text-align: center;
}

.theme-obsidian #choiceDialog.well-of-souls-dialog .choice-btn {
  min-height: 92px;
  padding: 18px 20px;
  border-color: rgba(87, 177, 116, .34);
  background: rgba(7, 35, 22, .78);
  text-align: center;
}

.theme-obsidian #choiceDialog.well-of-souls-dialog .choice-btn strong {
  font-size: 1rem;
  line-height: 1.35;
  text-align: center;
}

.theme-obsidian #choiceDialog.well-of-souls-dialog .choice-btn span {
  margin-top: 7px;
  font-size: .78rem;
  line-height: 1.42;
  text-align: center;
}

.theme-obsidian #choiceDialog.well-of-souls-dialog .choice-btn:hover {
  border-color: rgba(126, 218, 153, .72);
  box-shadow: inset 0 0 28px rgba(51, 160, 96, .13), 0 0 18px rgba(40, 129, 80, .1);
}

@media (max-width: 720px) {
  .theme-obsidian .dialog-card,
  .theme-obsidian .home-info-card,
  .theme-obsidian .modifier-browser-card,
  .theme-obsidian #choiceDialog.well-of-souls-dialog .dialog-card {
    padding: 52px 26px 34px;
  }

  .theme-obsidian #choiceDialog.well-of-souls-dialog .choice-btn {
    min-height: 78px;
    padding: 14px;
  }
}

/* Version 91 — compact Current Item header and blue-steel Currency Library interior. */
.theme-obsidian .item-panel > .panel-heading {
  margin-top:10px;
  padding-top:6px;
}
.theme-obsidian .item-panel .save-base-controls {
  width:min(250px, 100%);
  grid-template-columns:repeat(2, minmax(0, 1fr));
}
.theme-obsidian .currency-panel .currency-group {
  border-color:rgba(91, 139, 195, .28);
  background-color:rgba(7, 16, 27, .9);
  background-image:
    linear-gradient(180deg, rgba(31, 60, 92, .18), rgba(3, 10, 18, .16)),
    var(--obsidian-texture);
  box-shadow:inset 0 0 26px rgba(28, 73, 119, .12);
}
.theme-obsidian .currency-panel .currency-group > summary {
  color:#bfd3eb;
  background:linear-gradient(180deg, rgba(25, 49, 76, .34), rgba(8, 20, 34, .2));
}
.theme-obsidian .currency-panel .currency-group > summary::before {
  color:#78a9df;
}
.theme-obsidian .currency-panel .group-count {
  border-color:rgba(99, 147, 202, .28);
  background:rgba(10, 28, 47, .72);
  color:#9fbbda;
}
.theme-obsidian .currency-panel .currency-image-button,
.theme-obsidian .currency-panel .currency-name-button,
.theme-obsidian .currency-panel .currency-text-button:not(.well-reveal-button) {
  border-color:rgba(73, 116, 164, .3);
  background:linear-gradient(180deg, rgba(15, 35, 57, .94), rgba(7, 19, 32, .96));
  color:#d6e3f2;
}
.theme-obsidian .currency-panel .currency-image-button.available,
.theme-obsidian .currency-panel .currency-name-button.available,
.theme-obsidian .currency-panel .currency-text-button.available:not(.well-reveal-button) {
  border-color:rgba(88, 144, 207, .48);
  background:linear-gradient(180deg, rgba(20, 49, 79, .96), rgba(9, 27, 47, .98));
}
.theme-obsidian .currency-panel .currency-image-button.available:hover,
.theme-obsidian .currency-panel .currency-name-button.available:hover,
.theme-obsidian .currency-panel .currency-text-button.available:not(.well-reveal-button):hover {
  border-color:#83b3e7;
  box-shadow:0 0 0 2px rgba(91, 150, 216, .12), inset 0 0 18px rgba(76, 138, 207, .1);
}
.theme-obsidian .currency-panel .currency-fallback-label {
  border-color:#416b96;
  background:radial-gradient(circle, #193b5d, #0a1b2c 72%);
  color:#d5e6f7;
}
.theme-obsidian .currency-panel .currency-subgroup-label {
  color:#7599bf;
}
.theme-obsidian .currency-panel .normal-currency-section + .normal-currency-section,
.theme-obsidian .currency-panel .desecration-right-controls {
  border-color:rgba(105, 153, 207, .18);
}


/* Version 92 — unified window controls and warm currency surfaces */
.theme-obsidian .dialog-card,
.theme-obsidian .home-info-card,
.theme-obsidian .modifier-browser-card {
  position: relative;
}
.theme-obsidian .window-close-btn,
.theme-obsidian .home-info-close.window-close-btn,
.theme-obsidian .modifier-browser-header .window-close-btn {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 20;
  width: auto;
  min-width: 72px;
  height: 32px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: .68rem;
  line-height: 30px;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.theme-obsidian .currency-panel .currency-image-button,
.theme-obsidian .currency-panel .currency-name-button,
.theme-obsidian .currency-panel .currency-text-button:not(.well-reveal-button) {
  border-color: rgba(147, 116, 75, .42);
  background: linear-gradient(180deg, rgba(69, 55, 39, .96), rgba(43, 34, 24, .98));
  color: #eadfcf;
}
.theme-obsidian .currency-panel .currency-image-button.available,
.theme-obsidian .currency-panel .currency-name-button.available,
.theme-obsidian .currency-panel .currency-text-button.available:not(.well-reveal-button) {
  border-color: rgba(186, 145, 88, .58);
  background: linear-gradient(180deg, rgba(84, 66, 45, .98), rgba(50, 39, 27, .99));
}
.theme-obsidian .currency-panel .currency-image-button.available:hover,
.theme-obsidian .currency-panel .currency-name-button.available:hover,
.theme-obsidian .currency-panel .currency-text-button.available:not(.well-reveal-button):hover {
  border-color: #d2aa70;
  box-shadow: 0 0 0 2px rgba(194, 145, 80, .12), inset 0 0 18px rgba(218, 170, 102, .08);
}
.theme-obsidian .currency-panel .currency-fallback-label {
  border-color: #806341;
  background: radial-gradient(circle, #5a452d, #2b2117 72%);
  color: #eee0c8;
}


/* Version 93 — inset window controls and sand-brown Currency Library. */
.theme-obsidian .dialog-card,
.theme-obsidian .home-info-card,
.theme-obsidian .modifier-browser-card {
  padding-top: 78px;
}
.theme-obsidian .window-close-btn,
.theme-obsidian .home-info-close.window-close-btn,
.theme-obsidian .modifier-browser-header .window-close-btn {
  top: 34px;
  right: 36px;
}
.theme-obsidian .home-info-overlay.guide-fullscreen .home-info-close.window-close-btn {
  top: 34px;
  right: 36px;
}
.theme-obsidian .currency-panel {
  background-color: rgba(61, 48, 32, .96);
  background-image:
    linear-gradient(180deg, rgba(104, 82, 52, .72), rgba(47, 36, 23, .94)),
    var(--obsidian-texture);
  box-shadow: 0 26px 68px rgba(0,0,0,.62), inset 0 0 56px rgba(102, 70, 31, .19);
}
.theme-obsidian .currency-panel::before {
  border-image-source: var(--obsidian-item-frame-hires);
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.52)) drop-shadow(0 0 12px rgba(195, 143, 62, .16));
}
.theme-obsidian .currency-panel > .panel-heading h2 {
  color: #e1c78f;
  text-shadow: 0 1px 0 #1e1408, 0 0 18px rgba(206, 155, 74, .16);
}
.theme-obsidian .currency-panel .currency-group {
  border-color: rgba(185, 139, 76, .34);
  background-color: rgba(91, 70, 45, .72);
  background-image:
    linear-gradient(180deg, rgba(137, 104, 65, .18), rgba(57, 42, 26, .22)),
    var(--obsidian-texture);
  box-shadow: inset 0 0 28px rgba(72, 42, 17, .15);
}
.theme-obsidian .currency-panel .currency-group > summary {
  color: #ead6ad;
  background: linear-gradient(180deg, rgba(119, 88, 52, .42), rgba(71, 51, 31, .32));
}
.theme-obsidian .currency-panel .currency-group > summary::before { color: #d7ab61; }
.theme-obsidian .currency-panel .group-count {
  border-color: rgba(190, 143, 75, .34);
  background: rgba(72, 49, 27, .68);
  color: #d9bd8c;
}
.theme-obsidian .currency-panel .currency-image-button,
.theme-obsidian .currency-panel .currency-name-button,
.theme-obsidian .currency-panel .currency-text-button:not(.well-reveal-button) {
  border-color: rgba(181, 133, 76, .40);
  background: linear-gradient(180deg, rgba(95, 61, 34, .62), rgba(54, 34, 20, .68));
  color: #efe1c8;
  backdrop-filter: blur(2px);
}
.theme-obsidian .currency-panel .currency-image-button.available,
.theme-obsidian .currency-panel .currency-name-button.available,
.theme-obsidian .currency-panel .currency-text-button.available:not(.well-reveal-button) {
  border-color: rgba(215, 164, 91, .62);
  background: linear-gradient(180deg, rgba(116, 76, 41, .74), rgba(66, 41, 23, .78));
}
.theme-obsidian .currency-panel .currency-image-button.available:hover,
.theme-obsidian .currency-panel .currency-name-button.available:hover,
.theme-obsidian .currency-panel .currency-text-button.available:not(.well-reveal-button):hover {
  border-color: #e2ba76;
  box-shadow: 0 0 0 2px rgba(207, 154, 78, .13), inset 0 0 18px rgba(225, 173, 100, .10);
}
.theme-obsidian .currency-panel .currency-fallback-label {
  border-color: #a3733e;
  background: radial-gradient(circle, rgba(117, 75, 39, .86), rgba(48, 29, 16, .92) 72%);
  color: #f0dfc2;
}
.theme-obsidian .currency-panel .currency-subgroup-label { color: #c69b62; }
.theme-obsidian .currency-panel .normal-currency-section + .normal-currency-section,
.theme-obsidian .currency-panel .desecration-right-controls { border-color: rgba(188, 139, 75, .22); }
@media (max-width: 720px) {
  .theme-obsidian .window-close-btn,
  .theme-obsidian .home-info-close.window-close-btn,
  .theme-obsidian .modifier-browser-header .window-close-btn,
  .theme-obsidian .home-info-overlay.guide-fullscreen .home-info-close.window-close-btn {
    top: 24px;
    right: 24px;
  }
  .theme-obsidian .dialog-card,
  .theme-obsidian .home-info-card,
  .theme-obsidian .modifier-browser-card { padding-top: 70px; }
}


/* Version 94 — sand-gold currency controls and borderless inner item surface */
.theme-obsidian .item-card {
  border-color: transparent;
  box-shadow: inset 0 0 38px rgba(201,168,92,.055), 0 8px 30px rgba(0,0,0,.35);
}
.theme-obsidian .currency-panel {
  background-color: rgba(76, 60, 39, .94);
  background-image:
    linear-gradient(180deg, rgba(129, 101, 63, .50), rgba(58, 43, 27, .91)),
    var(--obsidian-texture);
}
.theme-obsidian .currency-panel .currency-group {
  background-color: rgba(112, 86, 54, .56);
  background-image:
    linear-gradient(180deg, rgba(161, 126, 78, .12), rgba(66, 47, 28, .17)),
    var(--obsidian-texture);
}
.theme-obsidian .currency-panel .currency-image-button,
.theme-obsidian .currency-panel .currency-name-button,
.theme-obsidian .currency-panel .currency-text-button:not(.well-reveal-button) {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(205, 158, 88, .38);
  background: linear-gradient(180deg, rgba(104, 67, 36, .39), rgba(48, 29, 17, .43));
  box-shadow:
    inset 0 0 0 1px rgba(244, 211, 153, .045),
    inset 0 7px 12px rgba(255, 225, 172, .025),
    0 1px 0 rgba(0,0,0,.46);
  backdrop-filter: blur(2.5px);
}
.theme-obsidian .currency-panel .currency-image-button::before,
.theme-obsidian .currency-panel .currency-name-button::before,
.theme-obsidian .currency-panel .currency-text-button:not(.well-reveal-button)::before {
  content: "";
  position: absolute;
  inset: 2px;
  pointer-events: none;
  border-top: 1px solid rgba(234, 193, 122, .18);
  border-bottom: 1px solid rgba(72, 42, 20, .52);
  border-radius: inherit;
}
.theme-obsidian .currency-panel .currency-image-button::after,
.theme-obsidian .currency-panel .currency-name-button::after,
.theme-obsidian .currency-panel .currency-text-button:not(.well-reveal-button)::after {
  content: "";
  position: absolute;
  inset: 5px 3px;
  pointer-events: none;
  border-left: 1px solid rgba(220, 171, 96, .10);
  border-right: 1px solid rgba(220, 171, 96, .10);
}
.theme-obsidian .currency-panel .currency-image-button.available,
.theme-obsidian .currency-panel .currency-name-button.available,
.theme-obsidian .currency-panel .currency-text-button.available:not(.well-reveal-button) {
  border-color: rgba(224, 174, 94, .54);
  background: linear-gradient(180deg, rgba(126, 82, 43, .46), rgba(61, 36, 20, .49));
}
.theme-obsidian .currency-panel .currency-image-button.available:hover,
.theme-obsidian .currency-panel .currency-name-button.available:hover,
.theme-obsidian .currency-panel .currency-text-button.available:not(.well-reveal-button):hover {
  border-color: rgba(239, 195, 117, .88);
  box-shadow: 0 0 0 1px rgba(211, 159, 80, .10), inset 0 0 15px rgba(229, 178, 97, .08);
}

/* Version 95 — stable seven-modifier workspace and lighter sand controls. */
.theme-obsidian .item-card {
  min-height: 690px;
}
.theme-obsidian .currency-panel .currency-image-button,
.theme-obsidian .currency-panel .currency-name-button,
.theme-obsidian .currency-panel .currency-text-button:not(.well-reveal-button) {
  background: linear-gradient(180deg, rgba(104, 67, 36, .18), rgba(48, 29, 17, .20));
  backdrop-filter: blur(1.5px);
}
.theme-obsidian .currency-panel .currency-image-button.available,
.theme-obsidian .currency-panel .currency-name-button.available,
.theme-obsidian .currency-panel .currency-text-button.available:not(.well-reveal-button) {
  background: linear-gradient(180deg, rgba(126, 82, 43, .22), rgba(61, 36, 20, .24));
}
@media (max-width: 720px) {
  .theme-obsidian .item-card { min-height: 620px; }
}


/* Version 96 — jewellery-quality and Genesis route behavior pass. */


/* Version 1.1.1 — stronger abyssal Well of Souls identity. */
.theme-obsidian #choiceDialog.well-of-souls-dialog {
  background:rgba(0, 24, 12, .985) !important;
  border-color:rgba(52, 218, 117, .82) !important;
  box-shadow:0 28px 90px rgba(0,0,0,.82), inset 0 0 72px rgba(26, 218, 103, .28), 0 0 38px rgba(30, 205, 96, .18) !important;
}
.theme-obsidian #choiceDialog.well-of-souls-dialog .dialog-card {
  background-color:rgba(0, 20, 10, .99) !important;
  background-image:
    radial-gradient(circle at 50% 18%, rgba(46, 235, 126, .34), transparent 44%),
    radial-gradient(circle at 50% 92%, rgba(12, 118, 61, .30), transparent 52%),
    linear-gradient(180deg, rgba(3, 58, 29, .96), rgba(0, 15, 8, .99)),
    var(--obsidian-texture) !important;
  box-shadow:0 38px 120px rgba(0,0,0,.82), inset 0 0 105px rgba(35, 222, 112, .30) !important;
}
.theme-obsidian #choiceDialog.well-of-souls-dialog .dialog-card::before {
  filter:saturate(1.55) brightness(.92) drop-shadow(0 20px 34px rgba(0,0,0,.68)) drop-shadow(0 0 26px rgba(35, 230, 113, .36)) !important;
}
.theme-obsidian #choiceDialog.well-of-souls-dialog .choice-btn {
  border-color:rgba(77, 226, 132, .62) !important;
  background:linear-gradient(180deg, rgba(7, 75, 38, .92), rgba(1, 31, 16, .96)) !important;
  box-shadow:inset 0 0 30px rgba(38, 206, 105, .20) !important;
}
.theme-obsidian #choiceDialog.well-of-souls-dialog .choice-btn:hover {
  border-color:rgba(132, 255, 173, .94) !important;
  background:linear-gradient(180deg, rgba(11, 105, 52, .96), rgba(1, 43, 22, .98)) !important;
  box-shadow:inset 0 0 38px rgba(54, 240, 132, .27), 0 0 24px rgba(39, 222, 112, .20) !important;
}

.theme-obsidian .sandbox-byline {
  color:#c1b18a !important;
  text-shadow:0 1px 0 rgba(0,0,0,.72) !important;
  opacity:.9;
}
