/* site.css — preview/demo site (cottagecore aesthetic, independent of widget concept) */

* { box-sizing: border-box; }

:root {
  --site-bg-warm:    #FAF3E7;
  --site-bg-soft:    #F4ECDB;
  --site-card:       #FFFDF8;
  --site-card-deep:  #FBF3E0;
  --site-fg:         #3B2418;
  --site-fg-muted:   #7B5E47;
  --site-fg-subtle:  #A39078;
  --site-border:     rgba(91, 52, 32, 0.14);
  --site-border-strong: rgba(91, 52, 32, 0.22);
  --site-accent:     #C66D3D;
  --site-accent-2:   #7BA968;
  --site-accent-3:   #FF8FB3;
  --site-shadow-sm:  0 1px 3px rgba(91, 52, 32, 0.05);
  --site-shadow-md:  0 4px 18px rgba(91, 52, 32, 0.07), 0 0 0 1px rgba(91, 52, 32, 0.04);
  --serif:           'Lora', Georgia, serif;
  --serif-display:   'Cormorant Garamond', Georgia, serif;
  --sans:            'Manrope', system-ui, sans-serif;
  --mono:            'JetBrains Mono', ui-monospace, monospace;
}

html, body {
  margin: 0; padding: 0;
  background: var(--site-bg-warm);
  color: var(--site-fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(at 20% 0%, rgba(198, 109, 61, 0.05), transparent 50%),
    radial-gradient(at 80% 30%, rgba(123, 169, 104, 0.04), transparent 50%);
  background-attachment: fixed;
}

a { color: var(--site-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }

.app {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 32px 80px;
}

@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; gap: 22px; padding: 18px; }
}

.main-col { min-width: 0; }

/* ─── HERO ─── */
.hero {
  position: relative;
  padding: 40px 44px 36px;
  margin-bottom: 28px;
  border-radius: 18px;
  background: linear-gradient(135deg, #FFFDF8 0%, #F4ECDB 100%);
  box-shadow: var(--site-shadow-md);
  overflow: hidden;
  border: 1px solid var(--site-border);
}

.hero__watermark {
  position: absolute;
  top: -20px; right: -40px;
  width: 280px;
  opacity: 0.12;
  pointer-events: none;
}

.hero__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  color: var(--site-fg);
  margin: 0 0 14px;
  max-width: 16ch;
}
.hero__title em {
  font-style: italic;
  color: var(--site-accent);
}
.hero__lede {
  font-size: 15px;
  line-height: 1.5;
  color: var(--site-fg-muted);
  max-width: 60ch;
  margin: 0;
}

/* ─── SCENES ─── */
.scenes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 36px;
}

.scene {
  background: var(--site-card);
  border-radius: 14px;
  border: 1px solid var(--site-border);
  box-shadow: var(--site-shadow-sm);
  overflow: hidden;
}

.scene__head {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--site-border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.scene__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  margin: 0;
  letter-spacing: -0.01em;
}

.scene__hint {
  font-size: 11px;
  color: var(--site-fg-subtle);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.scene__body {
  position: relative;
  background: #FFF6E3;
}
/* Starting scene keeps its image bg, no override here */

/* Scene 1 — Standalone
   exemple chat is designed for OBS scenes (1280×720 or 1920×1080). Iframe
   renders internally at 1280×860 and is scaled via JS to fit the scene body. */
.scene--standalone .scene__body {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px;
  min-height: 460px;
  overflow: hidden;
  background: #ffffff;
}
.scene--standalone__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1280 / 860;
  max-width: 960px;
  overflow: hidden;
}
.scene--standalone iframe {
  position: absolute;
  top: 0; left: 0;
  width: 1280px;
  height: 860px;
  border: none;
  background: transparent;
  transform-origin: top left;
}

/* Scene 2 — Starting stream (overlay over real Live2D-style bg)
   Iframe sized at 720×860 internal (OBS-portrait) and scaled to fit chat panel area */
.scene--starting .scene__body {
  position: relative;
  padding: 0;
  min-height: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.scene--starting .stream-canvas {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1a1208;
}
/* the empty white chat panel frame in scen1_chat.png — measured rectangle */
.scene--starting__chat-wrap {
  position: absolute;
  left: 12%;
  top: 13%;
  width: 47%;
  height: 64%;
  overflow: hidden;
}
.scene--starting__chat {
  position: absolute;
  top: 0; left: 0;
  width: 1280px;
  border: none;
  background: transparent;
  transform-origin: top left;
  /* width + height + transform set by fitScaledIframes() in site.js */
}

/* ─── SETTINGS PANEL ─── */
.panel {
  position: sticky;
  top: 22px;
  align-self: flex-start;
  background: var(--site-card);
  border-radius: 16px;
  border: 1px solid var(--site-border);
  box-shadow: var(--site-shadow-md);
  padding: 18px 18px 16px;
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-thumb { background: var(--site-border-strong); border-radius: 999px; }

.panel__section {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--site-border);
}
.panel__section--head {
  background: linear-gradient(180deg, rgba(198,109,61,0.05), transparent);
  margin: -18px -18px 16px;
  padding: 18px 18px 14px;
}
.panel__section--foot {
  border-bottom: none;
  margin-bottom: 0; padding-bottom: 0;
}
.panel__section:last-child { border-bottom: none; }

.panel__label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--site-fg-muted);
  margin-bottom: 8px;
}
.panel__label em { font-style: normal; color: var(--site-fg-subtle); font-weight: 500; text-transform: none; letter-spacing: 0.02em; }

/* connection status pill */
.conn-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  border: 1px solid transparent;
  font-style: normal;
}
.conn-status__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.conn-status--idle      { background: rgba(91,52,32,0.06); color: var(--site-fg-subtle); }
.conn-status--idle .conn-status__dot      { background: var(--site-fg-subtle); }
.conn-status--connecting{ background: rgba(212,162,76,0.14); color: #8C6418; border-color: rgba(212,162,76,0.35); }
.conn-status--connecting .conn-status__dot{ background: #D4A24C; animation: connDotPulse 1s infinite; }
.conn-status--joined    { background: rgba(123,169,104,0.18); color: #4A6B36; border-color: rgba(123,169,104,0.4); }
.conn-status--joined .conn-status__dot    { background: #5C8A40; box-shadow: 0 0 0 0 rgba(92,138,64,0.6); animation: connDotPulse 1.6s infinite; }
.conn-status--live      { background: rgba(123,169,104,0.22); color: #3F5C2E; border-color: rgba(123,169,104,0.55); }
.conn-status--live .conn-status__dot      { background: #4A7E2F; }
.conn-status--error     { background: rgba(198,69,69,0.12); color: #8B2828; border-color: rgba(198,69,69,0.4); }
.conn-status--error .conn-status__dot     { background: #B83333; }
@keyframes connDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.8); }
}

.panel__hint {
  font-size: 10.5px;
  color: var(--site-fg-subtle);
  margin: 8px 0 0;
  line-height: 1.45;
}

/* connect row */
.connect-row { margin-bottom: 8px; }
.connect-row input {
  width: 100%;
  font-family: var(--sans);
  font-size: 13px;
  padding: 9px 13px;
  border-radius: 8px;
  border: 1.5px solid var(--site-border);
  background: white;
  color: var(--site-fg);
  outline: none;
}
.connect-row input:focus {
  border-color: var(--site-accent);
  box-shadow: 0 0 0 3px rgba(198, 109, 61, 0.12);
}

.btn-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* font picker grid */
.font-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.font-chip {
  font-size: 12px;
  padding: 7px 10px;
  justify-content: center;
  transition: all 0.15s;
}
.font-chip[data-font="comfortaa"] { font-family: 'Comfortaa', sans-serif; }
.font-chip[data-font="nunito"]    { font-family: 'Nunito', sans-serif; }
.font-chip[data-font="lora"]      { font-family: 'Lora', serif; }
.font-chip[data-font="caveat"]    { font-family: 'Caveat', cursive; font-size: 16px; font-weight: 700; }

.accent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.accent-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: var(--mono);
  background: transparent;
  color: var(--site-fg);
  border: 1px solid var(--site-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  --chip-color: #F9924B;
}
.accent-chip:hover { border-color: var(--site-fg-subtle); }
.accent-chip__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--chip-color);
  box-shadow: 0 0 6px var(--chip-color);
  flex-shrink: 0;
}
.accent-chip.is-active {
  background: var(--chip-color);
  color: #fff;
  border-color: var(--chip-color);
}
.accent-chip.is-active .accent-chip__dot {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
}
.btn-row .btn {
  flex: 1;
  justify-content: center;
  font-size: 12px;
  padding: 8px 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.005em;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--site-fg);
  transition: all 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--site-fg); color: var(--site-bg-warm); }
.btn--primary:hover { background: var(--site-accent); }
.btn--primary.btn--connected { background: #4A7E2F; color: #fff; }
.btn--primary.btn--connected:hover { background: #3A6422; }
.btn--primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--accent { background: var(--site-accent); color: white; }
.btn--accent:hover { background: #B85C2E; }
.btn--ghost { border-color: var(--site-border-strong); color: var(--site-fg); }
.btn--ghost:hover { border-color: var(--site-fg); background: rgba(0,0,0,0.02); }
.btn--full { width: 100%; justify-content: center; }
.btn--test { font-size: 11.5px; padding: 7px 10px; text-transform: lowercase; }

/* test grid (per-event buttons) */
.test-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

/* concept cards */
.concept-grid {
  display: grid;
  gap: 6px;
}
.concept-card {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--site-border);
  background: var(--site-card-deep);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  font-family: var(--sans);
  color: var(--site-fg);
}
.concept-card:hover {
  border-color: var(--site-fg-muted);
  transform: translateY(-1px);
}
.concept-card.is-active {
  border-color: var(--site-accent);
  background: white;
  box-shadow: 0 0 0 2.5px rgba(198, 109, 61, 0.15);
}
.concept-card__swatch {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--swatch-a), var(--swatch-b));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.concept-card__title {
  font-weight: 700;
  font-size: 13px;
  display: block;
  letter-spacing: -0.005em;
}
.concept-card__sub {
  font-size: 10.5px;
  color: var(--site-fg-subtle);
  display: block;
  margin-top: 1px;
}

/* themes — small swatches */
.theme-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 16px;
}
.theme-swatch {
  position: relative;
  width: 38px; height: 30px;
  border-radius: 6px;
  cursor: pointer;
  border: 1.5px solid var(--site-border);
  background: linear-gradient(135deg, var(--swatch-a), var(--swatch-b));
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.theme-swatch:hover { transform: translateY(-1px); }
.theme-swatch.is-active { box-shadow: 0 0 0 2.5px rgba(198, 109, 61, 0.25); border-color: var(--site-accent); }
.theme-swatch__label {
  position: absolute;
  bottom: -14px; left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--site-fg-subtle);
  text-transform: uppercase;
  white-space: nowrap;
}

/* font picker */
.font-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}
.font-chip {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1.5px solid var(--site-border);
  background: var(--site-card-deep);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--site-fg);
  transition: all 0.15s ease;
  text-align: center;
}
.font-chip:hover { border-color: var(--site-fg-muted); }
.font-chip.is-active {
  border-color: var(--site-accent);
  background: white;
  color: var(--site-fg);
  box-shadow: 0 0 0 2px rgba(198, 109, 61, 0.12);
}

/* toggles */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 12.5px;
  gap: 10px;
}
.toggle-row__label {
  color: var(--site-fg);
  flex: 1;
  min-width: 0;
}
.toggle-row__hint {
  display: block;
  font-size: 10px;
  color: var(--site-fg-subtle);
  margin-top: 1px;
}

/* toggle switch button */
.toggle-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.toggle-btn__track {
  display: flex;
  align-items: center;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--site-border-strong);
  border: 1.5px solid var(--site-border-strong);
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}
.toggle-btn__thumb {
  position: absolute;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.toggle-btn.is-on .toggle-btn__track {
  background: var(--site-accent);
  border-color: var(--site-accent);
}
.toggle-btn.is-on .toggle-btn__thumb {
  transform: translateX(16px);
}

.toggle {
  position: relative;
  width: 34px; height: 20px;
  border-radius: 999px;
  background: var(--site-border-strong);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.is-on { background: var(--site-accent); }
.toggle.is-on::after { transform: translateX(14px); }

.select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 12.5px;
}
.select-row select {
  font-family: var(--sans);
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1.5px solid var(--site-border);
  background: white;
  color: var(--site-fg);
  cursor: pointer;
}

/* ─── concept-book (was brandbook) ─── */
.concept-book {
  margin-top: 50px;
  padding: 40px 44px 48px;
  border-radius: 18px;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  box-shadow: var(--site-shadow-md);
}

.concept-book__head {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--site-border);
}
.concept-book__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--site-fg);
}
.concept-book__lede {
  color: var(--site-fg-muted);
  font-size: 14.5px;
  max-width: 60ch;
  margin: 0;
}

/* === ANATOMY OF A MESSAGE === */
.bb-anatomy-row {
  position: relative;
  background: var(--site-card-deep);
  border-radius: 12px;
  padding: 24px 28px;
  border: 1px solid var(--site-border);
  margin-bottom: 18px;
}
.bb-anat-msg {
  font-family: 'Caveat', cursive;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bb-anat-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bb-anat-row--meta { padding-left: 4px; }
.bb-anat-row--bubble { padding-left: 4px; align-items: flex-start; }
.bb-anat-paw {
  display: inline-block;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  background-color: var(--bb-paw-color, #F9924B);
  -webkit-mask-image: url('../assets/orginal_art/paw.svg');
  mask-image: url('../assets/orginal_art/paw.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  filter: drop-shadow(0 0 4px var(--bb-paw-glow, rgba(249,146,75,0.35)));
}
.bb-mini-paw {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  background-color: var(--bb-paw-color, #F9924B);
  -webkit-mask-image: url('../assets/orginal_art/paw.svg');
  mask-image: url('../assets/orginal_art/paw.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.bb-anat-name {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 26px;
  color: var(--site-accent);
}
.bb-anat-thread {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 22px;
  margin-top: 2px;
}
.bb-anat-thread svg { display: block; margin: -2px 0; }
.bb-anat-text {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 22px;
  color: var(--site-fg);
  padding-top: 4px;
}

.bb-anat-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bb-anat-row-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--site-fg-subtle);
  padding-left: 4px;
}

.bb-anatomy-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, #1A120A 0%, #0F0A06 100%);
  padding: 22px 24px;
  border-radius: 10px;
  border: 1px solid rgba(212, 162, 76, 0.2);
}
.bb-event-sample {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  display: flex;
  gap: 7px;
  align-items: baseline;
  color: #F8EFD9;
  flex-wrap: wrap;
}
.bb-event-sample .ev-prefix {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #D4A24C;
  opacity: 0.7;
}
.bb-event-sample .ev-prefix.premium {
  opacity: 1;
  text-shadow: 0 0 8px #D4A24C;
}
.bb-event-sample .ev-name {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 17px;
  color: #F2C481;
}
.bb-event-sample .ev-name.premium {
  text-shadow: 0 0 14px #D4A24C;
}
.bb-event-sample .ev-sep { color: #F2C481; opacity: 0.4; }
.bb-event-sample .ev-sys {
  font-family: 'Lora', serif;
  font-style: italic;
  color: #C9B69A;
}
.bb-event-sample .ev-tier {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #D4A24C;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.bb-event-raid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(212,162,76,0.12), rgba(28,18,12,0.5));
  border: 1px solid #D4A24C;
  border-radius: 4px;
  margin-top: 4px;
}
.bb-event-raid strong {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 600;
  color: #F2C481;
  font-size: 15px;
}
.bb-event-raid small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #C9B69A;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bb-section {
  margin-bottom: 28px;
}
.bb-section h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.bb-section p {
  color: var(--site-fg-muted);
  margin: 0 0 14px;
  max-width: 70ch;
  font-size: 14px;
  line-height: 1.55;
}
.bb-section__sub {
  font-size: 12.5px !important;
  color: var(--site-fg-subtle) !important;
  margin-bottom: 12px !important;
}

.bb-section--full {
  border-top: 1px solid var(--site-border);
  padding-top: 24px;
  margin-top: 24px;
}

.bb-events {
  list-style: none;
  padding: 0; margin: 0;
}
.bb-events li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--site-border);
  font-size: 13.5px;
  color: var(--site-fg-muted);
}
.bb-events li:last-child { border-bottom: none; }
.bb-events strong {
  color: var(--site-fg);
  font-weight: 700;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  min-width: 110px;
}

/* palette */
.bb-palette,
#bb-palette {
  display: grid;
  gap: 18px;
}
.bb-pal-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--site-card-deep);
  border: 1px solid var(--site-border);
  border-radius: 10px;
}
.bb-pal-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bb-pal-name {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--site-fg);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.bb-pal-hint {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--site-fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.bb-pal-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.bb-swatch-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.bb-swatch {
  height: 48px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
}
.bb-swatch__hex {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--site-fg);
  letter-spacing: 0.03em;
}
.bb-swatch__label {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--site-fg-subtle);
  letter-spacing: 0.04em;
}

/* icons */
.bb-icons,
#bb-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
#bb-palette {
  display: grid;
  gap: 14px;
}
#bb-typo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.bb-typo__sample--name { font-family: 'Lora', serif; font-style: italic; font-weight: 600; font-size: 32px; color: var(--site-accent); }
.bb-typo__sample--text { font-family: 'Manrope', sans-serif; font-weight: 400; font-size: 22px; color: var(--site-fg); line-height: 1.4; }
.bb-typo__sample--mono { font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 16px; color: var(--site-accent-2); letter-spacing: 0.05em; }
#bb-anatomy { display: grid; gap: 14px; }
.bb-icon-card {
  background: var(--site-card-deep);
  border: 1px solid var(--site-border);
  border-radius: 10px;
  padding: 18px 12px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 200px;
}
.bb-icon__name {
  font-size: 11px;
  color: var(--site-fg);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.bb-icon__hint {
  font-size: 9.5px;
  color: var(--site-fg-subtle);
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* — Animated paw (mask + bg-color so accent picks up CSS var) — */
.bb-icon-paw {
  width: 88px;
  height: 88px;
  display: inline-block;
  background-color: var(--bb-paw-color, #F9924B);
  -webkit-mask-image: url('../assets/orginal_art/paw.svg');
  mask-image: url('../assets/orginal_art/paw.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: bb-pawClaws 3.6s ease-in-out infinite;
  transform-origin: 50% 60%;
  filter: drop-shadow(0 0 10px var(--bb-paw-glow, rgba(249, 146, 75, 0.35)));
}
.bb-icon-paw img { display: none; }

/* — Animated thread — */
.bb-icon-thread {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 24px;
  height: 110px;
  filter: drop-shadow(0 1px 1.5px rgba(120, 60, 20, 0.25));
  animation: bb-threadSway 4.2s ease-in-out infinite;
  transform-origin: top center;
}
.bb-icon-thread svg {
  display: block;
  margin: -2px 0;
}

/* — Animated chibi — */
.bb-icon-chibi {
  position: relative;
  width: 130px;
  height: 130px;
  pointer-events: none;
}
.bb-icon-chibi img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.bb-icon-chibi__body { filter: brightness(0); }
.bb-icon-chibi__eyes {
  filter: brightness(0);
  transform-origin: 50% 45%;
  animation: bb-blink_eye 4s infinite;
}
.bb-icon-chibi__heart-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bb-icon-chibi__heart--idle {
  animation: bb-chibiHeartGlowIdle 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}
.bb-icon-chibi__heart--peak {
  opacity: 0;
  animation: bb-chibiHeartPeak 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

/* — Keyframes (mirrored from widget-se/css.txt) — */
@keyframes bb-pawClaws {
  0%, 55%, 100% { transform: scale(1, 1) rotate(0deg); }
  65%           { transform: scale(1.12, 0.92) rotate(-3deg); }
  72%           { transform: scale(0.95, 1.08) rotate(2deg); }
  80%           { transform: scale(1.04, 0.97) rotate(-1deg); }
  88%           { transform: scale(1, 1) rotate(0deg); }
}
@keyframes bb-threadSway {
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(2deg); }
}
@keyframes bb-blink_eye {
  0%, 90%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(0.1); }
}
@keyframes bb-chibiHeartGlowIdle {
  0%, 100% { filter: drop-shadow(0 0  4px rgba(255,196,214,0.30)); }
  50%      { filter: drop-shadow(0 0 14px rgba(255,196,214,0.55)); }
}
@keyframes bb-chibiHeartPeak {
  0%, 100% { opacity: 0; filter: drop-shadow(0 0  6px rgba(255,94,146,0.35)); }
  50%      { opacity: 1; filter: drop-shadow(0 0 22px rgba(255,94,146,0.85)); }
}

/* animations */
.bb-animations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.bb-anim-card {
  background: var(--site-card-deep);
  border: 1px solid var(--site-border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.bb-anim__stage {
  border-radius: 8px;
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.bb-anim-card h6 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12.5px;
  margin: 0 0 3px;
  color: var(--site-fg);
}
.bb-anim-card p {
  font-size: 10.5px;
  color: var(--site-fg-subtle);
  margin: 0;
  line-height: 1.4;
}

/* typography */
.bb-typo {
  display: grid;
  gap: 14px;
}
.bb-typo-card {
  background: var(--site-card-deep);
  border: 1px solid var(--site-border);
  border-radius: 12px;
  padding: 22px;
}
.bb-typo__sample {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin-bottom: 8px;
  color: var(--site-fg);
}
.bb-typo__hint {
  font-size: 11.5px;
  color: var(--site-fg-subtle);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* === INSTALL GUIDE === */
.install-guide {
  margin-top: 36px;
  padding: 32px clamp(20px, 3.5vw, 44px);
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 16px;
  box-shadow: var(--site-shadow-md);
}
.install-guide__head {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--site-border);
}
.install-guide__title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--site-fg);
}
.install-guide__lede {
  color: var(--site-fg-muted);
  font-size: 14.5px;
  max-width: 70ch;
  margin: 0;
}
.install-guide__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
@media (max-width: 760px) {
  .install-guide__cols { grid-template-columns: 1fr; }
}
.install-step {
  background: var(--site-card-deep);
  border: 1px solid var(--site-border);
  border-radius: 12px;
  padding: 18px 20px 16px;
}
.install-step__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  margin: 0 0 10px;
  color: var(--site-fg);
}
.install-step__list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  color: var(--site-fg-muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.install-step__list li::marker {
  color: var(--site-fg-subtle);
  font-family: var(--mono);
  font-size: 11px;
}
.install-step strong { color: var(--site-fg); font-weight: 600; }
.install-step kbd {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--site-bg-warm);
  border: 1px solid var(--site-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--site-fg);
}
.install-guide__figure {
  margin: 0;
  padding: 16px;
  background: var(--site-card-deep);
  border: 1px solid var(--site-border);
  border-radius: 12px;
}
.install-guide__figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.install-guide__figure figcaption {
  margin-top: 10px;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--site-fg-subtle);
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* === LIGHTBOX === */
body.lightbox-locked { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  animation: lightboxFade 0.18s ease;
}
.lightbox.is-open { display: flex; }
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 4, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: zoom-out;
}
.lightbox__img {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
  animation: lightboxZoom 0.2s cubic-bezier(0.2, 0.6, 0.3, 1);
}
.lightbox__close {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 38px;
  height: 38px;
  font-size: 28px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lightbox__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
}
@keyframes lightboxFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes lightboxZoom {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* footer */
.site-foot {
  text-align: center;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--site-border);
  color: var(--site-fg-subtle);
  font-size: 12px;
}
.site-foot strong { color: var(--site-fg-muted); font-weight: 600; }

/* toast */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--site-fg);
  color: var(--site-bg-warm);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 36px rgba(0,0,0,0.22);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
