/* Shared Coral Bright header, mobile navigation, and footer. */
html[data-palette="coral-bright"] {
  --brand: #E46560;
  --action: #9D3E44;
  --ink: #332628;
  --muted: #6E6061;
  --white: #FFFFFF;
  --surface: #FFF6F5;
  --surface-deep: #FBE7E5;
  --border: #A48A88;
  --border-soft: #E8D6D3;
  --accent: #F2C84B;
  --uchineko-motif-opacity-section: .13;
  --uchineko-motif-opacity-hero: .045;
  --uchineko-motif-opacity-callout: .065;
}

/* Formal identity and non-identity decoration share approved geometry, but
   never share presentation semantics. */
[data-uchineko-logo-role="identity"] {
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  object-fit: contain;
}

[data-uchineko-logo-role="decorative"] {
  filter: none !important;
  mix-blend-mode: normal !important;
  pointer-events: none;
  user-select: none;
}

[data-uchineko-motif="section-watermark"] {
  opacity: var(--uchineko-motif-opacity-section, .13) !important;
}

[data-uchineko-motif="hero-watermark"] {
  opacity: var(--uchineko-motif-opacity-hero, .045) !important;
}

[data-uchineko-motif="callout-watermark"] {
  opacity: var(--uchineko-motif-opacity-callout, .065) !important;
}

[data-uchineko-motif="empty-state"] {
  opacity: 1 !important;
}

[data-uchineko-motif-host] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

[data-uchineko-motif-host] > [data-uchineko-logo-role="decorative"] {
  position: absolute;
  z-index: 0;
}

[data-uchineko-motif-content] {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-transparency: reduce) {
  [data-uchineko-logo-role="decorative"] { visibility: hidden; }
}

.site-header {
  height: 88px;
  padding: 0 max(30px, calc((100vw - var(--max)) / 2));
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 36px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--white);
}

.site-header .brand {
  width: 340px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-header .brand-symbol {
  width: 82px;
  height: 35px;
  flex: none;
  display: block;
  object-fit: contain;
  filter: none;
  opacity: 1;
  mix-blend-mode: normal;
}

.site-header .brand-wordmark {
  width: 242px;
  height: auto;
  filter: none;
  opacity: 1;
  mix-blend-mode: normal;
}
.site-header > nav { margin-left: auto; display: flex; gap: 30px; font-size: 12px; font-weight: 700; }
.site-header > nav a,
.site-header .header-search { position: relative; text-decoration: none; }
.site-header > nav a::after {
  content: "";
  height: 2px;
  position: absolute;
  right: 100%;
  bottom: -8px;
  left: 0;
  background: var(--brand);
  transition: right .2s ease;
}
.site-header > nav a:hover::after,
.site-header > nav a:focus-visible::after { right: 0; }
.site-header .header-search {
  min-height: 44px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.site-header .header-search[aria-current="page"] { border-color: var(--action); color: var(--action); }
.site-header .header-search span,
.mobile-nav__search span {
  width: 14px;
  height: 14px;
  position: relative;
  border: 1.6px solid var(--ink);
  border-radius: 50%;
}
.site-header .header-search span::after,
.mobile-nav__search span::after {
  content: "";
  width: 6px;
  height: 1.6px;
  position: absolute;
  right: -5px;
  bottom: -2px;
  background: var(--ink);
  transform: rotate(45deg);
}
.site-header .menu { display: none; }

.mobile-nav:not([open]) { display: none; }
.mobile-nav {
  width: min(380px, calc(100vw - 28px));
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 26px;
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 1000;
  overflow-y: auto;
  border: 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: -18px 0 48px color-mix(in srgb, var(--ink) 16%, transparent);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav[open] { display: flex; flex-direction: column; }
.mobile-nav::backdrop { background: color-mix(in srgb, var(--ink) 40%, transparent); backdrop-filter: blur(2px); }
.mobile-nav__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mobile-nav__head p { margin: 0; color: var(--action); font-size: 12px; font-weight: 900; letter-spacing: .14em; }
.mobile-nav__close {
  min-width: 76px;
  min-height: 44px;
  padding: 0 9px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.mobile-nav__close span { margin-left: 5px; color: var(--brand); font-size: 18px; }
.mobile-nav nav { margin: 28px 0 24px; display: flex; flex-direction: column; gap: 0; font-size: 16px; font-weight: 700; }
.mobile-nav nav a { min-height: 44px; padding: 17px 0; border-bottom: 1px solid var(--border-soft); text-decoration: none; }
.mobile-nav__search {
  min-height: 52px;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--action);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}
.mobile-nav :is(a, button):focus-visible { outline-color: var(--action); }
html.mobile-nav-open,
body.mobile-nav-open { overflow: hidden; overscroll-behavior: none; }

.uchineko-site-footer {
  --bright-footer-gutter: max(30px, calc((100vw - var(--max)) / 2));
  padding: 72px var(--bright-footer-gutter) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(480px, .85fr);
  gap: 54px;
  border-top: 7px solid var(--brand);
  background: var(--surface-deep);
  color: var(--ink);
}
.uchineko-site-footer .footer-brand { position: relative; }
.uchineko-site-footer .footer-brand__lockup {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}
.uchineko-site-footer .footer-brand__lockup:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 6px;
}
.uchineko-site-footer .footer-symbol {
  width: 76px;
  height: 32px;
  flex: none;
  filter: none;
  opacity: 1;
  mix-blend-mode: normal;
}
.uchineko-site-footer .footer-brand__lockup img:not(.footer-symbol) {
  width: 310px;
  max-width: calc(100% - 92px);
  filter: none;
  opacity: 1;
  mix-blend-mode: normal;
}
.uchineko-site-footer .footer-brand p { margin: 16px 0 0; color: var(--muted); font-size: 11px; }
.uchineko-site-footer .footer-nav {
  width: min(100%, 540px);
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}
.uchineko-site-footer .footer-nav > div { display: flex; flex-direction: column; gap: 2px; }
.uchineko-site-footer .footer-nav b { margin-bottom: 4px; color: var(--action); font-size: 10px; letter-spacing: .1em; }
.uchineko-site-footer .footer-nav p { margin: 0 0 4px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.uchineko-site-footer .footer-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.uchineko-site-footer .copyright {
  grid-column: 1 / -1;
  margin: 10px calc(0px - var(--bright-footer-gutter)) 0;
  padding: 18px var(--bright-footer-gutter) 20px;
  display: flex;
  gap: 24px;
  border: 0;
  background: var(--action);
  color: rgba(255, 255, 255, .82);
  font-size: 8px;
  letter-spacing: .09em;
}

@media (max-width: 900px) {
  .site-header { height: 76px; padding: 0 17px; gap: 10px; }
  .site-header .brand { width: 276px; gap: 9px; }
  .site-header .brand-symbol { width: 68px; height: 29px; }
  .site-header .brand-wordmark { width: 196px; }
  .site-header > nav,
  .site-header .header-search { display: none; }
  .site-header .menu {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin-left: auto;
    padding: 7px;
    display: block;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .site-header .menu i { width: 22px; height: 1px; margin: 6px auto; display: block; background: var(--ink); }
  .uchineko-site-footer { padding: 58px 24px 0; display: block; }
  .uchineko-site-footer .footer-brand__lockup { gap: 12px; }
  .uchineko-site-footer .footer-symbol { width: 66px; height: 29px; }
  .uchineko-site-footer .footer-brand__lockup img:not(.footer-symbol) { width: min(270px, calc(100% - 78px)); }
  .uchineko-site-footer .footer-nav { width: 100%; margin: 38px 0 0; }
  .uchineko-site-footer .copyright {
    --bright-footer-gutter: 24px;
    margin-top: 24px;
    flex-wrap: wrap;
  }
}

@media (max-width: 390px) {
  .site-header .brand { width: min(256px, calc(100vw - 78px)); }
  .site-header .brand-symbol { width: 58px; }
  .site-header .brand-wordmark { width: min(188px, calc(100vw - 148px)); }
  .uchineko-site-footer .footer-nav { grid-template-columns: 1fr; gap: 28px; }
}

@media (min-width: 901px) {
  .mobile-nav { display: none !important; }
}
