/*
 * COTOHOGI CODE - Main Stylesheet
 * Synthetic Aesthetics Research Lab
 *
 * @package Kotohogi_Code
 */

/* ==========================================================================
   RESET (destyle.css v4.0.1)
   ========================================================================== */

*,
::before,
::after {
  box-sizing: border-box;
  border-style: solid;
  border-width: 0;
  min-width: 0;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
}

main {
  display: block;
}

p, table, blockquote, address, pre, iframe, form, figure, dl {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

dt {
  font-weight: bold;
}

dd {
  margin-left: 0;
}

hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
  border-top-width: 1px;
  margin: 0;
  clear: both;
  color: inherit;
}

pre {
  font-family: monospace, monospace;
  font-size: inherit;
}

address {
  font-style: inherit;
}

a {
  background-color: transparent;
  text-decoration: none;
  color: inherit;
}

abbr[title] {
  text-decoration: underline dotted;
}

b, strong {
  font-weight: bolder;
}

code, kbd, samp {
  font-family: monospace, monospace;
  font-size: inherit;
}

small {
  font-size: 80%;
}

sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

svg, img, embed, object, iframe {
  vertical-align: bottom;
}

button, input, optgroup, select, textarea {
  -webkit-appearance: none;
  appearance: none;
  vertical-align: middle;
  color: inherit;
  font: inherit;
  background: transparent;
  padding: 0;
  margin: 0;
  border-radius: 0;
  text-align: inherit;
  text-transform: inherit;
}

button, [type='button'], [type='reset'], [type='submit'] {
  cursor: pointer;
}

button:disabled, [type='button']:disabled, [type='reset']:disabled, [type='submit']:disabled {
  cursor: default;
}

:-moz-focusring {
  outline: auto;
}

select:disabled {
  opacity: inherit;
}

option {
  padding: 0;
}

fieldset {
  margin: 0;
  padding: 0;
  min-width: 0;
}

legend {
  padding: 0;
}

progress {
  vertical-align: baseline;
}

textarea {
  overflow: auto;
}

[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
  height: auto;
}

[type='search'] {
  outline-offset: -2px;
}

[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

[type='number'] {
  -moz-appearance: textfield;
}

label[for] {
  cursor: pointer;
}

details {
  display: block;
}

summary {
  display: list-item;
}

[contenteditable]:focus {
  outline: auto;
}

table {
  border-color: inherit;
  border-collapse: collapse;
}

caption {
  text-align: left;
}

td, th {
  vertical-align: top;
  padding: 0;
}

th {
  text-align: left;
  font-weight: bold;
}

/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */

:root {
  /* Palette */
  --c-bg-primary: #0a0a0a;
  --c-bg-secondary: #111111;
  --c-bg-card: #141414;
  --c-text-primary: #e8e8e8;
  --c-text-secondary: #b0b0b0;
  --c-text-muted: #6b6b6b;
  --c-accent: #c5a55a;
  --c-accent-sub: #2a4a6b;
  --c-expert: rgba(42, 74, 107, 0.15);
  --c-danger: #8b2500;
  --c-border: #333333;

  /* Typography */
  --f-serif: 'Cormorant Garamond', 'Shippori Mincho', 'Times New Roman', serif;
  --f-sans: 'DM Sans', 'Noto Sans JP', 'Hiragino Sans', 'Meiryo', sans-serif;
  --f-mono: 'JetBrains Mono', 'Noto Sans JP', 'Hiragino Sans', monospace;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

body {
  background-color: var(--c-bg-primary);
  color: var(--c-text-primary);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.9;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-serif);
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--c-text-primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

.tech-tag {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--c-accent-sub);
  opacity: 0.8;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  border-left: 1px solid var(--c-accent);
  padding-left: 1.5rem;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
}

.archive-desc {
  font-family: var(--f-sans);
  font-size: 14px;
  color: var(--c-text-muted);
  line-height: 1.8;
  max-width: 640px;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--c-border);
}

.archive-desc p {
  margin: 0;
}

.btn {
  display: inline-block;
  border: 1px solid var(--c-border);
  padding: 12px 30px;
  font-family: var(--f-sans);
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-primary);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.placeholder {
  background-color: #1a1a1a;
  border: 1px solid #333;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-family: var(--f-mono);
  font-size: 12px;
  position: relative;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

#header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--f-serif);
  color: var(--c-accent);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 300;
}

.logo img {
  max-height: 40px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 40px;
}

.nav-menu li a,
.nav-link {
  font-family: var(--f-sans);
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-primary);
  transition: color 0.3s ease;
}

.nav-menu li a:hover,
.nav-link:hover,
.nav-menu li.current-menu-item > a,
.nav-menu li.current-menu-ancestor > a,
.nav-menu li.current_page_item > a,
.nav-link.active {
  color: var(--c-accent);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.bar {
  width: 24px;
  height: 1px;
  background-color: var(--c-accent);
}

/* ==========================================================================
   SITE MAIN
   ========================================================================== */

.site-main {
  flex-grow: 1;
}

/* ==========================================================================
   HERO (Front Page)
   ========================================================================== */

#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: #050508;
  border-bottom: 1px solid var(--c-border);
}

.hero__ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 62% 50%, rgba(18, 45, 85, 0.28) 0%, transparent 70%),
    radial-gradient(ellipse 35% 50% at 25% 65%, rgba(12, 30, 55, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 70% 35% at 50% 0%, rgba(10, 22, 45, 0.18) 0%, transparent 50%);
  z-index: 1;
}

.hero__floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(to top, rgba(12, 35, 70, 0.08) 0%, transparent 100%);
  z-index: 1;
}

.hero__rack-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.035;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 58px,
      rgba(100, 160, 220, 0.5) 58px,
      rgba(100, 160, 220, 0.5) 60px
    );
}

.hero__scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(100, 180, 255, 0.12) 20%, rgba(100, 180, 255, 0.25) 50%, rgba(100, 180, 255, 0.12) 80%, transparent 100%);
  z-index: 2;
  animation: scanDown 8s linear infinite;
  box-shadow: 0 0 15px 3px rgba(100, 180, 255, 0.04);
}

@keyframes scanDown {
  0% { top: -2%; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { top: 102%; opacity: 0; }
}

.hero__leds {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero__led {
  position: absolute;
  width: 3px;
  height: 3px;
  animation: ledBlink var(--duration) var(--delay) infinite;
}

.hero__led--blue {
  background: rgba(80, 150, 255, 0.8);
  box-shadow: 0 0 6px rgba(80, 150, 255, 0.4);
}

.hero__led--green {
  background: rgba(80, 220, 120, 0.7);
  box-shadow: 0 0 6px rgba(80, 220, 120, 0.3);
}

.hero__led--amber {
  background: rgba(220, 180, 60, 0.6);
  box-shadow: 0 0 6px rgba(220, 180, 60, 0.3);
}

@keyframes ledBlink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

#heroCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero__character-wrap {
  position: absolute;
  right: 5%;
  bottom: 0;
  z-index: 5;
  height: 92%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.hero__character {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
  filter: brightness(0.62) contrast(0.85) saturate(0.72);
  opacity: 0;
  animation: characterReveal 1.4s 0.3s ease forwards;
}

@keyframes characterReveal {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    filter: brightness(0.25) contrast(0.85) saturate(0.72);
  }
  50% {
    opacity: 0.85;
    filter: brightness(0.50) contrast(0.85) saturate(0.72);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(0.62) contrast(0.85) saturate(0.72);
  }
}

.hero__character-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    linear-gradient(160deg, transparent 20%, rgba(20, 45, 85, 0.14) 50%, transparent 80%),
    linear-gradient(to top, #050508 0%, rgba(5, 5, 8, 0.65) 8%, transparent 25%),
    linear-gradient(to left, transparent 70%, rgba(5, 5, 8, 0.25) 100%),
    rgba(8, 16, 32, 0.12);
}

.hero__content {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 6%;
  max-width: 600px;
}

.hero__tag {
  font-family: var(--f-mono);
  font-size: 11px;
  color: rgba(42, 74, 107, 0.75);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeSlideUp 0.6s 0.5s ease forwards;
}

.hero__tag::before {
  content: '// ';
  color: var(--c-text-muted);
}

.hero__title {
  font-family: var(--f-serif);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--c-text-primary);
  opacity: 0;
  animation: fadeSlideUp 0.8s 0.7s ease forwards;
}

.hero__title span {
  display: block;
  color: var(--c-accent);
}

.hero__subtitle {
  font-family: var(--f-sans);
  font-size: 1rem;
  color: var(--c-text-secondary);
  letter-spacing: 0.04em;
  line-height: 1.8;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeSlideUp 0.8s 0.9s ease forwards;
}

.hero__cta {
  display: flex;
  gap: 14px;
  opacity: 0;
  animation: fadeSlideUp 0.8s 1.1s ease forwards;
}

.hero__cta .btn {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 11px 26px;
  border: 1px solid rgba(51, 51, 51, 0.8);
  color: var(--c-text-muted);
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.hero__cta .btn:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
  background: rgba(197, 165, 90, 0.06);
}

.hero__status {
  position: absolute;
  bottom: 28px;
  left: 6%;
  z-index: 10;
  font-family: var(--f-mono);
  font-size: 10px;
  color: rgba(42, 74, 107, 0.45);
  letter-spacing: 0.08em;
  line-height: 1.8;
  opacity: 0;
  animation: fadeIn 1s 1.8s ease forwards;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   PAGE SECTIONS (General)
   ========================================================================== */

.page-section {
  padding: 100px 0;
  flex-grow: 1;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.page-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   BLOG STYLES
   ========================================================================== */

.blog-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
}

/* Cards */
.article-card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  padding: 0;
  margin-bottom: 40px;
  transition: transform 0.3s ease;
  display: block;
}

.article-card:hover {
  transform: scale(1.02);
}

.article-card:hover .article-title {
  color: var(--c-accent);
}

.article-card__link {
  display: block;
}

.article-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

img.article-img {
  display: block;
}

.article-content {
  padding: 30px;
}

.article-tag {
  background: rgba(42, 74, 107, 0.2);
  color: var(--c-accent);
  padding: 4px 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  display: inline-block;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.article-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.article-title a {
  color: inherit;
}

.article-meta {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-bottom: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-desc {
  color: var(--c-text-secondary);
  margin-bottom: 25px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  color: var(--c-accent);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.read-more:hover {
  text-decoration: underline;
}

/* Sidebar */
.sidebar-widget {
  margin-bottom: 50px;
  border: 1px solid var(--c-border);
  padding: 30px;
  background: var(--c-bg-secondary);
}

.profile-widget {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  padding: 0;
  overflow: hidden;
}

.profile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--c-accent);
}

.profile-info p {
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.4;
}

.widget-title-serif {
  margin-bottom: 20px;
  font-family: var(--f-serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--c-text-primary);
}

.cat-list li {
  border-bottom: 1px solid #222;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  font-family: var(--f-sans);
  font-size: 14px;
}

.cat-list li a:hover {
  color: var(--c-accent);
}

.cat-list li span {
  color: var(--c-text-muted);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-item {
  border: 1px solid var(--c-border);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--c-text-secondary);
  transition: all 0.3s ease;
  font-family: var(--f-mono);
}

.tag-item:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.archive-notice {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  padding: 20px;
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   BLOG POST DETAIL
   ========================================================================== */

.single-post-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 30px;
}

.single-post-meta {
  font-family: var(--f-mono);
  color: var(--c-text-muted);
  font-size: 12px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.single-post-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
}

.post-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text-secondary);
}

.post-content p {
  margin-bottom: 25px;
}

.post-content h2,
.post-content h3 {
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--c-text-primary);
}

.post-content h2 {
  font-size: 1.8rem;
}

.post-content h3 {
  font-size: 1.4rem;
}

.post-content blockquote {
  border-left: 2px solid var(--c-accent);
  padding-left: 20px;
  font-style: italic;
  color: var(--c-text-primary);
  margin: 30px 0;
}

.post-content code {
  font-family: var(--f-mono);
  background: rgba(42, 74, 107, 0.15);
  padding: 2px 5px;
  font-size: 0.9em;
  color: var(--c-accent);
}

.post-content ul,
.post-content ol {
  margin-bottom: 25px;
  padding-left: 20px;
}

.post-content ul li {
  list-style: disc;
  margin-bottom: 8px;
}

.post-content ol li {
  list-style: decimal;
  margin-bottom: 8px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  /*margin: 20px 0;*/
  margin: 0;
}

.post-navigation-wrap {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid #333;
}

/* ==========================================================================
   PORTFOLIO
   ========================================================================== */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.portfolio-item {
  position: relative;
  cursor: pointer;
  display: block;
}

.portfolio-thumb-wrap {
  margin-bottom: 15px;
  overflow: hidden;
}

.portfolio-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  transition: transform 0.3s ease;
  object-fit: cover;
}

img.portfolio-thumb {
  display: block;
}

.portfolio-item:hover .portfolio-thumb {
  transform: scale(1.02);
}

.portfolio-caption h4 {
  font-family: var(--f-serif);
  font-size: 1.1rem;
  margin-bottom: 5px;
  transition: color 0.3s ease;
}

.portfolio-item:hover .portfolio-caption h4 {
  color: var(--c-accent);
}

.portfolio-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-text-muted);
}

/* ==========================================================================
   PORTFOLIO POST DETAIL
   ========================================================================== */

.work-header {
  margin-bottom: 60px;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}

.work-title-group {
  flex: 1;
}

.work-id {
  font-family: var(--f-mono);
  color: var(--c-accent);
  font-size: 14px;
  margin-bottom: 10px;
  display: block;
}

.work-title {
  font-size: 3rem;
  line-height: 1.1;
}

.work-meta-list {
  text-align: right;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--c-text-muted);
  line-height: 1.6;
}

.work-visual-full {
  width: 100%;
  margin-bottom: 60px;
  border: 1px solid var(--c-border);
  background: #0f0f0f;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
}

.work-visual-full::after {
  content: "ORIGINAL RES";
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--c-expert);
  letter-spacing: 0.1em;
}

.work-main-image {
  max-width: 100%;
  height: auto;
}

.work-data-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
}

.data-block {
  margin-bottom: 40px;
}

.data-label {
  font-family: var(--f-mono);
  color: var(--c-accent-sub);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 15px;
  display: block;
  border-left: 2px solid var(--c-accent-sub);
  padding-left: 10px;
}

.prompt-box {
  background: rgba(42, 74, 107, 0.1);
  border: 1px solid var(--c-border);
  padding: 20px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--c-text-secondary);
  line-height: 1.6;
  word-break: break-all;
}

.prompt-box span {
  color: var(--c-accent);
}

.prompt-box--negative {
  color: var(--c-text-muted);
}

.param-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--f-mono);
  font-size: 12px;
}

.param-table td {
  padding: 10px 0;
  border-bottom: 1px solid #222;
}

.param-table td:first-child {
  color: var(--c-text-muted);
  width: 120px;
}

.param-table td:last-child {
  color: var(--c-text-primary);
  text-align: right;
}

.work-navigation {
  border-top: 1px solid var(--c-border);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */

.about-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
}

.about-text {
  max-width: 680px;
  font-size: 1.1rem;
  color: var(--c-text-secondary);
}

.about-text p {
  margin-bottom: 2rem;
}

.version-tag {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--c-text-muted);
  margin-top: 40px;
  text-align: right;
}

.about-status-display {
  margin-top: 20px;
  text-align: right;
  font-family: var(--f-mono);
  color: var(--c-expert);
  font-size: 12px;
}

/* ==========================================================================
   ASSISTANT
   ========================================================================== */

.assistant-card {
  border: 1px solid var(--c-border);
  display: grid;
  grid-template-columns: 300px 1fr;
  background: var(--c-bg-card);
}

.assistant-visual {
  border-right: 1px solid var(--c-border);
  height: 100%;
  min-height: 400px;
  overflow: hidden;
}

.assistant-visual img,
.assistant-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.assistant-info {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.assistant-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  margin-bottom: 20px;
  border-bottom: 1px solid #222;
  padding-bottom: 20px;
}

.assistant-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.assistant-label {
  font-family: var(--f-mono);
  color: var(--c-accent-sub);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.assistant-value {
  font-family: var(--f-sans);
  color: var(--c-text-primary);
}

.assistant-value.code {
  font-family: var(--f-mono);
  color: var(--c-accent);
}

.assistant-bio {
  font-size: 14px;
  color: var(--c-text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   404 PAGE
   ========================================================================== */

.error-404-section {
  display: flex;
  align-items: center;
  min-height: 60vh;
}

.error-404-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.error-404-code {
  position: relative;
  margin-bottom: 30px;
}

.error-number {
  font-family: var(--f-mono);
  font-size: 8rem;
  font-weight: 300;
  color: rgba(42, 74, 107, 0.15);
  line-height: 1;
  letter-spacing: 0.1em;
}

.error-glitch-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-accent-sub), transparent);
  opacity: 0.5;
}

.error-404-content .section-title {
  border-left: none;
  padding-left: 0;
  text-align: center;
}

.error-404-message {
  color: var(--c-text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 30px;
}

.error-404-status {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-text-muted);
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.error-404-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 50px;
}

.error-404-search {
  max-width: 400px;
  margin: 0 auto;
}

.error-search-label {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--c-text-muted);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   SEARCH
   ========================================================================== */

.search-query-highlight {
  color: var(--c-accent);
  font-style: italic;
}

.search-count {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-border);
}

.no-results {
  text-align: center;
  padding: 60px 0;
}

.no-results-message {
  color: var(--c-text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin: 20px 0 30px;
}

.no-results-search {
  max-width: 400px;
  margin: 0 auto;
}

.no-posts {
  padding: 60px 0;
  text-align: center;
  color: var(--c-text-muted);
  font-family: var(--f-mono);
  font-size: 14px;
}

/* Search Form */
.search-form {
  display: flex;
  gap: 0;
  border: 1px solid var(--c-border);
}

.search-form__label {
  flex: 1;
}

.search-form__input {
  width: 100%;
  padding: 12px 16px;
  background: var(--c-bg-secondary);
  color: var(--c-text-primary);
  border: none;
  font-family: var(--f-mono);
  font-size: 13px;
  outline: none;
}

.search-form__input::placeholder {
  color: var(--c-text-muted);
}

.search-form__submit {
  border: none;
  border-left: 1px solid var(--c-border);
  padding: 12px 24px;
  font-family: var(--f-mono);
  font-size: 12px;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--c-border);
  font-family: var(--f-mono);
  font-size: 14px;
}

.pagination__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  text-decoration: none;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.pagination__item:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.pagination__item.is-active {
  background: var(--c-accent);
  color: var(--c-bg-primary);
  border-color: var(--c-accent);
  pointer-events: none;
}

.pagination__prev,
.pagination__next {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.pagination__prev:hover,
.pagination__next:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.pagination__prev.is-disabled,
.pagination__next.is-disabled {
  opacity: 0.3;
  pointer-events: none;
  border-color: transparent;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
  background: var(--c-bg-primary);
  border-top: 1px solid #222;
  padding: 60px 0;
  font-size: 13px;
  color: var(--c-text-muted);
  margin-top: auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-brand {
  text-align: left;
}

.footer-logo {
  font-family: var(--f-serif);
  color: var(--c-text-primary);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  display: block;
  text-transform: uppercase;
}

.footer-disclaimer {
  text-align: center;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto;
}

.footer-social {
  text-align: right;
  display: flex;
  gap: 20px;
  justify-content: flex-end;
}

.footer-social a {
  color: var(--c-text-muted);
  text-decoration: none;
}

.footer-social a:hover {
  color: var(--c-accent);
}

/* ==========================================================================
   JAPANESE TYPOGRAPHY SUPPORT
   ========================================================================== */

.post-content,
.about-text,
.article-desc,
.assistant-value,
.profile-info p {
  word-break: break-all;
  overflow-wrap: break-word;
}

:lang(ja) h1,
:lang(ja) h2,
:lang(ja) h3,
:lang(ja) h4 {
  font-family: 'Shippori Mincho', 'Cormorant Garamond', serif;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.6;
}

:lang(ja) p,
:lang(ja) li,
:lang(ja) div {
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Meiryo', sans-serif;
  font-weight: 300;
  line-height: 2;
}

.ja {
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Meiryo', sans-serif;
  font-weight: 300;
  line-height: 2;
}

.ja-heading {
  font-family: 'Shippori Mincho', serif;
  font-weight: 300;
  letter-spacing: 0.1em;
}

.post-content p,
.about-text p {
  line-height: 2;
}

/* ==========================================================================
   POST GALLERY (Single / Masonry)
   ========================================================================== */

.post-gallery {
  margin: 40px 0;
}

/* -- WordPress ギャラリーブロック → Masonry 化 -- */
.wp-block-gallery.kc-gallery-enhanced {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0;
}

.wp-block-gallery.kc-gallery-enhanced .wp-block-image {
  margin: 0;
  flex-grow: 1;
  overflow: hidden;
  border: 1px solid var(--c-border);
  transition: border-color 0.3s ease;
  min-width: 0;
}

.wp-block-gallery.kc-gallery-enhanced .wp-block-image:hover {
  border-color: var(--c-accent);
}

.wp-block-gallery.kc-gallery-enhanced .wp-block-image a {
  display: block;
  cursor: zoom-in;
  width: 100%;
  height: 100%;
}

.wp-block-gallery.kc-gallery-enhanced .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.wp-block-gallery.kc-gallery-enhanced .wp-block-image:hover img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

.wp-block-gallery.kc-gallery-enhanced .wp-block-image figcaption {
  display: none;
}

@media (max-width: 768px) {
  .wp-block-gallery.kc-gallery-enhanced {
    flex-direction: column;
  }

  .wp-block-gallery.kc-gallery-enhanced .wp-block-image {
    flex-basis: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .wp-block-gallery.kc-gallery-enhanced .wp-block-image img {
    height: auto;
    max-height: 400px;
  }
}

/* -- Single image -- */
.post-gallery--single {
  max-width: 100%;
}

.post-gallery--single a {
  display: block;
  cursor: zoom-in;
  overflow: hidden;
  border: 1px solid var(--c-border);
  transition: border-color 0.3s ease;
}

.post-gallery--single a:hover {
  border-color: var(--c-accent);
}

.post-gallery--single img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.post-gallery--single a:hover img {
  transform: scale(1.02);
}

/* -- Masonry grid -- */
.post-gallery--masonry {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.masonry-item {
  flex-grow: 1;
  overflow: hidden;
  border: 1px solid var(--c-border);
  transition: border-color 0.3s ease;
  min-width: 0;
}

.masonry-item:hover {
  border-color: var(--c-accent);
}

.masonry-item a {
  display: block;
  cursor: zoom-in;
  width: 100%;
  height: 100%;
}

.masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.masonry-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.08);
}

/* Masonry: desktop 2-3 columns via flex-basis */
.post-gallery--masonry .masonry-item {
  flex-basis: calc(50% - 8px);
  max-width: calc(50% - 4px);
}

/* 3枚の場合: 上段2枚 + 下段1枚ワイド（JSで制御） */
.post-gallery--masonry[data-count="3"] .masonry-item:nth-child(3) {
  flex-basis: 100%;
  max-width: 100%;
  max-height: 320px;
}

/* 5枚の場合: 上段3枚 + 下段2枚（JSで制御） */
.post-gallery--masonry[data-count="5"] .masonry-item:nth-child(-n+3) {
  flex-basis: calc(33.333% - 8px);
  max-width: calc(33.333% - 6px);
}

/* Masonry rows: 各行の高さを揃える */
.masonry-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.masonry-row .masonry-item {
  flex-basis: auto;
  max-width: none;
}

/* タブレット */
@media (max-width: 1024px) {
  .post-gallery--masonry .masonry-item {
    flex-basis: calc(50% - 4px);
    max-width: calc(50% - 4px);
  }
}

/* スマートフォン: 1列表示 */
@media (max-width: 768px) {
  .post-gallery--masonry {
    flex-direction: column;
  }

  .post-gallery--masonry .masonry-item,
  .post-gallery--masonry[data-count="3"] .masonry-item:nth-child(3),
  .post-gallery--masonry[data-count="5"] .masonry-item:nth-child(-n+3),
  .masonry-row .masonry-item {
    flex-basis: 100%;
    max-width: 100%;
    max-height: none;
  }

  .masonry-row {
    flex-direction: column;
  }

  .masonry-item img {
    height: auto;
    max-height: 400px;
  }
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */

.kc-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  cursor: zoom-out;
}

.kc-lightbox-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.kc-lightbox-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kc-lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  cursor: default;
}

.kc-lightbox-overlay.is-active .kc-lightbox-img {
  transform: scale(1);
  opacity: 1;
}

.kc-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10001;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease, color 0.3s ease;
  font-family: var(--f-mono);
}

.kc-lightbox-close:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.kc-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  width: 50px;
  height: 50px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease, color 0.3s ease;
  font-family: var(--f-mono);
}

.kc-lightbox-nav:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.kc-lightbox-prev {
  left: 20px;
}

.kc-lightbox-next {
  right: 20px;
}

.kc-lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  font-family: var(--f-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.15em;
}

@media (max-width: 768px) {
  .kc-lightbox-img {
    max-width: 95vw;
    max-height: 80vh;
  }

  .kc-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .kc-lightbox-prev {
    left: 10px;
  }

  .kc-lightbox-next {
    right: 10px;
  }

  .kc-lightbox-close {
    top: 10px;
    right: 10px;
  }
}

/* ==========================================================================
   WORDPRESS SPECIFIC
   ========================================================================== */

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--c-text-muted);
  margin-top: 8px;
}

.alignleft {
  float: left;
  margin: 0 20px 20px 0;
}

.alignright {
  float: right;
  margin: 0 0 20px 20px;
}

.aligncenter {
  display: block;
  margin: 20px auto;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1200px) {
  .hero__character-wrap {
    right: 2%;
    height: 85%;
  }

  .hero__content {
    max-width: 480px;
  }
}

@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .assistant-card {
    grid-template-columns: 1fr;
  }

  .assistant-visual {
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    min-height: 300px;
  }

  .work-data-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .hero__character-wrap {
    right: -2%;
    height: 78%;
  }

  .hero__content {
    max-width: 420px;
  }

  .hero__title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
  }
}

@media (max-width: 768px) {
  /* Navigation */
  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 900;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-menu li a,
  .nav-link {
    font-size: 1.2rem;
  }

  .mobile-toggle {
    display: flex;
    z-index: 1001;
  }

  /* Hero */
  #hero {
    height: auto;
    min-height: 100vh;
  }

  .hero__character-wrap {
    position: absolute;
    right: -5%;
    bottom: 0;
    left: auto;
    height: 70%;
    opacity: 0.35;
  }

  .hero__character {
    filter: brightness(0.50) contrast(0.82) saturate(0.65);
  }

  .hero__character-overlay {
    background:
      linear-gradient(to right, rgba(5, 5, 8, 0.85) 0%, rgba(5, 5, 8, 0.3) 70%, transparent 100%),
      linear-gradient(to top, #050508 0%, rgba(5, 5, 8, 0.4) 10%, transparent 25%);
  }

  .hero__content {
    position: relative;
    max-width: 100%;
    padding: 120px 24px 100px;
  }

  .hero__status {
    left: 24px;
  }

  /* Layout */
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .footer-brand {
    text-align: center;
  }

  .footer-disclaimer {
    margin: 0 auto;
  }

  .footer-social {
    justify-content: center;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  /* Work detail */
  .work-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .work-meta-list {
    text-align: left;
  }

  .work-title {
    font-size: 2rem;
  }

  /* 404 */
  .error-number {
    font-size: 5rem;
  }

  .error-404-status {
    flex-direction: column;
    gap: 5px;
  }

  .error-404-actions {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2.2rem;
  }

  .hero__subtitle {
    font-size: 0.9rem;
  }

  .hero__cta {
    flex-direction: column;
    gap: 10px;
  }

  .hero__cta .btn {
    text-align: center;
    width: 100%;
  }

  .hero__character-wrap {
    height: 60%;
    right: -10%;
  }

  .single-post-title {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.6rem;
  }
}

/* ==========================================================================
   BACK TO TOP — Scroll Progress Ring
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease, border-color 0.25s ease;
  outline: none;
}
.back-to-top:focus-visible {
  box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.45);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  border-color: var(--c-accent);
}
.back-to-top:hover .back-to-top__ring-progress {
  stroke: var(--c-accent);
  filter: drop-shadow(0 0 4px rgba(197, 165, 90, 0.5));
}
.back-to-top:hover .back-to-top__arrow {
  transform: translate(-50%, -55%) translateY(-3px);
  color: var(--c-accent);
}
.back-to-top:active {
  transform: scale(0.93);
}
.back-to-top__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}
.back-to-top__ring-track {
  fill: none;
  stroke: var(--c-border);
  stroke-width: 2px;
}
.back-to-top__ring-progress {
  fill: none;
  stroke: var(--c-accent-sub);
  stroke-width: 2px;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear, stroke 0.25s ease;
}
.back-to-top__arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  color: var(--c-text-secondary);
  font-size: 16px;
  line-height: 1;
  font-family: var(--f-mono);
  pointer-events: none;
  transition: transform 0.25s ease, color 0.25s ease;
  user-select: none;
}
.back-to-top__arrow svg {
  display: block;
  width: 16px;
  height: 16px;
}
@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
  .back-to-top__arrow svg {
    width: 13px;
    height: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top,
  .back-to-top__ring-progress,
  .back-to-top__arrow {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================================
   PRODUCT PAGE — Banner & Intro
   ========================================================================== */

:root {
  --f-mincho: 'Shippori Mincho B1', '游明朝', 'Yu Mincho', 'HiraMinProN-W3', 'ヒラギノ明朝 ProN', serif;
  --f-cormorant: 'Cormorant Garamond', 'Times New Roman', serif;
}

.product-intro {
  margin-bottom: 56px;
  padding: 40px;
  border: 1px solid var(--c-border);
  background: var(--c-bg-card);
  position: relative;
}
.product-intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--c-accent), transparent);
}
.product-intro__lead {
  font-family: var(--f-mincho);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--c-accent);
  letter-spacing: 0.15em;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #222;
}
.product-intro__text p {
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 2;
  color: var(--c-text-secondary);
  margin-bottom: 1em;
}
.product-intro__text p:last-child {
  margin-bottom: 0;
}
@media (max-width: 768px) {
  .product-intro {
    padding: 24px 20px;
  }
}

.product-banner-wrap {
  margin-bottom: 60px;
}

.banner {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3/1;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7);
  text-decoration: none;
  color: inherit;
}
.banner:hover .banner__bg {
  transform: scale(1);
}
.banner:hover .banner__cta-hint {
  opacity: 1;
  transform: translateX(0);
}

.banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  transform: scale(1.03);
  transition: transform 8s ease;
}

.banner__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(12, 8, 4, 0.9) 0%, rgba(12, 8, 4, 0.65) 30%, rgba(12, 8, 4, 0.12) 55%, transparent 75%),
    linear-gradient(to bottom, rgba(12, 8, 4, 0.3) 0%, transparent 20%, transparent 80%, rgba(12, 8, 4, 0.55) 100%);
}

.banner__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 6%;
}

.banner__sub {
  display: block;
  font-family: var(--f-cormorant);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(0.55rem, 1.5vw, 1rem);
  color: rgba(220, 185, 120, 0.75);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: clamp(6px, 1.2vw, 16px);
  opacity: 0;
  transform: translateY(8px);
  animation: banner-fade-up 0.9s 0.3s ease forwards;
}

.banner__title {
  font-family: var(--f-mincho)!important;
  font-weight: 800;
  font-size: clamp(1.8rem, 7vw, 5.5rem);
  color: #f5ead8;
  letter-spacing: 0.18em;
  line-height: 1;
  margin: 0;
  text-shadow:
    0 0 40px rgba(220, 165, 80, 0.25),
    2px 3px 12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(10px);
  animation: banner-fade-up 1s 0.55s ease forwards;
}

.banner__line {
  width: clamp(30px, 5vw, 60px);
  height: 1px;
  background: linear-gradient(to right, rgba(210, 170, 80, 0.9), transparent);
  margin: clamp(8px, 1.5vw, 20px) 0;
  opacity: 0;
  animation: banner-fade-up 0.9s 0.75s ease forwards;
}

.banner__catch {
  display: block;
  font-family: var(--f-mincho);
  font-weight: 400;
  font-size: clamp(0.5rem, 1.2vw, 0.85rem);
  color: rgba(220, 200, 165, 0.7);
  letter-spacing: 0.3em;
  opacity: 0;
  animation: banner-fade-up 0.9s 0.95s ease forwards;
}

.banner__cta-hint {
  position: absolute;
  bottom: clamp(12px, 3%, 28px);
  left: 6%;
  font-family: var(--f-mono);
  font-size: clamp(0.6rem, 1vw, 0.78rem);
  color: var(--c-accent);
  letter-spacing: 0.2em;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes banner-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .banner {
    aspect-ratio: 2/1;
  }
}

@media (max-width: 768px) {
  .banner {
    aspect-ratio: 4/3;
  }
  .banner__bg {
    object-position: 70% center;
  }
  .banner__overlay {
    background: linear-gradient(to bottom,
      rgba(12, 8, 4, 0.72) 0%,
      rgba(12, 8, 4, 0.4) 40%,
      rgba(12, 8, 4, 0.8) 100%
    );
  }
  .banner__content {
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 0 6% 10%;
  }
  .banner__line {
    background: linear-gradient(to right, transparent, rgba(210, 170, 80, 0.9), transparent);
  }
  .banner__cta-hint {
    left: 50%;
    transform: translateX(-50%) translateX(-6px);
    opacity: 0;
  }
  .banner:hover .banner__cta-hint {
    transform: translateX(-50%) translateX(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .banner__sub,
  .banner__title,
  .banner__line,
  .banner__catch {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .banner__bg {
    transition: none;
    transform: none;
  }
  .banner__cta-hint {
    transition: none;
  }
}

.product-extra-content {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--c-border);
}

/* ==========================================================================
   SIDEBAR BANNER — 春語廊 × Patreon
   ========================================================================== */

.sidebar-banner {
  display: block;
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(210, 170, 80, 0.15);
  text-decoration: none;
  color: inherit;
}
.sidebar-banner:hover {
  border-color: rgba(210, 170, 80, 0.45);
}
.sidebar-banner:hover .sidebar-banner__bg {
  transform: scale(1);
}
.sidebar-banner:hover .sidebar-banner__cta {
  opacity: 1;
  transform: translateY(0);
}
.sidebar-banner:hover .sidebar-banner__overlay {
  background: linear-gradient(to bottom, rgba(12, 8, 4, 0.6) 0%, rgba(12, 8, 4, 0.35) 40%, rgba(12, 8, 4, 0.72) 100%);
}
.sidebar-banner:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

.sidebar-banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  transform: scale(1.05);
  transition: transform 6s ease;
}

.sidebar-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(12, 8, 4, 0.65) 0%, rgba(12, 8, 4, 0.38) 40%, rgba(12, 8, 4, 0.78) 100%);
  transition: background 0.4s ease;
}

.sidebar-banner__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  padding: 0 8% 22%;
}

.sidebar-banner__sub {
  display: block;
  font-family: var(--f-cormorant, 'Cormorant Garamond', serif);
  font-style: italic;
  font-weight: 300;
  font-size: 0.6rem;
  color: rgba(220, 185, 120, 0.75);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0;
  transform: translateY(6px);
  animation: sb-fade-up 0.8s 0.3s ease forwards;
}

.sidebar-banner__title {
  font-family: var(--f-mincho, 'Shippori Mincho B1', '游明朝', serif)!important;
  font-weight: 800;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  color: #f5ead8;
  letter-spacing: 0.2em;
  line-height: 1;
  margin: 0;
  text-shadow: 0 0 30px rgba(220, 165, 80, 0.3), 1px 2px 8px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(8px);
  animation: sb-fade-up 0.9s 0.5s ease forwards;
}

.sidebar-banner__line {
  width: 32px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(210, 170, 80, 0.9), transparent);
  margin: 6px auto;
  opacity: 0;
  animation: sb-fade-up 0.8s 0.7s ease forwards;
}

.sidebar-banner__catch {
  display: block;
  font-family: var(--f-mincho, 'Shippori Mincho B1', serif);
  font-weight: 400;
  font-size: 0.5rem;
  color: rgba(220, 200, 165, 0.65);
  letter-spacing: 0.25em;
  opacity: 0;
  animation: sb-fade-up 0.8s 0.85s ease forwards;
}

.sidebar-banner__cta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 7px 8px;
  background: rgba(197, 165, 90, 0.88);
  font-family: var(--f-mono);
  font-size: 0.58rem;
  color: #0a0a0a;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes sb-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .sidebar-banner {
    max-width: 220px;
  }
}

@media (max-width: 768px) {
  .sidebar-banner {
    max-width: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-banner__sub,
  .sidebar-banner__title,
  .sidebar-banner__line,
  .sidebar-banner__catch {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .sidebar-banner__bg {
    transition: none;
    transform: none;
  }
  .sidebar-banner__cta {
    transition: none;
  }
}
