@import url('assets/fonts/brk-fonts.css');

@property --browse-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --text-main: rgba(237, 229, 212, 0.96);
  --text-muted: rgba(201, 191, 173, 0.78);
  --text-dim: rgba(154, 146, 131, 0.46);
  --browse-primary: rgba(95, 1, 1, 0.98);
  --browse-deep: rgba(177, 8, 8, 0.98);
  --browse-highlight: rgba(197, 32, 7, 0.96);
  --browse-accent: rgba(193, 137, 34, 0.98);
  --browse-duration: 5250ms;
  --browse-opacity: 0.94;
  --ink-panel-opacity: 0.78;
  --black: #050403;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--black); color: var(--text-main); }
body { overflow: hidden; font-family: 'RDRLino', Georgia, serif; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus { outline: none; }

.world-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 68% 52%, rgba(75, 5, 3, .10), transparent 35%),
    #030202;
}
.world-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.18), transparent 26%, transparent 76%, rgba(0,0,0,.18));
}
.vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 180px 64px rgba(0,0,0,.92), inset 0 -90px 150px rgba(0,0,0,.58);
}


#app { position: relative; z-index: 2; width: 100vw; height: 100vh; display: grid; grid-template-columns: 540px 1fr; gap: clamp(28px, 3vw, 66px); padding: 3.2vh 4vw; }

/* Route replacement behavior -------------------------------------------------
   The root BRK menu is the Home menu only. Opening any other route removes it
   and lets that route occupy the same left edge. Escape/Backspace restores the
   prior route through app.js history. */
#app.is-subroute {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
#app.is-subroute > .brk-shell { display: none; }
#app.is-subroute > .stage {
  grid-column: 1;
  width: 100%;
}

/* A resource's own navigation becomes the BRK menu in the original left slot. */
#app.is-resource-route .docs-view {
  padding: 0 0 70px;
}
#app.is-resource-route .docs-columns {
  width: 100%;
  min-height: 92vh;
  margin: 0;
  grid-template-columns: 540px minmax(0, 1fr);
  gap: clamp(28px, 3vw, 66px);
}
#app.is-resource-route .resource-sections {
  width: 540px;
  height: min(864px, 92vh);
  min-height: 720px;
  padding: 34px 54px 46px;
}
#app.is-resource-route .resource-sections .stage-list {
  width: 432px;
  margin: 0;
}
#app.is-resource-route .resource-sections .section-row {
  width: 432px;
}
#app.is-resource-route .doc-canvas {
  min-height: min(864px, 92vh);
}

/* Exact BRK Menu proportions / surface language */
.brk-shell {
  position: relative; width: 540px; height: min(864px, 92vh); min-height: 720px;
  filter: drop-shadow(0 16px 22px rgba(0,0,0,.58)); overflow: visible; isolation: isolate;
  display: flex; flex-direction: column; padding: 0 54px;
}
.shell-ink {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: url('assets/ui/inkroller_1a.png') top left / 100% 864px repeat-y;
  opacity: var(--ink-panel-opacity);
}
.shell-header {
  position: relative;
  flex: 0 0 178px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: center;
  padding: 28px 12px 18px;
}
.shell-eyebrow {
  font-family: 'RDRLino', Georgia, serif;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 2.2px;
  color: rgba(200,188,167,.58);
  text-transform: uppercase;
  text-shadow: 0 2px 2px #000;
}
.shell-title {
  margin-top: 7px;
  font-family: 'Redemption', Georgia, serif;
  font-size: 48px;
  line-height: .9;
  letter-spacing: 1px;
  color: rgba(239,231,214,.95);
  text-transform: uppercase;
  text-shadow: 0 3px 3px rgba(0,0,0,.95);
}
.header-rule, .stage-divider { height: 4px; background: url('assets/ui/divider_line.png') center / 100% 4px no-repeat; opacity: .38; }
.header-rule { width: 408px; margin: 18px auto 0; }

.menu-rows { display: flex; flex-direction: column; gap: 6px; }
.menu-row,
.stage-row,
.resource-card,
.section-row {
  position: relative; overflow: hidden; border: 0; outline: 0; cursor: pointer;
  background: url('assets/ui/selection_box_bg_1d.png') center / 100% 100% no-repeat;
  color: var(--text-muted);
}
.menu-row { width: 432px; height: 52px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; padding: 0 14px 0 16px; }
.row-label { position: relative; z-index: 4; font-family: 'RDRLedger', Georgia, serif; font-size: 19px; line-height: 1; letter-spacing: .15px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-right { position: relative; z-index: 4; font-family: 'RDRLedger', Georgia, serif; font-size: 15px; color: rgba(228,219,200,.72); padding-left: 12px; }

.menu-row.is-focused,
.stage-row.is-focused,
.resource-card.is-focused,
.section-row.is-focused {
  color: rgba(255,250,238,.99) !important;
  border: 2px solid var(--browse-primary);
  box-shadow: inset 0 0 0 1px rgba(95,0,0,.48), 0 0 7px var(--browse-highlight);
}
.menu-row.is-focused::before,
.stage-row.is-focused::before,
.resource-card.is-focused::before,
.section-row.is-focused::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.08)), url('assets/ui/brk_selected_bg.jpg') center var(--brk-bg-y,50%) / 100% auto no-repeat;
}
.menu-row.is-focused::after,
.stage-row.is-focused::after,
.resource-card.is-focused::after,
.section-row.is-focused::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 18px rgba(0,0,0,.44); }
.row-border-flow { display: none; }
.is-focused > .row-border-flow { display: block; position: absolute; inset: 0; z-index: 5; pointer-events: none; border: 2px solid var(--browse-primary); border-radius: 2px; opacity: var(--browse-opacity); filter: drop-shadow(0 0 3px var(--browse-highlight)); }
@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .is-focused > .row-border-flow {
    padding: 2px; border: 0;
    background: conic-gradient(from var(--browse-angle), var(--browse-primary) 0deg, var(--browse-primary) 82deg, var(--browse-deep) 128deg, var(--browse-highlight) 158deg, var(--browse-primary) 198deg, var(--browse-accent) 250deg, var(--browse-primary) 306deg, var(--browse-primary) 360deg);
    animation: menu-border-flow var(--browse-duration) linear infinite;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
  }
}
@keyframes menu-border-flow { to { --browse-angle: 360deg; } }

.shell-filler { flex: 1; min-height: 26px; }
.shell-horses { width: 368px; max-height: 94px; object-fit: contain; align-self: center; opacity: .56; filter: drop-shadow(0 2px 2px #000); margin-bottom: 5px; }
.shell-footer { position: relative; min-height: 54px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 12px; border-top: 1px solid rgba(229,221,204,.48); font-size: 11px; color: rgba(201,191,173,.68); text-transform: uppercase; letter-spacing: .7px; }
kbd { min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; margin-right: 3px; padding: 0 5px; border: 1px solid rgba(231,222,202,.32); border-radius: 2px; background: rgba(0,0,0,.48); color: rgba(237,229,212,.9); font-family: 'RDRLino', Georgia, serif; font-size: 10px; box-shadow: inset 0 0 4px rgba(255,255,255,.04); }

.stage { position: relative; height: 92vh; min-width: 0; overflow: hidden; }
.view { position: absolute; inset: 0; display: none; overflow: auto; padding: clamp(20px, 2vw, 36px) clamp(12px, 2vw, 38px) 74px; scrollbar-width: thin; scrollbar-color: rgba(128,20,10,.7) rgba(0,0,0,.25); }
.view.is-active { display: block; animation: view-in .24s ease-out both; }
@keyframes view-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

.home-view { overflow: hidden; padding: 0; }
.home-lockup {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3vh 3vw 5vh 0;
}
.home-brand-reveal {
  position: relative;
  width: min(980px, 82vw);
  max-width: 100%;
  aspect-ratio: 1448 / 1167;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  isolation: isolate;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.72));
}
.home-brand-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 110px 48px rgba(3,2,2,.72), inset 0 0 28px 12px rgba(3,2,2,.35);
}
.home-brand-base,
.home-brand-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.home-brand-base {
  z-index: 1;
  opacity: .95;
  filter: saturate(.92) contrast(1.04) brightness(.88);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 53%, rgba(0,0,0,.92) 68%, transparent 98%);
  mask-image: radial-gradient(ellipse at center, #000 53%, rgba(0,0,0,.92) 68%, transparent 98%);
}
.home-brand-overlay {
  z-index: 2;
  object-fit: contain;
  opacity: .985;
  filter: drop-shadow(0 5px 6px rgba(0,0,0,.86));
  transition: opacity .6s ease, filter .6s ease;
}
.home-brand-reveal:hover .home-brand-overlay,
.home-brand-reveal:focus .home-brand-overlay,
.home-brand-reveal:active .home-brand-overlay {
  opacity: 0;
  filter: drop-shadow(0 5px 6px rgba(0,0,0,0));
}
.home-brand-reveal:focus { outline: none; }

.stage-heading {
  width: min(1040px, 100%);
  max-width: none;
  margin: 3vh auto 28px;
  text-align: center;
}
.stage-kicker { display: block; font-family: 'RDRLino', Georgia, serif; font-size: 12px; letter-spacing: 2px; color: rgba(205,192,169,.58); text-transform: uppercase; text-align: center; }
.stage-heading h1, .doc-canvas h1 { margin: 5px 0 6px; font-family: 'Redemption', Georgia, serif; font-size: clamp(44px, 5vw, 74px); font-weight: 400; line-height: .95; letter-spacing: .8px; text-transform: uppercase; text-shadow: 0 3px 3px rgba(0,0,0,.95); }
.stage-divider { width: 100%; max-width: 960px; margin-top: 14px; }
.stage-heading .stage-divider {
  width: 100%;
  max-width: none;
  height: clamp(28px, 3.4vw, 42px);
  margin: 8px auto 0;
  background: url('assets/ui/arrow_border.png') center / 100% auto no-repeat;
  opacity: .88;
}
.stage-divider.compact { width: 100%; margin: 14px 0 18px; }

.resource-grid {
  position: relative;
  isolation: isolate;
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}
.resource-card {
  min-height: 106px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  padding: 8px 18px 8px 18px;
  text-align: left;
}
/* Every BRK menu uses one continuous selected image. The focused row is a window into it. */
[data-menu-axis] {
  --slice-menu-width: 100%;
  --slice-menu-height: 100%;
  --slice-image-width: var(--slice-menu-width);
  --slice-image-left: 0px;
  --slice-image-top: 0px;
}
[data-menu-axis] .nav-target.is-focused::before {
  background-image:
    linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.08)),
    url('assets/ui/brk_selected_bg.jpg');
  /* Keep the BRK artwork's original aspect ratio. It always spans the
     menu width and is vertically centered behind shorter menu groups. */
  background-size:
    100% 100%,
    var(--slice-image-width, var(--slice-menu-width)) auto;
  background-position:
    0 0,
    calc(var(--slice-image-left, 0px) - var(--slice-x, 0px))
    calc(var(--slice-image-top, 0px) - var(--slice-y, 0px));
  background-repeat: no-repeat;
}

/* Home mirrors BRK Menu itself instead of using the catalogue-wide slice.
   The crop focal point walks down the source artwork as selection moves. */
#site-menu .nav-target.is-focused::before {
  background:
    linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.08)),
    url('assets/ui/brk_selected_bg.jpg') center var(--brk-bg-y, 35%) / 100% auto no-repeat;
}
.card-name { position: relative; z-index: 4; font-family: 'Redemption', Georgia, serif; font-size: clamp(23px, 2.4vw, 36px); line-height: .92; letter-spacing: .4px; color: rgba(226,218,201,.86); text-transform: uppercase; }
.card-arrow { position: relative; z-index: 4; justify-self: end; font-family: 'RDRLedger', Georgia, serif; font-size: 28px; }
.resource-card.is-focused .card-name, .resource-card.is-focused .card-arrow { color: rgba(255,250,238,.99); }

.simple-view .stage-heading { width: min(1040px, 100%); }
.stage-list { width: min(820px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.stage-row, .section-row { min-height: 58px; display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 0 18px; font-family: 'RDRLedger', Georgia, serif; font-size: 20px; text-align: left; }
.stage-row > span, .section-row > span { position: relative; z-index: 4; }

.docs-view { padding: 3vh 2vw 70px; }
.docs-columns { width: min(1200px, 100%); min-height: 84vh; margin: 0 auto; display: grid; grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); gap: 28px; }
.resource-sections { position: relative; align-self: start; min-height: 670px; padding: 34px 28px 46px; background: url('assets/ui/inkroller_1a.png') top left / 100% 864px repeat-y; filter: drop-shadow(0 10px 16px rgba(0,0,0,.5)); }
.back-link { border: 0; background: transparent; color: rgba(215,204,184,.72); font-family: 'RDRLino', Georgia, serif; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; cursor: pointer; padding: 0 0 14px; }
.back-link.is-focused { color: rgba(245,229,193,.96); text-shadow: 0 0 8px rgba(197,32,7,.45); }
.resource-wordmark { font-family: 'Redemption', Georgia, serif; font-size: 36px; line-height: .92; text-transform: uppercase; color: rgba(237,229,212,.94); text-shadow: 0 2px 2px #000; }
.compact-list { gap: 6px; }
.section-row { min-height: 48px; font-size: 17px; }
.doc-canvas { position: relative; min-height: 78vh; overflow: hidden; padding: clamp(34px, 5vw, 76px); border: 1px solid rgba(225,215,193,.08); box-shadow: 0 18px 34px rgba(0,0,0,.42); }
.doc-ink { position: absolute; inset: 0; z-index: -1; background: url('assets/ui/inkroller_1a.png') top left / 100% 864px repeat-y; opacity: .63; filter: contrast(1.04); }
.doc-breadcrumb { font-family: 'RDRLino', Georgia, serif; font-size: 11px; letter-spacing: 1.4px; color: rgba(200,190,172,.54); text-transform: uppercase; }
.empty-doc-lines { margin-top: 54px; opacity: .13; }
.empty-doc-lines span { display: block; height: 1px; background: rgba(237,229,212,.72); margin: 28px 0; }
.empty-doc-lines span:nth-child(2) { width: 74%; }.empty-doc-lines span:nth-child(3) { width: 42%; }

.global-controls { position: fixed; z-index: 9; right: 3.4vw; bottom: 2.3vh; display: flex; gap: 14px; color: rgba(201,191,173,.44); font-family: 'RDRLino', Georgia, serif; font-size: 10px; letter-spacing: .7px; text-transform: uppercase; pointer-events: none; }
.global-controls span { display: flex; align-items: center; }
.global-controls kbd { opacity: .7; }

@media (max-width: 1180px) {
  body { overflow: auto; }
  #app { height: auto; min-height: 100vh; grid-template-columns: 430px 1fr; gap: 18px; padding: 20px; }
  #app.is-subroute { grid-template-columns: minmax(0, 1fr); gap: 0; }
  #app.is-resource-route .docs-columns { grid-template-columns: 430px minmax(0, 1fr); gap: 18px; }
  #app.is-resource-route .resource-sections { width: 430px; padding-left: 28px; padding-right: 28px; }
  #app.is-resource-route .resource-sections .stage-list,
  #app.is-resource-route .resource-sections .section-row { width: 374px; }
  .brk-shell { width: 430px; transform: scale(.79); transform-origin: top left; margin-right: -90px; }
  .stage { height: calc(100vh - 40px); }
  .resource-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  #app { display: block; padding: 12px; }
  .brk-shell { position: relative; width: 540px; transform: scale(min(.7, calc((100vw - 24px) / 540))); transform-origin: top left; margin-bottom: calc(-864px * .30 + 18px); }
  .stage { height: auto; min-height: 70vh; }
  .view { position: relative; inset: auto; min-height: 70vh; padding: 28px 6px 76px; }
  .view:not(.is-active) { display: none; }
  .home-lockup { min-height: 66vh; padding: 0; }
  .home-brand-reveal { width: min(94vw, 760px); }
  .home-brand-overlay { padding: 23% 17% 20%; }
  .docs-columns { grid-template-columns: 1fr; }
  #app.is-resource-route .docs-columns { grid-template-columns: 1fr; gap: 18px; }
  #app.is-resource-route .resource-sections { width: 100%; height: auto; min-height: auto; padding: 28px; }
  #app.is-resource-route .resource-sections .stage-list,
  #app.is-resource-route .resource-sections .section-row { width: 100%; }
  .resource-sections { min-height: auto; }
  .global-controls { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}


/* ==========================================================================
   Branch selector / BRK + Indestructible RP split
   ========================================================================== */

body.is-selector-active .world-bg {
  background:
    linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.18)),
    url('assets/backgrounds/red_forest.png') center 52% / cover no-repeat;
}
body.is-selector-active .world-bg::before {
  background:
    radial-gradient(ellipse at 50% 48%, transparent 24%, rgba(0,0,0,.13) 58%, rgba(0,0,0,.72) 100%),
    linear-gradient(90deg, rgba(0,0,0,.56), transparent 24%, transparent 76%, rgba(0,0,0,.56));
}
body.is-selector-active .vignette {
  box-shadow:
    inset 0 0 200px 72px rgba(0,0,0,.72),
    inset 0 -110px 170px rgba(0,0,0,.72),
    inset 0 90px 130px rgba(0,0,0,.34);
}

.branch-gate {
  display: none;
  grid-column: 1 / -1;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: clamp(22px, 4vh, 48px) clamp(28px, 6vw, 94px) 30px;
  align-items: center;
  justify-items: center;
  grid-template-rows: auto 1fr auto;
}
#app.is-selector {
  display: block;
  padding: 0;
}
#app.is-selector .branch-gate {
  display: grid;
}
#app.is-selector .branch-shell,
#app.is-selector .stage {
  display: none;
}

.branch-gate-header {
  width: min(1120px, 90vw);
  text-align: center;
  padding-top: 1vh;
}
.branch-gate-header h1 {
  margin: 7px 0 0;
  font-family: 'Redemption', Georgia, serif;
  font-size: clamp(44px, 5.2vw, 82px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 4px 7px rgba(0,0,0,.92);
}
.branch-divider {
  width: min(920px, 88%);
  height: clamp(26px, 3vw, 42px);
  margin: 10px auto 0;
  background: url('assets/ui/arrow_border.png') center / 100% auto no-repeat;
  opacity: .82;
}

.branch-options {
  width: min(1320px, 92vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 68px);
  align-items: stretch;
}
.branch-option {
  position: relative;
  min-height: min(470px, 54vh);
  overflow: hidden;
  border: 1px solid rgba(236,225,201,.12);
  padding: clamp(24px, 3vw, 44px);
  background:
    linear-gradient(180deg, rgba(5,3,3,.56), rgba(3,2,2,.82)),
    url('assets/ui/inkroller_1a.png') center / 100% 100% no-repeat;
  color: var(--text-main);
  cursor: pointer;
  isolation: isolate;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.48));
  transition: transform .22s ease, background-color .22s ease, box-shadow .22s ease;
}
.branch-option::before { display: none !important; }
.branch-option::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  box-shadow: inset 0 0 85px 32px rgba(0,0,0,.56);
}
.branch-option.is-focused {
  border: 2px solid var(--browse-primary);
  box-shadow:
    0 0 10px rgba(197,32,7,.62),
    inset 0 0 0 1px rgba(95,0,0,.58),
    inset 0 0 70px rgba(80,6,2,.12);
  transform: translateY(-2px);
}

.branch-art {
  position: relative;
  z-index: 2;
  width: 100%;
  height: min(300px, 34vh);
  display: flex;
  align-items: center;
  justify-content: center;
}
.branch-art img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.branch-art-brk img {
  width: min(520px, 88%);
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.9));
}
.branch-art-irp img {
  position: absolute;
  width: min(620px, 96%);
  transition: opacity .36s ease, transform .36s ease;
}
.irp-branch-white { opacity: .94; }
.irp-branch-red { opacity: 0; transform: scale(.985); }
.branch-option.is-focused .irp-branch-white { opacity: 0; transform: scale(1.015); }
.branch-option.is-focused .irp-branch-red { opacity: 1; transform: scale(1); }

.branch-caption {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 10px;
  font-family: 'Redemption', Georgia, serif;
  font-size: clamp(28px, 2.7vw, 43px);
  line-height: .95;
  text-transform: uppercase;
  text-shadow: 0 3px 4px #000;
}
.branch-subcaption {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 8px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 16px;
  color: rgba(215,204,183,.62);
}
.branch-gate-footer {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  color: rgba(224,213,191,.7);
  font-family: 'RDRLino', Georgia, serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  text-shadow: 0 2px 3px #000;
}

/* Branch shells ------------------------------------------------------------- */
.branch-shell { display: none; }
#app.is-branch-home.is-brk-branch .brk-branch-shell { display: flex; }
#app.is-branch-home.is-irp-branch .irp-branch-shell { display: flex; }

#app.is-branch-home {
  grid-template-columns: 540px 1fr;
  gap: clamp(28px, 3vw, 66px);
}
#app.is-branch-home > .stage {
  grid-column: 2;
  width: auto;
}
#app.is-subroute > .branch-shell { display: none !important; }

.irp-shell-header {
  flex-basis: 188px;
  padding-top: 8px;
}
.irp-shell-emblem {
  position: absolute;
  width: 82px;
  height: 82px;
  object-fit: contain;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  opacity: .9;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.86));
}
.irp-shell-header .shell-title { font-size: 42px; }

/* Both branch root menus use BRK Menu's own focused crop behavior. */
#brk-menu .nav-target.is-focused::before,
#irp-menu .nav-target.is-focused::before {
  background:
    linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.08)),
    url('assets/ui/brk_selected_bg.jpg') center var(--brk-bg-y, 35%) / 100% auto no-repeat;
}

/* Branch home center art ---------------------------------------------------- */
.branch-home-view { overflow: hidden; padding: 0; }
.branch-home-lockup {
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.branch-home-lockup::before {
  content: '';
  position: absolute;
  width: min(820px, 80%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(115,9,4,.18), rgba(31,3,2,.08) 40%, transparent 72%);
  filter: blur(8px);
}
.brk-home-logo {
  position: relative;
  z-index: 1;
  width: min(760px, 76%);
  max-height: 72vh;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.8));
}
.irp-home-lockup {
  flex-direction: column;
  gap: 4px;
}
.irp-home-emblem {
  position: relative;
  z-index: 1;
  width: min(240px, 22vw);
  max-height: 26vh;
  object-fit: contain;
  opacity: .82;
}
.irp-home-wordmark {
  position: relative;
  z-index: 1;
  width: min(780px, 82%);
  max-height: 34vh;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.75));
}

/* IRP category pages -------------------------------------------------------- */
.irp-category-view .stage-heading {
  width: min(1040px, 100%);
}
.irp-category-list {
  width: min(820px, 100%);
}

/* Selector should not show the global bottom-right controls twice. */
body.is-selector-active .global-controls { display: none; }

@media (max-width: 980px) {
  .branch-gate {
    overflow: auto;
    display: block !important;
    padding: 24px 18px 34px;
  }
  .branch-options {
    width: min(720px, 100%);
    margin: 28px auto;
    grid-template-columns: 1fr;
  }
  .branch-option { min-height: 360px; }
  .branch-gate-footer { padding-bottom: 20px; }
}

@media (max-width: 820px) {
  #app.is-branch-home { display: block; }
  #app.is-branch-home .branch-shell {
    position: relative;
    display: flex;
  }
  #app.is-branch-home > .stage { width: 100%; }
  .branch-option { min-height: 320px; }
  .branch-art { height: 210px; }
}


/* BRK root branch artwork --------------------------------------------------- */
.branch-art-brk {
  padding: clamp(8px, 1vw, 14px);
}

.branch-art-brk img {
  width: min(590px, 96%);
  max-height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 8px 10px rgba(0,0,0,.88))
    brightness(.98);
  transition:
    filter .28s ease,
    transform .28s ease;
}

/* Red inner selection frame, matching the IRP focused wordmark language. */
.branch-art-brk::after {
  content: '';
  position: absolute;
  inset: 6% 4%;
  pointer-events: none;
  opacity: 0;
  border: 3px solid rgba(176, 8, 4, .94);
  box-shadow:
    0 0 0 2px rgba(52, 0, 0, .9),
    0 0 13px rgba(213, 19, 8, .72),
    inset 0 0 18px rgba(156, 9, 3, .18);
  transition: opacity .25s ease;
}

.branch-option.is-focused .branch-art-brk::after {
  opacity: 1;
}

.branch-option.is-focused .branch-art-brk img {
  transform: scale(1.01);
  filter:
    drop-shadow(0 8px 10px rgba(0,0,0,.9))
    brightness(1.04);
}


/* Match BRK branch switching behavior to IRP ------------------------------- */
.branch-art-brk {
  position: relative;
}

.branch-art-brk img {
  position: absolute;
  width: min(590px, 96%);
  max-height: 100%;
  object-fit: contain;
  transition:
    opacity .36s ease,
    transform .36s ease,
    filter .36s ease;
}

.brk-branch-paper {
  opacity: .98;
  transform: scale(1);
}

.brk-branch-transparent {
  opacity: 0;
  transform: scale(.985);
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.9));
}

.branch-option.is-focused .brk-branch-paper,
.branch-option:hover .brk-branch-paper,
.branch-option:focus-visible .brk-branch-paper {
  opacity: 0;
  transform: scale(1.015);
}

.branch-option.is-focused .brk-branch-transparent,
.branch-option:hover .brk-branch-transparent,
.branch-option:focus-visible .brk-branch-transparent {
  opacity: 1;
  transform: scale(1);
}

/* The artwork itself now swaps like IRP, so don't add an extra BRK-only
   inner red rectangle on top of it. */
.branch-art-brk::after {
  display: none;
}


/* Branch artwork alignment fix --------------------------------------------- */
/* All idle/selected logo layers share the exact same center point. */
.branch-art-brk img,
.branch-art-irp img {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  object-position: center;
}

/* Keep the crossfade from changing placement. */
.brk-branch-paper,
.brk-branch-transparent,
.irp-branch-white,
.irp-branch-red {
  transform-origin: center center;
}

/* With the redundant title removed, give the retained subtext a little air. */
.branch-subcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 17px;
}


/* Branch selector — transparent cards -------------------------------------- */
/* Let the red forest remain visible behind both branch choices while keeping
   the card outlines and selected BRK border treatment. */
.branch-option {
  background: transparent;
  filter: none;
}

.branch-option::after {
  display: none;
}

.branch-option.is-focused {
  background: transparent;
  box-shadow:
    0 0 12px rgba(197, 32, 7, .68),
    0 0 0 1px rgba(95, 0, 0, .58);
}


/* Branch selector — inkroller cards, static outline only ------------------- */
.branch-option {
  background: transparent;
  filter: none;
}

/* Separate layer so the inkroller can sit at 70% without fading the logos. */
.branch-option::after {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url('assets/ui/inkroller_1a.png') center / 100% 100% no-repeat;
  opacity: .40;
  box-shadow: none;
}

/* Keep the static focused outline/glow, but disable the animated BRK flow. */
.branch-option > .row-border-flow,
.branch-option.is-focused > .row-border-flow {
  display: none !important;
  animation: none !important;
}


/* Branch selector — no card border or glow --------------------------------- */
.branch-option,
.branch-option.is-focused,
.branch-option:hover,
.branch-option:focus-visible {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}


/* Branch selector — fade inkroller away on selection ----------------------- */
.branch-option::after {
  transition: opacity .38s ease;
}

.branch-option.is-focused::after,
.branch-option:hover::after,
.branch-option:focus-visible::after {
  opacity: 0;
}


/* Branch selector — selected visuals only while actively interacting -------- */

/* A remembered JS focus alone must still render the idle state. */
.branch-option.is-focused:not(:hover) .brk-branch-paper {
  opacity: .98;
  transform: scale(1);
}
.branch-option.is-focused:not(:hover) .brk-branch-transparent {
  opacity: 0;
  transform: scale(.985);
}

.branch-option.is-focused:not(:hover) .irp-branch-white {
  opacity: .94;
  transform: scale(1);
}
.branch-option.is-focused:not(:hover) .irp-branch-red {
  opacity: 0;
  transform: scale(.985);
}

.branch-option.is-focused:not(:hover)::after {
  opacity: .40;
}

/* Mouse hover, native keyboard focus, or transient arrow-key navigation
   reveals the selected artwork and fades the inkroller away. */
.branch-option:hover::after,
.branch-option:focus-visible::after,
.branch-gate.is-keyboard-active .branch-option.is-focused::after {
  opacity: 0;
}

.branch-option:hover .brk-branch-paper,
.branch-option:focus-visible .brk-branch-paper,
.branch-gate.is-keyboard-active .branch-option.is-focused .brk-branch-paper {
  opacity: 0;
  transform: scale(1.015);
}

.branch-option:hover .brk-branch-transparent,
.branch-option:focus-visible .brk-branch-transparent,
.branch-gate.is-keyboard-active .branch-option.is-focused .brk-branch-transparent {
  opacity: 1;
  transform: scale(1);
}

.branch-option:hover .irp-branch-white,
.branch-option:focus-visible .irp-branch-white,
.branch-gate.is-keyboard-active .branch-option.is-focused .irp-branch-white {
  opacity: 0;
  transform: scale(1.015);
}

.branch-option:hover .irp-branch-red,
.branch-option:focus-visible .irp-branch-red,
.branch-gate.is-keyboard-active .branch-option.is-focused .irp-branch-red {
  opacity: 1;
  transform: scale(1);
}


/* Site-wide red forest background ------------------------------------------ */
.world-bg {
  background:
    linear-gradient(rgba(0, 0, 0, .34), rgba(0, 0, 0, .52)),
    url('assets/backgrounds/red_forest.png') center 52% / cover no-repeat;
}

.world-bg::before {
  background:
    radial-gradient(ellipse at 57% 48%, transparent 18%, rgba(0, 0, 0, .20) 54%, rgba(0, 0, 0, .72) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .76), rgba(0, 0, 0, .18) 31%, rgba(0, 0, 0, .22) 72%, rgba(0, 0, 0, .68));
}

.vignette {
  box-shadow:
    inset 0 0 210px 76px rgba(0, 0, 0, .76),
    inset 0 -110px 170px rgba(0, 0, 0, .66),
    inset 0 85px 135px rgba(0, 0, 0, .38);
}

/* The destination selector remains the brighter presentation of the same
   artwork; branch menus and documentation use the darker treatment above. */
body.is-selector-active .world-bg {
  background:
    linear-gradient(rgba(0, 0, 0, .08), rgba(0, 0, 0, .18)),
    url('assets/backgrounds/red_forest.png') center 52% / cover no-repeat;
}

body.is-selector-active .world-bg::before {
  background:
    radial-gradient(ellipse at 50% 48%, transparent 24%, rgba(0, 0, 0, .13) 58%, rgba(0, 0, 0, .72) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .56), transparent 24%, transparent 76%, rgba(0, 0, 0, .56));
}

body.is-selector-active .vignette {
  box-shadow:
    inset 0 0 200px 72px rgba(0, 0, 0, .72),
    inset 0 -110px 170px rgba(0, 0, 0, .72),
    inset 0 90px 130px rgba(0, 0, 0, .34);
}

/* BRK branch header — mirror the actual in-game BRK Menu ------------------ */
.brk-branch-shell .shell-header {
  position: relative;
  flex: 0 0 186px;
  min-height: 186px;
  padding: 6px 0 0;
  display: block;
  text-align: center;
}

/* The website branch name is already established before entering the menu;
   BRK Menu itself leads with the framed menu title. */
.brk-branch-shell .shell-eyebrow,
.brk-branch-shell .header-rule {
  display: none;
}

.brk-branch-shell .shell-title {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 472px;
  height: 164px;
  margin: 0;
  padding: 10px 48px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%) translateY(6px);
  background: url('assets/ui/menu_border.png') center / 100% 100% no-repeat;
  font-family: 'Redemption', Georgia, serif;
  font-size: 46px;
  line-height: .94;
  letter-spacing: .9px;
  color: rgba(255,255,255,.96);
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 2px 2px rgba(0,0,0,.95);
}

@media (max-width: 1180px) {
  .brk-branch-shell .shell-title {
    width: 472px;
    height: 164px;
  }
}


/* Resource documentation menu — same anatomy as BRK Main Menu -------------- */
#app.is-resource-route .resource-sections.brk-resource-shell {
  position: relative;
  width: 540px;
  height: min(864px, 92vh);
  min-height: 720px;
  padding: 0 54px;
  display: flex;
  flex-direction: column;
  align-self: start;
  overflow: visible;
  isolation: isolate;
  background: url('assets/ui/inkroller_1a.png') top left / 100% 864px repeat-y;
  filter: drop-shadow(0 16px 22px rgba(0,0,0,.58));
}

/* Same framed title treatment as the BRK root menu. */
.resource-menu-header {
  position: relative;
  flex: 0 0 186px;
  min-height: 186px;
  padding: 6px 0 0;
  display: block;
  text-align: center;
}

.resource-menu-header .resource-wordmark {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 472px;
  height: 164px;
  margin: 0;
  padding: 10px 48px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%) translateY(6px);
  background: url('assets/ui/menu_border.png') center / 100% 100% no-repeat;
  font-family: 'Redemption', Georgia, serif;
  font-size: 42px;
  line-height: .94;
  letter-spacing: .9px;
  color: rgba(255,255,255,.96);
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 2px 2px rgba(0,0,0,.95);
}

/* Match the root menu row geometry. */
#app.is-resource-route .resource-sections .stage-list {
  width: 432px;
  margin: 0;
  gap: 6px;
}

#app.is-resource-route .resource-sections .section-row {
  width: 432px;
  min-height: 52px;
  height: 52px;
  padding: 0 14px 0 16px;
  font-size: 19px;
}

.resource-menu-filler {
  flex: 1;
  min-height: 26px;
}

.resource-menu-footer {
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  border-top: 1px solid rgba(229,221,204,.48);
  font-family: 'RDRLino', Georgia, serif;
  font-size: 11px;
  color: rgba(201,191,173,.68);
  text-transform: uppercase;
  letter-spacing: .7px;
}

/* The old resource-only back label/divider is intentionally gone. */
.brk-resource-shell .back-link,
.brk-resource-shell > .stage-divider.compact {
  display: none !important;
}

@media (max-width: 1180px) {
  #app.is-resource-route .resource-sections.brk-resource-shell {
    width: 430px;
    padding-left: 28px;
    padding-right: 28px;
  }

  .resource-menu-header .resource-wordmark {
    width: 408px;
  }

  #app.is-resource-route .resource-sections .stage-list,
  #app.is-resource-route .resource-sections .section-row {
    width: 374px;
  }
}

@media (max-width: 820px) {
  #app.is-resource-route .resource-sections.brk-resource-shell {
    width: 100%;
    height: auto;
    min-height: 720px;
    padding: 0 28px;
  }

  .resource-menu-header .resource-wordmark {
    width: min(472px, calc(100vw - 80px));
  }

  #app.is-resource-route .resource-sections .stage-list,
  #app.is-resource-route .resource-sections .section-row {
    width: 100%;
  }
}


/* ==========================================================================
   Indestructible RP main menu consistency
   ========================================================================== */

/* Match BRK Main Menu's ornate framed header. The old emblem, eyebrow and
   divider remain in the markup only for compatibility and are hidden here. */
.irp-branch-shell .shell-header {
  position: relative;
  flex: 0 0 186px;
  min-height: 186px;
  padding: 6px 0 0;
  display: block;
  text-align: center;
}

.irp-branch-shell .irp-shell-emblem,
.irp-branch-shell .shell-eyebrow,
.irp-branch-shell .header-rule {
  display: none;
}

.irp-branch-shell .shell-title {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 472px;
  height: 164px;
  margin: 0;
  padding: 10px 48px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%) translateY(6px);
  background: url('assets/ui/menu_border.png') center / 100% 100% no-repeat;
  font-family: 'Redemption', Georgia, serif;
  font-size: 44px;
  line-height: .94;
  letter-spacing: .9px;
  color: rgba(255,255,255,.96);
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 2px 2px rgba(0,0,0,.95);
}

/* The IRP menu has more entries, so use the tighter Horse Dev / Dev Tool
   rhythm while preserving BRK row visuals. */
#irp-menu {
  gap: 4px;
}

#irp-menu .menu-row {
  height: 48px;
}

/* Logical player-facing groups:
   Basics | World/Work | Reference/Community | Rules */
#irp-menu .menu-row:nth-child(4),
#irp-menu .menu-row:nth-child(8),
#irp-menu .menu-row:nth-child(10) {
  margin-top: 12px;
}

/* Plain IRP branch-home logo: no emblem and no white paper backing. */
.irp-home-lockup {
  flex-direction: row;
  gap: 0;
}

.irp-home-logo {
  position: relative;
  z-index: 1;
  width: min(820px, 82%);
  max-height: 58vh;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0,0,0,.78));
}

@media (max-width: 1180px) {
  .irp-branch-shell .shell-title {
    width: 472px;
    height: 164px;
  }
}

@media (max-width: 820px) {
  .irp-branch-shell .shell-title {
    width: min(472px, calc(100vw - 80px));
  }

  .irp-home-logo {
    width: min(92vw, 760px);
  }
}


/* Avoid duplicate control prompts when a left-side menu already owns them. */
#app.is-branch-home ~ .global-controls,
#app.is-resource-route ~ .global-controls {
  display: none;
}


/* ==========================================================================
   BRK resource page grouping
   ========================================================================== */

.resource-menu-spacer {
  flex: 0 0 14px;
  height: 14px;
  pointer-events: none;
}

.doc-content {
  position: relative;
  min-height: 420px;
}

/* ==========================================================================
   BRK RP Dice — interactive product preview
   Reuses the resource's actual sprite sheets, timings and outcome treatment.
   ========================================================================== */

.rp-dice-preview {
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 0 10px;
}

.rp-dice-roll {
  position: relative;
  width: min(460px, 100%);
  min-height: 390px;
  padding: 24px 20px 20px;
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(237, 229, 212, .96);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.rp-dice-roll:hover .rp-dice-sprite {
  filter:
    drop-shadow(0 7px 14px rgba(0, 0, 0, .88))
    drop-shadow(0 0 10px rgba(207, 157, 62, .34));
}

.rp-dice-label {
  font-family: 'Redemption', Georgia, serif;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(214, 204, 186, .82);
  text-shadow: 0 2px 3px rgba(0, 0, 0, .85);
}

.rp-dice-face {
  position: relative;
  width: 196px;
  height: 196px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rp-dice-glow {
  position: absolute;
  inset: -26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(207, 157, 62, .55) 0%, rgba(0,0,0,0) 68%);
  opacity: .68;
  filter: blur(2px);
  transition: background .25s ease, opacity .25s ease;
}

.rp-dice-glow.state-success {
  background: radial-gradient(circle, rgba(240, 232, 214, .42) 0%, rgba(0,0,0,0) 68%);
}

.rp-dice-glow.state-fail {
  background: radial-gradient(circle, rgba(177, 8, 8, .55) 0%, rgba(0,0,0,0) 68%);
}

.rp-dice-glow.state-crit-success {
  background: radial-gradient(circle, rgba(207, 157, 62, .55) 0%, rgba(0,0,0,0) 72%);
  opacity: 1;
}

.rp-dice-glow.state-crit-fail {
  background: radial-gradient(circle, rgba(177, 8, 8, .55) 0%, rgba(0,0,0,0) 72%);
  opacity: 1;
}

.rp-dice-sprite {
  position: relative;
  z-index: 2;
  width: 256px;
  height: 256px;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: 0 0;
  transform: scale(.72);
  transform-origin: center center;
  filter: drop-shadow(0 7px 14px rgba(0, 0, 0, .88));
  opacity: 1;
  transition: filter .2s ease, transform .2s ease;
  image-rendering: auto;
  pointer-events: none;
}

.rp-dice-sprite.is-rolling {
  filter:
    drop-shadow(0 8px 16px rgba(0, 0, 0, .9))
    drop-shadow(0 0 8px rgba(207, 157, 62, .28));
}

.rp-dice-sprite.is-settling {
  transform: scale(.74);
}

.rp-dice-sprite.settle-success {
  filter:
    drop-shadow(0 7px 14px rgba(0, 0, 0, .88))
    drop-shadow(0 0 14px rgba(240, 232, 214, .42));
}

.rp-dice-sprite.settle-fail {
  filter:
    drop-shadow(0 7px 14px rgba(0, 0, 0, .88))
    drop-shadow(0 0 14px rgba(177, 8, 8, .55));
}

.rp-dice-sprite.settle-crit-success {
  transform: scale(.76);
  filter:
    drop-shadow(0 7px 14px rgba(0, 0, 0, .88))
    drop-shadow(0 0 22px rgba(207, 157, 62, .55));
}

.rp-dice-sprite.settle-crit-fail {
  transform: scale(.76);
  filter:
    drop-shadow(0 7px 14px rgba(0, 0, 0, .9))
    drop-shadow(0 0 22px rgba(177, 8, 8, .55));
}

.rp-dice-result {
  min-height: 24px;
  font-family: 'Redemption', Georgia, serif;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(240, 232, 214, .95);
  text-shadow: 0 2px 3px rgba(0, 0, 0, .9);
  opacity: 0;
  transition: opacity .25s ease;
}

.rp-dice-result.idle {
  opacity: .48;
  color: rgba(214, 204, 186, .82);
}

.rp-dice-result.visible {
  opacity: 1;
}

.rp-dice-result.success { color: rgba(240, 232, 214, .98); }
.rp-dice-result.fail { color: rgba(177, 8, 8, .98); }
.rp-dice-result.crit-success { color: rgba(207, 157, 62, .98); }
.rp-dice-result.crit-fail { color: rgba(90, 4, 4, .98); }

@media (max-width: 820px) {
  .rp-dice-preview {
    min-height: 430px;
  }

  .rp-dice-roll {
    min-height: 350px;
  }
}


/* ==========================================================================
   BRK custom cursor
   ========================================================================== */

/* Supplied RDR-style cursor, reduced to a practical browser size.
   Hotspot is centered on the upper point of the icon. */
html,
body,
button,
a,
.nav-target,
[role="button"] {
  cursor: url('assets/ui/cursor_brk.png') 3 3, default !important;
}

/* ==========================================================================
   Page heading consistency
   ========================================================================== */

/* Page titles stand on their own throughout the site:
   TITLE
   ornate arrow divider
   No eyebrow/kicker/breadcrumb line above the heading. */
.stage-kicker,
.doc-breadcrumb {
  display: none !important;
}

.stage-heading h1 {
  margin-top: 0;
}

.doc-canvas h1 {
  margin-top: 0;
}


/* ==========================================================================
   BRK documentation content
   ========================================================================== */

.doc-stack {
  width: min(940px, 100%);
  margin: 0 auto;
  padding: 8px 0 30px;
  font-family: 'RDRLino', Georgia, serif;
  color: rgba(224, 216, 198, .88);
  line-height: 1.62;
}

.doc-stack p {
  margin: 0 0 16px;
  font-size: 15px;
}

.doc-stack code,
.doc-code {
  font-family: Consolas, 'Courier New', monospace;
}

.doc-stack code {
  padding: 1px 5px;
  border: 1px solid rgba(226, 216, 194, .10);
  background: rgba(0, 0, 0, .28);
  color: rgba(244, 233, 208, .94);
  user-select: text;
  cursor: text;
}

.doc-lead {
  max-width: 850px;
  margin-bottom: 18px !important;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 19px !important;
  line-height: 1.5;
  color: rgba(238, 229, 211, .92);
}

.doc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 30px;
}

.doc-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 10px;
  border: 1px solid rgba(218, 204, 178, .20);
  background: rgba(0, 0, 0, .24);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(226, 215, 193, .72);
}

.doc-section {
  margin: 34px 0 0;
}

.doc-section > h2,
.doc-trouble > h3 {
  margin: 0 0 13px;
  font-family: 'Redemption', Georgia, serif;
  font-weight: 400;
  text-transform: uppercase;
  color: rgba(244, 235, 216, .96);
  text-shadow: 0 2px 2px rgba(0, 0, 0, .88);
}

.doc-section > h2 {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(221, 211, 190, .18);
  font-size: 28px;
  line-height: 1;
  letter-spacing: .5px;
}

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

.doc-card {
  min-height: 126px;
  padding: 17px 18px;
  border: 1px solid rgba(225, 215, 193, .10);
  background:
    linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.28)),
    url('assets/ui/selection_box_bg_1d.png') center / 100% 100% no-repeat;
}

.doc-card h3 {
  margin: 0 0 8px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: rgba(243, 234, 215, .94);
}

.doc-card p {
  margin: 0;
  font-size: 14px;
  color: rgba(208, 198, 180, .78);
}

.doc-callout,
.doc-note,
.doc-warning {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 3px solid rgba(193, 137, 34, .72);
  background: rgba(0, 0, 0, .25);
  color: rgba(228, 218, 198, .86);
}

.doc-warning {
  border-left-color: rgba(177, 8, 8, .90);
}

.doc-note {
  border-left-color: rgba(226, 216, 195, .34);
}

.doc-muted {
  color: rgba(198, 188, 170, .62);
}

.doc-code {
  overflow-x: auto;
  margin: 16px 0 20px;
  padding: 16px 18px;
  border: 1px solid rgba(224, 214, 193, .12);
  background: rgba(0, 0, 0, .42);
  box-shadow: inset 0 0 20px rgba(0,0,0,.22);
  color: rgba(240, 231, 213, .90);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre;
  user-select: text;
  cursor: text;
}

.doc-code code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0 22px;
  background: rgba(0, 0, 0, .16);
  font-size: 14px;
}

.doc-table th,
.doc-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(224, 214, 193, .10);
  text-align: left;
  vertical-align: top;
}

.doc-table th {
  width: 28%;
  font-family: 'RDRLedger', Georgia, serif;
  font-weight: 400;
  color: rgba(239, 229, 210, .91);
}

.doc-table thead th {
  width: auto;
  background: rgba(0, 0, 0, .25);
  font-size: 13px;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: rgba(219, 207, 185, .72);
}

.doc-table td {
  color: rgba(207, 198, 180, .79);
}

.doc-table-compact th,
.doc-table-compact td {
  padding-top: 8px;
  padding-bottom: 8px;
}

.doc-steps {
  margin: 14px 0 20px;
  padding-left: 24px;
}

.doc-steps li {
  margin: 8px 0;
  padding-left: 5px;
  font-size: 15px;
  color: rgba(215, 205, 187, .82);
}

.doc-media-placeholder {
  min-height: 180px;
  padding: 34px;
  border: 1px dashed rgba(226, 215, 193, .24);
  background: rgba(0, 0, 0, .22);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  text-align: center;
}

.doc-media-placeholder strong {
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 19px;
  color: rgba(237, 228, 209, .90);
}

.doc-media-placeholder span {
  max-width: 660px;
  font-size: 13px;
  color: rgba(194, 185, 168, .58);
}

.doc-compat-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid rgba(224, 214, 193, .10);
  background: rgba(0, 0, 0, .20);
}

.doc-compat-row strong {
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 20px;
  color: rgba(241, 231, 211, .94);
}

.doc-compat-row p {
  margin: 5px 0 0;
}

.doc-status {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid rgba(224, 214, 193, .16);
  background: rgba(0, 0, 0, .28);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.doc-status.required {
  color: rgba(229, 190, 112, .90);
}

.doc-status.optional {
  color: rgba(210, 201, 184, .66);
}

.doc-trouble {
  margin: 0 0 10px;
  padding: 17px 18px;
  border: 1px solid rgba(224, 214, 193, .10);
  background:
    linear-gradient(rgba(0,0,0,.17), rgba(0,0,0,.28)),
    url('assets/ui/selection_box_bg_1d.png') center / 100% 100% no-repeat;
}

.doc-trouble > h3 {
  margin-bottom: 7px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 19px;
  text-transform: none;
}

.doc-trouble p {
  margin: 0;
  font-size: 14px;
}

.doc-version {
  margin: 0 0 14px;
  padding: 17px 18px;
  border: 1px solid rgba(224, 214, 193, .10);
  background: rgba(0, 0, 0, .20);
}

.doc-version header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(224, 214, 193, .10);
}

.doc-version header strong {
  font-family: 'Redemption', Georgia, serif;
  font-size: 27px;
  font-weight: 400;
  color: rgba(244, 234, 214, .95);
}

.doc-version header span {
  padding: 2px 7px;
  border: 1px solid rgba(193, 137, 34, .34);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(217, 181, 111, .82);
}

.doc-version ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.doc-version li {
  margin: 6px 0;
  color: rgba(207, 197, 179, .79);
  font-size: 14px;
}

@media (max-width: 900px) {
  .doc-card-grid {
    grid-template-columns: 1fr;
  }

  .doc-table {
    font-size: 13px;
  }

  .doc-compat-row {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .doc-stack {
    padding-left: 2px;
    padding-right: 2px;
  }

  .doc-lead {
    font-size: 17px !important;
  }

  .doc-table {
    display: block;
    overflow-x: auto;
  }
}


/* ==========================================================================
   Resource menu purchase block
   ========================================================================== */

.resource-menu-label {
  width: 432px;
  height: 24px;
  display: flex;
  align-items: flex-end;
  padding: 0 4px 5px;
  margin: 0 0 1px;
  border-bottom: 1px solid rgba(229, 221, 204, .34);
  font-family: 'RDRLino', Georgia, serif;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(207, 196, 176, .58);
  text-shadow: 0 2px 2px rgba(0,0,0,.9);
}

#resource-section-nav [data-external] {
  color: rgba(226, 216, 197, .88);
}

#resource-section-nav [data-external] > span:nth-child(2) {
  color: rgba(214, 170, 84, .82);
  text-transform: uppercase;
  font-size: 14px;
}

/* ==========================================================================
   Resource left-menu selection crop fix
   ========================================================================== */

/* Resource navigation is physically a BRK left-side menu. Never let the
   catalogue-wide continuous slice calculations drive these rows. */
#resource-section-nav[data-root-menu="true"] .nav-target.is-focused::before {
  background:
    linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.08)),
    url('assets/ui/brk_selected_bg.jpg')
    center var(--brk-bg-y, 35%) / 100% auto no-repeat !important;
}

@media (max-width: 1180px) {
  .resource-menu-label {
    width: 374px;
  }
}

@media (max-width: 820px) {
  .resource-menu-label {
    width: 100%;
  }
}


/* ==========================================================================
   Resource catalogue wordmarks
   ========================================================================== */

/* Matching supplied BRK wordmarks replace plain text only where an asset
   exists. Their layout sits above the existing continuous selected-image
   slice, so catalogue scrolling/slice math remains unchanged. */
.resource-card .card-wordmark {
  height: 54px;
  display: flex;
  align-items: center;
  overflow: visible;
}

.resource-card .card-wordmark img {
  display: block;
  width: auto;
  max-width: min(92%, 390px);
  max-height: 43px;
  object-fit: contain;
  object-position: left center;
  opacity: .72;
  filter:
    drop-shadow(0 2px 2px rgba(0,0,0,.92))
    drop-shadow(0 0 1px rgba(0,0,0,.75));
  transition: opacity .18s ease, filter .18s ease;
  pointer-events: none;
}

/* Selection stays white rather than reverting to the original red source art. */
.resource-card.is-focused .card-wordmark img {
  opacity: 1;
  filter:
    drop-shadow(0 2px 2px rgba(0,0,0,.98))
    drop-shadow(0 0 3px rgba(255,255,255,.12));
}

/* Extra-wide marks such as Resourceful Ranger should never crowd the arrow. */
.resource-card .card-wordmark {
  max-width: calc(100% - 12px);
}

@media (max-width: 1180px) {
  .resource-card .card-wordmark img {
    max-width: 86%;
    max-height: 40px;
  }
}


/* All current BRK catalogue entries now use the same wordmark image treatment. */
.resource-card .card-wordmark img {
  image-rendering: auto;
}


/* ==========================================================================
   Shared resource-page links / showcase / dependencies
   ========================================================================== */

.doc-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 24px;
}

.doc-link-button {
  position: relative;
  min-width: 170px;
  min-height: 46px;
  overflow: hidden;
  border: 0;
  padding: 0 13px 0 15px;
  background: url('assets/ui/selection_box_bg_1d.png') center / 100% 100% no-repeat;
  color: rgba(218, 208, 189, .80);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 16px;
  text-align: left;
}

.doc-link-button.is-focused,
.doc-link-button:hover {
  color: rgba(255, 250, 238, .99);
  box-shadow:
    inset 0 0 0 2px rgba(95, 1, 1, .92),
    0 0 7px rgba(197, 32, 7, .58);
}

.doc-link-button.purchase > span:first-child {
  color: rgba(224, 184, 104, .94);
}

.showcase-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(224, 214, 193, .14);
  background: rgba(0, 0, 0, .62);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .34);
}

.showcase-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.showcase-local-note {
  margin-top: 10px !important;
  font-size: 12px !important;
}

.showcase-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, .45fr);
  gap: 12px;
  align-items: start;
}

.showcase-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(224, 214, 193, .12);
  background: rgba(0, 0, 0, .28);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .30);
}

.showcase-shot-wide {
  grid-row: span 2;
}

.showcase-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 610px;
  object-fit: contain;
  background: rgba(0, 0, 0, .32);
}

.showcase-shot figcaption {
  padding: 8px 11px 10px;
  border-top: 1px solid rgba(224, 214, 193, .08);
  font-family: 'RDRLino', Georgia, serif;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(201, 191, 173, .58);
}

.dependency-grid {
  width: 100%;
  margin: 8px 0 20px;
}

.dependency-card {
  min-height: 132px;
  grid-template-columns: minmax(0, 1fr) 30px;
  grid-template-rows: auto 1fr;
  align-content: center;
  row-gap: 5px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.dependency-card .card-wordmark {
  grid-column: 1;
  grid-row: 1;
}

.dependency-card .card-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.dependency-status {
  position: absolute;
  z-index: 6;
  top: 8px;
  right: 11px;
  padding: 2px 7px;
  border: 1px solid rgba(226, 216, 195, .18);
  background: rgba(0, 0, 0, .56);
  font-family: 'RDRLino', Georgia, serif;
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dependency-status.required {
  color: rgba(229, 190, 112, .94);
}

.dependency-status.optional {
  color: rgba(211, 201, 183, .68);
}

.dependency-description {
  position: relative;
  z-index: 4;
  grid-column: 1;
  grid-row: 2;
  padding-right: 20px;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: .25px;
  color: rgba(196, 186, 169, .60);
}

.dependency-card.is-focused .dependency-description {
  color: rgba(231, 221, 202, .84);
}

@media (max-width: 860px) {
  .showcase-gallery {
    grid-template-columns: 1fr;
  }

  .showcase-shot-wide {
    grid-row: auto;
  }
}

@media (max-width: 620px) {
  .doc-link-button {
    width: 100%;
  }
}


/* ==========================================================================
   Screenshot showcase carousel
   Center = full preview, sides = smaller previous/next previews.
   ========================================================================== */

.showcase-carousel-shell {
  position: relative;
  width: 100%;
  min-height: 370px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.showcase-carousel {
  position: relative;
  height: 350px;
  display: grid;
  grid-template-columns: .72fr 1.28fr .72fr;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.showcase-carousel-item {
  position: relative;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(224, 214, 194, .72);
  opacity: .52;
  transform: scale(.82);
  transition:
    transform .28s ease,
    opacity .28s ease,
    filter .28s ease;
}

.showcase-carousel-item.previous {
  transform-origin: right center;
}

.showcase-carousel-item.next {
  transform-origin: left center;
}

.showcase-carousel-item.is-current {
  z-index: 3;
  opacity: 1;
  transform: scale(1);
}

.showcase-carousel-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, .42);
  border: 1px solid rgba(224, 214, 193, .10);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .36);
}

.showcase-carousel-frame img {
  display: block;
  width: 100%;
  height: 285px;
  object-fit: contain;
  background: rgba(0, 0, 0, .35);
}

.showcase-carousel-item:not(.is-current) .showcase-carousel-frame img {
  height: 220px;
}

.showcase-carousel-item.is-current .showcase-carousel-frame {
  border: 2px solid var(--browse-primary);
  box-shadow:
    inset 0 0 0 1px rgba(95,0,0,.48),
    0 0 8px var(--browse-highlight);
}

/* Reuse the BRK animated selection border on the centered screenshot. */
.showcase-carousel-item.is-current .row-border-flow {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border: 2px solid var(--browse-primary);
  opacity: var(--browse-opacity);
  filter: drop-shadow(0 0 3px var(--browse-highlight));
}

@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .showcase-carousel-item.is-current .row-border-flow {
    padding: 2px;
    border: 0;
    background: conic-gradient(
      from var(--browse-angle),
      var(--browse-primary) 0deg,
      var(--browse-primary) 82deg,
      var(--browse-deep) 128deg,
      var(--browse-highlight) 158deg,
      var(--browse-primary) 198deg,
      var(--browse-accent) 250deg,
      var(--browse-primary) 306deg,
      var(--browse-primary) 360deg
    );
    animation: menu-border-flow var(--browse-duration) linear infinite;
    -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
  }
}

.showcase-carousel-caption {
  display: block;
  min-height: 32px;
  padding: 8px 8px 0;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: .8px;
  text-transform: uppercase;
  text-align: center;
  color: rgba(198, 188, 170, .56);
}

.showcase-carousel-item.is-current .showcase-carousel-caption {
  color: rgba(231, 221, 202, .84);
}

.showcase-carousel-control {
  width: 34px;
  height: 64px;
  border: 0;
  background: transparent;
  color: rgba(224, 214, 194, .48);
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 38px;
  line-height: 1;
}

.showcase-carousel-control:hover {
  color: rgba(247, 237, 218, .94);
  text-shadow: 0 0 8px rgba(197, 32, 7, .58);
}

.showcase-carousel-help {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 3px;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 9px;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: rgba(196, 186, 168, .46);
}

/* ==========================================================================
   Screenshot lightbox / zoom
   ========================================================================== */

body.showcase-lightbox-open {
  overflow: hidden;
}

.showcase-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: rgba(0, 0, 0, .88);
  backdrop-filter: blur(3px);
}

.showcase-lightbox-stage {
  width: min(1500px, 92vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.showcase-lightbox-image-button {
  max-width: 100%;
  max-height: calc(92vh - 54px);
  border: 0;
  padding: 0;
  background: transparent;
}

.showcase-lightbox-image-frame {
  position: relative;
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 54px);
  overflow: auto;
  border: 2px solid var(--browse-primary);
  box-shadow:
    0 0 10px rgba(197, 32, 7, .68),
    0 20px 48px rgba(0, 0, 0, .58);
}

.showcase-lightbox-image-frame img {
  display: block;
  max-width: 88vw;
  max-height: calc(92vh - 60px);
  width: auto;
  height: auto;
  object-fit: contain;
  transition: max-width .2s ease, max-height .2s ease;
}


.showcase-lightbox-image-frame .row-border-flow {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border: 2px solid var(--browse-primary);
  opacity: var(--browse-opacity);
  filter: drop-shadow(0 0 3px var(--browse-highlight));
}

.showcase-lightbox-footer {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 8px;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 9px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(211, 201, 184, .62);
}

/* ==========================================================================
   Local-file YouTube fallback
   ========================================================================== */

.showcase-video-local {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(224, 214, 193, .14);
  padding: 0;
  background: rgba(0, 0, 0, .52);
}

.showcase-video-local img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: brightness(.48) saturate(.82);
}

.showcase-video-local-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 26px;
  background: rgba(0, 0, 0, .22);
  color: rgba(242, 233, 214, .94);
  text-align: center;
}

.showcase-play-mark {
  width: 66px;
  height: 66px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(242, 233, 214, .78);
  border-radius: 50%;
  padding-left: 5px;
  font-size: 28px;
}

.showcase-video-local-overlay strong {
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

.showcase-video-local-overlay small {
  font-family: 'RDRLino', Georgia, serif;
  font-size: 10px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(213, 202, 183, .58);
}

.showcase-video-local:hover .showcase-video-local-overlay {
  background: rgba(72, 7, 3, .28);
}

@media (max-width: 860px) {
  .showcase-carousel-shell {
    min-height: 310px;
    grid-template-columns: 28px minmax(0, 1fr) 28px;
  }

  .showcase-carousel {
    height: 290px;
    grid-template-columns: .5fr 1.5fr .5fr;
    gap: 8px;
  }

  .showcase-carousel-frame img {
    height: 235px;
  }

  .showcase-carousel-item:not(.is-current) .showcase-carousel-frame img {
    height: 160px;
  }
}


/* ==========================================================================
   BRK Notify interactive preview
   ========================================================================== */

.notify-preview-page {
  width: min(1040px, 100%);
}

.notify-playground {
  margin-top: 20px;
}

.notify-playground-screen {
  position: relative;
  width: 100%;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(226, 216, 195, .12);
  background:
    radial-gradient(ellipse at 70% 46%, rgba(107, 9, 5, .14), transparent 36%),
    linear-gradient(rgba(0,0,0,.22), rgba(0,0,0,.48)),
    url('assets/backgrounds/red_forest.png') center 52% / cover no-repeat;
  box-shadow:
    inset 0 0 110px rgba(0,0,0,.52),
    0 14px 28px rgba(0,0,0,.34);
}

.notify-playground-watermark {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: rgba(218, 207, 186, .26);
  text-transform: uppercase;
}

.notify-demo-area {
  position: absolute;
  top: 30px;
  left: 28px;
  width: min(430px, calc(100% - 56px));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notify-demo-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notify-demo-toast {
  --notify-demo-accent: rgba(236, 233, 233, .98);
  position: relative;
  min-height: 68px;
  padding: 5px 12px;
  display: flex;
  align-items: stretch;
  overflow: visible;
  background: url('assets/ui/inkroller_1a.png') center / 100% 100% no-repeat;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.5));
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}

.notify-demo-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.notify-demo-toast.leaving {
  opacity: 0;
  transform: translateX(-24px);
}

.notify-demo-toast[data-type='success'] {
  --notify-demo-accent: rgba(177, 133, 0, .98);
}

.notify-demo-toast[data-type='warning'] {
  --notify-demo-accent: rgba(255, 218, 32, .98);
}

.notify-demo-toast[data-type='error'] {
  --notify-demo-accent: rgba(201, 0, 0, .98);
}

.notify-demo-accent {
  width: 6px;
  flex: 0 0 6px;
  background: var(--notify-demo-accent);
}

.notify-demo-image-wrap {
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  align-self: center;
  margin-right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-2px);
}

.notify-demo-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.78));
}

.notify-demo-body {
  min-width: 0;
  flex: 1;
  padding: 12px 18px 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.notify-demo-title {
  font-family: 'RDRLino', Georgia, serif;
  color: rgba(237, 229, 212, .96);
  font-size: 18px;
  letter-spacing: .4px;
  text-transform: uppercase;
  text-shadow: 0 2px 2px rgba(0,0,0,.9);
}

.notify-demo-desc {
  font-family: 'RDRChalk', 'RDRLedger', Georgia, serif;
  color: rgba(201, 191, 173, .78);
  font-size: 14px;
  line-height: 1.3;
}

.notify-demo-loot {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transform: scale(.85);
}

.notify-demo-loot.show {
  animation: notify-demo-loot-in 260ms cubic-bezier(.34,1.56,.64,1) forwards;
}

.notify-demo-loot.leaving {
  opacity: 0;
  transform: scale(.92);
  transition: opacity 150ms ease-in, transform 150ms ease-in;
}

@keyframes notify-demo-loot-in {
  0% { opacity: 0; transform: scale(.7) translateY(6px); }
  60% { opacity: 1; transform: scale(1.06) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.notify-demo-loot-icon-placeholder {
  position: relative;
  width: 70px;
  height: 70px;
  flex: 0 0 70px;
  border: 1px dashed rgba(218, 207, 185, .22);
  border-radius: 50%;
  background: rgba(0,0,0,.18);
}

.notify-demo-loot-icon-placeholder::after {
  content: 'IMG';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 9px;
  letter-spacing: 1px;
  color: rgba(215, 204, 184, .28);
}

.notify-demo-loot-copy {
  display: flex;
  align-items: baseline;
  gap: 12px;
  line-height: 1.1;
}

.notify-demo-loot-label {
  font-family: 'RDRLino', Georgia, serif;
  color: rgba(237, 229, 212, .96);
  font-size: 18px;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-shadow: 0 2px 3px rgba(0,0,0,.95);
}

.notify-demo-loot-amount {
  font-family: 'RDRLino', Georgia, serif;
  color: rgba(207, 157, 62, .98);
  font-size: 17px;
  text-shadow: 0 2px 3px rgba(0,0,0,.95);
}

.notify-demo-announcement {
  position: absolute;
  top: 26px;
  left: 50%;
  width: min(640px, 72%);
  padding: 36px 48px 38px;
  transform: translate(-50%, -12px);
  text-align: center;
  background: url('assets/resources/notify/ui/hud_location_bg2.png') center / 100% 100% no-repeat;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.55));
  opacity: 0;
}

.notify-demo-announcement.show {
  animation: notify-demo-announce-in 320ms ease-out forwards;
}

.notify-demo-announcement.leaving {
  opacity: 0;
  transform: translate(-50%, -10px);
  transition: opacity 260ms ease-in, transform 260ms ease-in;
}

@keyframes notify-demo-announce-in {
  0% { opacity: 0; transform: translate(-50%, -18px) scale(.97); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.notify-demo-announcement-title {
  font-family: 'Redemption', Georgia, serif;
  color: rgba(237, 229, 212, .96);
  font-size: 34px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 3px 3px rgba(0,0,0,.95);
}

.notify-demo-announcement-divider {
  width: 200px;
  height: 4px;
  margin: 8px auto;
  background: url('assets/ui/divider_line.png') center / 100% 4px no-repeat;
  opacity: .4;
}

.notify-demo-announcement-subtitle {
  font-family: 'RDRChalk', 'RDRLedger', Georgia, serif;
  color: rgba(201, 191, 173, .78);
  font-size: 18px;
}

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

.notify-control-group {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(224, 214, 193, .10);
  background: rgba(0,0,0,.18);
}

.notify-control-group > h3 {
  margin: 0 0 11px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 18px;
  font-weight: normal;
  color: rgba(240, 230, 210, .90);
}

.notify-control-group > p {
  margin: -4px 0 12px;
  font-size: 12px;
  color: rgba(195, 185, 168, .56);
}

.notify-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.notify-demo-button {
  position: relative;
  min-height: 46px;
  overflow: hidden;
  border: 0;
  padding: 0 11px 0 13px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  background: url('assets/ui/selection_box_bg_1d.png') center / 100% 100% no-repeat;
  color: rgba(210, 200, 182, .72);
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 15px;
  text-align: left;
}

.notify-demo-button > span {
  position: relative;
  z-index: 4;
}

.notify-demo-button > span:last-child {
  font-size: 12px;
  color: rgba(209, 170, 92, .68);
  text-transform: uppercase;
}

.notify-demo-button.is-focused,
.notify-demo-button:hover {
  color: rgba(255,250,238,.99);
  border: 2px solid var(--browse-primary);
  box-shadow:
    inset 0 0 0 1px rgba(95,0,0,.48),
    0 0 7px var(--browse-highlight);
}

.notify-demo-button.is-focused::before,
.notify-demo-button:hover::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.08)),
    url('assets/ui/brk_selected_bg.jpg') center 46% / 100% auto no-repeat;
}

.notify-special-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.notify-demo-button-large {
  min-height: 54px;
  font-size: 18px;
}

.notify-loot-group {
  display: flex;
  flex-direction: column;
}

.notify-gift-button {
  --gift-tilt: 0deg;
  position: relative;
  flex: 1;
  min-height: 220px;
  border: 0;
  overflow: hidden;
  padding: 18px 20px;
  background:
    radial-gradient(circle at 50% 44%, rgba(124, 10, 5, .16), transparent 42%),
    rgba(0,0,0,.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: rgba(237, 229, 212, .92);
}

.notify-gift-button:hover,
.notify-gift-button.is-focused {
  box-shadow:
    inset 0 0 0 2px rgba(95,1,1,.72),
    0 0 8px rgba(197,32,7,.36);
}

.notify-gift {
  position: relative;
  width: 94px;
  height: 94px;
  display: block;
  transform: rotate(var(--gift-tilt));
  transform-origin: center bottom;
}

.notify-gift-shadow {
  position: absolute;
  width: 110px;
  height: 18px;
  margin-top: 94px;
  border-radius: 50%;
  background: rgba(0,0,0,.44);
  filter: blur(4px);
}

.notify-gift-body {
  position: absolute;
  left: 11px;
  bottom: 4px;
  width: 72px;
  height: 64px;
  display: block;
  border: 2px solid rgba(210, 199, 177, .74);
  background:
    linear-gradient(90deg, transparent 42%, rgba(139, 8, 5, .92) 43% 57%, transparent 58%),
    linear-gradient(rgba(57, 3, 2, .92), rgba(19, 3, 2, .96));
  box-shadow:
    inset 0 0 14px rgba(0,0,0,.48),
    0 6px 10px rgba(0,0,0,.44);
}

.notify-gift-lid {
  position: absolute;
  z-index: 3;
  left: 5px;
  top: 18px;
  width: 84px;
  height: 25px;
  display: block;
  border: 2px solid rgba(218, 207, 185, .82);
  background:
    linear-gradient(90deg, transparent 43%, rgba(139, 8, 5, .96) 44% 56%, transparent 57%),
    linear-gradient(rgba(72, 4, 3, .98), rgba(32, 3, 2, .98));
  box-shadow: 0 5px 8px rgba(0,0,0,.42);
  transform-origin: 18% 100%;
}

.notify-gift-bow {
  position: absolute;
  left: 50%;
  top: -15px;
  width: 42px;
  height: 22px;
  transform: translateX(-50%);
}

.notify-gift-bow i {
  position: absolute;
  top: 4px;
  width: 22px;
  height: 14px;
  border: 2px solid rgba(193, 137, 34, .88);
  border-radius: 70% 28% 70% 28%;
}

.notify-gift-bow i:first-child {
  right: 19px;
  transform: rotate(22deg);
}

.notify-gift-bow i:last-child {
  left: 19px;
  transform: scaleX(-1) rotate(22deg);
}

.notify-gift-copy {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.notify-gift-copy strong {
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 17px;
  font-weight: normal;
  letter-spacing: .6px;
}

.notify-gift-copy small {
  font-family: 'RDRLino', Georgia, serif;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(198, 188, 170, .45);
}

.notify-gift-button.is-opening .notify-gift {
  animation: notify-gift-hit 390ms cubic-bezier(.2,.9,.3,1);
}

.notify-gift-button.is-opening .notify-gift-lid {
  animation: notify-gift-lid-pop 390ms cubic-bezier(.2,.9,.3,1);
}

@keyframes notify-gift-hit {
  0% { transform: rotate(var(--gift-tilt)) translateY(0) scale(1); }
  28% { transform: rotate(var(--gift-tilt)) translateY(5px) scale(1.08,.86); }
  58% { transform: rotate(var(--gift-tilt)) translateY(-8px) scale(.96,1.06); }
  100% { transform: rotate(var(--gift-tilt)) translateY(0) scale(1); }
}

@keyframes notify-gift-lid-pop {
  0% { transform: translateY(0) rotate(0); }
  34% { transform: translateY(-5px) rotate(-5deg); }
  58% { transform: translateY(-24px) rotate(-16deg); }
  100% { transform: translateY(0) rotate(0); }
}

.notify-gift-burst {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 43%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.notify-gift-burst i {
  --burst-angle: 0deg;
  --burst-distance: 34px;
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 10px;
  background: rgba(207, 157, 62, .82);
  transform-origin: 50% 50%;
  animation: notify-gift-particle 500ms ease-out forwards;
}

.notify-gift-burst i:nth-child(even) {
  background: rgba(201, 0, 0, .82);
}

@keyframes notify-gift-particle {
  0% {
    opacity: 1;
    transform: rotate(var(--burst-angle)) translateY(0) rotate(0);
  }
  100% {
    opacity: 0;
    transform:
      rotate(var(--burst-angle))
      translateY(calc(var(--burst-distance) * -1))
      rotate(160deg);
  }
}

@media (max-width: 900px) {
  .notify-playground-controls {
    grid-template-columns: 1fr;
  }

  .notify-special-controls {
    grid-column: auto;
  }

  .notify-demo-announcement {
    width: 88%;
  }
}

@media (max-width: 620px) {
  .notify-control-grid,
  .notify-special-controls {
    grid-template-columns: 1fr;
  }

  .notify-playground-screen {
    min-height: 610px;
  }

  .notify-demo-area {
    left: 14px;
    width: calc(100% - 28px);
  }
}


/* ==========================================================================
   Notify loot rarity demo
   ========================================================================== */

.notify-rarity-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: -2px 0 12px;
}

.notify-rarity-legend span {
  padding: 3px 7px;
  border: 1px solid currentColor;
  background: rgba(0,0,0,.20);
  font-family: 'RDRLino', Georgia, serif;
  font-size: 8px;
  line-height: 1;
  letter-spacing: .7px;
  text-transform: uppercase;
  opacity: .72;
}

.notify-rarity-legend b {
  margin-left: 3px;
  font-weight: normal;
  opacity: .72;
}

.notify-rarity-legend .common { color: #d9d2c4; }
.notify-rarity-legend .uncommon { color: #9db586; }
.notify-rarity-legend .rare { color: #7699bd; }
.notify-rarity-legend .epic { color: #9b77b2; }
.notify-rarity-legend .legendary { color: #d69d36; }

.notify-demo-loot-stack {
  width: min(382px, 100%);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.notify-demo-loot-stack .notify-demo-loot {
  --loot-rarity-accent: #d9d2c4;
  position: relative;
  min-height: 74px;
  padding: 5px 14px 5px 7px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-24px) scale(.96);
  border-left: 4px solid var(--loot-rarity-accent);
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.035),
      rgba(0,0,0,.10) 42%
    ),
    url('assets/ui/inkroller_1a.png') center / 100% 100% no-repeat;
  filter:
    drop-shadow(0 5px 8px rgba(0,0,0,.52))
    drop-shadow(0 0 4px var(--loot-rarity-accent));
  transition:
    opacity 190ms ease-out,
    transform 220ms cubic-bezier(.2,.9,.3,1);
}

.notify-demo-loot-stack .notify-demo-loot::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 18px rgba(0,0,0,.30);
}

.notify-demo-loot-stack .notify-demo-loot.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.notify-demo-loot-stack .notify-demo-loot.leaving {
  opacity: 0;
  transform: translateX(-18px) scale(.95);
}

.notify-demo-loot-stack .notify-demo-loot.stack-hit {
  animation: notify-loot-stack-hit 250ms cubic-bezier(.2,.9,.3,1);
}

@keyframes notify-loot-stack-hit {
  0% { transform: scale(1); }
  42% { transform: scale(1.055); }
  100% { transform: scale(1); }
}

.notify-demo-loot-image-wrap {
  position: relative;
  z-index: 2;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notify-demo-loot-image {
  display: block;
  max-width: 68px;
  max-height: 68px;
  object-fit: contain;
  filter:
    drop-shadow(0 3px 4px rgba(0,0,0,.82))
    drop-shadow(0 0 4px var(--loot-rarity-accent));
}

.notify-demo-loot-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
}

.notify-demo-loot-topline {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.notify-demo-loot-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: 'RDRLino', Georgia, serif;
  color: rgba(237, 229, 212, .96);
  font-size: 16px;
  line-height: 1.05;
  letter-spacing: .3px;
  text-transform: uppercase;
  text-shadow: 0 2px 3px rgba(0,0,0,.95);
}

.notify-demo-loot-rarity {
  font-family: 'RDRLino', Georgia, serif;
  color: var(--loot-rarity-accent);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.notify-demo-loot-amount {
  align-self: center;
  font-family: 'RDRLino', Georgia, serif;
  color: var(--loot-rarity-accent);
  font-size: 18px;
  text-shadow: 0 2px 3px rgba(0,0,0,.95);
}

.notify-gift-button {
  --gift-rarity-accent: rgba(207, 157, 62, .84);
}

.notify-gift-button[data-rarity] {
  box-shadow:
    inset 0 0 0 2px var(--gift-rarity-accent),
    0 0 15px var(--gift-rarity-accent);
}

.notify-gift-burst i {
  background: var(--gift-rarity-accent);
}

.notify-gift-burst i:nth-child(even) {
  background: rgba(201, 0, 0, .82);
}

.notify-gift-button[data-rarity='rare'] .notify-gift,
.notify-gift-button[data-rarity='epic'] .notify-gift,
.notify-gift-button[data-rarity='legendary'] .notify-gift {
  filter:
    drop-shadow(0 0 8px var(--gift-rarity-accent))
    drop-shadow(0 6px 8px rgba(0,0,0,.52));
}

.notify-gift-button[data-rarity='legendary'] .notify-gift {
  animation:
    notify-gift-hit 390ms cubic-bezier(.2,.9,.3,1),
    notify-gift-legendary 390ms ease-out;
}

@keyframes notify-gift-legendary {
  0%, 100% { filter: drop-shadow(0 0 4px #d69d36); }
  50% { filter: drop-shadow(0 0 18px #d69d36); }
}


/* ==========================================================================
   Notify playground — sticky live player beside the controls
   ========================================================================== */

.notify-playground {
  display: grid;
  grid-template-columns: minmax(390px, 1.08fr) minmax(340px, .92fr);
  gap: 18px;
  align-items: start;
}

.notify-playground-screen {
  position: sticky;
  top: 18px;
  min-height: 550px;
  max-height: calc(100vh - 72px);
}

.notify-playground-controls {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.notify-special-controls {
  grid-column: auto;
}

.notify-loot-group {
  min-height: 230px;
}

/* Old rarity explanation is gone. */
.notify-rarity-legend {
  display: none !important;
}

/* ==========================================================================
   Loot Notify — match the real BRK Notify ticker
   ========================================================================== */

.notify-demo-area > .notify-demo-loot {
  --loot-rarity-accent: rgba(207, 157, 62, .98);
  position: relative;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  filter: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: scale(.85);
}

.notify-demo-area > .notify-demo-loot.hidden {
  display: none;
}

.notify-demo-area > .notify-demo-loot.show {
  display: flex;
  animation:
    notify-real-loot-bounce-in
    260ms cubic-bezier(.34,1.56,.64,1) forwards;
}

.notify-demo-area > .notify-demo-loot.leaving {
  opacity: 0;
  transform: scale(.92);
  transition:
    opacity 150ms ease-in,
    transform 150ms ease-in;
}

@keyframes notify-real-loot-bounce-in {
  0% {
    opacity: 0;
    transform: scale(.7) translateY(6px);
  }
  60% {
    opacity: 1;
    transform: scale(1.06) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.notify-demo-loot-icon-wrap {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notify-demo-loot-icon {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter:
    drop-shadow(0 2px 3px rgba(0,0,0,.85));
}

.notify-demo-loot-text-wrap {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.1;
}

.notify-demo-loot-label {
  max-width: 210px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgba(237,229,212,.96);
  font-family: 'RDRLino', Georgia, serif;
  font-size: 17px;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-shadow:
    0 2px 3px rgba(0,0,0,.95),
    0 0 6px rgba(0,0,0,.7);
}

.notify-demo-loot-amount {
  color: var(--loot-rarity-accent);
  font-family: 'RDRLino', Georgia, serif;
  font-size: 14px;
  letter-spacing: .3px;
  text-shadow: 0 2px 3px rgba(0,0,0,.95);
}

.notify-demo-loot-status {
  color: var(--loot-rarity-accent);
  font-family: 'RDRLino', Georgia, serif;
  font-size: 10px;
  letter-spacing: .7px;
  text-transform: uppercase;
  text-shadow: 0 2px 3px rgba(0,0,0,.95);
}

/* Rarity remains a surprise; it only appears on the result itself. */
.notify-demo-loot-status.hidden {
  display: none;
}

@media (max-width: 1040px) {
  .notify-playground {
    grid-template-columns: 1fr;
  }

  .notify-playground-screen {
    position: relative;
    top: auto;
    min-height: 520px;
    max-height: none;
  }
}


/* ==========================================================================
   Notify playground — single-screen console layout
   ========================================================================== */

.notify-console.notify-playground {
  display: block;
  width: 100%;
  margin-top: 18px;
}

.notify-console .notify-console-strip {
  width: 100%;
}

.notify-console-strip-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.notify-console-group {
  min-width: 0;
  padding: 10px 11px 11px;
  border: 1px solid rgba(224, 214, 193, .10);
  background: rgba(0,0,0,.16);
}

.notify-console-group > h3 {
  margin: 0 0 8px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 17px;
  font-weight: normal;
  color: rgba(240, 230, 210, .90);
}

.notify-control-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.notify-control-row::-webkit-scrollbar {
  display: none;
}

.notify-control-row .notify-demo-button {
  flex: 1 0 0;
  min-width: 108px;
  min-height: 42px;
  padding: 0 9px 0 10px;
  font-size: 14px;
}

.notify-console-stage-wrap {
  position: relative;
  width: 100%;
  padding-top: 84px;
}

.notify-console .notify-playground-screen {
  position: relative;
  top: auto;
  width: 100%;
  min-height: 500px;
  max-height: none;
  margin: 0;
}

.notify-present-dock {
  position: absolute;
  z-index: 8;
  top: 0;
  right: 16px;
  height: 78px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notify-present-label {
  align-self: flex-start;
  margin-top: 8px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 15px;
  color: rgba(237, 229, 212, .72);
  text-transform: uppercase;
  white-space: nowrap;
}

.notify-gift-button.notify-gift-button-compact {
  flex: 0 0 auto;
  width: 150px;
  min-height: 76px;
  height: 76px;
  padding: 4px 10px;
  display: grid;
  grid-template-columns: 66px 1fr;
  grid-template-rows: 1fr;
  align-items: center;
  justify-items: center;
  gap: 5px;
  overflow: visible;
  background:
    radial-gradient(circle at 36% 50%, rgba(124,10,5,.16), transparent 46%),
    rgba(0,0,0,.18);
}

.notify-gift-button-compact .notify-gift {
  width: 62px;
  height: 62px;
  transform: rotate(var(--gift-tilt)) scale(.72);
  transform-origin: center center;
}

.notify-gift-button-compact .notify-gift-shadow {
  width: 68px;
  height: 12px;
  margin-top: 46px;
  margin-left: -68px;
}

.notify-gift-button-compact .notify-gift-copy {
  align-items: flex-start;
  justify-self: start;
  text-align: left;
}

.notify-gift-button-compact .notify-gift-copy strong {
  font-size: 14px;
}

.notify-gift-button-compact .notify-gift-copy small {
  font-size: 7px;
  letter-spacing: .8px;
}

.notify-console-strip-bottom {
  margin-top: 12px;
}

.notify-console-group-wide {
  width: 100%;
}

.notify-animal-row .notify-demo-button {
  flex: 0 0 116px;
  min-width: 116px;
}

.notify-console-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.notify-console-actions .notify-demo-button {
  min-height: 48px;
}

/* The old card-stack controls are not part of this layout. */
.notify-console .notify-playground-controls,
.notify-console .notify-control-group,
.notify-console .notify-loot-group,
.notify-console .notify-special-controls {
  all: unset;
}

/* Restore only the shared button behavior if an old selector had higher specificity. */
.notify-console .notify-demo-button {
  position: relative;
  overflow: hidden;
  border: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  background: url('assets/ui/selection_box_bg_1d.png') center / 100% 100% no-repeat;
  color: rgba(210, 200, 182, .72);
  font-family: 'RDRLedger', Georgia, serif;
  text-align: left;
}

.notify-console .notify-gift-button {
  display: grid;
}

@media (max-width: 920px) {
  .notify-console-strip-top {
    grid-template-columns: 1fr;
  }

  .notify-console-stage-wrap {
    padding-top: 78px;
  }

  .notify-present-dock {
    right: 8px;
  }

  .notify-console .notify-playground-screen {
    min-height: 470px;
  }
}

@media (max-width: 650px) {
  .notify-present-label {
    display: none;
  }

  .notify-gift-button.notify-gift-button-compact {
    width: 130px;
  }

  .notify-console .notify-playground-screen {
    min-height: 520px;
  }

  .notify-console-actions {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   BRK Notify interactive showcase — display case layout
   ========================================================================== */

.notify-showcase.notify-playground {
  display: block;
  width: 100%;
  margin-top: 20px;
}

.notify-showcase-stage-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 66px;
}

.notify-showcase .notify-playground-screen {
  position: relative;
  top: auto;
  width: 100%;
  min-height: 520px;
  max-height: none;
  margin: 0;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Present perched over the lower-right corner of the player.
   Fixed dimensions keep the artwork from being compressed.
   -------------------------------------------------------------------------- */

.notify-gift-perch {
  position: absolute;
  z-index: 20;
  right: 28px;
  bottom: -54px;
  width: 188px;
}

.notify-gift-perch-label {
  display: block;
  margin: 0 0 5px;
  padding-right: 7px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 14px;
  letter-spacing: .45px;
  color: rgba(235, 225, 206, .72);
  text-align: right;
  text-transform: uppercase;
  text-shadow: 0 2px 3px rgba(0,0,0,.9);
}

.notify-gift-button.notify-gift-float {
  position: relative;
  width: 188px;
  height: 176px;
  min-height: 176px;
  flex: none;
  padding: 12px 14px 10px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(220, 208, 185, .13);
  background:
    radial-gradient(circle at 50% 42%, rgba(119, 8, 4, .25), transparent 44%),
    linear-gradient(rgba(12,4,3,.78), rgba(0,0,0,.83)),
    url('assets/ui/inkroller_1a.png') center / 100% 100% no-repeat;
  box-shadow:
    0 15px 25px rgba(0,0,0,.52),
    inset 0 0 22px rgba(0,0,0,.24);
}

.notify-gift-button.notify-gift-float:hover,
.notify-gift-button.notify-gift-float.is-focused {
  border-color: var(--browse-primary);
  box-shadow:
    0 15px 25px rgba(0,0,0,.52),
    0 0 8px var(--browse-highlight),
    inset 0 0 0 1px rgba(95,0,0,.52);
}

.notify-gift-float .notify-gift {
  width: 94px;
  height: 94px;
  flex: 0 0 94px;
  transform: rotate(var(--gift-tilt));
  transform-origin: center bottom;
}

.notify-gift-float .notify-gift-shadow {
  width: 110px;
  height: 18px;
  margin-top: 86px;
}

.notify-gift-float .notify-gift-copy {
  position: relative;
  z-index: 6;
  align-items: center;
  text-align: center;
}

.notify-gift-float .notify-gift-copy strong {
  font-size: 16px;
}

.notify-gift-float .notify-gift-copy small {
  font-size: 8px;
}

/* --------------------------------------------------------------------------
   Mode selector
   -------------------------------------------------------------------------- */

.notify-mode-bar {
  position: relative;
  width: calc(100% - 216px);
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 0;
  margin: 0 0 8px;
}

.notify-mode-button {
  position: relative;
  min-width: 0;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid rgba(222, 211, 190, .09);
  padding: 0 9px;
  background:
    linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.22)),
    url('assets/ui/selection_box_bg_1d.png') center / 100% 100% no-repeat;
  color: rgba(201, 191, 173, .62);
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 14px;
  letter-spacing: .35px;
  text-transform: uppercase;
}

.notify-mode-button:hover,
.notify-mode-button.is-focused {
  color: rgba(246, 237, 219, .94);
}

.notify-mode-button.is-selected {
  color: rgba(255, 248, 232, .99);
  border: 2px solid var(--browse-primary);
  box-shadow:
    inset 0 0 0 1px rgba(95,0,0,.52),
    0 0 7px var(--browse-highlight);
}

.notify-mode-button.is-selected::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.10)),
    url('assets/ui/brk_selected_bg.jpg') center 46% / 100% auto no-repeat;
}

.notify-mode-button {
  isolation: isolate;
}

.notify-mode-button::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* --------------------------------------------------------------------------
   One contextual action row at a time
   -------------------------------------------------------------------------- */

.notify-mode-panels {
  width: calc(100% - 216px);
  min-height: 52px;
}

.notify-context-row {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.notify-context-row::-webkit-scrollbar {
  display: none;
}

.notify-context-row.hidden {
  display: none;
}

.notify-context-row .notify-demo-button {
  flex: 1 1 0;
  min-width: 122px;
  min-height: 48px;
}

.notify-context-row-animals .notify-demo-button {
  flex: 0 0 118px;
  min-width: 118px;
}

.notify-context-row-single .notify-demo-button {
  flex: 1 1 auto;
  width: 100%;
  min-width: 100%;
  min-height: 50px;
}

/* Neutralize earlier experimental console layout selectors. */
.notify-showcase .notify-console-strip,
.notify-showcase .notify-console-actions,
.notify-showcase .notify-present-dock {
  display: none !important;
}

@media (max-width: 900px) {
  .notify-showcase-stage-wrap {
    margin-bottom: 58px;
  }

  .notify-gift-perch {
    right: 16px;
    bottom: -48px;
    width: 168px;
  }

  .notify-gift-button.notify-gift-float {
    width: 168px;
    height: 158px;
    min-height: 158px;
  }

  .notify-mode-bar,
  .notify-mode-panels {
    width: calc(100% - 188px);
  }

  .notify-mode-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .notify-showcase-stage-wrap {
    margin-bottom: 186px;
  }

  .notify-gift-perch {
    right: 50%;
    bottom: -174px;
    width: 176px;
    transform: translateX(50%);
  }

  .notify-gift-button.notify-gift-float {
    width: 176px;
    height: 164px;
    min-height: 164px;
  }

  .notify-gift-perch-label {
    text-align: center;
    padding-right: 0;
  }

  .notify-mode-bar,
  .notify-mode-panels {
    width: 100%;
  }

  .notify-mode-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ==========================================================================
   BRK Notify interactive stage background
   Uses the original full-resolution supplied cave screenshot.
   ========================================================================== */

.notify-showcase .notify-playground-screen {
  background:
    radial-gradient(
      ellipse at 72% 26%,
      rgba(0, 0, 0, .03) 0%,
      rgba(0, 0, 0, .08) 34%,
      rgba(0, 0, 0, .32) 100%
    ),
    linear-gradient(
      rgba(0, 0, 0, .10),
      rgba(0, 0, 0, .26)
    ),
    url('assets/resources/notify/showcase/cave.jpg')
      center center / cover no-repeat;
  box-shadow:
    inset 0 0 90px rgba(0, 0, 0, .34),
    0 14px 28px rgba(0, 0, 0, .34);
}


/* ==========================================================================
   BRK Notify — four-row frame layout
   Two control rows above, two below, cave stage in the middle.
   ========================================================================== */

.notify-frame-layout.notify-playground {
  display: block;
  width: 100%;
  margin-top: 0;
}

.notify-frame-controls {
  width: 100%;
  display: grid;
  gap: 7px;
}

.notify-frame-controls-top {
  margin-bottom: 12px;
}

.notify-frame-controls-bottom {
  margin-top: 66px;
}

.notify-frame-row {
  display: grid;
  gap: 7px;
  width: 100%;
}

.notify-frame-row-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.notify-frame-row-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.notify-frame-row .notify-demo-button {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 0 11px 0 13px;
  font-size: 15px;
}

/* Keep the older BRK-style button proportions the user preferred. */
.notify-frame-row .notify-demo-button > span:last-child {
  font-size: 11px;
}

.notify-frame-stage-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 0;
}

/* Animated BRK border around the entire cave interaction stage. */
.notify-stage-flow-border {
  position: absolute;
  z-index: 12;
  inset: -2px;
  pointer-events: none;
  padding: 2px;
  opacity: var(--browse-opacity);
  filter: drop-shadow(0 0 4px var(--browse-highlight));
  background:
    conic-gradient(
      from var(--browse-angle),
      var(--browse-primary) 0deg,
      var(--browse-primary) 82deg,
      var(--browse-deep) 128deg,
      var(--browse-highlight) 158deg,
      var(--browse-primary) 198deg,
      var(--browse-accent) 250deg,
      var(--browse-primary) 306deg,
      var(--browse-primary) 360deg
    );
  animation: menu-border-flow var(--browse-duration) linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@supports not ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .notify-stage-flow-border {
    inset: 0;
    padding: 0;
    background: transparent;
    border: 2px solid var(--browse-primary);
  }
}

/* Preserve the full-size present from the display-case pass. */
.notify-frame-layout .notify-gift-perch {
  right: 28px;
  bottom: -54px;
  width: 188px;
}

.notify-frame-layout .notify-gift-button.notify-gift-float {
  width: 188px;
  height: 176px;
  min-height: 176px;
}

/* The previous mode-tab/display-case controls are gone from this version. */
.notify-frame-layout .notify-mode-bar,
.notify-frame-layout .notify-mode-panels,
.notify-frame-layout .notify-context-row {
  display: none !important;
}

@media (max-width: 900px) {
  .notify-frame-row-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .notify-frame-controls-bottom {
    margin-top: 62px;
  }

  .notify-frame-layout .notify-gift-perch {
    right: 16px;
  }
}

@media (max-width: 680px) {
  .notify-frame-row-four,
  .notify-frame-row-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notify-frame-stage-wrap {
    margin-bottom: 188px;
  }

  .notify-frame-controls-bottom {
    margin-top: 0;
  }

  .notify-frame-layout .notify-gift-perch {
    right: 50%;
    bottom: -174px;
    transform: translateX(50%);
  }
}


/* ==========================================================================
   BRK Notify cave stage — current frame-layout selector
   ========================================================================== */

.notify-frame-layout .notify-playground-screen {
  background:
    radial-gradient(
      ellipse at 72% 26%,
      rgba(0, 0, 0, .03) 0%,
      rgba(0, 0, 0, .08) 34%,
      rgba(0, 0, 0, .32) 100%
    ),
    linear-gradient(
      rgba(0, 0, 0, .10),
      rgba(0, 0, 0, .26)
    ),
    url('assets/resources/notify/showcase/cave.jpg')
      center center / cover no-repeat;
  box-shadow:
    inset 0 0 90px rgba(0, 0, 0, .34),
    0 14px 28px rgba(0, 0, 0, .34);
}


/* ==========================================================================
   BRK Notify loot button — inventory slot treatment
   ========================================================================== */

.notify-frame-layout .notify-inventory-gift-perch {
  right: 26px;
  bottom: -39px;
  width: 156px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.notify-inventory-gift-perch .notify-gift-perch-label {
  width: 100%;
  margin: 0 0 3px;
  padding: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: .55px;
  color: rgba(235, 225, 206, .76);
}

.notify-gift-button.notify-gift-inventory {
  --gift-tilt: 0deg;
  position: relative;
  width: 156px;
  height: 140px;
  min-height: 140px;
  flex: 0 0 140px;
  display: block;
  overflow: visible;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
}

.notify-gift-button.notify-gift-inventory:hover,
.notify-gift-button.notify-gift-inventory.is-focused {
  border: 0;
  box-shadow: none;
}

.notify-gift-slot-base,
.notify-gift-slot-border {
  position: absolute;
  inset: 0;
  display: block;
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}

.notify-gift-slot-base {
  z-index: 0;
  background-image: url('assets/resources/notify/ui/black_square.png');
  opacity: .96;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.54));
}

.notify-gift-slot-border {
  z-index: 5;
  background-image: url('assets/resources/notify/ui/border_red_square.png');
  opacity: 0;
  transform: scale(.985);
  filter:
    drop-shadow(0 0 2px rgba(111,0,0,.86))
    drop-shadow(0 0 5px rgba(197,32,7,.42));
  transition: opacity 150ms ease, transform 150ms ease;
}

.notify-gift-inventory:hover .notify-gift-slot-border,
.notify-gift-inventory.is-focused .notify-gift-slot-border {
  opacity: .97;
  transform: scale(1);
}

/* Suppress the generic selection rectangle; the supplied red slot owns focus. */
.notify-gift-inventory.is-focused::before,
.notify-gift-inventory.is-focused::after,
.notify-gift-inventory:hover::before,
.notify-gift-inventory:hover::after {
  display: none !important;
}

.notify-gift-inventory .notify-gift-shadow {
  z-index: 1;
  left: 50%;
  bottom: 22px;
  width: 78px;
  height: 11px;
  margin: 0;
  transform: translateX(-50%);
  background: rgba(0,0,0,.64);
  filter: blur(5px);
}

/* White sketched inventory-style present. */
.notify-gift-inventory .notify-gift-sketch {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 78px;
  margin: 0;
  transform:
    translate(-50%, -48%)
    rotate(var(--gift-tilt));
  transform-origin: 50% 92%;
  filter:
    drop-shadow(0 2px 1px rgba(0,0,0,.88))
    drop-shadow(0 0 1px rgba(255,245,226,.28));
}

.notify-gift-inventory .notify-gift-body {
  left: 10px;
  bottom: 4px;
  width: 62px;
  height: 49px;
  border: 3px solid rgba(237, 232, 219, .92);
  border-radius: 1px;
  background:
    linear-gradient(
      90deg,
      transparent 42%,
      rgba(130, 8, 5, .92) 43% 57%,
      transparent 58%
    ),
    rgba(7, 6, 5, .10);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.38),
    1px 1px 0 rgba(236,230,216,.22);
  transform: rotate(-.7deg) skewX(-.8deg);
}

.notify-gift-inventory .notify-gift-lid {
  left: 5px;
  top: 13px;
  width: 72px;
  height: 22px;
  border: 3px solid rgba(244, 238, 224, .96);
  border-radius: 1px;
  background:
    linear-gradient(
      90deg,
      transparent 42%,
      rgba(130, 8, 5, .96) 43% 57%,
      transparent 58%
    ),
    rgba(7, 6, 5, .12);
  box-shadow:
    1px 2px 0 rgba(0,0,0,.72),
    inset 0 0 0 1px rgba(0,0,0,.28);
  transform-origin: 18% 100%;
}

.notify-gift-inventory .notify-gift-bow {
  left: 50%;
  top: -14px;
  width: 38px;
  height: 20px;
}

.notify-gift-inventory .notify-gift-bow i {
  top: 4px;
  width: 21px;
  height: 13px;
  border: 3px solid rgba(236, 228, 207, .94);
  border-radius: 72% 28% 68% 30%;
  box-shadow: 0 1px 0 rgba(0,0,0,.72);
}

.notify-gift-inventory .notify-gift-bow i:first-child {
  right: 17px;
}

.notify-gift-inventory .notify-gift-bow i:last-child {
  left: 17px;
}

/* Loose scratch strokes keep the icon from looking too clean/vector-perfect. */
.notify-gift-sketch-line {
  position: absolute;
  z-index: 6;
  display: block;
  height: 2px;
  background: rgba(244, 238, 225, .68);
  pointer-events: none;
}

.notify-gift-sketch-line.line-a {
  width: 23px;
  left: 17px;
  bottom: 17px;
  transform: rotate(-2deg);
}

.notify-gift-sketch-line.line-b {
  width: 15px;
  right: 13px;
  top: 26px;
  transform: rotate(2deg);
}

.notify-gift-underlabel {
  display: block;
  margin-top: 1px;
  font-family: 'RDRChalk', 'RDRLedger', Georgia, serif;
  font-size: 13px;
  line-height: 1;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(236, 227, 208, .80);
  text-shadow: 0 2px 2px rgba(0,0,0,.92);
}

/* Keep the existing click behavior, but tune it for the smaller inventory icon. */
.notify-gift-inventory.is-opening .notify-gift-sketch {
  animation: notify-inventory-gift-hit 390ms cubic-bezier(.2,.9,.3,1);
}

.notify-gift-inventory.is-opening .notify-gift-lid {
  animation: notify-inventory-gift-lid-pop 390ms cubic-bezier(.2,.9,.3,1);
}

@keyframes notify-inventory-gift-hit {
  0% {
    transform: translate(-50%, -48%) rotate(var(--gift-tilt)) scale(1);
  }
  28% {
    transform: translate(-50%, -44%) rotate(var(--gift-tilt)) scale(1.08,.87);
  }
  58% {
    transform: translate(-50%, -56%) rotate(var(--gift-tilt)) scale(.96,1.06);
  }
  100% {
    transform: translate(-50%, -48%) rotate(var(--gift-tilt)) scale(1);
  }
}

@keyframes notify-inventory-gift-lid-pop {
  0% { transform: translateY(0) rotate(0); }
  34% { transform: translateY(-4px) rotate(-4deg); }
  58% { transform: translateY(-19px) rotate(-9deg); }
  100% { transform: translateY(0) rotate(0); }
}

/* Rarity burst still originates from the clickable slot. */
.notify-gift-inventory .notify-gift-burst {
  z-index: 8;
}

@media (max-width: 900px) {
  .notify-frame-layout .notify-inventory-gift-perch {
    right: 14px;
    width: 148px;
  }

  .notify-gift-button.notify-gift-inventory {
    width: 148px;
    height: 133px;
    min-height: 133px;
    flex-basis: 133px;
  }
}

@media (max-width: 680px) {
  .notify-frame-layout .notify-inventory-gift-perch {
    right: 50%;
    bottom: -154px;
    width: 156px;
    transform: translateX(50%);
  }

  .notify-frame-stage-wrap {
    margin-bottom: 170px;
  }
}


/* ==========================================================================
   BRK Notify loot button — supplied closed/open inventory art
   ========================================================================== */

.notify-gift-sprite .notify-gift-art {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 108px;
  height: 108px;
  transform: translate(-50%, -50%);
  transform-origin: 50% 82%;
  pointer-events: none;
}

.notify-gift-sprite .notify-gift-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  image-rendering: auto;
  filter:
    drop-shadow(0 4px 4px rgba(0,0,0,.72))
    drop-shadow(0 0 1px rgba(241,234,219,.22));
  transition:
    opacity 80ms linear,
    transform 120ms ease-out;
}

.notify-gift-sprite .notify-gift-art-closed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.notify-gift-sprite .notify-gift-art-open {
  opacity: 0;
  transform: translateY(5px) scale(.94);
}

.notify-gift-sprite.is-opening .notify-gift-art {
  animation: notify-gift-sprite-hit 390ms cubic-bezier(.2,.9,.3,1);
}

.notify-gift-sprite.is-opening .notify-gift-art-closed {
  opacity: 0;
  transform: translateY(3px) scale(.96);
}

.notify-gift-sprite.is-opening .notify-gift-art-open {
  opacity: 1;
  animation: notify-gift-open-pop 390ms cubic-bezier(.2,.9,.3,1);
}

/* The supplied images now own the present artwork. */
.notify-gift-sprite .notify-gift-sketch,
.notify-gift-sprite .notify-gift-body,
.notify-gift-sprite .notify-gift-lid,
.notify-gift-sprite .notify-gift-bow,
.notify-gift-sprite .notify-gift-sketch-line {
  display: none !important;
}

.notify-gift-sprite .notify-gift-shadow {
  bottom: 20px;
  width: 82px;
  height: 12px;
  opacity: .72;
}

/* Make the particle burst originate from the open top of the box rather than
   from the center of the inventory slot. */
.notify-gift-sprite .notify-gift-burst {
  z-index: 9;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
}

@keyframes notify-gift-sprite-hit {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  24% {
    transform: translate(-50%, -46%) scale(1.05,.91);
  }
  52% {
    transform: translate(-50%, -55%) scale(.98,1.04);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes notify-gift-open-pop {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(.90);
  }
  22% {
    opacity: 1;
    transform: translateY(-7px) scale(1.06);
  }
  64% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notify-gift-sprite:hover .notify-gift-art-closed,
.notify-gift-sprite.is-focused .notify-gift-art-closed {
  transform: translateY(-2px) scale(1.025);
}

.notify-gift-sprite.is-opening:hover .notify-gift-art-closed,
.notify-gift-sprite.is-opening.is-focused .notify-gift-art-closed {
  transform: translateY(3px) scale(.96);
}

@media (max-width: 900px) {
  .notify-gift-sprite .notify-gift-art {
    width: 102px;
    height: 102px;
  }
}


/* ==========================================================================
   BRK Notify loot button — clean cave overlay
   No inventory-slot backing; animated BRK border appears only on selection.
   ========================================================================== */

.notify-frame-layout .notify-inventory-gift-perch {
  right: 26px;
  bottom: -35px;
  width: 150px;
}

.notify-inventory-gift-perch .notify-gift-perch-label,
.notify-gift-sprite .notify-gift-slot-base,
.notify-gift-sprite .notify-gift-slot-border {
  display: none !important;
}

.notify-gift-button.notify-gift-inventory.notify-gift-sprite {
  position: relative;
  width: 150px;
  height: 132px;
  min-height: 132px;
  flex: 0 0 132px;
  padding: 0;
  border: 0;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
  isolation: isolate;
}

/* Remove any inherited box/card surface. */
.notify-gift-button.notify-gift-inventory.notify-gift-sprite:hover,
.notify-gift-button.notify-gift-inventory.notify-gift-sprite.is-focused {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.notify-gift-sprite .notify-gift-focus-border {
  position: absolute;
  z-index: 7;
  inset: 7px;
  display: block;
  padding: 2px;
  opacity: 0;
  pointer-events: none;
  border: 2px solid var(--browse-primary);
  filter: drop-shadow(0 0 4px var(--browse-highlight));
  transition: opacity 120ms ease;
}

.notify-gift-sprite:hover .notify-gift-focus-border,
.notify-gift-sprite.is-focused .notify-gift-focus-border {
  opacity: var(--browse-opacity);
}

@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .notify-gift-sprite .notify-gift-focus-border {
    border: 0;
    background: conic-gradient(
      from var(--browse-angle),
      var(--browse-primary) 0deg,
      var(--browse-primary) 82deg,
      var(--browse-deep) 128deg,
      var(--browse-highlight) 158deg,
      var(--browse-primary) 198deg,
      var(--browse-accent) 250deg,
      var(--browse-primary) 306deg,
      var(--browse-primary) 360deg
    );
    -webkit-mask:
      linear-gradient(#000 0 0) content-box,
      linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
  }

  .notify-gift-sprite:hover .notify-gift-focus-border,
  .notify-gift-sprite.is-focused .notify-gift-focus-border {
    animation: menu-border-flow var(--browse-duration) linear infinite;
  }
}

/* Let the gift float naturally over the cave instead of sitting on a dark tile. */
.notify-gift-sprite .notify-gift-art {
  width: 112px;
  height: 112px;
}

.notify-gift-sprite .notify-gift-shadow {
  z-index: 1;
  bottom: 15px;
  width: 72px;
  height: 9px;
  opacity: .34;
  background: rgba(0,0,0,.42);
  filter: blur(5px);
}

.notify-inventory-gift-perch .notify-gift-underlabel {
  margin-top: 2px;
  font-size: 13px;
  color: rgba(238, 229, 211, .82);
}

@media (max-width: 900px) {
  .notify-frame-layout .notify-inventory-gift-perch {
    right: 14px;
    width: 144px;
  }

  .notify-gift-button.notify-gift-inventory.notify-gift-sprite {
    width: 144px;
    height: 128px;
    min-height: 128px;
    flex-basis: 128px;
  }

  .notify-gift-sprite .notify-gift-art {
    width: 106px;
    height: 106px;
  }
}


/* ==========================================================================
   BRK Notify loot button — final focus/open states
   ========================================================================== */

/* Lift the gift so the art and OPEN label clear the stage edge more cleanly. */
.notify-frame-layout .notify-inventory-gift-perch {
  bottom: -18px;
}

/* Idle remains completely clean. */
.notify-gift-sprite .notify-gift-focus-border {
  opacity: 0;
  box-shadow: none;
}

/* Hover/focus uses the normal animated BRK border. */
.notify-gift-sprite:hover:not(.is-opening) .notify-gift-focus-border,
.notify-gift-sprite.is-focused:not(.is-opening) .notify-gift-focus-border {
  opacity: var(--browse-opacity);
  filter: drop-shadow(0 0 4px var(--browse-highlight));
}

@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .notify-gift-sprite:hover:not(.is-opening) .notify-gift-focus-border,
  .notify-gift-sprite.is-focused:not(.is-opening) .notify-gift-focus-border {
    animation: menu-border-flow var(--browse-duration) linear infinite;
  }
}

/* Clicking/opening temporarily becomes a richer solid gold frame/glow.
   Once is-opening is removed, normal hover/focus styling resumes automatically. */
.notify-gift-sprite.is-opening .notify-gift-focus-border {
  opacity: 1;
  border: 2px solid rgba(214, 165, 62, .98);
  background: transparent;
  animation: none !important;
  -webkit-mask: none;
  mask: none;
  filter:
    drop-shadow(0 0 3px rgba(214, 165, 62, .96))
    drop-shadow(0 0 9px rgba(193, 137, 34, .72));
  box-shadow:
    inset 0 0 0 1px rgba(108, 64, 9, .45);
}

/* Watermark is intentionally removed from the markup; keep this defensive
   rule so older cached markup cannot show it behind the gift. */
.notify-frame-layout .notify-playground-watermark {
  display: none !important;
}

@media (max-width: 900px) {
  .notify-frame-layout .notify-inventory-gift-perch {
    bottom: -14px;
  }
}

@media (max-width: 680px) {
  .notify-frame-layout .notify-inventory-gift-perch {
    bottom: -146px;
  }
}


/* ==========================================================================
   BRK Notify loot results — responsive three-deep stack
   ========================================================================== */

.notify-live-loot-stack {
  width: min(330px, 100%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.notify-live-loot {
  --loot-rarity-accent: rgba(207, 157, 62, .98);
  position: relative;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transform: translateX(-18px) scale(.96);
  transition:
    opacity 130ms ease-out,
    transform 150ms cubic-bezier(.2,.9,.3,1);
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.58));
}

.notify-live-loot.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.notify-live-loot.leaving {
  opacity: 0;
  transform: translateX(-14px) scale(.95);
}

.notify-live-loot.stack-hit {
  animation: notify-live-loot-hit 220ms cubic-bezier(.2,.9,.3,1);
}

@keyframes notify-live-loot-hit {
  0% { transform: translateX(0) scale(1); }
  44% { transform: translateX(0) scale(1.05); }
  100% { transform: translateX(0) scale(1); }
}

.notify-live-loot-icon-wrap {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notify-live-loot-icon {
  display: block;
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
  /* Keep item artwork clean: no rarity-colored fuzzy glow. */
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.82));
}

.notify-live-loot-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: baseline;
  column-gap: 7px;
  row-gap: 1px;
}

.notify-live-loot-label {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: 'RDRLino', Georgia, serif;
  color: rgba(237,229,212,.96);
  font-size: 15px;
  line-height: 1.05;
  letter-spacing: .4px;
  text-transform: uppercase;
  text-shadow:
    0 2px 3px rgba(0,0,0,.95),
    0 0 5px rgba(0,0,0,.72);
}

.notify-live-loot-amount {
  grid-column: 2;
  grid-row: 1;
  font-family: 'RDRLino', Georgia, serif;
  color: var(--loot-rarity-accent);
  font-size: 13px;
  line-height: 1;
  text-shadow: 0 2px 3px rgba(0,0,0,.95);
}

.notify-live-loot-status {
  grid-column: 1 / -1;
  grid-row: 2;
  font-family: 'RDRLino', Georgia, serif;
  color: var(--loot-rarity-accent);
  font-size: 8px;
  line-height: 1;
  letter-spacing: .8px;
  text-transform: uppercase;
  text-shadow: 0 2px 3px rgba(0,0,0,.95);
}

/* Old single-ticker element is no longer rendered. */
.notify-demo-area > .notify-demo-loot {
  display: none !important;
}


/* ==========================================================================
   BRK Minigames — interactive milk preview
   ========================================================================== */

.minigames-preview-page {
  width: min(1040px, 100%);
}

.minigame-milk-demo {
  width: 100%;
}

.minigame-milk-stage {
  position: relative;
  width: 100%;
  min-height: 690px;
  overflow: hidden;
  border: 1px solid rgba(224, 214, 193, .12);
  background: #080706;
  box-shadow:
    inset 0 0 90px rgba(0,0,0,.42),
    0 14px 28px rgba(0,0,0,.34);
  isolation: isolate;
}

.minigame-milk-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow:
    inset 0 0 120px 34px rgba(0,0,0,.55),
    inset 0 -80px 110px rgba(0,0,0,.30);
}

.minigame-milk-backdrop {
  position: absolute;
  inset: -3%;
  z-index: 0;
  background:
    linear-gradient(rgba(0,0,0,.16), rgba(0,0,0,.30)),
    url('assets/resources/minigames/showcase/milk-wip.png')
      100% 50% / 220% auto no-repeat;
  filter: brightness(.72) saturate(.74) blur(1px);
  transform: scale(1.03);
}

.minigame-milk-prompt {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 330px;
  min-height: 610px;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
  color: #f4ecd8;
  text-shadow:
    -1px -1px 0 rgba(0,0,0,.98),
     1px -1px 0 rgba(0,0,0,.98),
    -1px  1px 0 rgba(0,0,0,.98),
     1px  1px 0 rgba(0,0,0,.98),
     0 3px 4px rgba(0,0,0,.95);
  pointer-events: none;
}

.minigame-milk-demo.is-active .minigame-milk-stage {
  cursor: none !important;
}

.minigame-milk-guide {
  position: relative;
  width: 100%;
  height: 510px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.minigame-guide-end {
  position: relative;
  z-index: 2;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.92));
}

.minigame-guide-udder {
  width: 250px;
  height: 155px;
  margin-bottom: -10px;
}

.minigame-guide-bucket {
  width: 205px;
  height: 126px;
  margin-top: -5px;
}

.minigame-guide-lane {
  position: relative;
  width: 150px;
  height: 250px;
  flex: 0 0 250px;
}

.minigame-guide-line {
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 3px;
  transform: translateX(-50%);
  background: rgba(247,242,225,.88);
  box-shadow:
    0 0 3px #000,
    0 0 7px rgba(255,255,255,.28);
}

.minigame-guide-target {
  position: absolute;
  left: 50%;
  width: 34px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(236,196,73,.92);
  box-shadow:
    0 0 10px rgba(236,196,73,.85),
    0 0 2px #000;
}

.minigame-guide-mouse-wrap {
  position: absolute;
  left: 50%;
  top: 8px;
  z-index: 4;
  width: 72px;
  height: 82px;
  transform: translate(-50%, -50%);
  transition:
    top 30ms linear,
    left 30ms linear,
    filter 90ms ease;
}

.minigame-guide-mouse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  object-fit: contain;
  filter: drop-shadow(0 2px 3px #000);
}

.minigame-guide-direction-arrow {
  position: absolute;
  left: 50%;
  z-index: 6;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  filter: drop-shadow(0 1px 2px #000);
}

.minigame-milk-demo.direction-down .minigame-guide-direction-arrow {
  bottom: -2px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 15px solid #f4edd8;
}

.minigame-milk-demo.direction-up .minigame-guide-direction-arrow {
  top: -2px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 15px solid #f4edd8;
}

.minigame-milk-demo.feedback-gold .minigame-guide-mouse-wrap {
  filter:
    drop-shadow(0 0 10px rgba(236,190,56,1))
    drop-shadow(0 0 3px #000);
}

.minigame-milk-demo.feedback-gold .minigame-guide-direction-arrow {
  border-top-color: #edbd38;
  border-bottom-color: #edbd38;
}

.minigame-milk-demo.feedback-red .minigame-guide-mouse-wrap {
  filter:
    drop-shadow(0 0 9px rgba(116,35,29,.95))
    drop-shadow(0 0 3px #000);
}

.minigame-milk-demo.feedback-red .minigame-guide-direction-arrow {
  border-top-color: #74231d;
  border-bottom-color: #74231d;
}

.minigame-guide-status {
  margin-top: 3px;
  font-family: 'RDRChalk', 'RDRLedger', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-align: center;
  text-transform: uppercase;
}

.minigame-guide-counters {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 7px;
  font-family: 'RDRChalk', 'RDRLedger', Georgia, serif;
  font-size: 11px;
  letter-spacing: .8px;
}

.minigame-milk-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 0;
  color: rgba(210,210,210,.84);
  font-family: 'RDRLino', Georgia, serif;
  font-size: 10px;
  letter-spacing: .45px;
  text-shadow: 0 1px 2px rgba(0,0,0,.92);
}

.minigame-milk-cancel-key {
  min-width: 18px;
  width: 18px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 1px;
  color: rgba(35,35,35,.96);
  background: rgba(255,255,255,.88);
  font-family: Georgia, serif;
  font-size: 8px;
  line-height: 1;
}

.minigame-demo-result {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px;
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(2px);
  text-align: center;
}

.minigame-demo-result strong {
  font-family: 'Redemption', Georgia, serif;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 1px;
  color: rgba(244,235,216,.96);
  text-transform: uppercase;
  text-shadow: 0 3px 3px rgba(0,0,0,.95);
}

.minigame-demo-result > span {
  font-family: 'RDRChalk', 'RDRLedger', Georgia, serif;
  font-size: 14px;
  color: rgba(220,210,191,.76);
}

.minigame-restart-button {
  width: 220px;
  margin-top: 8px;
}

.minigame-preview-hint {
  margin-top: 10px;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: .35px;
  color: rgba(194,184,167,.58);
  text-align: center;
}

.minigames-showcase-shot {
  width: 100%;
}

.minigames-showcase-shot img {
  max-height: none;
}

@media (max-width: 900px) {
  .minigame-milk-stage {
    min-height: 620px;
  }

  .minigame-milk-prompt {
    transform: translate(-50%, -50%) scale(.88);
  }
}

@media (max-width: 620px) {
  .minigame-milk-stage {
    min-height: 540px;
  }

  .minigame-milk-prompt {
    transform: translate(-50%, -50%) scale(.72);
  }

  .minigame-preview-hint {
    padding: 0 12px;
  }
}


/* ==========================================================================
   BRK Minigames preview — browser interaction stabilization
   ========================================================================== */

.minigame-milk-stage {
  min-height: 620px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: contain;
}

.minigame-milk-stage img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* Use the supplied in-game screenshot as a normal stage backdrop rather than
   magnifying it to 220%, which made the preview feel broken/cropped. */
.minigame-milk-backdrop {
  inset: 0;
  background:
    linear-gradient(rgba(0,0,0,.14), rgba(0,0,0,.24)),
    url('assets/resources/minigames/showcase/milk-wip.png')
      center center / cover no-repeat;
  filter: brightness(.70) saturate(.78);
  transform: none;
}

/* Match the actual BRK Minigames NUI geometry more closely. */
.minigame-milk-prompt {
  width: 330px;
  min-height: 610px;
}

.minigame-milk-guide {
  height: 510px;
}

.minigame-guide-lane {
  width: 150px;
  height: 250px;
  flex-basis: 250px;
}

.minigame-guide-mouse-wrap {
  /* The real NUI does not animate lane coordinates. Instant response feels
     substantially better while physically dragging. */
  transition: filter 90ms ease;
  will-change: left, top, filter;
}

.minigame-milk-demo.is-active .minigame-milk-stage,
.minigame-milk-demo.is-active .minigame-milk-stage * {
  cursor: none !important;
}

.minigame-demo-ready {
  background:
    radial-gradient(circle at 50% 50%, rgba(0,0,0,.34), rgba(0,0,0,.68)),
    rgba(0,0,0,.30);
}

.minigame-demo-ready strong {
  font-size: 31px;
}

.minigame-demo-ready > span {
  max-width: 430px;
  line-height: 1.45;
}

/* Keep result/start buttons clickable even though the game artwork itself is
   pointer-transparent. */
.minigame-demo-result,
.minigame-demo-result button {
  pointer-events: auto;
}

.minigame-preview-hint {
  margin-top: 12px;
  color: rgba(205,195,177,.68);
}

/* The actual NUI uses a transparent full-screen surface. On the website we
   keep a subtle BRK frame so users understand where the drag surface ends. */
.minigame-milk-stage {
  border: 1px solid rgba(226,216,195,.18);
  box-shadow:
    inset 0 0 100px rgba(0,0,0,.34),
    0 14px 28px rgba(0,0,0,.34);
}

@media (max-width: 900px) {
  .minigame-milk-stage {
    min-height: 580px;
  }

  .minigame-milk-prompt {
    transform: translate(-50%, -50%) scale(.84);
  }
}

@media (max-width: 620px) {
  .minigame-milk-stage {
    min-height: 510px;
  }

  .minigame-milk-prompt {
    transform: translate(-50%, -50%) scale(.68);
  }
}


/* ==========================================================================
   BRK Minigames — isolated actual-NUI browser preview
   ========================================================================== */

.minigame-isolated-demo {
  width: 100%;
}

.minigame-isolated-stage {
  position: relative;
  width: 100%;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(226,216,195,.18);
  background: #080706;
  box-shadow:
    inset 0 0 105px rgba(0,0,0,.36),
    0 14px 28px rgba(0,0,0,.34);
  isolation: isolate;
}

.minigame-isolated-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(0,0,0,.13), rgba(0,0,0,.24)),
    url('assets/resources/minigames/showcase/milk-wip.png')
      center center / cover no-repeat;
  filter: brightness(.76) saturate(.82);
}

.minigame-isolated-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow:
    inset 0 0 115px 28px rgba(0,0,0,.45),
    inset 0 -80px 110px rgba(0,0,0,.22);
}

.minigame-isolated-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  min-height: 650px;
  border: 0;
  background: transparent;
  color-scheme: dark;
}

.minigame-isolated-frame:focus {
  outline: none;
}

.minigame-site-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 34px;
  background:
    radial-gradient(circle at 50% 50%, rgba(0,0,0,.35), rgba(0,0,0,.70)),
    rgba(0,0,0,.18);
  backdrop-filter: blur(2px);
  text-align: center;
}

.minigame-site-overlay.hidden {
  display: none;
}

.minigame-site-overlay > strong {
  font-family: 'Redemption', Georgia, serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .7px;
  color: rgba(244,235,216,.97);
  text-transform: uppercase;
  text-shadow: 0 3px 3px rgba(0,0,0,.95);
}

.minigame-site-overlay > span {
  width: min(500px, 88%);
  font-family: 'RDRLino', Georgia, serif;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .25px;
  color: rgba(209,199,181,.72);
  text-shadow: 0 2px 3px rgba(0,0,0,.92);
}

.minigame-site-start {
  width: min(260px, 82%);
  margin-top: 7px;
}

.minigame-site-start.is-disabled {
  opacity: .42;
  pointer-events: none;
}

.minigame-isolated-demo .minigame-preview-hint {
  margin-top: 11px;
  padding: 0 20px;
  font-size: 10px;
  line-height: 1.5;
  color: rgba(201,191,173,.58);
}

@media (max-width: 900px) {
  .minigame-isolated-stage,
  .minigame-isolated-frame {
    min-height: 590px;
  }
}

@media (max-width: 620px) {
  .minigame-isolated-stage,
  .minigame-isolated-frame {
    min-height: 520px;
  }

  .minigame-site-overlay > strong {
    font-size: 29px;
  }
}


/* ==========================================================================
   BRK Minigames — established interaction-frame treatment
   ========================================================================== */

/* Large preview mode scales the actual NUI to about 763px tall. Give it
   enough vertical room so the udder/top of the prompt stays inside the box. */
.minigame-isolated-stage,
.minigame-isolated-frame {
  min-height: 800px;
}

/* Reuse the exact animated BRK red/gold frame language already established
   for interactive stages instead of introducing a Minigames-only border. */
.minigame-isolated-stage::before {
  content: '';
  position: absolute;
  z-index: 12;
  inset: -2px;
  pointer-events: none;
  padding: 2px;
  opacity: var(--browse-opacity);
  filter: drop-shadow(0 0 4px var(--browse-highlight));
  background:
    conic-gradient(
      from var(--browse-angle),
      var(--browse-primary) 0deg,
      var(--browse-primary) 82deg,
      var(--browse-deep) 128deg,
      var(--browse-highlight) 158deg,
      var(--browse-primary) 198deg,
      var(--browse-accent) 250deg,
      var(--browse-primary) 306deg,
      var(--browse-primary) 360deg
    );
  animation: menu-border-flow var(--browse-duration) linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@supports not ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .minigame-isolated-stage::before {
    inset: 0;
    padding: 0;
    background: transparent;
    border: 2px solid var(--browse-primary);
  }
}

@media (max-width: 900px) {
  .minigame-isolated-stage,
  .minigame-isolated-frame {
    min-height: 760px;
  }
}

@media (max-width: 620px) {
  .minigame-isolated-stage,
  .minigame-isolated-frame {
    min-height: 700px;
  }
}


/* ==========================================================================
   Shared BRK interaction frame
   User-supplied red/black distressed frame beneath the animated BRK glow.
   ========================================================================== */

.minigame-isolated-stage {
  aspect-ratio: 1915 / 821;
  min-height: 0 !important;
  height: auto;
  overflow: hidden;
}

.minigame-isolated-frame {
  min-height: 0 !important;
  height: 100%;
}

/* Use the supplied edited Milking screenshot as the actual interaction
   backdrop with only a restrained readability layer. */
.minigame-isolated-backdrop {
  background:
    linear-gradient(
      rgba(0, 0, 0, .06),
      rgba(0, 0, 0, .16)
    ),
    url('assets/resources/minigames/showcase/edited_milking.png')
      center center / cover no-repeat;
  filter: none;
}

/* Decorative frame:
   NUI = z3
   start/result overlay = z8
   supplied frame = z10
   animated BRK glow = z12
   so the glow visibly runs over the frame rather than replacing it. */
.minigame-interaction-frame {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background:
    url('assets/ui/interaction_frame.png')
      center center / 100% 100% no-repeat;
}

/* The supplied frame already provides the dark distressed edge treatment. */
.minigame-isolated-stage::after {
  box-shadow:
    inset 0 0 70px 16px rgba(0,0,0,.20);
}

/* Keep the animated border just outside the artwork edge so both layers read. */
.minigame-isolated-stage::before {
  inset: 0;
  z-index: 12;
}

/* Shared full-image showcase treatment used when screenshots have different
   aspect ratios and should not be cropped. */
.showcase-feature-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.showcase-feature-stack .showcase-shot img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.showcase-feature-secondary {
  width: min(72%, 720px);
  align-self: center;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 760px) {
  .showcase-feature-secondary {
    width: 100%;
  }
}


/* ==========================================================================
   Shared BRK interactive-space frame rule
   Every playable / interactive preview uses the supplied distressed frame
   with the animated BRK red/gold glow above it.
   ========================================================================== */

:root {
  --brk-interaction-safe-x: 34px;
  --brk-interaction-safe-y: 30px;
}

/* Future interactive spaces can opt into the same safe-area convention. */
.brk-interaction-space {
  --interaction-safe-x: var(--brk-interaction-safe-x);
  --interaction-safe-y: var(--brk-interaction-safe-y);
  position: relative;
  isolation: isolate;
}

/* --------------------------------------------------------------------------
   Notify
   Keep the cave/background full bleed, but reserve the clear center for
   toasts, loot, and announcements so the distressed frame never covers them.
   -------------------------------------------------------------------------- */

.notify-frame-stage-wrap {
  --interaction-safe-x: 38px;
  --interaction-safe-y: 32px;
  isolation: isolate;
}

/* Nine-slice the frame so it keeps its corner/edge proportions even though
   Notify's stage is a different shape from the original 1915x821 artwork. */
.notify-frame-stage-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  border: 32px solid transparent;
  border-image-source: url('assets/ui/interaction_frame.png');
  border-image-slice: 38;
  border-image-width: 32px;
  border-image-repeat: stretch;
}

/* Existing animated BRK glow remains above the physical frame. */
.notify-frame-stage-wrap > .notify-stage-flow-border {
  z-index: 12;
}

/* Notifications / loot live inside the clear center of the frame. */
.notify-frame-layout .notify-demo-area {
  top: calc(30px + var(--interaction-safe-y));
  left: calc(28px + var(--interaction-safe-x));
  width: min(
    430px,
    calc(
      100% -
      56px -
      (var(--interaction-safe-x) * 2)
    )
  );
}

.notify-frame-layout .notify-demo-announcement {
  top: calc(26px + var(--interaction-safe-y));
  max-width: calc(
    100% -
    (var(--interaction-safe-x) * 2) -
    24px
  );
}

/* Preserve the present's established floating treatment, but keep its actual
   clickable art clear of the distressed right/bottom edge. */
.notify-frame-layout .notify-inventory-gift-perch {
  right: calc(26px + var(--interaction-safe-x));
  bottom: 4px;
}

/* Bottom controls no longer need to compensate for a present hanging far
   outside the stage. */
.notify-frame-controls-bottom {
  margin-top: 30px;
}

/* --------------------------------------------------------------------------
   RP Dice
   Turn the dice preview itself into a framed interactive game surface.
   -------------------------------------------------------------------------- */

.rp-dice-preview {
  --interaction-safe-x: 54px;
  --interaction-safe-y: 42px;
  position: relative;
  isolation: isolate;
  width: min(860px, 100%);
  min-height: 430px;
  margin: 0 auto;
  padding:
    var(--interaction-safe-y)
    var(--interaction-safe-x);
  background: rgba(0, 0, 0, .12);
  box-shadow:
    inset 0 0 70px rgba(0,0,0,.24),
    0 14px 28px rgba(0,0,0,.24);
}

/* Same frame, nine-sliced to protect its distressed edge proportions. */
.rp-dice-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  border: 34px solid transparent;
  border-image-source: url('assets/ui/interaction_frame.png');
  border-image-slice: 38;
  border-image-width: 34px;
  border-image-repeat: stretch;
}

/* Same animated BRK glow used by Notify and Minigames. */
.rp-dice-preview::after {
  content: '';
  position: absolute;
  z-index: 12;
  inset: 0;
  pointer-events: none;
  padding: 2px;
  opacity: var(--browse-opacity);
  filter: drop-shadow(0 0 4px var(--browse-highlight));
  background:
    conic-gradient(
      from var(--browse-angle),
      var(--browse-primary) 0deg,
      var(--browse-primary) 82deg,
      var(--browse-deep) 128deg,
      var(--browse-highlight) 158deg,
      var(--browse-primary) 198deg,
      var(--browse-accent) 250deg,
      var(--browse-primary) 306deg,
      var(--browse-primary) 360deg
    );
  animation: menu-border-flow var(--browse-duration) linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@supports not ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .rp-dice-preview::after {
    padding: 0;
    background: transparent;
    border: 2px solid var(--browse-primary);
  }
}

.rp-dice-preview .rp-dice-roll {
  position: relative;
  z-index: 2;
  width: min(460px, 100%);
  min-height: 340px;
  padding: 14px 20px;
}

/* --------------------------------------------------------------------------
   Minigames
   Its supplied frame is already a dedicated overlay; keep the same safe-zone
   contract for current/future prompt layouts inside the game surface.
   -------------------------------------------------------------------------- */

.minigame-isolated-stage {
  --interaction-safe-x: 36px;
  --interaction-safe-y: 30px;
}

/* --------------------------------------------------------------------------
   Responsive safe areas
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  :root {
    --brk-interaction-safe-x: 24px;
    --brk-interaction-safe-y: 22px;
  }

  .notify-frame-stage-wrap {
    --interaction-safe-x: 26px;
    --interaction-safe-y: 24px;
  }

  .notify-frame-layout .notify-inventory-gift-perch {
    right: calc(14px + var(--interaction-safe-x));
  }

  .rp-dice-preview {
    --interaction-safe-x: 34px;
    --interaction-safe-y: 30px;
    min-height: 390px;
  }
}

@media (max-width: 520px) {
  .notify-frame-stage-wrap {
    --interaction-safe-x: 20px;
    --interaction-safe-y: 20px;
  }

  .notify-frame-layout .notify-demo-area {
    left: var(--interaction-safe-x);
    width: calc(100% - (var(--interaction-safe-x) * 2));
  }

  .notify-frame-layout .notify-inventory-gift-perch {
    right: 50%;
    bottom: -138px;
    transform: translateX(50%);
  }

  .notify-frame-controls-bottom {
    margin-top: 154px;
  }

  .rp-dice-preview {
    --interaction-safe-x: 28px;
    --interaction-safe-y: 26px;
    min-height: 360px;
  }
}


/* ==========================================================================
   Unreleased resource Tebex rows
   Same purchase-row placement as released resources, but visibly Coming Soon.
   Remains keyboard/mouse selectable so it can open the internal Tebex page.
   ========================================================================== */

#resource-section-nav .resource-purchase-unavailable {
  color: rgba(156, 151, 141, .48);
  filter: grayscale(1) brightness(.72);
}

#resource-section-nav .resource-purchase-unavailable > span:nth-child(2) {
  color: rgba(175, 168, 153, .48);
}

#resource-section-nav .resource-purchase-unavailable:hover,
#resource-section-nav .resource-purchase-unavailable.is-focused {
  color: rgba(211, 204, 190, .72) !important;
  filter: grayscale(.86) brightness(.88);
}

/* Keep the familiar selection treatment, but mute the artwork so the row
   still reads as unavailable rather than looking like a normal live store link. */
#resource-section-nav .resource-purchase-unavailable.is-focused::before {
  filter: grayscale(1) brightness(.58);
  opacity: .72;
}

#resource-section-nav .resource-purchase-unavailable.is-focused > .row-border-flow {
  opacity: .48;
  filter: grayscale(1) drop-shadow(0 0 2px rgba(170, 164, 151, .38));
}

.resource-purchase-coming-soon strong {
  color: rgba(224, 184, 104, .94);
  font-weight: 400;
}


/* ==========================================================================
   BRK RP Dice interactive background
   Shared HUD artwork fills the complete framed interaction surface.
   ========================================================================== */

.rp-dice-preview {
  background:
    url('assets/ui/hud_location_bg2.png')
      center center / 100% 100% no-repeat;
}


/* ==========================================================================
   Resource catalogue category browser
   ========================================================================== */

.catalogue-category-card {
  min-height: 112px;
}

.catalogue-category-card .card-name {
  font-size: clamp(27px, 2.7vw, 40px);
  letter-spacing: .7px;
}

.resource-catalogue-empty {
  grid-column: 1 / -1;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 36px;
  text-align: center;
  background:
    linear-gradient(rgba(0,0,0,.13), rgba(0,0,0,.13)),
    url('assets/ui/selection_box_bg_1d.png') center / 100% 100% no-repeat;
  opacity: .72;
}

.resource-catalogue-empty-title {
  font-family: 'Redemption', Georgia, serif;
  font-size: clamp(28px, 3vw, 42px);
  line-height: .95;
  text-transform: uppercase;
  color: rgba(226,218,201,.78);
}

.resource-catalogue-empty-copy {
  max-width: 520px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 16px;
  line-height: 1.35;
  color: rgba(203,193,176,.58);
}

@media (max-width: 760px) {
  .catalogue-category-card {
    min-height: 94px;
  }
}


/* ==========================================================================
   BRK Documentation hub
   Documentation is a reference/help destination, not a duplicate resource
   catalogue.
   ========================================================================== */

#docs-grid {
  display: block;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.docs-hub-overview,
.docs-guide-intro {
  width: 100%;
}

.docs-overview-lead,
.docs-guide-intro {
  max-width: 900px;
  margin: 0 auto 28px;
  text-align: center;
}

.docs-overview-label {
  display: block;
  margin-bottom: 8px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 12px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: rgba(181, 47, 36, .88);
}

.docs-overview-lead h2,
.docs-guide-intro h2 {
  margin: 0 auto 14px;
  font-family: 'Redemption', Georgia, serif;
  font-size: clamp(35px, 4.6vw, 64px);
  font-weight: 400;
  line-height: .93;
  text-transform: uppercase;
  color: rgba(236, 230, 215, .96);
  text-shadow: 0 2px 14px rgba(0,0,0,.56);
}

.docs-overview-lead p,
.docs-guide-intro > p {
  margin: 0 auto;
  max-width: 830px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.48;
  color: rgba(215, 207, 190, .84);
}

.docs-overview-lead em {
  color: rgba(234, 226, 207, .96);
  font-style: normal;
}

.docs-principle-grid,
.docs-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.docs-principle,
.docs-guidance-card,
.docs-what-lives-here {
  position: relative;
  padding: 24px 26px 25px;
  background:
    linear-gradient(
      110deg,
      rgba(13, 10, 9, .91),
      rgba(22, 16, 13, .76)
    );
  border-left: 2px solid rgba(128, 31, 25, .48);
  box-shadow:
    inset 0 0 34px rgba(0,0,0,.18),
    0 10px 24px rgba(0,0,0,.12);
}

.docs-principle::after,
.docs-guidance-card::after,
.docs-what-lives-here::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(164, 43, 32, .40),
    transparent
  );
}

.docs-principle h3,
.docs-guidance-card h3,
.docs-what-lives-here h3 {
  margin: 0 0 8px;
  font-family: 'RDRLino', Georgia, serif;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 400;
  color: rgba(233, 226, 209, .94);
}

.docs-principle p,
.docs-guidance-card p,
.docs-what-lives-here p {
  margin: 0;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 16px;
  line-height: 1.48;
  color: rgba(203, 195, 178, .76);
}

.docs-what-lives-here {
  margin: 0 0 26px;
  padding-left: 30px;
  padding-right: 30px;
}

.docs-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.docs-category-card {
  min-height: 128px;
  text-align: left;
}

.docs-category-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.docs-category-card .card-name {
  font-size: clamp(26px, 2.7vw, 39px);
  line-height: .92;
}

.docs-category-summary {
  max-width: 500px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 14px;
  line-height: 1.25;
  color: rgba(197, 188, 170, .60);
  text-transform: none;
  letter-spacing: 0;
}

.docs-category-card.is-focused .docs-category-summary,
.docs-category-card:hover .docs-category-summary {
  color: rgba(228, 219, 201, .82);
}

.docs-guide-intro {
  margin-bottom: 22px;
}

.docs-guidance-grid {
  margin-bottom: 30px;
}

.docs-resource-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 4px 0 10px;
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(126, 35, 27, .38);
}

.docs-resource-heading > span {
  font-family: 'RDRLino', Georgia, serif;
  font-size: 22px;
  color: rgba(231, 222, 204, .92);
}

.docs-resource-heading p {
  margin: 0;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 13px;
  color: rgba(188, 179, 161, .56);
}

.docs-resource-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 24px;
}

.docs-resource-link {
  position: relative;
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 18px;
  padding: 10px 17px 10px 20px;
  overflow: hidden;
  border: 0;
  background: rgba(8, 7, 6, .50);
  color: rgba(223, 215, 198, .84);
  text-align: left;
  cursor: pointer;
}

.docs-resource-link::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: .30;
  background:
    url('assets/ui/selection_box_bg_1d.png')
      center center / 100% 100% no-repeat;
}

.docs-resource-link:hover::before,
.docs-resource-link.is-focused::before {
  opacity: .90;
}

.docs-resource-link-copy,
.docs-resource-target,
.docs-resource-link .card-arrow {
  position: relative;
  z-index: 2;
}

.docs-resource-link-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.docs-resource-wordmark {
  flex: 0 0 195px;
  height: 48px;
  display: flex;
  align-items: center;
}

.docs-resource-wordmark img {
  width: 100%;
  max-width: 188px;
  max-height: 48px;
  object-fit: contain;
  object-position: left center;
}

.docs-resource-name {
  flex: 0 0 195px;
  font-family: 'Redemption', Georgia, serif;
  font-size: 25px;
  color: rgba(235, 227, 209, .92);
}

.docs-resource-note {
  min-width: 0;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 14px;
  line-height: 1.3;
  color: rgba(195, 186, 168, .62);
}

.docs-resource-target {
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 13px;
  white-space: nowrap;
  color: rgba(164, 154, 137, .52);
}

.docs-resource-link:hover .docs-resource-note,
.docs-resource-link.is-focused .docs-resource-note {
  color: rgba(223, 213, 194, .82);
}

.docs-resource-link:hover .docs-resource-target,
.docs-resource-link.is-focused .docs-resource-target {
  color: rgba(213, 202, 182, .72);
}

@media (max-width: 900px) {
  .docs-principle-grid,
  .docs-guidance-grid,
  .docs-category-grid {
    grid-template-columns: 1fr;
  }

  .docs-resource-link {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  .docs-resource-target {
    display: none;
  }
}

@media (max-width: 620px) {
  .docs-overview-lead h2,
  .docs-guide-intro h2 {
    font-size: 36px;
  }

  .docs-principle,
  .docs-guidance-card,
  .docs-what-lives-here {
    padding: 20px;
  }

  .docs-resource-link-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .docs-resource-wordmark,
  .docs-resource-name {
    flex-basis: auto;
  }

  .docs-resource-wordmark {
    width: 160px;
    height: 40px;
  }

  .docs-resource-wordmark img {
    max-width: 160px;
    max-height: 40px;
  }

  .docs-resource-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}


/* ==========================================================================
   Documentation category card cleanup
   The Documentation overview makes the container much taller than a normal
   catalogue. Do not calculate category selections as slices of that whole
   page; use a stable BRK selected crop per card.
   ========================================================================== */

.docs-category-card {
  min-height: 104px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.docs-category-card.is-focused::before {
  background:
    linear-gradient(rgba(0,0,0,.10), rgba(0,0,0,.10)),
    url('assets/ui/brk_selected_bg.jpg')
      center 38% / 100% auto no-repeat !important;
}

.docs-category-card .card-name {
  font-size: clamp(25px, 2.45vw, 36px);
}

.docs-category-summary {
  max-width: 470px;
  font-size: 13px;
  line-height: 1.18;
}

/* Tighter, reference-style overview. */
.docs-overview-lead {
  margin-bottom: 20px;
}

.docs-overview-lead h2 {
  font-size: clamp(34px, 4vw, 54px);
  margin-bottom: 10px;
}

.docs-overview-lead p {
  max-width: 780px;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.38;
}

.docs-principle-grid {
  gap: 10px;
  margin-bottom: 14px;
}

.docs-principle {
  padding: 18px 21px 19px;
}

.docs-principle h3 {
  margin-bottom: 5px;
  font-size: clamp(19px, 1.8vw, 25px);
}

.docs-principle p {
  font-size: 15px;
  line-height: 1.36;
}

.docs-what-lives-here {
  margin-bottom: 20px;
  padding: 18px 22px;
}

.docs-what-lives-here h3 {
  margin-bottom: 5px;
  font-size: 22px;
}

.docs-what-lives-here p {
  font-size: 15px;
  line-height: 1.36;
}

/* Category help pages should read as reference cards, not essays. */
.docs-guidance-card {
  padding: 18px 21px 19px;
}

.docs-guidance-card h3 {
  margin-bottom: 5px;
  font-size: clamp(19px, 1.8vw, 25px);
}

.docs-guidance-card p {
  font-size: 15px;
  line-height: 1.36;
}

@media (max-width: 760px) {
  .docs-category-card {
    min-height: 92px;
  }
}


/* ==========================================================================
   BRK Chat interactive preview
   Actual BRK Chat v1.0.5 NUI running inside a website-controlled iframe.
   ========================================================================== */

.chat-preview-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-preview-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 255px;
  gap: 12px;
}

.chat-preview-toolbar-block {
  padding: 15px 17px;
  background:
    linear-gradient(
      110deg,
      rgba(10, 8, 7, .91),
      rgba(22, 15, 12, .78)
    );
  border-left: 2px solid rgba(130, 31, 24, .50);
}

.chat-preview-control-title {
  display: block;
  margin-bottom: 9px;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 18px;
  color: rgba(232, 224, 207, .92);
}

.chat-theme-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chat-theme-button,
.chat-preview-activate {
  border: 1px solid rgba(126, 36, 28, .44);
  background: rgba(0, 0, 0, .42);
  color: rgba(204, 197, 181, .72);
  font-family: 'RDRLedger', Georgia, serif;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-theme-button {
  min-width: 66px;
  padding: 7px 9px 6px;
  font-size: 13px;
}

.chat-theme-button:hover,
.chat-theme-button.is-active {
  border-color: rgba(197, 49, 34, .82);
  color: rgba(239, 231, 211, .96);
  box-shadow:
    inset 0 0 16px rgba(126, 22, 16, .28),
    0 0 8px rgba(126, 22, 16, .18);
}

.chat-theme-command {
  display: inline-block;
  margin-top: 10px;
  color: rgba(204, 194, 174, .62);
  font-family: monospace;
  font-size: 12px;
}

.chat-custom-colors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 8px 10px;
}

.chat-custom-colors .chat-preview-control-title,
.chat-custom-colors small {
  grid-column: 1 / -1;
}

.chat-custom-colors label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 13px;
  color: rgba(204, 195, 178, .72);
}

.chat-custom-colors input[type='color'] {
  width: 36px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(126, 36, 28, .46);
  background: transparent;
  cursor: pointer;
}

.chat-custom-colors small {
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(175, 166, 150, .48);
}

.chat-preview-stage {
  --interaction-safe-x: 32px;
  --interaction-safe-y: 28px;
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 470px;
  overflow: hidden;
  background:
    linear-gradient(
      rgba(0, 0, 0, .02),
      rgba(0, 0, 0, .10)
    ),
    url('assets/resources/chat/preview/background.jpg')
      center center / cover no-repeat;
  box-shadow:
    inset 0 0 80px rgba(0,0,0,.24),
    0 12px 28px rgba(0,0,0,.22);
}

/* Shared distressed frame. */
.chat-preview-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background:
    url('assets/ui/interaction_frame.png')
      center center / 100% 100% no-repeat;
}

/* Established animated BRK glow over the frame. */
.chat-preview-stage::after {
  content: '';
  position: absolute;
  z-index: 12;
  inset: 0;
  pointer-events: none;
  padding: 2px;
  opacity: var(--browse-opacity);
  filter: drop-shadow(0 0 4px var(--browse-highlight));
  background:
    conic-gradient(
      from var(--browse-angle),
      var(--browse-primary) 0deg,
      var(--browse-primary) 82deg,
      var(--browse-deep) 128deg,
      var(--browse-highlight) 158deg,
      var(--browse-primary) 198deg,
      var(--browse-accent) 250deg,
      var(--browse-primary) 306deg,
      var(--browse-primary) 360deg
    );
  animation: menu-border-flow var(--browse-duration) linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.chat-preview-frame {
  position: absolute;
  z-index: 3;
  inset: var(--interaction-safe-y) var(--interaction-safe-x);
  width: calc(100% - (var(--interaction-safe-x) * 2));
  height: calc(100% - (var(--interaction-safe-y) * 2));
  border: 0;
  background: transparent;
}

.chat-preview-hints {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 14px;
  padding: 0 4px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 12px;
  color: rgba(185, 176, 158, .58);
}

.chat-preview-hints kbd {
  margin: 0 1px;
}

.chat-preview-activate {
  margin-left: auto;
  padding: 7px 11px 6px;
}

.chat-preview-activate.needs-focus {
  border-color: rgba(203, 49, 32, .94);
  color: rgba(239, 229, 207, .96);
  animation: chat-preview-focus-pulse 1.15s ease-in-out infinite;
}

@keyframes chat-preview-focus-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(177, 8, 8, 0); }
  50% { box-shadow: 0 0 10px rgba(177, 8, 8, .42); }
}

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

.chat-command-reference-preview {
  margin-top: 2px;
}

.chat-command-group {
  padding: 16px 17px 14px;
  background:
    linear-gradient(
      108deg,
      rgba(8, 7, 6, .88),
      rgba(21, 15, 12, .74)
    );
  border-left: 2px solid rgba(128, 31, 25, .46);
}

.chat-command-group h3 {
  margin: 0 0 8px;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: rgba(231, 223, 207, .92);
}

.chat-command-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.chat-command-row {
  display: grid;
  grid-template-columns: minmax(195px, .8fr) minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid rgba(119, 42, 32, .18);
}

.chat-command-row:last-child {
  border-bottom: 0;
}

.chat-command-row code {
  color: rgba(226, 207, 161, .88);
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.chat-command-row span {
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 13px;
  line-height: 1.24;
  color: rgba(193, 184, 166, .64);
}

.dependency-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dependency-list > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  padding: 8px 10px;
  background: rgba(0,0,0,.20);
}

.dependency-list strong {
  font-family: 'RDRLino', Georgia, serif;
  font-weight: 400;
  color: rgba(232, 224, 207, .92);
}

.dependency-list span {
  font-family: 'RDRLedger', Georgia, serif;
  color: rgba(197, 188, 170, .66);
}

@supports not ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .chat-preview-stage::after {
    padding: 0;
    background: transparent;
    border: 2px solid var(--browse-primary);
  }
}

@media (max-width: 900px) {
  .chat-preview-toolbar {
    grid-template-columns: 1fr;
  }

  .chat-command-reference {
    grid-template-columns: 1fr;
  }

  .chat-preview-stage {
    min-height: 420px;
  }
}

@media (max-width: 620px) {
  .chat-preview-stage {
    min-height: 360px;
  }

  .chat-command-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .chat-preview-frame {
    inset: 22px;
    width: calc(100% - 44px);
    height: calc(100% - 44px);
  }

  .chat-preview-activate {
    margin-left: 0;
  }
}


/* ==========================================================================
   BRK Chat Showcase
   Videos: one at a time, no lightbox.
   Screenshots: established carousel + image lightbox.
   ========================================================================== */

.chat-video-carousel {
  width: 100%;
}

.chat-video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0, 0, 0, .68);
  border: 1px solid rgba(224, 214, 193, .14);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, .34),
    inset 0 0 0 1px rgba(95, 0, 0, .20);
}

.chat-showcase-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.chat-video-navigation {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 42px;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.chat-video-nav-button {
  width: 42px;
  height: 38px;
  border: 0;
  background: transparent;
  color: rgba(219, 208, 188, .62);
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 31px;
  line-height: 1;
  cursor: pointer;
}

.chat-video-nav-button:hover,
.chat-video-nav-button.is-focused {
  color: rgba(250, 239, 217, .96);
  text-shadow: 0 0 7px rgba(197, 32, 7, .58);
}

.chat-video-nav-button:disabled {
  opacity: .20;
  cursor: default;
}

.chat-video-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.chat-video-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(206, 193, 171, .44);
  border-radius: 50%;
  background: rgba(0, 0, 0, .38);
  cursor: pointer;
}

.chat-video-dot.is-current {
  border-color: rgba(222, 178, 84, .88);
  background: rgba(177, 8, 8, .86);
  box-shadow: 0 0 6px rgba(197, 32, 7, .52);
}

.chat-video-position {
  min-width: 42px;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 11px;
  text-align: center;
  color: rgba(194, 184, 166, .54);
}

.chat-video-caption {
  margin-top: 2px;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 11px;
  letter-spacing: .65px;
  text-transform: uppercase;
  text-align: center;
  color: rgba(217, 207, 188, .68);
}

@media (max-width: 620px) {
  .chat-video-navigation {
    grid-template-columns: 34px minmax(0, 1fr) auto 34px;
    gap: 5px;
  }

  .chat-video-nav-button {
    width: 34px;
  }

}


/* BRK Chat showcase video frame ------------------------------------------- */

.chat-video-stage {
  isolation: isolate;
  border: 0;
}

.chat-showcase-video {
  position: relative;
  z-index: 1;
}

/* Same animated BRK red/gold border used on selected screenshots and
   interactive preview frames. */
.chat-video-stage::after {
  content: '';
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
  padding: 2px;
  opacity: var(--browse-opacity);
  filter: drop-shadow(0 0 4px var(--browse-highlight));
  background:
    conic-gradient(
      from var(--browse-angle),
      var(--browse-primary) 0deg,
      var(--browse-primary) 82deg,
      var(--browse-deep) 128deg,
      var(--browse-highlight) 158deg,
      var(--browse-primary) 198deg,
      var(--browse-accent) 250deg,
      var(--browse-primary) 306deg,
      var(--browse-primary) 360deg
    );
  animation: menu-border-flow var(--browse-duration) linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@supports not ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .chat-video-stage::after {
    padding: 0;
    background: transparent;
    border: 2px solid var(--browse-primary);
  }
}


/* ==========================================================================
   Shared local resource showcase video
   Used by resource showcases that have one local MP4.
   ========================================================================== */

.showcase-local-video-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0, 0, 0, .76);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, .34),
    inset 0 0 0 1px rgba(95, 0, 0, .20);
}

.showcase-local-video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.showcase-local-video-stage::after {
  content: '';
  position: absolute;
  z-index: 6;
  inset: 0;
  pointer-events: none;
  padding: 2px;
  opacity: var(--browse-opacity);
  filter: drop-shadow(0 0 4px var(--browse-highlight));
  background:
    conic-gradient(
      from var(--browse-angle),
      var(--browse-primary) 0deg,
      var(--browse-primary) 82deg,
      var(--browse-deep) 128deg,
      var(--browse-highlight) 158deg,
      var(--browse-primary) 198deg,
      var(--browse-accent) 250deg,
      var(--browse-primary) 306deg,
      var(--browse-primary) 360deg
    );
  animation: menu-border-flow var(--browse-duration) linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@supports not ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
  .showcase-local-video-stage::after {
    padding: 0;
    background: transparent;
    border: 2px solid var(--browse-primary);
  }
}


/* ==========================================================================
   BRK Chat preview controls
   Row 1: animated border presets
   Row 2: message + channel/tab colors
   Row 3: character name
   ========================================================================== */

.chat-preview-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-border-presets,
.chat-color-editor,
.chat-character-row {
  width: 100%;
}

.chat-color-editor {
  display: block;
}

.chat-color-editor-section + .chat-color-editor-section {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(126, 36, 28, .24);
}

.chat-color-editor-label {
  display: block;
  margin-bottom: 7px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(190, 180, 162, .52);
}

.chat-color-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 6px 10px;
}

.chat-channel-color-grid {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
}

.chat-color-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 3px 5px 3px 8px;
  background: rgba(0, 0, 0, .24);
  border: 1px solid rgba(126, 36, 28, .20);
}

.chat-color-control span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 12px;
  color: rgba(210, 201, 183, .72);
}

.chat-color-control input[type='color'] {
  width: 32px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(142, 51, 39, .42);
  background: transparent;
  cursor: pointer;
}

.chat-character-row label {
  display: grid;
  grid-template-columns: 180px minmax(0, 420px);
  align-items: center;
  gap: 14px;
}

.chat-character-row .chat-preview-control-title {
  margin: 0;
}

#chat-preview-character-name {
  width: 100%;
  min-width: 0;
  padding: 9px 11px 8px;
  border: 1px solid rgba(126, 36, 28, .42);
  outline: none;
  background: rgba(0, 0, 0, .42);
  color: rgba(235, 226, 207, .94);
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 15px;
}

#chat-preview-character-name::placeholder {
  color: rgba(183, 173, 156, .46);
}

#chat-preview-character-name:focus {
  border-color: rgba(189, 46, 33, .78);
  box-shadow:
    inset 0 0 12px rgba(118, 21, 15, .18),
    0 0 6px rgba(118, 21, 15, .18);
}

/* Old border-customization box is no longer used. */
.chat-custom-colors {
  display: none;
}

@media (max-width: 960px) {
  .chat-color-grid,
  .chat-channel-color-grid {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
  }
}

@media (max-width: 620px) {
  .chat-color-grid,
  .chat-channel-color-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-character-row label {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

/* ==========================================================================
   BRK / IRP Reviews
   Leave-review panel = BRK Menu.
   Public review feed = BRK Chat.
   ========================================================================== */

.review-view {
  width: 100%;
}

.review-app {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.review-layout {
  display: grid;
  grid-template-columns: 540px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.review-compose,
.review-public {
  min-width: 0;
}

/* BRK Menu review writer -------------------------------------------------- */

.review-menu-shell {
  position: relative;
  width: 540px;
  height: min(790px, 84vh);
  min-height: 680px;
  padding: 0 54px 20px;
  display: flex;
  flex-direction: column;
  overflow: visible;
  isolation: isolate;
  background:
    url('assets/ui/inkroller_1a.png')
    top left / 100% 864px repeat-y;
  filter: drop-shadow(0 16px 22px rgba(0,0,0,.58));
}

.review-menu-header {
  position: relative;
  flex: 0 0 176px;
  min-height: 176px;
  display: block;
  text-align: center;
}

.review-menu-title {
  position: absolute;
  left: 50%;
  top: 5px;
  width: 472px;
  height: 164px;
  padding: 10px 48px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%) translateY(6px);
  background:
    url('assets/ui/menu_border.png')
    center / 100% 100% no-repeat;
  font-family: 'Redemption', Georgia, serif;
  font-size: 40px;
  line-height: .94;
  letter-spacing: .9px;
  color: rgba(255,255,255,.96);
  text-transform: uppercase;
  text-shadow: 0 2px 2px rgba(0,0,0,.95);
}

.review-menu-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 auto;
}

.review-menu-row.menu-row {
  width: 432px;
  height: 46px;
  flex: 0 0 46px;
  margin: 0;
}

.review-menu-row.review-menu-static-row,
.review-rating-field.review-menu-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  padding: 0 14px 0 16px;
  border: 0;
  background:
    url('assets/ui/selection_box_bg_1d.png')
    center / 100% 100% no-repeat;
  color: var(--text-muted);
}

.review-menu-row.review-menu-static-row {
  cursor: default;
}

.review-menu-dropdown {
  position: relative;
  z-index: 30;
  width: 245px;
  max-width: 100%;
}

.review-menu-select-button {
  position: relative;
  width: 100%;
  height: 32px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 23px;
  align-items: center;
  gap: 5px;
  padding: 1px 4px 1px 10px;
  overflow: hidden;
  border: 0;
  outline: 0;
  background:
    url('assets/ui/selection_box_bg_1d.png')
    center / 100% 100% no-repeat;
  color: rgba(242,234,216,.91);
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 14px;
  text-align: right;
  cursor: pointer;
}

.review-menu-select-button > span:first-child {
  position: relative;
  z-index: 4;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-menu-select-arrow {
  position: relative;
  z-index: 4;
  width: 21px;
  height: 21px;
  justify-self: end;
  background:
    url('assets/ui/button_1_img.png')
    center / contain no-repeat;
  filter:
    drop-shadow(0 1px 1px rgba(0,0,0,.95))
    brightness(.88);
  opacity: .84;
}

.review-menu-dropdown.is-open .review-menu-select-arrow {
  background-image: url('assets/ui/button_0_img.png');
  opacity: 1;
}

.review-menu-dropdown-list {
  position: absolute;
  top: calc(100% + 3px);
  right: 0;
  z-index: 60;
  width: min(285px, 72vw);
  max-height: 285px;
  padding: 9px 8px;
  overflow-y: auto;
  background:
    linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,.42)),
    url('assets/ui/inkroller_1a.png')
    center / 100% 100% no-repeat;
  filter: drop-shadow(0 10px 13px rgba(0,0,0,.72));
  scrollbar-width: thin;
  scrollbar-color:
    rgba(124,24,17,.78)
    rgba(0,0,0,.24);
}

.review-menu-dropdown-list.hidden {
  display: none;
}

.review-menu-dropdown-option {
  position: relative;
  width: 100%;
  min-height: 40px;
  display: grid;
  align-items: center;
  padding: 4px 13px;
  overflow: hidden;
  border: 0;
  outline: 0;
  background:
    url('assets/ui/selection_box_bg_1d.png')
    center / 100% 100% no-repeat;
  color: rgba(221,212,195,.72);
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 15px;
  text-align: right;
  cursor: pointer;
}

.review-menu-dropdown-option + .review-menu-dropdown-option {
  margin-top: 3px;
}

.review-menu-dropdown-option > span:first-child {
  position: relative;
  z-index: 4;
}

.review-menu-dropdown-option.is-current {
  color: rgba(248,240,222,.96);
}

.review-menu-dropdown-option:hover,
.review-menu-dropdown-option:focus-visible,
.review-menu-dropdown-option.is-focused {
  color: rgba(255,249,235,.99);
}

.review-menu-dropdown-empty {
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 6px 10px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 12px;
  color: rgba(199,189,171,.52);
  text-align: center;
}

.review-rating-field {
  margin: 0;
  min-width: 0;
}

.review-rating-field:disabled {
  opacity: .44;
}

.review-rating {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 1px;
}

.review-star {
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(110, 98, 80, .66);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,.95);
}

.review-star:hover,
.review-star:focus-visible,
.review-star.is-selected {
  color: rgba(207,157,62,.96);
  text-shadow:
    0 1px 2px rgba(0,0,0,.95),
    0 0 7px rgba(137,72,16,.28);
}

.review-menu-writing-space {
  position: relative;
  flex: 1 1 auto;
  min-height: 188px;
  margin-top: 9px;
  overflow: hidden;
  background:
    linear-gradient(
      rgba(0,0,0,.58),
      rgba(0,0,0,.82)
    );
  border-top: 1px solid rgba(135,38,29,.22);
  border-bottom: 1px solid rgba(135,38,29,.18);
  box-shadow:
    inset 0 10px 30px rgba(0,0,0,.36),
    inset 0 -22px 36px rgba(0,0,0,.48);
}

.review-menu-textarea {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  width: calc(100% - 20px);
  min-height: 102px;
  max-height: calc(100% - 20px);
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid rgba(128,37,28,.34);
  outline: 0;
  background: rgba(0,0,0,.52);
  color: rgba(244,239,228,.94);
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 14px;
  line-height: 1.34;
  text-shadow:
    0 1px 2px rgba(0,0,0,1),
    0 0 4px rgba(0,0,0,.68);
}

.review-menu-textarea:focus {
  border-color: rgba(181,46,34,.70);
  box-shadow: inset 0 0 12px rgba(106,20,14,.18);
}

.review-menu-textarea:disabled {
  opacity: .38;
}

.review-menu-textarea::placeholder {
  color: rgba(200,191,173,.34);
}

.review-menu-statusline {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 2px 0;
}

.review-menu-statusline > span {
  min-width: 0;
  margin-right: auto;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 11px;
  color: rgba(197,187,169,.58);
}

.review-submit-button,
.review-delete-button,
.review-refresh-button,
.review-captcha-cancel {
  border: 1px solid rgba(129,38,29,.48);
  outline: 0;
  background: rgba(0,0,0,.44);
  color: rgba(229,220,202,.87);
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 11px;
  text-transform: uppercase;
  cursor: pointer;
}

.review-submit-button,
.review-delete-button {
  padding: 7px 10px 6px;
}

.review-delete-button {
  border-color: rgba(116,39,33,.32);
  color: rgba(187,164,153,.64);
}

.review-delete-button.hidden {
  display: none;
}

.review-submit-button:hover,
.review-submit-button.is-focused,
.review-delete-button:hover,
.review-delete-button.is-focused,
.review-refresh-button:hover,
.review-refresh-button.is-focused,
.review-captcha-cancel:hover,
.review-captcha-cancel.is-focused {
  border-color: rgba(190,47,34,.84);
  color: rgba(246,235,212,.98);
  box-shadow:
    inset 0 0 15px rgba(117,19,14,.20),
    0 0 7px rgba(117,19,14,.20);
}

.review-submit-button:disabled,
.review-menu-row:disabled {
  opacity: .42;
  cursor: default;
  box-shadow: none;
}

.review-auth-detail {
  min-height: 22px;
  padding-top: 3px;
  font-family: 'RDRLedger', Georgia, serif;
  font-size: 10px;
  color: rgba(177,167,150,.44);
  text-align: center;
}

/* BRK Minigames CAPTCHA --------------------------------------------------- */

.review-captcha-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 8px 8px 7px;
  background:
    radial-gradient(
      ellipse at center,
      rgba(22,14,10,.52),
      rgba(0,0,0,.92) 78%
    );
}

.review-captcha-layer.hidden {
  display: none;
}

.review-captcha-instruction {
  z-index: 3;
  padding: 3px 7px;
  font-family: 'RDRLino', Georgia, serif;
  font-size: 11px;
  letter-spacing: .55px;
  color: rgba(236,226,207,.82);
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 3px #000;
}

.review-captcha-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.review-captcha-cancel {
  z-index: 3;
  padding: 5px 9px 4px;
}

/* BRK Chat public review feed -------------------------------------------- */

.review-chat-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  filter: drop-shadow(0 7px 9px rgba(0,0,0,.42));
}

.review-chat-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    url('assets/ui/inkroller_1a.png')
    bottom left / 100% 100% no-repeat;
  opacity: .47;
  pointer-events: none;
}

.review-chat-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  border: 1px solid rgba(151,38,28,.62);
  box-shadow:
    inset 0 0 16px rgba(93,12,8,.18),
    0 0 7px rgba(93,12,8,.20);
}

.review-chat-feed-panel {
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.review-chat-channelbar {
  position: relative;
  z-index: 2;
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 7px;
  border-bottom: 1px solid rgba(151,43,31,.32);
  background: rgba(0,0,0,.32);
  font-family: 'RDRLedger', Georgia, serif;
}

.review-chat-channel-dot {
  width: 3px;
  align-self: stretch;
  flex: 0 0 3px;
  background: rgba(207,157,62,.96);
  box-shadow: 0 0 5px rgba(207,157,62,.34);
}

.review-chat-channel-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.review-chat-channel-heading strong {
  font-family: 'RDRLino', Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  color: rgba(245,239,225,.94);
  letter-spacing: .02em;
}

.review-chat-channel-heading [data-review-count] {
  color: rgba(185,175,158,.46);
  font-size: 10px;
}

.review-refresh-button {
  margin-left: auto;
  padding: 6px 9px 5px;
}

.review-list.review-chat-messages {
  flex: 1;
  min-height: 455px;
  max-height: 660px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color:
    rgba(137,40,31,.40)
    rgba(0,0,0,.12);
  padding: 13px 12px 15px 15px;
}

.review-chat-row {
  position: relative;
  padding: 5px 2px 7px 9px;
  font-family: 'RDRLedger', Georgia, serif;
  color: rgba(247,243,233,.94);
  text-shadow:
    0 1px 2px rgba(0,0,0,1),
    0 0 4px rgba(0,0,0,.82);
}

.review-chat-row + .review-chat-row {
  margin-top: 3px;
}

.review-chat-message-line {
  position: relative;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.review-chat-row-accent {
  position: absolute;
  left: -9px;
  top: .20em;
  bottom: .12em;
  width: 2px;
  background: rgba(177,8,8,.84);
}

.review-chat-name {
  color: rgba(204,213,216,.96);
}

.review-chat-rating {
  margin-left: 5px;
  color: rgba(207,157,62,.96);
  letter-spacing: .5px;
  white-space: nowrap;
}

.review-chat-separator {
  color: rgba(204,213,216,.62);
}

.review-chat-body {
  white-space: pre-wrap;
  color: rgba(255,255,255,.96);
}

.review-chat-meta {
  display: flex;
  gap: 7px;
  margin-top: 2px;
  color: rgba(175,165,148,.36);
  font-size: 9px;
  text-shadow: none;
}

.review-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  text-align: center;
  font-family: 'RDRLedger', Georgia, serif;
  color: rgba(181,171,153,.44);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1120px) {
  .review-layout {
    grid-template-columns: 1fr;
  }

  .review-menu-shell {
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  .review-menu-shell {
    width: min(540px, 100%);
    min-height: 650px;
    padding-left: clamp(16px, 8vw, 54px);
    padding-right: clamp(16px, 8vw, 54px);
  }

  .review-menu-title {
    width: min(472px, calc(100vw - 32px));
  }

  .review-menu-row.menu-row,
  .review-menu-row.review-menu-static-row,
  .review-rating-field.review-menu-row {
    width: 100%;
  }

  .review-menu-dropdown {
    width: min(245px, 52vw);
  }
}

/* ==========================================================================
   BRK asset-first UI overrides
   Use supplied BRK/RDR artwork before CSS-drawn stand-ins.
   ========================================================================== */

/* Standard rectangular selected state:
   selected.png is the real static artwork; animated flow rides above it. */
.menu-row.is-focused,
.stage-row.is-focused,
.resource-card.is-focused,
.section-row.is-focused {
  border: 0 !important;
}

.is-focused > .row-border-flow,
.showcase-carousel-item.is-current .row-border-flow,
.showcase-lightbox-image-frame .row-border-flow {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 8;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    url('assets/ui/selected.png')
    center / 100% 100% no-repeat !important;
  opacity: 1;
  filter:
    drop-shadow(0 0 3px var(--browse-highlight))
    drop-shadow(0 0 1px rgba(0,0,0,.85));
  -webkit-mask: none !important;
  mask: none !important;
  animation: none !important;
  pointer-events: none;
}

/* Animated BRK red/gold treatment stays on top of the real selected asset. */
.is-focused > .row-border-flow::after,
.showcase-carousel-item.is-current .row-border-flow::after,
.showcase-lightbox-image-frame .row-border-flow::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 2px;
  pointer-events: none;
  background:
    conic-gradient(
      from var(--browse-angle),
      var(--browse-primary) 0deg,
      var(--browse-primary) 82deg,
      var(--browse-deep) 128deg,
      var(--browse-highlight) 158deg,
      var(--browse-primary) 198deg,
      var(--browse-accent) 250deg,
      var(--browse-primary) 306deg,
      var(--browse-primary) 360deg
    );
  animation:
    menu-border-flow
    var(--browse-duration)
    linear infinite;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: var(--browse-opacity);
}

/* Current item in custom review dropdown uses the same real selection asset,
   even before keyboard focus lands on it. */
.review-menu-dropdown-option.is-current::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    url('assets/ui/selected.png')
    center / 100% 100% no-repeat;
  opacity: .72;
  pointer-events: none;
}

/* The review resource selector itself gets selected.png when opened/focused. */
.review-menu-select-button:hover::before,
.review-menu-select-button:focus-visible::before,
.review-menu-select-button.is-focused::before,
.review-menu-dropdown.is-open .review-menu-select-button::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    url('assets/ui/selected.png')
    center / 100% 100% no-repeat;
  pointer-events: none;
}

.review-menu-select-button:hover > .row-border-flow,
.review-menu-select-button:focus-visible > .row-border-flow,
.review-menu-select-button.is-focused > .row-border-flow,
.review-menu-dropdown.is-open .review-menu-select-button > .row-border-flow {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 6;
}

/* Supplied RDR directional button artwork replaces text glyph arrows. */
.card-arrow {
  width: 23px;
  height: 23px;
  min-width: 23px;
  display: block;
  font-size: 0 !important;
  color: transparent !important;
  background:
    url('assets/ui/button_3_img.png')
    center / contain no-repeat;
  filter:
    drop-shadow(0 1px 1px rgba(0,0,0,.95))
    brightness(.86);
}

.resource-card.is-focused .card-arrow,
.resource-card:hover .card-arrow {
  filter:
    drop-shadow(0 0 4px rgba(139,24,13,.52))
    brightness(1.08);
}

/* Generic docs/external rows that end in a literal › receive the right-arrow
   artwork without requiring every resource module to be rewritten. */
.doc-link-button > span:last-child {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: block;
  overflow: hidden;
  font-size: 0;
  background:
    url('assets/ui/button_3_img.png')
    center / contain no-repeat;
}

/* Screenshot / Chat video carousels use the actual RDR left/right buttons. */
.showcase-carousel-control {
  width: 38px;
  height: 64px;
  overflow: hidden;
  font-size: 0 !important;
  color: transparent !important;
  background-position: center !important;
  background-size: 31px 31px !important;
  background-repeat: no-repeat !important;
  filter:
    drop-shadow(0 1px 1px rgba(0,0,0,.95))
    brightness(.76);
  transition:
    filter .16s ease,
    transform .16s ease;
}

.showcase-carousel-control.previous {
  background-image: url('assets/ui/button_2_img.png') !important;
}

.showcase-carousel-control.next {
  background-image: url('assets/ui/button_3_img.png') !important;
}

.showcase-carousel-control:hover,
.showcase-carousel-control:focus-visible,
.showcase-carousel-control.is-focused {
  filter:
    drop-shadow(0 0 5px rgba(150,27,16,.62))
    brightness(1.12);
  transform: scale(1.07);
}

/* Review feed border uses the supplied rectangular selection artwork instead
   of a generic one-pixel CSS rectangle. */
.review-chat-panel::after {
  border: 0 !important;
  background:
    url('assets/ui/selected.png')
    center / 100% 100% no-repeat;
  box-shadow:
    inset 0 0 16px rgba(93,12,8,.18),
    0 0 7px rgba(93,12,8,.20);
  opacity: .78;
}

/* Preserve purpose-built square/frame assets where they are a better match.
   These declarations make that intent explicit and prevent generic overrides. */
.notify-gift-slot-border {
  background-image:
    url('assets/resources/notify/ui/border_red_square.png') !important;
}

.notify-frame-stage-wrap::before,
.rp-dice-preview::before {
  border-image-source:
    url('assets/ui/interaction_frame.png') !important;
}


/*__________________________________________________________________________________*/
/* BRK Tools                                                                        */
/*__________________________________________________________________________________*/

.tools-tool-view {
  display: none;
}

.tools-tool-view.is-active {
  display: flex;
  flex-direction: column;
}

.tools-embed-shell {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 8px;
  border: 1px solid rgba(128, 20, 10, 0.45);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.tools-embed-frame {
  display: block;
  width: 100%;
  height: min(78vh, 920px);
  min-height: 560px;
  border: 0;
  background: #1e1f22;
}
