:root {
  color-scheme: light;
  --yh-hero-image: url("/images/akane-halloween-2025.jpg");
  --yh-blue-900: #14254e;
  --yh-blue-700: #285ecb;
  --yh-blue-500: #40a7ff;
  --yh-blue-300: #87d4ff;
  --yh-yellow-500: #f8d35a;
  --yh-yellow-300: #fff0a4;
  --yh-paper: #ffffff;
  --yh-sky: #edf7ff;
  --yh-line: rgba(30, 141, 245, 0.18);
  --yh-veil: rgba(247, 251, 255, 0.88);
  --yh-veil-strong: rgba(255, 255, 255, 0.94);

  --red-0: var(--yh-blue-700);
  --red-1: var(--yh-blue-500);
  --red-2: var(--yh-blue-300);
  --red-3: var(--yh-yellow-500);
  --red-4: var(--yh-yellow-300);
  --red-5: #eaf7ff;
  --red-5-5: #f7fbff;
  --red-6: #ffffff;
  --color-red-6-shadow: rgba(30, 141, 245, 0.18);
  --color-red-3-shadow: rgba(244, 202, 61, 0.28);

  --grey-7: #33516f;
  --grey-9: #6f8195;
  --color-default: #20364f;
  --color-border: rgba(30, 141, 245, 0.28);
  --color-link: var(--yh-blue-700);
  --color-background: var(--yh-sky);
  --color-header-background: rgba(255, 255, 255, 0.86);
  --color-footer-background: rgba(255, 255, 255, 0.96);
  --color-mobile-nav-background: rgba(255, 255, 255, 0.96);
  --color-wrap: rgba(255, 255, 255, 0.94);
  --color-sticky: #fffef5;
  --color-h2-border: rgba(30, 141, 245, 0.14);
  --color-meta-shadow: rgba(30, 141, 245, 0.12);
  --color-hover-shadow: rgba(23, 109, 204, 0.14);
  --color-h2-after: var(--yh-yellow-500);
  --highlight-selection: rgba(255, 229, 138, 0.45);
}

[data-theme='dark'] {
  color-scheme: light;
  --red-0: #176dcc;
  --red-1: #1e8df5;
  --red-2: #67c2ff;
  --red-3: #f4ca3d;
  --red-4: #ffe58a;
  --red-5: #eaf7ff;
  --red-5-5: #f7fbff;
  --red-6: #ffffff;
  --color-background: var(--yh-sky);
  --color-header-background: rgba(255, 255, 255, 0.88);
  --color-footer-background: rgba(255, 255, 255, 0.96);
  --color-mobile-nav-background: rgba(255, 255, 255, 0.96);
  --color-wrap: rgba(255, 255, 255, 0.94);
  --color-default: #20364f;
}

html {
  background: var(--yh-sky);
}

body {
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--yh-blue-300) 24%, transparent), transparent 28%),
    radial-gradient(circle at 88% 24%, color-mix(in srgb, var(--yh-yellow-300) 34%, transparent), transparent 22%),
    linear-gradient(180deg, var(--yh-sky) 0%, #ffffff 48%, color-mix(in srgb, var(--yh-yellow-300) 24%, #ffffff) 100%);
  color: var(--color-default);
}

::selection {
  background: var(--highlight-selection);
  color: var(--yh-blue-900);
}

a {
  text-decoration-color: rgba(30, 141, 245, 0.35);
}

#header-nav {
  background: var(--yh-veil);
  border-bottom: 1px solid rgba(30, 141, 245, 0.12);
  box-shadow: 0 8px 28px rgba(23, 109, 204, 0.09);
  backdrop-filter: blur(14px);
}

#header-nav .main-nav-link,
#header-nav .nav-icon,
#header-nav .main-nav-link-wrap {
  color: var(--yh-blue-700);
  opacity: 0.92;
  text-shadow: none;
}

#header-nav .main-nav-link {
  letter-spacing: 0;
}

#header-nav .main-nav-link-wrap:hover,
#header-nav .nav-icon:hover {
  color: var(--yh-blue-500);
}

.main-nav-icon {
  padding: 13px 6px;
}

.main-nav-icon img,
.sidebar-menu-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 3px 7px rgba(30, 141, 245, 0.24));
  transition: transform 0.28s ease, filter 0.28s ease;
}

.main-nav-link-wrap:hover .main-nav-icon img,
.sidebar-menu-link-wrap:hover .sidebar-menu-icon img {
  filter: drop-shadow(0 5px 10px rgba(244, 202, 61, 0.32));
  transform: rotate(-8deg) scale(1.08);
}

.icon-taichi::before,
.icon-taichi:before {
  content: "" !important;
  display: inline-block;
  width: 1em;
  height: 1em;
  background: url("/images/yh-sunwave.svg") no-repeat center / contain;
  vertical-align: -0.12em;
  filter: drop-shadow(0 3px 7px rgba(30, 141, 245, 0.24));
}

#header {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.80) 0%, rgba(231, 247, 255, 0.56) 46%, rgba(255, 241, 181, 0.28) 100%),
    radial-gradient(circle at 76% 22%, color-mix(in srgb, var(--yh-yellow-300) 38%, transparent), transparent 26%),
    var(--yh-hero-image) center 42% / cover no-repeat;
  overflow: hidden;
}

#header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.80) 0%, rgba(231, 247, 255, 0.52) 48%, rgba(255, 238, 160, 0.30) 100%),
    radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--yh-yellow-300) 42%, transparent), transparent 24%);
}

#header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--color-background));
}

#header img {
  filter: saturate(1.05) brightness(1.06);
  object-position: center 42%;
  opacity: 0;
}

#header-title h1,
#subtitle {
  color: var(--yh-blue-900);
  letter-spacing: 0;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.58),
    0 8px 22px rgba(255, 255, 255, 0.88),
    0 2px 14px color-mix(in srgb, var(--yh-blue-900) 24%, transparent);
}

#subtitle {
  color: var(--yh-blue-900);
  font-weight: 700;
}

#main,
#content {
  color: var(--color-default);
}

.article,
.article-card,
.article-inner,
.archive-article,
.archive,
.archive-wrap,
.category-list,
.tag-list,
.tagcloud,
.widget-wrap,
.post-list,
.post-categories,
.post-categories-cover,
.post-categories-cover::after,
.reimu-card {
  background: var(--yh-veil-strong);
  border: 1px solid rgba(30, 141, 245, 0.1);
  box-shadow: 0 14px 34px rgba(23, 109, 204, 0.08);
  backdrop-filter: blur(10px);
}

.article:hover,
.article-card:hover,
.archive-article:hover,
.widget-wrap:hover {
  box-shadow: 0 18px 42px rgba(23, 109, 204, 0.13);
}

.article-entry h1,
.article-entry h2,
.article-entry h3,
.article-entry h4,
.article-entry strong,
.article-title,
.archive-article-title,
.archive-title,
.archive-year,
.archive-month,
.category-list-link,
.tag-list-link,
.post-categories-title,
.sidebar-author-name {
  color: var(--yh-blue-900);
  letter-spacing: 0;
}

.article-meta,
.article-meta a,
.article-date,
.archive-article-date,
.archive-article-category,
.archive-article-tag,
.sidebar-description {
  color: #65819e;
}

.post-cover img,
.article-gallery img,
.post-categories-cover img,
.post-nav-img img,
.post-link-card-cover-wrap img {
  filter: saturate(1.02) brightness(1.04);
  object-position: center 42%;
}

.post-cover::after,
.post-cover:after,
.post-categories-cover::after,
.post-categories-cover:after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), color-mix(in srgb, var(--yh-sky) 74%, transparent)),
    radial-gradient(circle at 28% 28%, color-mix(in srgb, var(--yh-yellow-300) 28%, transparent), transparent 24%);
}

.article-entry blockquote,
.article-copyright,
.note,
.post-link-card {
  background: var(--yh-veil-strong);
  border-color: rgba(30, 141, 245, 0.22);
}

.link-active {
  background: linear-gradient(135deg, var(--yh-blue-700), var(--yh-blue-300) 58%, var(--yh-yellow-500));
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 28px rgba(30, 141, 245, 0.18);
}

.link-active .sidebar-menu-link,
.link-active .sidebar-menu-icon {
  color: #fff;
}

.sidebar-toc-wrapper li::before,
.article-entry h2::after {
  background: var(--yh-yellow-500);
}

.footer-line {
  background: linear-gradient(to left, var(--yh-yellow-500) 50%, transparent 0%) repeat-x 0 0 / 100px 10px;
  filter: drop-shadow(0 0 5px rgba(244, 202, 61, 0.35));
}

.footer-info-sep,
.sidebar-top-taichi {
  filter: drop-shadow(0 4px 9px rgba(30, 141, 245, 0.18));
}

.footer-info-sep {
  min-height: 24px;
}

.sidebar-top {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(30, 141, 245, 0.14);
  box-shadow: 0 12px 32px rgba(23, 109, 204, 0.16);
}

.sidebar-top .arrow-up::before {
  color: var(--yh-blue-700);
}

#loader .loading-bg {
  background: rgba(247, 251, 255, 0.94);
  backdrop-filter: blur(8px);
  transition-duration: 1.2s;
}

#loader .loading-left-bg {
  background:
    linear-gradient(135deg, rgba(160, 218, 255, 0.76), rgba(247, 252, 255, 0.96));
}

#loader .loading-right-bg {
  background:
    linear-gradient(225deg, rgba(255, 232, 145, 0.70), rgba(255, 255, 255, 0.96));
}

#loader .spinner-box {
  transition-duration: 0.75s;
}

#loader .spinner-box .loading-taichi {
  opacity: 0.86;
}

#loader .spinner-box .loading-taichi.rotate {
  animation: yh-logo-breathe 2.2s ease-in-out infinite;
}

#loader .spinner-box .loading-taichi img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px rgba(30, 141, 245, 0.12));
}

#loader .spinner-box .loading-word {
  color: var(--yh-blue-700);
  letter-spacing: 0;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.92);
}

html.yh-skip-theme-loader body {
  overflow: auto !important;
}

html.yh-skip-theme-loader #loader {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html.yh-transition-carry #container,
html.yh-transition-carry #copy-tooltip,
html.yh-transition-carry #heatmap-tooltip {
  opacity: 0;
}

html.yh-transition-carry .yh-wipe-stage {
  opacity: 1;
  visibility: visible;
}

html.yh-transition-carry.yh-wipe-left .yh-wipe-stage,
html.yh-transition-carry.yh-wipe-right .yh-wipe-stage {
  inset: 0;
  width: 100vw;
  height: 100vh;
  transform: none;
}

html.yh-transition-carry.yh-wipe-left .yh-wipe-stage,
.yh-wipe-stage.from-left {
  --wipe-panel-width: 190vw;
  --wipe-enter: calc(-1 * var(--wipe-panel-width, 190vw));
  --wipe-covered-start: calc(100vw - var(--wipe-panel-width, 190vw));
  --wipe-covered-end: 0vw;
  --wipe-exit: 100vw;
}

html.yh-transition-carry.yh-wipe-right .yh-wipe-stage,
.yh-wipe-stage.from-right {
  --wipe-panel-width: 190vw;
  --wipe-enter: 100vw;
  --wipe-covered-start: 0vw;
  --wipe-covered-end: calc(100vw - var(--wipe-panel-width, 190vw));
  --wipe-exit: calc(-1 * var(--wipe-panel-width, 190vw));
}

html.yh-transition-carry.yh-wipe-left .yh-wipe-layer,
html.yh-transition-carry.yh-wipe-right .yh-wipe-layer {
  transform: translate3d(0, 0, 0);
}

.yh-transition-stage {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  overflow: visible;
  contain: none;
  opacity: 0;
  visibility: hidden;
}

.yh-transition-stage.is-active {
  opacity: 1;
  visibility: visible;
}

.yh-wipe-stage {
  background: transparent;
}

.yh-page-hold {
  position: fixed;
  inset: 0;
  z-index: 2147482990;
  overflow: hidden;
  pointer-events: none;
  background: #fff;
  contain: layout paint;
}

.yh-page-hold > * {
  width: 100%;
}

.yh-wipe-layer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--wipe-panel-width, 145vw);
  height: 100%;
  transform: translate3d(0, 0, 0);
  animation-duration: var(--wipe-duration, 2100ms);
  animation-fill-mode: both;
  will-change: transform;
  backface-visibility: hidden;
  background-color: var(--wipe-panel-color, #0092dd);
  background-image: var(--wipe-image, none);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: var(--wipe-focus, center);
}

.yh-wipe-layer:nth-child(1) {
  z-index: 1;
  --wipe-panel-color: #0092dd;
}

.yh-wipe-layer:nth-child(2) {
  z-index: 2;
  --wipe-panel-color: #ffffff;
}

.yh-wipe-layer:nth-child(3) {
  z-index: 3;
  --wipe-panel-color: #3e3a35;
}

.yh-wipe-stage.from-left,
.yh-wipe-stage.from-right {
  inset: 0;
  width: 100vw;
  height: 100vh;
  transform: none;
}

.yh-wipe-stage.is-passing .yh-wipe-layer {
  animation-delay: calc(0ms - var(--wipe-offset, 0ms));
}

.yh-wipe-stage.is-passing .yh-wipe-layer:nth-child(1) {
  animation-name: yh-wipe-swoosh-1;
  animation-timing-function: cubic-bezier(0.62, 0.02, 0.42, 1);
}

.yh-wipe-stage.is-passing .yh-wipe-layer:nth-child(2) {
  animation-name: yh-wipe-swoosh-2;
  animation-timing-function: cubic-bezier(0.62, 0.02, 0.42, 1);
}

.yh-wipe-stage.is-passing .yh-wipe-layer:nth-child(3) {
  animation-name: yh-wipe-swoosh-3;
  animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
}

.yh-update-notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1300;
  padding: 12px 16px;
  border: 1px solid rgba(30, 141, 245, 0.22);
  border-left: 4px solid var(--yh-yellow-500);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--yh-blue-900);
  box-shadow: 0 16px 34px rgba(23, 109, 204, 0.16);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.24s ease, transform 0.24s ease;
  backdrop-filter: blur(10px);
}

.yh-update-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes yh-logo-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.035);
  }
}

@keyframes yh-wipe-swoosh-1 {
  0% { transform: translate3d(var(--wipe-enter, 100vw), 0, 0); }
  28% {
    transform: translate3d(var(--wipe-covered-start, 0), 0, 0);
    animation-timing-function: cubic-bezier(0.33, 0.0, 0.23, 1);
  }
  72% {
    transform: translate3d(var(--wipe-covered-end, 0), 0, 0);
    animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  100% { transform: translate3d(var(--wipe-exit, -100vw), 0, 0); }
}

@keyframes yh-wipe-swoosh-2 {
  0%,
  10% { transform: translate3d(var(--wipe-enter, 100vw), 0, 0); }
  34% {
    transform: translate3d(var(--wipe-covered-start, 0), 0, 0);
    animation-timing-function: cubic-bezier(0.33, 0.0, 0.23, 1);
  }
  66% {
    transform: translate3d(var(--wipe-covered-end, 0), 0, 0);
    animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  90%,
  100% { transform: translate3d(var(--wipe-exit, -100vw), 0, 0); }
}

@keyframes yh-wipe-swoosh-3 {
  0%,
  22% {
    transform: translate3d(var(--wipe-enter, 100vw), 0, 0);
    animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
  }
  78%,
  100% { transform: translate3d(var(--wipe-exit, -100vw), 0, 0); }
}

@media screen and (max-width: 767px) {
  #header-nav {
    background: rgba(255, 255, 255, 0.9);
  }

  #loader .spinner-box .loading-taichi img {
    width: 128px;
    height: 128px;
  }

}

@media (prefers-reduced-motion: reduce) {
  #loader .spinner-box .loading-taichi.rotate {
    animation: none;
  }
}
