/*
Skin Name: Burasut Lab Staging
Description: Burasut.com redesign skin for Cocoon. Keeps Cocoon/Ultimate Member behavior while replacing the visual layer.
Author: Burasut
Version: 0.4.1
Priority: 999
*/

:root {
  --bura-bg: #090b10;
  --bura-surface: #10131a;
  --bura-surface-2: #171b24;
  --bura-paper: #f5f0e7;
  --bura-text: #f3eee5;
  --bura-text-subtle: #c9c2b7;
  --bura-muted: #aaa49a;
  --bura-gold: #d8ad63;
  --bura-gold-soft: #f2d9a1;
  --bura-link: #efc979;
  --bura-link-hover: #fff0c4;
  --bura-blue: #6da6bd;
  --bura-line: rgba(216, 173, 99, 0.22);
  --bura-line-strong: rgba(216, 173, 99, 0.52);
  --bura-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  --bura-sans: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  --bura-serif: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
}

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(112, 78, 35, 0.15), transparent 34rem),
    linear-gradient(180deg, #080807 0%, #0d0c0b 48%, #070707 100%);
  color: var(--bura-text);
  font-family: var(--bura-sans);
}

body.custom-background {
  background-color: var(--bura-bg) !important;
  background-image: none !important;
}

a { transition: color 0.18s ease, opacity 0.18s ease, border-color 0.18s ease; }
a:hover { color: var(--bura-link-hover); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--bura-gold-soft) !important;
  outline-offset: 3px;
}

/* Use Cocoon's existing navigation as one shared header on every WordPress page. */
html.burasut-global-header body #header-container #header { display: none !important; }

html.burasut-global-header body.home #header-container {
  display: block !important;
}

html.burasut-global-header body.home .bl-site-header {
  display: none !important;
}

#header-container {
  min-height: 64px;
  border-bottom: 1px solid var(--bura-line);
}

.bura-site-brand {
  position: absolute;
  z-index: 4;
  top: 0;
  left: max(20px, calc((100% - 1240px) / 2));
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--bura-paper) !important;
  font-family: var(--bura-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.15;
  text-decoration: none;
}

.bura-site-brand small {
  margin-top: 5px;
  color: var(--bura-muted);
  font-family: var(--bura-sans);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.bura-language-switch {
  position: absolute;
  z-index: 100190;
  top: 11px;
  right: calc(max(14px, calc((100vw - 1420px) / 2)) + 58px);
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bura-line-strong);
  border-radius: 999px;
  background: rgba(12, 13, 16, 0.88);
  color: var(--bura-gold-soft) !important;
  font: 800 10px/1 var(--bura-sans);
  letter-spacing: 0.08em;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.bura-language-switch:hover {
  border-color: var(--bura-gold-soft);
  color: #fff7df !important;
}

#bura-hamburger {
  position: fixed !important;
  z-index: 100200 !important;
  top: 8px !important;
  right: max(14px, calc((100vw - 1420px) / 2)) !important;
  width: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--bura-line-strong) !important;
  border-radius: 999px;
  background: rgba(12, 13, 16, 0.9) !important;
  color: var(--bura-paper) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#bura-hamburger span {
  width: 20px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff, var(--bura-gold));
  transition: transform 180ms ease, opacity 180ms ease;
}

#bura-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#bura-hamburger.active span:nth-child(2) { opacity: 0; }
#bura-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#bura-wilds { display: none !important; }
#bura-wilds.active {
  position: fixed !important;
  z-index: 100180 !important;
  inset: 0;
  min-height: 100dvh;
  padding: clamp(82px, 8vw, 116px) clamp(28px, 6vw, 92px) clamp(34px, 5vw, 72px);
  display: grid !important;
  grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(24px, 4vw, 68px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 78% 44%, rgba(216, 173, 99, 0.12), transparent 34rem),
    rgba(5, 6, 8, 0.98);
}

body.bura-drawer-open { overflow: hidden; }

#bura-wilds .wilds-menu {
  min-width: 0;
  margin: 0;
  padding: 1px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 1px;
  list-style: none;
  border: 1px solid var(--bura-line-strong);
  background: var(--bura-line);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
}

#bura-wilds .wilds-menu li { margin: 0; }

#bura-wilds .wilds-link {
  min-width: 0;
  min-height: 92px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 0;
  background: rgba(13, 14, 18, 0.98);
  color: var(--bura-paper) !important;
  text-decoration: none !important;
}

#bura-wilds .wilds-link:hover,
#bura-wilds .wilds-link:focus-visible {
  background: linear-gradient(135deg, rgba(216, 173, 99, 0.19), rgba(13, 14, 18, 0.98));
  color: #fff7df !important;
}

#bura-wilds .wilds-link .en {
  overflow: hidden;
  color: var(--bura-gold-soft);
  font: 800 9px/1.2 var(--bura-sans);
  letter-spacing: 0.14em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#bura-wilds .wilds-link .jp {
  margin-top: 8px;
  color: inherit;
  font: 600 14px/1.45 var(--bura-serif);
  letter-spacing: 0.04em;
}

#bura-wilds .wilds-logo {
  min-width: 0;
  min-height: 340px;
  padding: clamp(24px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--bura-line);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.055), transparent 64%);
}

#bura-wilds .wilds-logo img {
  width: min(100%, 720px);
  max-height: 62vh;
  object-fit: contain;
  filter: drop-shadow(0 18px 44px rgba(0, 0, 0, 0.52));
}

#bura-wilds.active .wilds-menu li.is-account {
  opacity: 1;
  transform: translateX(0);
}

body.admin-bar #bura-hamburger { top: 40px !important; }
body.admin-bar .bura-language-switch { top: 11px; }

#navi .navi-in {
  width: min(1240px, calc(100% - 40px));
  min-height: 64px;
  padding-left: 225px;
  padding-right: 118px;
}

@media (min-width: 768px) {
  #navi .navi-in > ul.menu-header.menu-pc {
    min-height: 64px;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
  }

  #navi .navi-in > ul.menu-header.menu-pc > li {
    width: auto !important;
    min-width: 116px;
    max-width: 170px;
    flex: 1 1 0;
  }

  #navi .navi-in > ul.menu-mobile { display: none !important; }
}

#header-container,
#header-container .navi {
  background: rgba(8, 8, 7, 0.9);
  border-color: var(--bura-line);
  backdrop-filter: blur(8px) saturate(115%);
  -webkit-backdrop-filter: blur(8px) saturate(115%);
}

#header-container.burasut-header-scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.34);
}

body.home #header,
body.home #header-in {
  min-height: 78px !important;
  height: 78px !important;
}

body.home #header {
  background-color: rgba(8, 8, 7, 0.96) !important;
  background-image: none !important;
}

body.home #header-in {
  display: flex;
  align-items: center;
  padding: 0 28px;
}

body.home #header .logo {
  margin: 0;
  text-align: left;
}

body.home #header .header-site-logo-image {
  display: none !important;
}

body.home #header .site-name-text::before {
  content: "BURASUT LAB";
  color: var(--bura-paper);
  font-family: var(--bura-serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

#navi .navi-in > .menu-header {
  min-height: 62px;
  align-items: center;
}

#navi .navi-in a {
  color: #d2ccc1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

#navi .navi-in a:hover,
#navi .current-menu-item > a { color: var(--bura-gold-soft); }

#content { margin-top: clamp(18px, 3vw, 38px); }

body.home .bl-hero h1 {
  max-width: none;
  font-size: clamp(40px, 4vw, 52px) !important;
  line-height: 1.16 !important;
  letter-spacing: 0.015em !important;
  text-wrap: balance;
}

.bl-hero-title-main,
.bl-hero-title-sub { display: block; }

.bl-hero-title-sub {
  margin-top: 0.42em;
  color: var(--bura-gold-soft);
  font-family: var(--bura-sans);
  font-size: 0.38em;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

body.home .bl-lead {
  max-width: 650px;
  color: var(--bura-text-subtle) !important;
}

body.home .bl-header-guild {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

body.home .bl-language-link {
  width: 38px;
  height: 38px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bura-line-strong);
  background: rgba(20, 18, 15, 0.58);
  color: var(--bura-gold-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

body.home .bl-button--gold {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid var(--bura-gold) !important;
  background: var(--bura-gold) !important;
  color: #111 !important;
}

body.home .bl-quick > button {
  width: 100%;
  min-width: 0;
  display: flex !important;
  align-items: center;
  gap: 16px;
  margin: 0;
  min-height: 88px;
  padding: 22px 18px;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: var(--bura-paper) !important;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

body.home .bl-quick > button > b { margin-left: auto; }

body.home #bl-community button[data-bl-open-guild] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid var(--bura-gold) !important;
  border-radius: 0;
  background: var(--bura-gold) !important;
  color: #111 !important;
  cursor: pointer;
  font: 800 12px/1.3 var(--bura-sans);
  letter-spacing: 0.06em;
}

body.home .bl-menu-panel__discord { text-decoration: none !important; }
body.home #bl-latest .bl-article[hidden] { display: none !important; }

/* The prototype originally relied on an inline IntersectionObserver to add
   .bl-visible.  Keep content readable even when that optional animation
   controller is absent or deferred. */
body.home .bl-reveal {
  opacity: 1 !important;
  transform: none !important;
}

body.home #bl-menu-panel {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.home .bl-menu-panel__items {
  width: 100%;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.home .bl-menu-panel__item {
  min-width: 0;
  min-height: 64px;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  padding: 11px 13px !important;
}

body.home .bl-menu-panel__item small {
  overflow: hidden;
  font-size: 7px;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.home .bl-menu-panel__item strong {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
}

body.home .bl-lab__feature-bot a {
  color: var(--bura-paper);
  text-decoration-color: rgba(216, 173, 99, 0.45);
  text-underline-offset: 0.18em;
}

body.home .bl-lab__feature-bot a:hover { color: var(--bura-gold-soft); }

/* Site-wide content frame. The home page keeps its purpose-built layout. */
body:not(.home) #content {
  margin-top: 0;
  padding: clamp(24px, 4vw, 52px) 0 72px;
}

body:not(.home) #content-in {
  width: min(1240px, calc(100% - 40px));
  max-width: 1240px;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: nowrap !important;
}

body:not(.home) #main {
  min-width: 0;
  width: auto !important;
  max-width: calc(100% - 350px);
  flex: 1 1 0%;
  margin: 0 !important;
  padding: clamp(26px, 3.2vw, 46px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(16, 19, 26, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

body:not(.home) #sidebar {
  width: 320px !important;
  flex: 0 0 320px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.breadcrumb {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent !important;
  font-size: 12px;
}

.sidebar .widget {
  margin: 0 0 20px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(16, 19, 26, 0.92);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
}

.sidebar .widget-title,
.sidebar h2,
.sidebar h3 {
  margin: 0 0 16px;
  padding: 0 0 11px;
  border: 0;
  border-bottom: 1px solid var(--bura-line);
  background: transparent;
  color: var(--bura-paper);
  font-family: var(--bura-serif);
  font-size: 16px;
  letter-spacing: 0.06em;
}

.sidebar .widget-entry-card-wrap,
.sidebar .a-wrap {
  border-radius: 8px;
  color: var(--bura-text-subtle) !important;
}

.sidebar .widget-entry-card-wrap:hover,
.sidebar .a-wrap:hover { background: rgba(216, 173, 99, 0.07); }

.sidebar .search-box,
.sidebar .search-edit {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: #0a0c11 !important;
  color: var(--bura-text) !important;
}

.main,
.sidebar,
.entry-card-wrap,
.related-entry-card-wrap,
.author-box {
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(14, 14, 12, 0.88);
  box-shadow: var(--bura-shadow);
}

.article {
  color: var(--bura-text);
  line-height: 1.9;
}

/* Cocoon assumes a light canvas in several components. Keep every reading
   surface legible when those defaults appear inside the dark skin. */
body:not(.home) .article p,
body:not(.home) .article li,
body:not(.home) .article dd,
body:not(.home) .article figcaption,
body:not(.home) .article .wp-caption-text,
body:not(.home) .article .caption-text,
body:not(.home) .article .sns-follow-message,
body:not(.home) .article .related-entry-card-snippet,
body:not(.home) .article .author-description,
.sidebar,
.sidebar p,
.sidebar li {
  color: var(--bura-text-subtle);
}

body:not(.home) .article strong,
body:not(.home) .article b,
body:not(.home) .article dt,
body:not(.home) .article label,
body:not(.home) .article legend,
.sidebar strong,
.sidebar b { color: var(--bura-text); }

body:not(.home) .article a:not(.sns-button):not(.btn):not(.key-btn):not(.a-wrap),
.sidebar a:not(.sns-button):not(.btn):not(.a-wrap),
.breadcrumb a {
  color: var(--bura-link);
  text-decoration-color: rgba(239, 201, 121, 0.42);
  text-underline-offset: 0.18em;
}

body:not(.home) .article a:not(.sns-button):not(.btn):not(.key-btn):not(.a-wrap):hover,
.sidebar a:not(.sns-button):not(.btn):not(.a-wrap):hover,
.breadcrumb a:hover { color: var(--bura-link-hover); }

.entry-title {
  margin-bottom: 26px;
  color: var(--bura-paper);
  font-family: var(--bura-serif);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.025em;
}

/* Cocoon's former no-title setting left single articles without a visible H1. */
body.single-post .entry-title { display: block !important; }

body:not(.home) .entry-title,
body:not(.home) .list-title {
  font-size: clamp(28px, 3.2vw, 46px);
  text-wrap: balance;
}

body.archive .list-title,
body.search .list-title {
  margin: 0 0 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bura-line-strong);
  color: var(--bura-paper);
  font-family: var(--bura-serif);
  letter-spacing: 0.04em;
}

.article h2 {
  margin-top: 3.2em;
  padding: 18px 20px;
  border: 0;
  border-left: 3px solid var(--bura-gold);
  background: linear-gradient(90deg, rgba(216, 173, 99, 0.13), rgba(216, 173, 99, 0.02));
  color: var(--bura-paper);
  font-family: var(--bura-serif);
}

.article h3 {
  margin-top: 2.5em;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid var(--bura-line-strong);
  background: transparent;
  color: var(--bura-paper);
}

.article h4 { color: var(--bura-gold-soft); }

.eye-catch-wrap {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #050505;
  border-radius: 10px;
}

.eye-catch img { width: 100%; }

.entry-card-wrap {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}

.entry-card-wrap:hover {
  border-color: var(--bura-line-strong);
  transform: translateY(-2px);
}

body.archive .entry-card-wrap,
body.search .entry-card-wrap,
body.blog .entry-card-wrap {
  margin-bottom: 18px;
  padding: 0 !important;
  background: var(--bura-surface);
  box-shadow: none;
}

body.archive .entry-card,
body.search .entry-card,
body.blog .entry-card {
  min-height: 190px;
  display: grid;
  grid-template-columns: minmax(230px, 38%) minmax(0, 1fr);
  align-items: stretch;
}

body.archive .entry-card-thumb,
body.search .entry-card-thumb,
body.blog .entry-card-thumb {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  overflow: hidden;
  border-radius: 11px 0 0 11px;
  background: #080a0f;
}

body.archive .entry-card-thumb img,
body.search .entry-card-thumb img,
body.blog .entry-card-thumb img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
}

body.archive .entry-card-content,
body.search .entry-card-content,
body.blog .entry-card-content {
  margin: 0 !important;
  padding: 22px 24px;
}

.entry-card-title {
  color: var(--bura-paper) !important;
  font-family: var(--bura-serif);
  line-height: 1.5;
}

.entry-card-snippet {
  margin-top: 10px;
  color: var(--bura-text-subtle) !important;
  line-height: 1.75;
}

.entry-card-meta,
.entry-card-info { color: var(--bura-muted) !important; }

.cat-label {
  border: 1px solid rgba(216, 173, 99, 0.38) !important;
  background: rgba(9, 11, 16, 0.9) !important;
  color: var(--bura-gold-soft) !important;
}

.a-wrap,
.entry-card-wrap a,
.related-entry-card-wrap,
.related-entry-card-wrap a,
.prev-post,
.prev-post a,
.next-post,
.next-post a,
.comment-btn,
.comment-btn:hover {
  color: var(--bura-text) !important;
}

.related-entry-card-title,
.prev-post-title,
.next-post-title,
.comment-btn { color: var(--bura-text) !important; }

.related-entry-card-snippet,
.prev-post .post-date,
.next-post .post-date { color: var(--bura-muted) !important; }

.bura-deferred-embed {
  margin: 28px 0;
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bura-line-strong);
  background:
    radial-gradient(circle at 80% 20%, rgba(88, 101, 242, 0.25), transparent 45%),
    #0d0d11;
}

.bura-embed-load {
  width: min(420px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 8, 12, 0.86);
  color: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.bura-embed-load strong,
.bura-embed-load span { display: block; }
.bura-embed-load strong { margin: 7px 0; font-size: 20px; }
.bura-embed-load span:last-child { color: var(--bura-muted); font-size: 13px; }
.bura-embed-kicker { color: #aeb7ff; font-size: 11px; letter-spacing: 0.16em; }
.bura-discord-frame { width: 100%; min-height: 500px; border: 0; }

.entry-card-title { color: var(--bura-paper); }
.entry-card-snippet { color: var(--bura-muted); }

.breadcrumb,
.date-tags,
.post-date,
.post-update { color: var(--bura-muted); }

.toc {
  border: 1px solid var(--bura-line);
  background: #0b0d14 !important;
  color: var(--bura-text-subtle);
}

.toc-title { color: var(--bura-gold-soft); }

.toc a,
.toc a:visited {
  color: var(--bura-text-subtle) !important;
  text-decoration: none !important;
}

.toc a:hover,
.toc a:focus-visible { color: var(--bura-link-hover) !important; }

.tag-link,
.tag-link:visited,
.cat-link,
.cat-link:visited {
  border-color: var(--bura-line-strong) !important;
  background: rgba(216, 173, 99, 0.07) !important;
  color: var(--bura-text-subtle) !important;
}

.tag-link:hover,
.cat-link:hover {
  border-color: var(--bura-gold) !important;
  color: var(--bura-link-hover) !important;
}

blockquote {
  border-left: 3px solid var(--bura-gold);
  background: rgba(216, 173, 99, 0.07);
  color: var(--bura-text-subtle);
}

.speech-balloon,
.information-box,
.question-box,
.alert-box,
.memo-box,
.comment-box,
.common-icon-box,
.blank-box,
.tab-caption-box,
.label-box,
.caption-box,
.blogcard,
.internal-blogcard,
.external-blogcard,
.blogcard-wrap,
.internal-blogcard-wrap,
.external-blogcard-wrap {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: var(--bura-surface-2) !important;
  color: var(--bura-text-subtle) !important;
}

.speech-balloon::before,
.speech-balloon::after { border-right-color: var(--bura-surface-2) !important; }

.sbp-r .speech-balloon::before,
.sbp-r .speech-balloon::after {
  border-right-color: transparent !important;
  border-left-color: var(--bura-surface-2) !important;
}

.wp-block-table,
.article figure.wp-block-table,
.article table,
.article thead,
.article tbody,
.article tfoot,
.article tr {
  background: transparent !important;
  color: var(--bura-text-subtle) !important;
}

.article table,
.article th,
.article td {
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--bura-text-subtle);
}

.article th { background: #211c14 !important; color: var(--bura-text) !important; }
.article td { background: #10100e !important; }
.article tr:nth-child(even) td { background: #15130f !important; }

.article pre,
.article code,
.article .wp-block-code,
.article .wp-block-preformatted {
  border-color: rgba(255, 255, 255, 0.12);
  background: #090b10;
  color: #d8e7ee;
}

.article hr { border-color: var(--bura-line); }

input:not([type="submit"]):not([type="button"]):not([type="reset"]),
textarea,
select {
  border-color: rgba(255, 255, 255, 0.18) !important;
  background-color: #0b0c0d !important;
  color: var(--bura-text) !important;
}

input::placeholder,
textarea::placeholder { color: #918d85 !important; opacity: 1; }

input[type="submit"],
.submit,
.form-submit input,
.search-submit {
  border: 1px solid var(--bura-line-strong) !important;
  background: var(--bura-gold) !important;
  color: #111 !important;
  font-weight: 800;
}

.pager-post-navi,
.pagination { margin-top: 34px; }

.page-numbers,
.pagination-next-link {
  border-radius: 8px;
}

.page-numbers.dots {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--bura-muted) !important;
}

.author-box {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--bura-surface);
}

.pagination-next-link,
.page-numbers,
.btn,
.ranking-item-link-buttons a,
.comment-btn,
.key-btn {
  border-color: var(--bura-line-strong);
  background: #12110f;
  color: var(--bura-text) !important;
}

.pagination-next-link:hover,
.page-numbers.current,
.page-numbers:hover,
.btn:hover,
.comment-btn:hover,
.key-btn:hover {
  background: var(--bura-gold);
  color: #111 !important;
}

/* Ultimate Member: visual overrides only; forms, roles and sessions remain plugin-owned. */
.um,
.um-page-account,
.um-page-user {
  color: var(--bura-paper) !important;
}

.um .um-form,
.um-account-main,
.um-account-side,
.um-profile-body {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 13, 12, 0.92);
  box-shadow: var(--bura-shadow);
}

.um .um-field-label label,
.um-account-heading,
.um-profile-name a { color: var(--bura-paper) !important; }

.um a,
.um a:visited,
.um .um-link-alt,
.um .um-field-checkbox-option,
.um .um-field-radio-option {
  color: var(--bura-link) !important;
}

.um a:hover,
.um .um-link-alt:hover { color: var(--bura-link-hover) !important; }

.um .um-field-error,
.um .um-notice.err {
  background: #7d2b35 !important;
  color: #fff4f4 !important;
}

.um input[type="text"],
.um input[type="password"],
.um input[type="email"],
.um textarea,
.um select {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: #0b0b0a !important;
  color: var(--bura-paper) !important;
}

.um input[type="submit"],
.um .um-button {
  border-radius: 0 !important;
  background: var(--bura-gold) !important;
  color: #111 !important;
  font-weight: 800 !important;
}

.um-account-side li a.current,
.um-account-side li a:hover { color: var(--bura-gold-soft) !important; }

#footer,
.footer-bottom {
  border-top: 1px solid var(--bura-line);
  background: #080807;
}

/* Cocoon's logged-in PV/edit panel is fixed over the page and obscures UI
   checks; the WordPress admin bar already provides the same edit access. */
body.logged-in #admin-panel { display: none !important; }
body.logged-in.home .bl-site-header { top: 32px !important; }

@media (min-width: 768px) {
  #bura-hamburger { display: flex !important; }
  #bura-wilds { display: none !important; }
  #bura-wilds.active { display: grid !important; }

  body.home .bl-menu-button,
  body.home .bl-language-link { display: none !important; }

  body.home .bl-hero {
    height: auto !important;
    min-height: clamp(540px, 68svh, 620px) !important;
  }

  .bl-hero-title-main { white-space: normal; }
}

@media (max-width: 1023px) {
  .main,
  .sidebar { box-shadow: none; }

  #content { margin-top: 12px; }

  body:not(.home) #content-in {
    width: min(860px, calc(100% - 32px));
    display: block;
    flex-wrap: wrap !important;
  }

  body:not(.home) #sidebar {
    width: 100% !important;
    margin-top: 28px !important;
  }

  .sidebar .widget { box-shadow: none; }

  /* Cocoon keeps this fixed navigation through the tablet breakpoint. */
  html body ul.mobile-footer-menu-buttons.mobile-menu-buttons {
    min-height: 61px;
    border-top: 1px solid var(--bura-line-strong) !important;
    background-color: #0a0d13 !important;
    background-image: none !important;
    color: var(--bura-text) !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.42) !important;
    z-index: 1000 !important;
  }

  .mobile-footer-menu-buttons .menu-button,
  .mobile-footer-menu-buttons .menu-button-in,
  .mobile-footer-menu-buttons .menu-icon,
  .mobile-footer-menu-buttons .menu-caption {
    background-color: transparent !important;
    color: var(--bura-text) !important;
  }

  .mobile-footer-menu-buttons .menu-icon { color: var(--bura-gold-soft) !important; }

  .mobile-footer-menu-buttons .menu-caption {
    color: var(--bura-paper) !important;
    opacity: 0.82;
  }

  .mobile-footer-menu-buttons .logo-menu-button .menu-button-in {
    overflow: hidden;
    border: 1px solid rgba(216, 173, 99, 0.38) !important;
    border-radius: 50%;
    background: #141922 !important;
  }

  .mobile-footer-menu-buttons .site-logo-image { border-radius: 50%; }

  body.mobile-button-fmb { padding-bottom: 68px !important; }

  body.logged-in #admin-panel { display: none !important; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  body.logged-in.home .bl-site-header { top: 64px !important; }
  body.home .bl-hero { padding: 96px 0 64px !important; }
  body.logged-in.home .bl-hero { padding-top: 140px !important; }
  body.home .bl-hero__inner {
    margin-top: 0 !important;
    gap: 34px !important;
  }
  body.home .bl-signature { display: none !important; }
}

@media (max-width: 767px) {
  html.burasut-global-header body #header-container #navi { display: none !important; }

  body.home #header,
  body.home #header-in {
    min-height: 58px !important;
    height: 58px !important;
  }

  body.home #header-in { padding: 0 16px; }
  body.home #header .site-name-text::before { font-size: 14px; }

  #bura-hamburger {
    right: 14px !important;
    border: 1px solid var(--bura-line-strong) !important;
    background: #11151d !important;
    color: var(--bura-paper) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34) !important;
  }

  #bura-hamburger span {
    background-image: linear-gradient(90deg, #fff, var(--bura-gold)) !important;
  }

  #bura-wilds.active {
    padding: 72px 12px 86px;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  #bura-wilds .wilds-menu {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #bura-wilds .wilds-link {
    min-height: 76px;
    padding: 13px 12px;
  }

  #bura-wilds .wilds-link .en { font-size: 8px; }
  #bura-wilds .wilds-link .jp { margin-top: 6px; font-size: 12px; }
  #bura-wilds .wilds-logo { display: none; }

  #header-container { min-height: 58px; }

  .bura-site-brand {
    left: 16px;
    min-height: 58px;
    font-size: 13px;
    letter-spacing: 0.13em;
  }

  .bura-site-brand small { display: none; }

  #navi .navi-in {
    width: 100%;
    min-height: 58px;
    padding-left: 0;
    padding-right: 0;
  }

  .bura-language-switch {
    top: 8px;
    right: 66px;
    width: 42px;
    height: 42px;
  }

  body:not(.home) #content {
    padding: 16px 0 54px;
  }

  body:not(.home) #content-in {
    width: calc(100% - 24px);
  }

  body:not(.home) #main {
    max-width: none;
    padding: 22px 18px !important;
    border-radius: 11px;
  }

  .entry-title { font-size: clamp(25px, 8vw, 36px); }

  .article h2 {
    margin-top: 2.5em;
    padding: 15px 16px;
  }

  .um .um-form,
  .um-account-main,
  .um-account-side,
  .um-profile-body { padding: 16px; }

  .bura-deferred-embed { min-height: 180px; }

  body.archive .entry-card,
  body.search .entry-card,
  body.blog .entry-card {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  body.archive .entry-card-thumb,
  body.search .entry-card-thumb,
  body.blog .entry-card-thumb {
    aspect-ratio: 16 / 9;
    border-radius: 10px 10px 0 0;
  }

  body.archive .entry-card-thumb img,
  body.search .entry-card-thumb img,
  body.blog .entry-card-thumb img { min-height: 0; }

  body.archive .entry-card-content,
  body.search .entry-card-content,
  body.blog .entry-card-content { padding: 18px; }

  .entry-card-snippet {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .sidebar .widget { padding: 18px; }

  body.home .bl-hero h1 {
    max-width: 10em;
    font-size: clamp(34px, 10.5vw, 46px) !important;
    line-height: 1.18 !important;
  }

  .bl-hero-title-sub {
    margin-top: 0.55em;
    font-size: 0.42em;
    letter-spacing: 0.05em;
  }

  body.home .bl-account-link {
    height: 38px !important;
    min-width: 64px;
    padding: 0 10px !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  body.logged-in.home .bl-site-header { top: 46px !important; }

  body.logged-in.home .bl-drawer {
    top: 46px !important;
    height: calc(100dvh - 46px) !important;
  }

  body.admin-bar #bura-hamburger { top: 51px !important; }

  body.admin-bar .bura-language-switch { top: 8px; }

  body.admin-bar #bura-wilds {
    top: 46px !important;
    bottom: auto;
    height: calc(100dvh - 46px) !important;
    min-height: calc(100dvh - 46px) !important;
  }
}

@media (max-width: 359px) {
  body.home .bl-brand { gap: 7px !important; }
  body.home .bl-brand__name {
    font-size: 12px !important;
    letter-spacing: 0.11em !important;
  }
  body.home .bl-header-actions { gap: 6px !important; }
  body.home .bl-account-link {
    min-width: 58px;
    padding-inline: 7px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
