/* HD Forge Chamber ? Anvil Sanctuary. Classic presentation remains untouched. */
@media (min-width: 1201px) {
  body.graphics-hd-ui:has(#game.graphics-hd) .screen-overlay.visible:has(.forge-sanctuary) {
    position: fixed;
    inset: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: clamp(34px, 5vh, 62px) clamp(42px, 5vw, 92px);
    overflow: hidden;
    background: #030404 url("assets/hd/ui/forge/anvil-sanctuary-background.png") center / cover no-repeat;
    backdrop-filter: none;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary {
    width: min(760px, 55vw);
    max-width: none;
    height: min(730px, 88vh);
    max-height: none;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: clamp(12px, 1.65vh, 18px);
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: drop-shadow(0 14px 30px #000c);
    color: #c9bfb2;
    text-shadow: 0 2px 3px #000;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary-header {
    display: grid;
    gap: 8px;
    text-align: center;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .overlay-title {
    margin: 0;
    color: #e6ddd0;
    font: 600 clamp(2rem, 3vw, 3.15rem)/0.95 Georgia, "Times New Roman", serif;
    letter-spacing: clamp(3px, 0.42vw, 7px);
    text-transform: uppercase;
    text-shadow: 0 4px 5px #000, 0 0 22px #b96f2b22;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .overlay-sub {
    margin: 0 0 2px;
    color: #9b8e7d;
    font-size: clamp(0.62rem, 0.75vw, 0.76rem);
    letter-spacing: clamp(1.7px, 0.18vw, 3px);
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-context {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-block: 1px solid #574a3c;
    background: #070707e8 url("assets/hd/ui/abyssal-gothic/panel-texture.png") center / 320px 320px;
    box-shadow: inset 0 0 20px #000b;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-context > span {
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 10px;
    border: 0;
    border-right: 1px solid #4c4035;
    background: transparent;
    box-shadow: none;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-context > span:last-child {
    border-right: 0;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-context small {
    color: #817566;
    font-size: clamp(0.5rem, 0.58vw, 0.6rem);
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-context strong {
    color: #c7bda9;
    font-size: clamp(0.64rem, 0.75vw, 0.76rem);
    letter-spacing: 0.7px;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 1.2vw, 18px);
    align-content: stretch;
    padding: 0;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto;
    align-content: start;
    align-items: center;
    justify-items: center;
    gap: clamp(8px, 1.2vh, 14px);
    padding: clamp(34px, 4.8vh, 46px) clamp(16px, 1.7vw, 24px) clamp(20px, 2.8vh, 28px);
    overflow: hidden;
    border: 1px solid #5f5549;
    background: #080909e8 url("assets/hd/ui/abyssal-gothic/panel-texture.png") center / 320px 320px;
    box-shadow: inset 0 0 34px #000d, 0 12px 28px #0007;
    text-align: center;
    cursor: pointer;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice::before {
    content: "";
    position: absolute;
    inset: 8px;
    pointer-events: none;
    border: 1px solid #4039308f;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice-emblem {
    align-self: center;
    width: clamp(98px, 10vw, 142px);
    height: clamp(98px, 10vw, 142px);
    display: block;
    border-radius: 50%;
    object-fit: cover;
    filter: saturate(0.68) brightness(0.78) contrast(1.08);
    box-shadow: 0 7px 20px #000c;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice-copy {
    align-self: center;
    display: grid;
    gap: clamp(9px, 1.1vh, 13px);
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice-copy > strong {
    color: #d8d0c5;
    font: 600 clamp(1.45rem, 2vw, 2rem)/1 Georgia, "Times New Roman", serif;
    letter-spacing: 2.2px;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice-copy > p {
    margin: 0;
    color: #968b80;
    font: 400 clamp(0.72rem, 0.87vw, 0.9rem)/1.55 Georgia, "Times New Roman", serif;
    letter-spacing: 0.25px;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary :is(.forge-choice, .forge-relic-choice, .forge-footer):hover,
  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary :is(.forge-choice, .forge-relic-choice, .forge-footer):focus-visible,
  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary :is(.forge-choice, .forge-relic-choice, .forge-footer).hd-nav-selected {
    outline: 2px solid #d7ad5e;
    outline-offset: 2px;
    border-color: #b88944;
    box-shadow: inset 0 0 38px #6a3b183d, 0 0 0 1px #151006, 0 0 24px #c57c2838;
    filter: brightness(1.08);
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice.hd-nav-selected .forge-choice-emblem {
    filter: saturate(0.9) brightness(0.96) contrast(1.06);
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice.disabled {
    opacity: 0.48;
    filter: saturate(0.35);
    cursor: not-allowed;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice.disabled:hover,
  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice.disabled:focus-visible,
  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice.disabled.hd-nav-selected {
    outline-color: #6e6256;
    border-color: #62584d;
    box-shadow: inset 0 0 34px #000d;
    filter: saturate(0.35);
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-footer {
    min-height: clamp(52px, 6.2vh, 64px);
    display: grid;
    place-content: center;
    gap: 4px;
    border: 0;
    background-color: #070807ed;
    background-image: url("assets/hd/ui/abyssal-gothic/section-plaque.png"), url("assets/hd/ui/abyssal-gothic/panel-texture.png");
    background-position: center, center;
    background-repeat: no-repeat, repeat;
    background-size: 100% 100%, 280px 280px;
    color: #bbb1a5;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 8px 22px #0008;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-footer strong {
    color: #d8d0c3;
    font: 600 clamp(0.9rem, 1.15vw, 1.2rem)/1 Georgia, "Times New Roman", serif;
    letter-spacing: 2.4px;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-footer small {
    color: #786e64;
    font-size: 0.55rem;
    letter-spacing: 0.7px;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-controls {
    margin: -4px 0 0;
    color: #72695f;
    font-size: clamp(0.52rem, 0.6vw, 0.62rem);
    letter-spacing: 0.7px;
    text-align: center;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-controls span {
    color: #a69782;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-controls i::after {
    content: "|";
    margin: 0 10px;
    color: #443c34;
    font-style: normal;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary.overlay-card-forge-transmute {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-relic-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 9px 11px;
    align-content: stretch;
    padding: 0;
    overflow: hidden;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-relic-grid-single {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(92px, 0.34fr);
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-relic-choice {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    overflow: hidden;
    border: 1px solid #51493f;
    background: #080909e9 url("assets/hd/ui/abyssal-gothic/panel-texture.png") center / 300px 300px;
    box-shadow: inset 0 0 22px #000c;
    text-align: left;
    cursor: pointer;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-relic-icon {
    width: 42px;
    height: 42px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px #000);
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-relic-icon-fallback {
    border: 1px solid var(--forge-rarity, #6f675d);
    background-color: #11100f;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-relic-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-relic-name {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 7px;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-relic-name strong,
  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-relic-copy > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-relic-name strong {
    color: #d7cfc4;
    font: 600 clamp(0.72rem, 0.84vw, 0.87rem)/1 Georgia, "Times New Roman", serif;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-relic-name em {
    color: var(--forge-rarity, #aaa);
    font-size: 0.49rem;
    font-style: normal;
    letter-spacing: 0.75px;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-relic-copy > span {
    color: #817970;
    font-size: clamp(0.54rem, 0.62vw, 0.64rem);
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-relic-action {
    color: #b88350;
    font-size: 0.53rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-sanctuary {
    width: min(820px, 59vw);
    grid-template-areas:
      "title"
      "subtitle"
      "panel"
      "hint";
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: clamp(9px, 1.3vh, 14px);
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-sanctuary > .overlay-title {
    grid-area: title;
    text-align: center;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-sanctuary > .overlay-sub {
    grid-area: subtitle;
    text-align: center;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-sanctuary > .overlay-hint {
    grid-area: hint;
    margin: 0;
    color: #756b60;
    font-size: clamp(0.52rem, 0.62vw, 0.64rem);
    letter-spacing: 0.75px;
    text-align: center;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-sanctuary .forge-reward-panel {
    grid-area: panel;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(10px, 1.35vh, 14px);
    margin: 0;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-context {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-block: 1px solid #574a3c;
    background: #070707e8 url("assets/hd/ui/abyssal-gothic/panel-texture.png") center / 320px 320px;
    box-shadow: inset 0 0 20px #000b;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-context > span {
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 10px;
    border-right: 1px solid #4c4035;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-context > span:last-child {
    border-right: 0;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-context small {
    color: #817566;
    font-size: clamp(0.5rem, 0.58vw, 0.6rem);
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-context strong {
    min-width: 0;
    overflow: hidden;
    color: #c7bda9;
    font-size: clamp(0.64rem, 0.75vw, 0.76rem);
    letter-spacing: 0.7px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-grid {
    min-height: 0;
    align-content: stretch;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-grid-forge-temper {
    grid-template-columns: minmax(0, 390px);
    justify-content: center;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-grid-forge-transmute {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .forge-reward-choice {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(118px, 0.88fr) auto;
    align-content: center;
    justify-items: center;
    gap: clamp(12px, 1.6vh, 18px);
    padding: clamp(22px, 3vh, 30px) clamp(15px, 1.4vw, 22px);
    border-color: color-mix(in srgb, var(--relic-border, #62574a) 72%, #514436);
    background:
      radial-gradient(circle at 50% 29%, color-mix(in srgb, var(--relic-accent, #9a7956) 14%, transparent), transparent 52%),
      #080909e9 url("assets/hd/ui/abyssal-gothic/panel-texture.png") center / 320px 320px;
    box-shadow: inset 0 0 36px #000d, 0 12px 28px #0007;
    text-align: center;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .forge-reward-choice::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid color-mix(in srgb, var(--relic-accent, #8d765f) 24%, transparent);
    pointer-events: none;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .forge-reward-choice::after {
    display: none;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .forge-reward-choice .relic-draft-icon {
    position: static;
    align-self: end;
    width: clamp(104px, 9vw, 138px);
    height: clamp(104px, 9vw, 138px);
    opacity: 0.92;
    object-fit: contain;
    filter: saturate(0.82) brightness(0.9) drop-shadow(0 8px 13px #000d);
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-key {
    display: none;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-choice-copy {
    align-self: start;
    justify-items: center;
    gap: 8px;
    padding: 0;
    text-align: center;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-rarity {
    font-size: clamp(0.52rem, 0.62vw, 0.63rem);
    letter-spacing: 1.5px;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-choice-copy strong {
    overflow: visible;
    color: #ddd4c8;
    font: 600 clamp(1rem, 1.28vw, 1.28rem)/1.08 Georgia, "Times New Roman", serif;
    letter-spacing: 0.55px;
    text-overflow: clip;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-choice-copy small {
    color: #90867b;
    font: 400 clamp(0.62rem, 0.72vw, 0.72rem)/1.45 Georgia, "Times New Roman", serif;
    -webkit-line-clamp: 4;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .forge-reward-choice:hover,
  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .forge-reward-choice:focus-visible,
  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .forge-reward-choice.hd-nav-selected {
    outline: 2px solid #d7ad5e;
    outline-offset: 2px;
    border-color: #b88944;
    box-shadow: inset 0 0 38px #6a3b183d, 0 0 0 1px #151006, 0 0 24px #c57c2838;
    filter: brightness(1.08);
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .forge-reward-choice.hd-nav-selected .relic-draft-icon {
    opacity: 1;
    filter: saturate(1) brightness(1) drop-shadow(0 8px 13px #000d);
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-skip {
    min-height: clamp(54px, 6.5vh, 66px);
    display: grid;
    place-content: center;
    gap: 4px;
    border: 0;
    background-color: #070807ed;
    background-image: url("assets/hd/ui/abyssal-gothic/section-plaque.png"), url("assets/hd/ui/abyssal-gothic/panel-texture.png");
    background-position: center, center;
    background-repeat: no-repeat, repeat;
    background-size: 100% 100%, 280px 280px;
    box-shadow: 0 8px 22px #0008;
    text-align: center;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-skip strong {
    color: #d8d0c3;
    font: 600 clamp(0.86rem, 1.06vw, 1.1rem)/1 Georgia, "Times New Roman", serif;
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-skip small {
    color: #786e64;
    font-size: 0.55rem;
    letter-spacing: 0.7px;
    text-transform: uppercase;
  }

  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-skip:hover,
  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-skip:focus-visible,
  body.graphics-hd-ui:has(#game.graphics-hd) .forge-reward-panel .relic-draft-skip.hd-nav-selected {
    outline: 2px solid #d7ad5e;
    outline-offset: 2px;
    box-shadow: inset 0 0 30px #6a3b183d, 0 0 24px #c57c2838;
    filter: brightness(1.08);
  }

  @media (max-height: 760px) {
    body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary {
      height: min(650px, 92vh);
      gap: 10px;
    }

    body.graphics-hd-ui:has(#game.graphics-hd) .forge-sanctuary .forge-choice-emblem {
      width: 92px;
      height: 92px;
    }
  }
}
