/* ============================================================
   ARTNECT Design System — Private Art Salon
   Black × Gold × Cream | Luxury Gallery Aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Noto+Sans+JP:wght@300;400;500;700&family=Noto+Serif+JP:wght@300;400;500;600&display=swap');

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --obsidian:       #0a0a0a;
  --charcoal:       #1a1a1a;
  --smoke:          #2a2a2a;
  --ash:            #3d3d3d;
  --mid:            #6b6b6b;
  --silver:         #b8b0a0;
  --border:         #e8e0d0;
  --cream:          #fdfaf4;
  --cream-mid:      #f5edd8;
  --white:          #ffffff;

  --gold:           #c9a85c;
  --gold-dark:      #a38442;
  --gold-deep:      #7a6232;
  --gold-light:     #e0c07a;
  --gold-pale:      #f5edd8;
  --gold-glow:      rgba(201,168,92,0.15);
  --gold-border:    rgba(201,168,92,0.38);

  --healing:   #7DCEA0;
  --story:     #85929E;
  --dynamic:   #E59866;
  --artisan:   #A38442;

  --font-display: 'Cormorant Garamond', 'Noto Serif JP', Georgia, serif;
  --font-serif:   'Noto Serif JP', 'Hiragino Mincho ProN', serif;
  --font-sans:    'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;

  --ease-out:  cubic-bezier(0.25,0.46,0.45,0.94);
  --ease-gold: cubic-bezier(0.34,1.56,0.64,1);
  --transition: all 0.32s var(--ease-out);

  --shadow-sm:     0 2px 12px rgba(0,0,0,0.06);
  --shadow-md:     0 4px 24px rgba(0,0,0,0.1);
  --shadow-gold:   0 4px 24px rgba(163,132,66,0.2);
  --shadow-gold-h: 0 8px 40px rgba(163,132,66,0.32);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}

::selection { background: rgba(201,168,92,0.2); color: var(--charcoal); }

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   Typography
   ============================================================ */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
}

.display-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.45;
}

.section-title-light {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.45;
}

.body-text {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--mid);
  line-height: 1.85;
}

/* ============================================================
   Ornaments
   ============================================================ */
.gold-line {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 0.8rem auto;
}

.ornament-divider {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
}
.ornament-divider::before,
.ornament-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-border), transparent);
}
.ornament-divider .lozenge {
  width: 5px; height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  padding: 0.75rem 2rem;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  color: var(--charcoal);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(163,132,66,0.28);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  box-shadow: var(--shadow-gold-h);
  transform: translateY(-1px);
  color: var(--charcoal);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-border);
}
.btn-outline-gold:hover {
  background: rgba(201,168,92,0.08);
  border-color: var(--gold);
  color: var(--gold-light);
}

.btn-outline-white {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--mid);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--gold-border);
  color: var(--gold-dark);
}

.btn-dark {
  background: var(--charcoal);
  color: var(--white);
  border-color: transparent;
}
.btn-dark:hover {
  background: var(--smoke);
  transform: translateY(-1px);
}

.btn-danger {
  background: #dc2626;
  color: var(--white);
  border-color: transparent;
}
.btn-danger:hover { background: #b91c1c; }

.btn-sm { font-size: 0.8rem; padding: 0.5rem 1.25rem; }
.btn-lg { font-size: clamp(1rem, 1.5vw, 1.25rem); padding: 1rem 2.75rem; letter-spacing: 0.1em; }

/* ============================================================
   Cards (Public)
   ============================================================ */
.card-luxury {
  background: var(--white);
  border-radius: 4px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(163,132,66,0.06);
  transition: var(--transition);
  overflow: hidden;
}
.card-luxury:hover {
  box-shadow: 0 10px 36px rgba(163,132,66,0.14);
  transform: translateY(-3px);
  border-color: var(--gold-border);
}

/* ============================================================
   Category Cards (artist.png style)
   ============================================================ */
.cat-card {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}
@media(min-width:640px){ .cat-card{ aspect-ratio:16/10; } }

.cat-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.55s var(--ease-out);
}
.cat-card:hover .cat-card-bg { transform: scale(1.05); }

.cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.55) 100%
  );
  z-index: 1;
}

.cat-card-frame {
  position: absolute;
  inset: 10px;
  border: 1px solid var(--gold-border);
  z-index: 2;
  pointer-events: none;
  transition: var(--transition);
}
.cat-card:hover .cat-card-frame {
  inset: 13px;
  border-color: var(--gold);
}

.cat-card-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 3;
  padding: 1.5rem 1.5rem 1.25rem;
}

.cat-card-jp {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.12em;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.cat-card-en {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-block;
  padding: 0.2em 0.75em;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-draft    { background: #f3f4f6; color: #374151; }

/* ============================================================
   Forms
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--mid);
  margin-bottom: 0.45rem;
  letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.7rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--charcoal);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-textarea { resize: vertical; min-height: 110px; }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a38442' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.875rem center; padding-right: 2.5rem; }

/* ============================================================
   Public Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201,168,92,0.12);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.35);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem,3vw,2rem);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem,2.5vw,2.25rem);
}

.header-nav-link {
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s ease;
  white-space: nowrap;
  position: relative;
}
.header-nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.header-nav-link:hover { color: var(--gold); }
.header-nav-link:hover::after { transform: scaleX(1); }

.header-cta { flex-shrink: 0; }

/* Mobile nav */
.header-mobile-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: rgba(255,255,255,0.7);
  flex-direction: column;
  gap: 5px;
}
.header-mobile-btn span {
  display: block; width: 22px; height: 1.5px;
  background: currentColor;
  transition: var(--transition);
}

.header-mobile-menu {
  display: none;
  background: var(--obsidian);
  border-top: 1px solid rgba(201,168,92,0.1);
  padding: 1.25rem 1.25rem 1.5rem;
}
.header-mobile-menu.open { display: block; }

.header-mobile-menu .mob-link {
  display: block;
  padding: 0.7rem 0;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.header-mobile-menu .mob-link:last-child { border-bottom: none; }

@media(max-width:768px){
  .header-nav { display: none; }
  .header-cta { display: none; }
  .header-mobile-btn { display: flex; }
}

/* ============================================================
   Public Footer
   ============================================================ */
.site-footer {
  background: var(--obsidian);
  color: rgba(255,255,255,0.5);
  border-top: 1px solid rgba(201,168,92,0.12);
}
.site-footer a { color: rgba(255,255,255,0.5); transition: color 0.2s; }
.site-footer a:hover { color: var(--gold); }

/* ============================================================
   Hero
   ============================================================ */
/*
 * 3-layer approach:
 *   .hero-layer-bg    z:0  — <picture> element, covers full hero
 *   .hero-layer-overlay z:1 — diagonal gradient overlay (lighter on right)
 *   ::after           z:2  — film grain for luxury texture
 *   content divs      z:3+ — all hero text/badges above everything
 */
.hero {
  position: relative;
  min-height: calc(100svh - 76px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background-color: var(--obsidian);
  overflow: hidden;
}

/* Pseudo-element overlay disabled — using explicit .hero-layer-overlay div */
.hero::before { display: none; }

/* ── Grain texture: sits above image+overlay, below content ── */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

/* ── Background image layer ── */
.hero-layer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-layer-bg picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-layer-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
@media (max-width: 768px) {
  .hero-layer-bg img {
    object-fit: contain;
    object-position: top center;
  }
}

/* ── Overlay: diagonal gradient, image visible on right side ── */
.hero-layer-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    rgba(5,5,5,0.64) 0%,
    rgba(5,5,5,0.38) 38%,
    rgba(5,5,5,0.14) 65%,
    rgba(5,5,5,0.20) 100%
  );
}
@media (max-width: 768px) {
  .hero-layer-overlay {
    background: linear-gradient(
      to bottom,
      rgba(5,5,5,0.55) 0%,
      rgba(5,5,5,0.30) 40%,
      rgba(5,5,5,0.50) 100%
    );
  }
}

/* ── Legacy divs no longer needed ── */
.hero-bg, .hero-overlay, .hero-grain { display: none; }

/* ── Top label band (z-index ≥ 3 = above ::before:1 and ::after:2) ── */
.hero-label-band {
  position: absolute;
  top: clamp(2rem, 5vw, 3.5rem);
  left: 0;
  right: 0;
  z-index: 5;
  text-align: center;
}
.hero-label-inner {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.7vw, 1.375rem);
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0.6rem 2.75rem;
  border: 1px solid var(--gold-border);
  background: rgba(5,5,5,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ── Main content area (z-index 3 = above ::before:1 and ::after:2) ── */
.hero-shindan-main {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2rem, 4vw, 4rem);
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding:
    clamp(6rem, 11vw, 9rem)      /* top: clear label band */
    clamp(1.5rem, 5vw, 3rem)
    clamp(2.5rem, 5vw, 4rem)     /* bottom: natural padding */
    clamp(1.5rem, 5vw, 3rem);
}

/* ── Copy block (left) ── */
.hero-copy-block {
  flex: 1;
  max-width: 640px;
}

.hero-subcopy {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 2.25rem);
  font-weight: 300;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.14em;
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.hero-main-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.08;
  color: var(--white);
  letter-spacing: 0.04em;
  margin: 0 0 clamp(1.75rem, 3vw, 2.75rem);
  text-shadow: 0 4px 48px rgba(0,0,0,0.55);
}

.btn-hero {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  padding: 1.1rem 3rem;
  box-shadow: 0 4px 32px rgba(163,132,66,0.40);
  border-radius: 2px;
}
.btn-hero:hover {
  box-shadow: 0 8px 50px rgba(163,132,66,0.58);
  transform: translateY(-2px);
}

/* ── Vertical copy (right) ── */
.hero-vertical-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}
.hero-vertical-copy {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 300;
  color: rgba(255,255,255,0.68);
  letter-spacing: 0.38em;
  line-height: 1.6;
  border-right: 1px solid rgba(201,168,92,0.42);
  padding-right: 1.5rem;
}

/* ── Circular stat badges — inline flow below button ── */
.hero-badges {
  display: flex;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  flex-wrap: wrap;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.hero-badge-circle {
  width:  clamp(120px, 13vw, 165px);
  height: clamp(120px, 13vw, 165px);
  border-radius: 50%;
  border: 1px solid var(--gold-border);
  background: rgba(5,5,5,0.60);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 0.625rem;
  gap: 0.15rem;
}
.hb-cat {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.75rem, 1.1vw, 1rem);
  color: var(--gold);
  letter-spacing: 0.05em;
  line-height: 1.25;
}
.hb-sub {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(0.625rem, 0.75vw, 0.75rem);
  color: rgba(255,255,255,0.48);
  letter-spacing: 0.03em;
  line-height: 1.3;
}
.hb-val {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  margin-top: 0.1rem;
}

/* ── Mobile overrides ── */
@media (max-width: 768px) {
  .hero-label-band { top: 3.5rem; }

  /* Shrink label text so it fits within the mobile viewport */
  .hero-label-inner {
    font-size: 0.625rem;
    letter-spacing: 0.2em;
    padding: 0.45rem 1.25rem;
  }

  .hero-shindan-main {
    flex-direction: column;
    align-items: flex-start;
    padding-top: clamp(6rem, 18vw, 8rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
  }

  .hero-vertical-col { display: none; }

  .hero-main-title {
    font-size: clamp(2.25rem, 10vw, 3.25rem);
  }
  .hero-subcopy {
    font-size: clamp(1rem, 4vw, 1.375rem);
    letter-spacing: 0.06em;
  }
  .btn-hero {
    font-size: clamp(0.9375rem, 4vw, 1.125rem);
    padding: 0.9rem 2rem;
  }

  /* Badges: inline flow, two side-by-side */
  .hero-badges {
    margin-top: 1.25rem;
    gap: clamp(0.625rem, 3vw, 1rem);
    flex-wrap: nowrap;
  }
  .hero-badge-circle {
    width:  clamp(106px, 26vw, 140px);
    height: clamp(106px, 26vw, 140px);
  }
  .hb-val {
    font-size: clamp(1.75rem, 7.5vw, 2.5rem);
  }
  .hb-cat {
    font-size: clamp(0.6875rem, 2.5vw, 0.875rem);
  }
  .hb-sub {
    font-size: clamp(0.5625rem, 1.8vw, 0.6875rem);
  }

  .hero-scroll { display: none; }
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
}
.hero-scroll span {
  font-family: var(--font-display);
  font-size: 0.6rem; letter-spacing: 0.25em;
  color: var(--gold); text-transform: uppercase;
}
.hero-scroll-line {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-line 1.8s ease-in-out infinite;
}
@keyframes scroll-line {
  0%,100%{ transform: scaleY(1); transform-origin: top; opacity: 0.6; }
  50%{ transform: scaleY(0.5); transform-origin: bottom; opacity: 0.2; }
}

/* ============================================================
   Section Wrapper
   ============================================================ */
.section {
  padding: clamp(4rem,7vw,7rem) 0;
}
.section-dark { background: var(--charcoal); }
.section-cream { background: var(--cream); }
.section-white { background: var(--white); }

.container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 clamp(1rem,3vw,2rem);
}
.container-sm {
  max-width: 720px; margin: 0 auto;
  padding: 0 clamp(1rem,3vw,2rem);
}

.section-header { text-align: center; margin-bottom: clamp(2.5rem,4vw,4rem); }
.section-header .eyebrow { margin-bottom: 0.75rem; }
.section-header .section-title { margin-bottom: 0.75rem; }
.section-header .body-text { margin: 0 auto; max-width: 520px; }

/* ============================================================
   Step Cards
   ============================================================ */
.step-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: clamp(1.5rem,3vw,2.25rem) clamp(1.25rem,2vw,1.75rem);
  text-align: center;
  transition: var(--transition);
}
.step-card:hover {
  border-color: var(--gold-border);
  box-shadow: var(--shadow-gold);
  transform: translateY(-3px);
}
.step-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.875rem;
}
.step-title {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}
.step-desc {
  font-size: 0.8125rem;
  color: var(--mid);
  line-height: 1.75;
}

/* ============================================================
   Art Type (Index) Mini Cards
   ============================================================ */
.type-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  transition: var(--transition);
}
.type-card:hover {
  border-color: var(--gold-border);
  box-shadow: var(--shadow-gold);
  transform: translateY(-3px);
}
.type-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  margin-bottom: 1rem;
}
.type-name {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.type-desc {
  font-size: 0.8rem;
  color: var(--mid);
  line-height: 1.7;
}

/* ============================================================
   Diagnosis Page
   ============================================================ */
/*
 * 3-layer structure:
 *   .diag-layer-bg      z:0  — <picture> element, full bleed
 *   .diag-layer-overlay z:1  — strong dark overlay (UI readability first)
 *   .diag-layer-glow    z:2  — gold radial ambient glow
 *   .diagnosis-inner    z:3  — all quiz UI, inside a glass panel (.diag-card)
 */
.diagnosis-wrap {
  min-height: 100svh;
  background-color: var(--obsidian);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem,5vw,4rem) clamp(1rem,4vw,2rem);
  position: relative;
  overflow: hidden;
}

/* Pseudo-element overlays disabled — using explicit divs */
.diagnosis-wrap::before,
.diagnosis-wrap::after { display: none; }

/* ── Layer 0: Background image ── */
.diag-layer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.diag-layer-bg picture {
  display: block;
  width: 100%;
  height: 100%;
}
.diag-layer-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
@media (max-width: 768px) {
  .diag-layer-bg img {
    object-fit: contain;
    object-position: top center;
  }
}

/* ── Layer 1: Strong dark overlay — readability over aesthetics ── */
.diag-layer-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(4,4,4,0.82);
}

/* ── Layer 2: Gold ambient glow (subtle) ── */
.diag-layer-glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 42%, rgba(201,168,92,0.07) 0%, transparent 65%);
}

/* Legacy divs — kept harmless */
.diag-bg-wrap, .diag-bg-overlay { display: none; }

/* UI content — above all layers */
.diagnosis-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 640px;
}

.diagnosis-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.diagnosis-header .eyebrow { margin-bottom: 0.5rem; }
.diagnosis-site-label {
  font-family: var(--font-display);
  font-size: 0.65rem; letter-spacing: 0.35em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  margin-bottom: 0.875rem;
}

/* Progress dots */
.diag-progress {
  display: flex; gap: 5px;
  margin-bottom: 2.5rem;
}
.diag-dot {
  flex: 1; height: 2px;
  background: rgba(201,168,92,0.15);
  border-radius: 9999px;
  transition: background 0.35s ease;
}
.diag-dot.done   { background: var(--gold-dark); }
.diag-dot.active { background: var(--gold); }

/* Question card — glass dark panel, readable on any background */
.diag-card {
  background: rgba(8,8,8,0.65);
  border: 1px solid rgba(201,168,92,0.30);
  border-radius: 20px;
  padding: clamp(2rem,5vw,3rem) clamp(1.5rem,4vw,2.5rem);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 8px 48px rgba(0,0,0,0.60),
    inset 0 1px 0 rgba(201,168,92,0.12);
}

/* Q番号: PC 18–24px / SP 16–20px */
.diag-q-num {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

/* 設問本文: PC 32–44px / SP 24–32px */
.diag-q-text {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.75rem);
  font-weight: 400;
  color: rgba(255,255,255,0.92);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.diag-choices { display: flex; flex-direction: column; gap: 0.75rem; }
/* 選択肢テキスト: PC 18–24px / SP 16–20px */
.diag-choice {
  display: block; width: 100%;
  text-align: left;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2px;
  color: rgba(255,255,255,0.82);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.5vw, 1.5rem);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.diag-choice:hover {
  background: rgba(201,168,92,0.08);
  border-color: var(--gold-border);
  color: var(--gold-light);
  transform: translateX(4px);
}

/* Done state */
.diag-done {
  text-align: center;
  padding: 3rem 0;
}
.diag-done-icon {
  width: 64px; height: 64px;
  border: 1px solid var(--gold-border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.75rem;
}
.diag-done-spinner {
  width: 28px; height: 28px;
  border: 1.5px solid rgba(201,168,92,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin-gold 1s linear infinite;
}
@keyframes spin-gold { to { transform: rotate(360deg); } }

/* ============================================================
   Sidebar (Admin/Artist panels)
   ============================================================ */
.sidebar {
  width: 220px;
  background: var(--obsidian);
  border-right: 1px solid rgba(201,168,92,0.1);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(201,168,92,0.08);
}
.sidebar-brand a { display: block; text-decoration: none; }
.sidebar-brand img { height: 32px; width: auto; object-fit: contain; }
.sidebar-brand .brand-text {
  font-family: var(--font-display);
  font-size: 1.1rem; letter-spacing: 0.2em;
  color: var(--gold);
}
.sidebar-brand .brand-sub {
  font-size: 0.625rem; letter-spacing: 0.12em;
  color: var(--ash); margin-top: 3px;
  text-transform: uppercase;
}

.sidebar-user {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(201,168,92,0.06);
}
.sidebar-user .u-label {
  font-size: 0.6rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ash); margin-bottom: 3px;
}
.sidebar-user .u-name {
  font-size: 0.8rem; font-weight: 500;
  color: rgba(255,255,255,0.8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sidebar-nav { flex: 1; padding: 0.75rem 0.625rem; overflow-y: auto; }

.s-nav-link {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.875rem;
  border-radius: 2px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: var(--transition);
  margin-bottom: 2px;
  border-left: 2px solid transparent;
}
.s-nav-link:hover { background: rgba(201,168,92,0.06); color: rgba(255,255,255,0.8); }
.s-nav-link.active {
  background: rgba(201,168,92,0.1);
  color: var(--gold);
  border-left-color: var(--gold);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(201,168,92,0.07);
}
.sidebar-footer a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.2s;
}
.sidebar-footer a:hover { color: rgba(255,255,255,0.7); }

/* Panel layout */
.panel-wrap { display: flex; height: 100svh; overflow: hidden; }
.panel-main  { flex: 1; overflow-y: auto; background: #f4f1eb; }

.panel-topbar {
  display: none;
  align-items: center; justify-content: space-between;
  padding: 0 1.25rem; height: 54px;
  background: var(--obsidian);
  border-bottom: 1px solid rgba(201,168,92,0.1);
  position: sticky; top: 0; z-index: 100;
}
.panel-topbar-logo { font-family: var(--font-display); font-size: 1rem; letter-spacing: 0.2em; color: var(--gold); }

.ham-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gold); padding: 6px;
  display: flex; flex-direction: column; gap: 5px;
}
.ham-btn span { display: block; width: 20px; height: 1.5px; background: currentColor; }

.sidebar-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); z-index: 199;
}
.sidebar-backdrop.open { display: block; }

@media(max-width:768px){
  .panel-wrap { flex-direction: column; height: auto; overflow: visible; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 200;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out);
  }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,0.5); }
  .panel-topbar { display: flex; }
  .panel-main { min-height: calc(100svh - 54px); overflow: visible; }
}

/* Panel content */
.panel-content { padding: clamp(1.25rem,3vw,2rem); }

.panel-page-title {
  font-family: var(--font-serif);
  font-size: 1.35rem; font-weight: 400;
  color: var(--charcoal); margin-bottom: 0.25rem;
}
.panel-page-sub { font-size: 0.8125rem; color: var(--mid); }

/* Stat cards in panel */
.p-stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  display: block;
  transition: var(--transition);
}
.p-stat:hover { border-color: var(--gold-border); box-shadow: var(--shadow-gold); }
.p-stat-val {
  font-family: var(--font-display);
  font-size: 2.25rem; font-weight: 300; line-height: 1;
  margin-bottom: 0.25rem;
}
.p-stat-label { font-size: 0.72rem; color: var(--mid); letter-spacing: 0.04em; }

/* Panel table */
.p-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.p-table th {
  padding: 0.7rem 1rem;
  text-align: left; font-size: 0.65rem;
  font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--mid);
  background: var(--cream); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.p-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #ede9e0;
  color: var(--charcoal);
}
.p-table tr:last-child td { border-bottom: none; }
.p-table tr:hover td { background: var(--cream); }

/* Panel card */
.panel-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: clip; /* clips to border-radius without blocking child scroll containers */
}
.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Responsive table wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tappable list row (replaces table rows with full-row links) */
.list-row-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  transition: background 0.18s ease;
}
.list-row-link:last-child { border-bottom: none; }
.list-row-link:hover { background: var(--cream); }

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-up { animation: fadeUp 0.65s var(--ease-out) both; }
.fade-in { animation: fadeIn 0.5s ease both; }
.d1 { animation-delay: 0.1s; }
.d2 { animation-delay: 0.22s; }
.d3 { animation-delay: 0.36s; }
.d4 { animation-delay: 0.5s; }
.d5 { animation-delay: 0.65s; }
.d6 { animation-delay: 0.82s; }
.d7 { animation-delay: 1.0s; }
.d8 { animation-delay: 1.2s; }

/* ============================================================
   Global Loading Overlay
   ============================================================ */
#loadingOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 8, 6, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#loadingOverlay.active { display: flex; }
#loadingProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #c9a85c, #f0d080, #a38442);
  z-index: 10000;
  box-shadow: 0 0 10px rgba(201, 168, 92, 0.7);
  transition: width 0.4s ease;
}
.loading-ring {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(201, 168, 92, 0.2);
  border-top-color: #c9a85c;
  border-radius: 50%;
  animation: spin-gold 0.85s linear infinite;
}
.loading-text {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  color: rgba(201, 168, 92, 0.65);
  text-transform: uppercase;
}

/* ============================================================
   Shake (error banners)
   ============================================================ */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-7px); }
  30%       { transform: translateX(5px); }
  45%       { transform: translateX(-4px); }
  60%       { transform: translateX(3px); }
  75%       { transform: translateX(-2px); }
}
.shake { animation: shake 0.45s var(--ease-out) both; }

/* ============================================================
   Micro-interactions
   ============================================================ */
.btn { transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease, var(--transition); }
.btn:active { transform: scale(0.95) translateY(1px); }
.panel-card { transition: transform 0.22s var(--ease-out), box-shadow 0.22s ease; }
.panel-card:hover { transform: translateY(-3px); box-shadow: 0 10px 36px rgba(0,0,0,0.12); }

/* ============================================================
   Ken Burns (artwork slider)
   ============================================================ */
@keyframes kenBurns {
  0%   { transform: scale(1)    translate(0, 0); }
  50%  { transform: scale(1.05) translate(-0.8%, -0.6%); }
  100% { transform: scale(1)    translate(0, 0); }
}
.art-slide-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: kenBurns 10s ease-in-out infinite;
  will-change: transform;
}

/* ============================================================
   Diagnosis reveal
   ============================================================ */
@keyframes diagBadgeReveal {
  0%   { opacity: 0; transform: scale(0.65); }
  68%  { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes diagTypeReveal {
  0%   { opacity: 0; transform: translateY(14px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes diagImgReveal {
  0%   { opacity: 0; transform: scale(0.94); filter: blur(8px); }
  100% { opacity: 1; transform: scale(1);    filter: blur(0); }
}
@keyframes diagCardReveal {
  0%   { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
.diag-badge-reveal { animation: diagBadgeReveal 0.65s cubic-bezier(0.34,1.56,0.64,1) 0.35s both; }
.diag-type-reveal  { animation: diagTypeReveal  0.75s var(--ease-out) 0.6s both; }
.diag-img-reveal   { animation: diagImgReveal   0.85s var(--ease-out) 0.1s both; }
.diag-card-reveal  { animation: diagCardReveal  0.7s  var(--ease-out) 0.45s both; }
.diag-cta-reveal   { animation: diagCardReveal  0.7s  var(--ease-out) 0.75s both; }

/* ============================================================
   Welcome screen
   ============================================================ */
@keyframes welcomeOrnament {
  0%   { opacity: 0; transform: scale(0.55) rotate(-8deg); }
  65%  { opacity: 1; transform: scale(1.06) rotate(1deg); }
  100% { opacity: 1; transform: scale(1)    rotate(0deg); }
}
@keyframes welcomeName {
  0%   { opacity: 0; transform: translateY(18px); letter-spacing: 0.04em; }
  100% { opacity: 1; transform: translateY(0);    letter-spacing: 0.18em; }
}
@keyframes welcomeTagline {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes welcomeBarFill {
  0%   { width: 0%; }
  100% { width: 100%; }
}
.welcome-ornament { animation: welcomeOrnament 0.9s cubic-bezier(0.34,1.56,0.64,1) 0.2s  both; }
.welcome-eyebrow  { animation: welcomeTagline  0.7s var(--ease-out) 0.65s both; }
.welcome-name     { animation: welcomeName     0.85s var(--ease-out) 0.85s both; }
.welcome-tagline  { animation: welcomeTagline  0.7s var(--ease-out) 1.15s both; }
.welcome-bar      { animation: welcomeBarFill  4.5s linear          1.6s  both; }

/* ============================================================
   Purchase celebration
   ============================================================ */
@keyframes celebCircle {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}
@keyframes celebCheck {
  0%   { stroke-dashoffset: 60; }
  100% { stroke-dashoffset: 0; }
}
@keyframes celebTitle {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.celeb-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(10, 8, 6, 0.94);
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 1.5rem; padding: 2rem; text-align: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.celeb-circle { animation: celebCircle 0.55s cubic-bezier(0.34,1.56,0.64,1) 0.15s both; }
.celeb-check  { stroke-dasharray: 60; stroke-dashoffset: 60; animation: celebCheck 0.5s ease 0.65s both; }
.celeb-title  { animation: celebTitle 0.65s var(--ease-out) 0.9s  both; }
.celeb-sub    { animation: celebTitle 0.65s var(--ease-out) 1.1s  both; }
.celeb-link   { animation: celebTitle 0.65s var(--ease-out) 1.35s both; }
#celebCanvas  { position: fixed; inset: 0; pointer-events: none; z-index: 8001; }
