/* Bully Bully: additive, scoped UX patch. Reuse approved tokens; do NOT restyle site. */
:root {
  --bbux-ink: #34222f;
  --bbux-paper: #fffefb;
  --bbux-lilac: #d5cdea;
  --bbux-blue: #b9cce0;
  --bbux-copper: #833311;
  --bbux-mono: 'Roboto Mono', Consolas, monospace;
}

/* 01: The actual <details> retain their native appearance and semantics. */
#inside .contents-list > details.contents-group { scroll-margin-top: 105px; }

/* 02: Small real symbol for returning to the beginning. */
.bbux-back-to-top {
  position: fixed; right: clamp(13px, 2.5vw, 24px); bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 32; display: inline-flex; gap: 9px; align-items: center; justify-content: center;
  padding: 11px 14px; min-height: 45px; border: 1px solid var(--bbux-ink);
  background: var(--bbux-paper); color: var(--bbux-ink);
  font: 400 10px/1.35 var(--bbux-mono); letter-spacing: .055em; text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--bbux-lilac); border-radius: 3px; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(5px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.bbux-back-to-top[data-visible='true'] { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.bbux-back-to-top:hover { background: #edf0b3; }
.bbux-back-to-top:focus-visible { outline: 2px solid var(--bbux-ink); outline-offset: 3px; }
.bbux-back-to-top svg { display: block; width: 15px; height: 15px; }
body:has(dialog[open]) .bbux-back-to-top,
body:has([id*='panic']:not([hidden])[aria-modal='true']) .bbux-back-to-top { display: none !important; }

/* 03: An actual SVG replaces arrow / status emojis; no additional icon style introduced. */
.bbux-inline-icon { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; flex: none; color: inherit; }
.bbux-icon-host { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.bbux-icon-host svg { display: block; }

/* 04: Temporary index INSIDE the existing menu, not a new header or navigation redesign. */
.site-header #navigation { overflow: visible; }
.site-header .bbux-site-index { position: relative; display: block; font: 400 10px/1.6 var(--bbux-mono); }
.site-header .bbux-site-index > summary {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 0;
  font: 400 10px/1.8 var(--bbux-mono); letter-spacing: .055em; text-transform: uppercase;
  cursor: pointer; list-style: none; white-space: nowrap;
}
.site-header .bbux-site-index > summary::-webkit-details-marker { display: none; }
.site-header .bbux-site-index > summary::after { content: '+'; font-size: 17px; line-height: 1; }
.site-header .bbux-site-index[open] > summary::after { content: '−'; }
.site-header .bbux-site-index .bbux-index-panel {
  position: absolute; z-index: 99; left: 0; top: 100%; width: min(375px, 88vw);
  max-height: min(70vh, 650px); overflow-y: auto; overscroll-behavior: contain;
  background: #fffefb; border: 1px solid #34222f; box-shadow: 4px 4px 0 #d5cdea;
  padding: 13px 15px 16px; color: #34222f;
}
.site-header .bbux-group-label {
  margin: 12px 0 6px; font: 500 9px/1.4 var(--bbux-mono); letter-spacing: .075em;
  text-transform: uppercase; color: #833311;
}
.site-header .bbux-index-panel .bbux-index-link {
  display: block !important; width: 100%; white-space: normal; text-align: left;
  padding: 8px 2px !important; border-bottom: 1px solid #34222f26;
  color: #34222f; text-transform: none; letter-spacing: 0; font: 400 11px/1.4 var(--bbux-mono);
}
.site-header .bbux-index-panel .bbux-index-link:hover,
.site-header .bbux-index-panel .bbux-index-link:focus-visible { background: #edf0b3; text-decoration: none; }

/* If a launch-only page lacks the real header, the script CLONES the actual home header.
   This fallback exists solely to keep that cloned header readable if page-specific
   CSS was omitted. The main site's approved header is NOT touched. */
.site-header.bbux-restored-header { position: relative; background: #fffefb; color: #34222f; border-top: 6px solid #b9cce0; border-bottom: 1px solid #34222f26; z-index: 40; }
.site-header.bbux-restored-header .header-inner { min-height: 72px; }
.site-header.bbux-restored-header .wordmark { color: #34222f; font: 400 34px/1 Georgia, 'Times New Roman', serif; }
.site-header.bbux-restored-header .menu-toggle { color: #34222f; }

/* 05: Tape must sit ON and BEYOND the ticket edges; never be trapped in it. */
.bbux-ticket-corrected { position: relative !important; overflow: visible !important; }
.bbux-ticket-corrected > .bbux-washi-wide {
  position: absolute !important; left: -9px !important; top: -17px !important;
  width: calc(100% + 18px) !important; height: 38px !important; z-index: 6 !important;
  display: block !important; border: none !important; border-radius: 0 !important;
  transform: rotate(-.5deg) !important; opacity: .97 !important;
  background-color: #e8945d !important; background-position: center center !important;
  background-repeat: repeat-x !important; background-size: auto 38px !important;
  pointer-events: none;
  clip-path: polygon(0 1%, 100% 0, 99.5% 99%, 0 100%);
  box-shadow: 0 2px 3px #34222f15;
}

@media (max-width: 850px) {
  .site-header .bbux-site-index { width: 100%; }
  .site-header .bbux-site-index > summary { width: 100%; display: flex; justify-content: space-between; }
  .site-header .bbux-site-index .bbux-index-panel {
    position: static; width: 100%; max-height: 52vh; box-shadow: none;
    background: #fffefb; margin-top: 2px;
  }
}
@media (max-width: 650px) {
  .bbux-back-to-top { padding: 10px 12px; min-height: 42px; }
  .bbux-back-to-top span { display: none; }
  .bbux-back-to-top svg { width: 18px; height: 18px; }
  .bbux-ticket-corrected > .bbux-washi-wide { height: 30px !important; background-size: auto 30px !important; top: -13px !important; }
  .site-header.bbux-restored-header .header-inner { min-height: 67px; }
}
@media (prefers-reduced-motion: reduce) {
  .bbux-back-to-top { transition: none; transform: none; }
}
/* Responsive fallback specifically for a restored/cloned launch header only. */
.site-header.bbux-restored-header .header-inner {
  display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center; gap: 18px; width: min(1200px,calc(100% - 48px)); margin-inline: auto;
}
.site-header.bbux-restored-header .wordmark { grid-column: 2; grid-row: 1; white-space: nowrap; }
.site-header.bbux-restored-header #navigation { grid-column: 1; grid-row: 1; display:flex; align-items:center; gap: 14px; }
.site-header.bbux-restored-header #navigation > a { font:400 10px/1.7 var(--bbux-mono); color:inherit; text-decoration:none; }
.site-header.bbux-restored-header .menu-toggle { display:none; }
.site-header.bbux-restored-header .header-link { grid-column: 3; grid-row: 1; justify-self:end; }
@media(max-width:900px) {
  .site-header.bbux-restored-header .header-inner { width:calc(100% - 36px); display:flex; justify-content:space-between; }
  .site-header.bbux-restored-header .wordmark { grid-column:auto; grid-row:auto; font-size:34px; }
  .site-header.bbux-restored-header .menu-toggle {
    display:inline-flex; gap:14px; align-items:center; justify-content:center;
    border:1px solid #34222f; background:transparent; padding:10px 16px;
    border-radius:30px; text-transform:uppercase; font:400 11px/1.5 var(--bbux-mono); color:inherit;
  }
  .site-header.bbux-restored-header #navigation {
    display:none; position:absolute; left:0; right:0; top:100%;
    max-height:75vh; overflow-y:auto; background:#fffefb; border-bottom:1px solid #34222f40;
    box-shadow:0 8px 15px #34222f18; padding:15px 20px; z-index:99;
    flex-direction:column; align-items:stretch; gap:0;
  }
  .site-header.bbux-restored-header #navigation.is-open { display:flex; }
  .site-header.bbux-restored-header #navigation > a {padding:10px 0;}
  .site-header.bbux-restored-header .header-link {display:none;}
}
