:root {
  --bg: #080e24;
  --bg-2: #0b1432;
  --gold: #c6a661;
  --gold-dim: #8c7646;
  --cream: #f5f0e6;
  --muted: #b4bed2;
  --line: rgba(198, 166, 97, 0.45);
  --panel: rgba(10, 16, 40, 0.72);
  --font-mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  background: #050812;
  color: var(--cream);
  font-family: var(--font-gothic);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100%;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Libra splash (portfolio only) */
.splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: #050812;
  overflow: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(198, 166, 97, 0.14), transparent 55%),
    radial-gradient(ellipse at 50% -10%, #0d1740, #050812 62%);
  pointer-events: none;
}

.splash-sky::before,
.splash-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 28%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 72% 22%, rgba(243, 230, 184, 0.7), transparent),
    radial-gradient(1px 1px at 42% 68%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 86% 58%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1px 1px at 12% 78%, rgba(243, 230, 184, 0.5), transparent),
    radial-gradient(1px 1px at 58% 12%, rgba(255, 255, 255, 0.55), transparent);
  animation: splashTwinkle 2.4s ease-in-out infinite alternate;
  opacity: 0.55;
}

.splash-sky::after {
  background-image:
    radial-gradient(1px 1px at 30% 40%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 64% 74%, rgba(243, 230, 184, 0.55), transparent),
    radial-gradient(1px 1px at 90% 30%, rgba(255, 255, 255, 0.5), transparent);
  animation-direction: alternate-reverse;
  animation-duration: 3.1s;
}

@keyframes splashTwinkle {
  from { opacity: 0.3; }
  to { opacity: 0.85; }
}

.splash-mark {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  text-align: center;
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(0.6rem);
  animation: splashMarkIn 0.9s ease 0.15s forwards;
}

@keyframes splashMarkIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.splash-libra {
  width: min(42vw, 220px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 18px rgba(198, 166, 97, 0.28));
}

.splash-lines line {
  fill: none;
  stroke: rgba(198, 166, 97, 0.75);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
  animation: splashLineDraw 1.4s ease forwards;
}

.splash-lines line:nth-child(1) { animation-delay: 0.2s; }
.splash-lines line:nth-child(2) { animation-delay: 0.35s; }
.splash-lines line:nth-child(3) { animation-delay: 0.5s; }
.splash-lines line:nth-child(4) { animation-delay: 0.65s; }
.splash-lines line:nth-child(5) { animation-delay: 0.8s; }
.splash-lines line:nth-child(6) { animation-delay: 0.95s; }

@keyframes splashLineDraw {
  to { stroke-dashoffset: 0; }
}

.splash-stars circle {
  fill: #f3e6b8;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: splashStarPop 0.55s ease forwards;
  filter: drop-shadow(0 0 4px rgba(243, 230, 184, 0.85));
}

.splash-stars circle:nth-child(1) { animation-delay: 0.35s; }
.splash-stars circle:nth-child(2) { animation-delay: 0.5s; }
.splash-stars circle:nth-child(3) { animation-delay: 0.55s; }
.splash-stars circle:nth-child(4) { animation-delay: 0.7s; }
.splash-stars circle:nth-child(5) { animation-delay: 0.85s; }
.splash-stars circle:nth-child(6) { animation-delay: 1.05s; }

@keyframes splashStarPop {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  70% {
    opacity: 1;
    transform: scale(1.25);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.splash-brand {
  margin: 0.85rem 0 0;
  font-family: var(--font-mincho);
  font-size: clamp(1.15rem, 3.2vw, 1.7rem);
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--gold);
}

.splash-sub {
  margin: 0;
  font-size: clamp(0.72rem, 1.6vw, 0.88rem);
  letter-spacing: 0.22em;
  color: var(--muted);
}

.splash-skip {
  position: absolute;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 2;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--gold-dim);
  font-family: var(--font-gothic);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  cursor: pointer;
  opacity: 0.7;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.splash-skip:hover,
.splash-skip:focus-visible {
  color: var(--gold);
  opacity: 1;
}

body.is-splash {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .splash,
  .splash-mark,
  .splash-lines line,
  .splash-stars circle,
  .splash-sky::before,
  .splash-sky::after {
    animation: none !important;
  }

  .splash-mark,
  .splash-lines line,
  .splash-stars circle {
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }
}

/* 案08: gold sparkle burst following cursor */
body.has-sparkle-cursor,
body.has-sparkle-cursor * {
  cursor: none !important;
}

.cursor-sparks {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}

.cursor-star {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10000;
  width: 1.1rem;
  height: 1.1rem;
  margin: -0.55rem 0 0 -0.55rem;
  opacity: 0;
  pointer-events: none;
  background: #fff8e7;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 94%,
    50% 72%,
    21% 94%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  box-shadow:
    0 0 4px rgba(255, 248, 231, 0.95),
    0 0 10px rgba(198, 166, 97, 0.75);
  will-change: transform;
  contain: layout style;
}

.cursor-star.is-visible {
  opacity: 1;
}

.cursor-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: var(--gold-soft, #f3e6b8);
  box-shadow: 0 0 6px 1px rgba(243, 230, 184, 0.8);
  animation: cursorSparkOut 0.9s ease-out forwards;
}

@keyframes cursorSparkOut {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(1);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-sparks {
    display: none;
  }
}

/* 16:9 presentation stage */
.stage-shell {
  position: relative;
  z-index: 1;
  width: min(100vw, calc(100vh * 16 / 9));
  margin: 0 auto;
  min-height: 100vh;
}

.stage {
  position: relative;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 14, 36, 0.88), rgba(8, 14, 36, 0.96));
}

/* Portfolio / slides: let starfield / shooting stars show through */
body.portfolio .stage,
body.slide-deck .stage {
  background: linear-gradient(180deg, rgba(8, 14, 36, 0.28), rgba(8, 14, 36, 0.42));
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  z-index: 4;
}

.stage::before {
  top: 12px;
  left: -4px;
}
.stage::after {
  top: 12px;
  right: -4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(8, 14, 36, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.6rem;
  aspect-ratio: auto;
}

.logo {
  margin: 0;
  font-family: var(--font-mincho);
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--gold);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--cream);
}

.play-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  font-family: var(--font-gothic);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.play-btn[aria-pressed="true"] {
  background: rgba(198, 166, 97, 0.14);
  color: var(--cream);
}

.slide-counter {
  margin: 0;
  min-width: 3.5rem;
  text-align: right;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--gold-dim);
}

body.slide-deck .hl {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
}

body.slide-deck .hl.num {
  font-family: var(--font-mincho);
  font-size: 1.15em;
  font-weight: 700;
  padding: 0 0.05em;
}

body.slide-deck .eyebrow {
  font-size: 0.86rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

body.slide-deck .slide-feature-row {
  align-items: start;
  align-content: start;
  grid-auto-rows: auto;
}

body.slide-deck .slide-feature-row .card,
body.slide-deck .slide-feature-row .media-card {
  height: auto;
}

/* Slide panels: larger type, tighter text block */
body.slide-deck .slide-feature-row .media-card {
  padding: 0.55rem 0.65rem 0.6rem;
  gap: 0;
  justify-content: flex-start;
}

.accent-org {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(198, 166, 97, 0.4);
}

body.slide-deck .slide-feature-row .media-label {
  margin-bottom: 0.12rem;
  font-size: clamp(0.78rem, 1.15vw, 0.92rem);
  letter-spacing: 0.16em;
}

body.slide-deck .slide-feature-row .media-card strong {
  margin: 0 0 0.12rem;
  font-size: clamp(1.12rem, 2vw, 1.42rem);
  line-height: 1.3;
}

body.slide-deck .slide-feature-row .media-url {
  margin: 0;
  font-size: clamp(0.92rem, 1.45vw, 1.12rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
}

body.slide-deck .slide-feature-row .media-card p {
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.12rem);
  line-height: 1.4;
}

body.slide-deck .slide-feature-row .impact-metric {
  margin: 0.05rem 0 0.15rem;
}

body.slide-deck #sec-profile.is-active {
  flex-direction: column;
  overflow: hidden;
  gap: 1rem;
  padding-top: 1.2rem;
  padding-bottom: 4.4rem;
  justify-content: flex-start;
}

body.slide-deck #sec-profile .scene-head {
  margin-bottom: 0.15rem;
  flex-shrink: 0;
}

body.slide-deck #sec-profile .scene-num {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
}

body.slide-deck #sec-profile .scene-title-text {
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  gap: 0.25rem;
}

body.slide-deck #sec-profile .slide-feature-row {
  flex: 0 1 auto;
  min-height: 0;
  align-content: start;
  grid-auto-rows: auto;
  margin-top: 0.35rem;
}

body.slide-deck #sec-profile .slide-feature-row .card,
body.slide-deck #sec-profile .slide-feature-row .media-card {
  min-height: 0;
  height: auto;
  align-content: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

body.slide-deck #sec-profile .slide-feature-row .card {
  display: flex;
  flex-direction: column;
}

body.slide-deck #sec-profile .media-thumb {
  aspect-ratio: 16 / 9;
  height: auto;
  flex: 0 0 auto;
  max-height: min(26vh, 11.5rem);
  margin: 0 0 0.35rem;
  background: #050812;
}

body.slide-deck #sec-profile .expertise-banner {
  flex-shrink: 0;
  margin: 0.35rem 0 0.45rem;
  text-align: center;
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: clamp(2.8rem, 6.8vw, 5rem);
  letter-spacing: 0.28em;
  line-height: 1.05;
  position: relative;
  min-height: 1.15em;
  order: 0;
}

body.slide-deck #sec-profile .expertise-banner .banner-line {
  display: block;
  background: linear-gradient(165deg, #f2e3b2 0%, var(--gold) 48%, #8a7340 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.slide-deck #sec-profile .expertise-banner .banner-primary {
  text-indent: 0.28em;
}

body.slide-deck #sec-profile .expertise-banner .banner-punch {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  opacity: 0;
  transform: translateY(-40%) scale(0.96);
  pointer-events: none;
}

body.slide-deck #sec-profile.is-punchline .banner-primary {
  opacity: 0;
  transform: translateY(-0.35em) scale(0.97);
}

body.slide-deck #sec-profile.is-punchline .banner-punch {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

body.slide-deck [data-reveal-panels] > .media-card {
  opacity: 0;
  transform: translateX(-1.4rem);
  pointer-events: none;
  transition:
    opacity 0.48s ease,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

body.slide-deck [data-reveal-panels] > .media-card.is-revealed {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

body.slide-deck .slide-feature-row .media-thumb {
  overflow: hidden;
  background: #050812;
}

body.slide-deck .slide-feature-row .media-thumb > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

body.slide-deck .impact-visual {
  min-height: clamp(11rem, 27vh, 15rem);
  margin: 0.25rem 0 1.1rem;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.5rem;
  border-top: 1px solid rgba(198, 166, 97, 0.2);
  border-bottom: 1px solid rgba(198, 166, 97, 0.2);
  background:
    radial-gradient(circle, rgba(198, 166, 97, 0.16), transparent 58%),
    linear-gradient(135deg, rgba(198, 166, 97, 0.05), transparent);
}

body.slide-deck .impact-word {
  font-family: var(--font-mincho);
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(198, 166, 97, 0.25);
}

body.slide-deck .impact-sub {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

body.slide-deck .impact-metric {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  margin: 0.15rem 0 0.35rem;
  color: var(--gold);
  line-height: 1;
}

body.slide-deck .impact-number {
  font-family: var(--font-mincho);
  font-size: clamp(2.7rem, 5.6vw, 4.2rem);
  font-weight: 700;
  text-shadow: 0 0 22px rgba(198, 166, 97, 0.25);
}

body.slide-deck .impact-unit {
  font-family: var(--font-mincho);
  font-size: 1.15rem;
  font-weight: 700;
}

.site-nav a.is-current {
  color: var(--gold);
}

/* Slide deck presentation */
body.slide-deck {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

body.slide-deck .stage-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
}

body.slide-deck .stage {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.slide-deck .site-header {
  position: relative;
  flex-shrink: 0;
}

body.slide-deck .scene {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1.6rem 2rem 5.5rem;
  border-bottom: none;
  scroll-margin-top: 0;
  justify-content: flex-start;
  animation: slideIn 0.45s ease;
}

body.slide-deck .scene.is-active {
  display: flex;
}

body.slide-deck #sec-stream.is-active {
  flex-direction: column;
  overflow: hidden;
  gap: 1rem;
  padding-top: 1.2rem;
  padding-bottom: 4.4rem;
  justify-content: flex-start;
}

body.slide-deck #sec-stream .scene-head {
  margin-bottom: 0.15rem;
  flex-shrink: 0;
}

body.slide-deck #sec-stream .scene-num {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
}

body.slide-deck #sec-stream .scene-title-text {
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  gap: 0.25rem;
}

body.slide-deck #sec-stream .stream-feature-row {
  flex: 0 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-content: start;
  grid-auto-rows: auto;
  margin-top: 0.35rem;
}

body.slide-deck #sec-stream .stream-feature-row .media-card {
  min-height: 0;
  height: auto;
  padding: 0.55rem 0.65rem 0.6rem;
  align-content: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

body.slide-deck #sec-stream .stream-feature-row .media-thumb {
  margin: -0.55rem -0.65rem 0.35rem;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: min(26vh, 11.5rem);
  flex: 0 0 auto;
  min-height: 0;
  background: #050812;
}

body.slide-deck #sec-stream .stream-feature-row .clip-mosaic {
  position: relative;
  overflow: hidden;
  background: rgba(6, 10, 28, 0.85);
  border-bottom: 1px solid rgba(198, 166, 97, 0.16);
}

body.slide-deck #sec-stream .clip-mosaic-track {
  position: absolute;
  inset: 0.35rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.22rem;
}

body.slide-deck #sec-stream .clip-mosaic-track img {
  width: 100%;
  min-width: 0;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 0.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  background: #080e24;
}

body.slide-deck #sec-stream .clip-mosaic-badge {
  position: absolute;
  right: 0.45rem;
  bottom: 0.4rem;
  z-index: 2;
  display: inline-flex;
  align-items: baseline;
  gap: 0.12rem;
  padding: 0.2rem 0.55rem 0.25rem;
  border: 1px solid rgba(198, 166, 97, 0.55);
  background: rgba(8, 14, 36, 0.82);
  color: var(--gold);
  line-height: 1;
  backdrop-filter: blur(6px);
}

body.slide-deck #sec-stream .clip-mosaic-badge .impact-number {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  text-shadow: 0 0 14px rgba(198, 166, 97, 0.35);
}

body.slide-deck #sec-stream .clip-mosaic-badge .impact-unit {
  font-size: 0.78rem;
}

body.slide-deck #sec-stream .stream-feature-row .media-label {
  margin-bottom: 0.12rem;
  font-size: clamp(0.78rem, 1.15vw, 0.92rem);
}

body.slide-deck #sec-stream .stream-feature-row strong {
  margin-bottom: 0.12rem;
  font-size: clamp(1.12rem, 2vw, 1.42rem);
  line-height: 1.3;
}

body.slide-deck #sec-stream .stream-feature-row .media-card p {
  font-size: clamp(0.95rem, 1.4vw, 1.12rem);
  line-height: 1.4;
}

body.slide-deck #sec-stream .stream-feature-row .media-url {
  font-size: clamp(0.92rem, 1.45vw, 1.12rem);
  line-height: 1.35;
}

body.slide-deck #sec-stream .stream-banner {
  flex-shrink: 0;
  margin: 0.35rem 0 0.45rem;
  text-align: center;
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.5vw, 3.3rem);
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-indent: 0;
  position: relative;
  min-height: 1.4em;
}

body.slide-deck #sec-stream .stream-banner .banner-line {
  display: block;
  background: linear-gradient(165deg, #f2e3b2 0%, var(--gold) 48%, #8a7340 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.slide-deck #sec-stream .stream-banner .banner-punch {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  opacity: 0;
  transform: translateY(-40%) scale(0.96);
  pointer-events: none;
}

body.slide-deck #sec-stream.is-punchline .banner-primary {
  opacity: 0;
  transform: translateY(-0.35em) scale(0.97);
}

body.slide-deck #sec-stream.is-punchline .banner-punch {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

body.slide-deck #sec-tools.is-active {
  flex-direction: column;
  overflow: hidden;
  gap: 1rem;
  padding-top: 1.2rem;
  padding-bottom: 4.4rem;
  justify-content: flex-start;
}

body.slide-deck #sec-tools .scene-head {
  margin-bottom: 0.15rem;
  flex-shrink: 0;
}

body.slide-deck #sec-tools .scene-num {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
}

body.slide-deck #sec-tools .scene-title-text {
  font-size: clamp(1.45rem, 2.8vw, 2.05rem);
  gap: 0.25rem;
}

body.slide-deck #sec-tools .tools-feature-row {
  flex: 0 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-content: start;
  grid-auto-rows: auto;
  margin-top: 0.35rem;
}

body.slide-deck #sec-tools .tools-feature-row .media-card {
  min-height: 0;
  height: auto;
  padding: 0.55rem 0.65rem 0.6rem;
  align-content: start;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

body.slide-deck #sec-tools .tools-feature-row .media-thumb {
  margin: -0.55rem -0.65rem 0.35rem;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: min(26vh, 11.5rem);
  flex: 0 0 auto;
  min-height: 0;
  background: #050812;
}

body.slide-deck #sec-tools .tools-feature-row .media-label {
  margin-bottom: 0.12rem;
  font-size: clamp(0.78rem, 1.15vw, 0.92rem);
}

body.slide-deck #sec-tools .tools-feature-row strong {
  margin-bottom: 0.12rem;
  font-size: clamp(1.12rem, 2vw, 1.42rem);
  line-height: 1.3;
}

body.slide-deck #sec-tools .tools-feature-row .media-card p {
  font-size: clamp(0.95rem, 1.4vw, 1.12rem);
  line-height: 1.4;
}

body.slide-deck #sec-tools .tools-feature-row .media-url {
  font-size: clamp(0.92rem, 1.45vw, 1.12rem);
  line-height: 1.35;
}

body.slide-deck #sec-tools .tools-banner {
  flex-shrink: 0;
  margin: 0.35rem 0 0.45rem;
  text-align: center;
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.5vw, 3.3rem);
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-indent: 0;
  position: relative;
  min-height: 2.7em;
}

body.slide-deck #sec-tools .tools-banner .banner-line {
  display: block;
  background: linear-gradient(165deg, #f2e3b2 0%, var(--gold) 48%, #8a7340 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

body.slide-deck #sec-tools .tools-banner .banner-punch {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  opacity: 0;
  transform: translateY(-40%) scale(0.96);
  pointer-events: none;
}

body.slide-deck #sec-tools.is-punchline .banner-primary {
  opacity: 0;
  transform: translateY(-0.35em) scale(0.97);
}

body.slide-deck #sec-tools.is-punchline .banner-punch {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

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

.scene {
  padding: 3.2rem 2rem 3.6rem;
  min-height: min(100vh, calc(100vw * 9 / 16));
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: 4rem;
  border-bottom: 1px solid rgba(198, 166, 97, 0.12);
}

.scene-hero {
  min-height: calc(100vh - 3.2rem);
  align-items: center;
  text-align: center;
  position: relative;
}

.hero-portrait {
  width: min(520px, 92vw);
  padding: 0;
  display: grid;
  gap: 0;
  justify-items: center;
}

.face-stage {
  position: relative;
  width: min(360px, 72vw);
  aspect-ratio: 1 / 1;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  border: none;
}

.face-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
  background: transparent;
}

.face-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-libra {
  width: min(620px, 82vw);
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  align-content: center;
}

.hero-libra-constellation {
  width: min(380px, 52vw);
  height: min(34vh, 260px);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.hero-libra-constellation .libra-svg {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.slide-deck .scene-hero.is-active {
  justify-content: center;
  gap: 0;
  overflow: hidden;
  padding-top: 1rem;
  padding-bottom: 4.2rem;
}

body.slide-deck .hero-libra {
  gap: 1rem;
  max-width: 100%;
}

body.slide-deck .hero-libra-constellation {
  width: min(360px, 48vw);
  height: min(32vh, 240px);
}

body.slide-deck .hero-baseline {
  width: min(280px, 48vw);
  position: relative;
  z-index: 2;
}

body.slide-deck .hero-identity {
  padding-top: 0.2rem;
  position: relative;
  z-index: 2;
}

.hero-baseline {
  width: min(360px, 72vw);
  height: 1px;
  margin: 0;
  background: var(--gold);
}

.hero-identity {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  padding-top: 1.15rem;
}

.logo-hero {
  margin: 0;
  font-family: var(--font-mincho);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  letter-spacing: 0.28em;
  color: var(--gold);
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--gold-dim);
}

.hero-title,
.scene-head h2,
.card h3,
.close-copy h2 {
  font-family: var(--font-mincho);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.hero-title {
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.25;
}

.rule {
  width: min(280px, 50%);
  height: 1px;
  margin: 1.1rem auto 1.2rem;
  background: var(--gold-dim);
}

.hero-sub {
  margin: 0;
  letter-spacing: 0.22em;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-copy {
  margin: 0 auto;
  max-width: 38rem;
  line-height: 2;
  letter-spacing: 0.05em;
  font-size: clamp(0.95rem, 1.5vw, 1.12rem);
}

.hero-meta {
  margin: 0.35rem 0 0;
  letter-spacing: 0.16em;
  color: var(--gold-dim);
  font-size: 0.8rem;
}

.scroll-cue {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.scroll-cue span {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: drip 2.2s ease-in-out infinite;
}

@keyframes drip {
  0%,
  100% {
    transform: scaleY(0.55);
    opacity: 0.4;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.scene-head {
  margin-bottom: 1.6rem;
  max-width: 52rem;
}

.scene-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  line-height: 1.45;
  color: var(--cream);
}

.scene-head h2 {
  color: var(--gold);
}

.scene-lead {
  margin: 0.7rem 0 0;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.scene-title {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0;
}

.scene-num {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: clamp(2.6rem, 5.2vw, 3.8rem);
  line-height: 1;
  font-feature-settings: "lnum";
  background: linear-gradient(165deg, #f2e3b2 0%, var(--gold) 48%, #7d6636 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  padding-right: 1.1rem;
  text-shadow: none;
}

.scene-num::after {
  content: "";
  position: absolute;
  right: 0;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line), transparent);
}

.scene-title-text {
  display: grid;
  gap: 0.35rem;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  letter-spacing: 0.08em;
  color: var(--gold);
}

.scene-title-en {
  font-family: var(--font-gothic);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

.scene-head-spread {
  max-width: none;
}

.scene-head-spread .scene-title {
  width: 100%;
}

.scene-title-aside {
  margin-left: auto;
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: clamp(0.95rem, 1.7vw, 1.2rem);
  letter-spacing: 0.28em;
  color: var(--gold-dim);
  white-space: nowrap;
  padding-left: 1.2rem;
  position: relative;
}

.scene-title-aside::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line), transparent);
}

.close-copy .close-phrase {
  margin: 1rem 0 0;
  font-family: var(--font-mincho);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  letter-spacing: 0.14em;
  color: var(--cream);
}

.grid-3,
.grid-2,
.media-row,
.demo-grid {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.media-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.1rem;
}

.card,
.media-card {
  background: var(--panel);
  border: 1px solid rgba(198, 166, 97, 0.22);
  padding: 1.15rem 1.2rem;
}

.card-kicker,
.media-label,
.year {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
}

body.portfolio .card-kicker,
body.portfolio .media-label,
body.portfolio .year {
  color: var(--cream);
}

.card h3,
.media-card strong {
  display: block;
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--cream);
  font-family: var(--font-mincho);
  font-weight: 600;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.92rem;
}

.link,
.link-row {
  margin-top: 0.85rem;
}

.link-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.link {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.media-card {
  display: grid;
  align-content: start;
  color: inherit;
  text-decoration: none;
  min-height: 7.5rem;
  transition: border-color 0.3s ease, transform 0.35s ease;
}

.media-thumb {
  margin: -1.15rem -1.2rem 0.85rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid rgba(198, 166, 97, 0.16);
  background: #050812;
}

.card > .media-thumb {
  margin: 0 0 0.85rem;
  border-bottom: none;
  border: 1px solid rgba(198, 166, 97, 0.16);
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.media-thumb-video {
  position: relative;
  background: #000;
}

.media-thumb-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.card > .media-thumb-video {
  aspect-ratio: 16 / 9;
}

.media-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  text-decoration: none;
}

.media-card.static {
  cursor: default;
}

.appearance-video-card {
  display: flex;
  flex-direction: column;
}

body.portfolio .appearance-video-card.panel-open {
  cursor: pointer;
}

.panel-modal-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #050812;
}

.appearance-video {
  margin: 0 0 0.85rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(198, 166, 97, 0.16);
  background: #080e24;
}

.appearance-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Portfolio panels: edge-to-edge, consistent 16:9 media */
body.portfolio .card > .media-thumb,
body.portfolio .appearance-video {
  width: auto;
  margin: -1.15rem -1.2rem 0.85rem;
  aspect-ratio: 16 / 9;
  border: 0;
  border-bottom: 1px solid rgba(198, 166, 97, 0.16);
}

body.portfolio .media-thumb,
body.portfolio .demo-shot,
body.portfolio .archive-thumb {
  aspect-ratio: 16 / 9;
}

body.portfolio .media-thumb img,
body.portfolio .demo-shot img,
body.portfolio .archive-thumb img,
body.portfolio .appearance-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-url {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.demo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.2rem;
}

.demo {
  margin: 0;
  overflow: hidden;
  background: #050812;
}

.demo figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(198, 166, 97, 0.2);
  font-size: 0.85rem;
}

.demo-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.demo-link:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  text-decoration: none;
}

.demo-cap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: baseline;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(198, 166, 97, 0.2);
  font-size: 0.85rem;
}

.demo-cap strong {
  font-family: var(--font-mincho);
  color: var(--cream);
}

.demo-cap span {
  color: var(--gold);
  font-size: 0.78rem;
}

.demo-shot {
  aspect-ratio: 16 / 9;
  background: #050812;
  overflow: hidden;
  position: relative;
}

.demo-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.demo-shot iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050812;
  pointer-events: none;
  transform: scale(0.55);
  transform-origin: top left;
  width: 181.82%;
  height: 181.82%;
}

.demo-shot img[src*="nanashino-website"] {
  object-fit: cover;
  object-position: center 42%;
}

.archive-thumb img[src*="nanashino-website"] {
  object-fit: cover;
  object-position: center 42%;
}

.demo iframe {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  background: #000;
  display: block;
}

.demo-note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.archive-block {
  margin-top: 1.5rem;
}

.archive-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.archive-block h3 {
  margin: 0;
  font-family: var(--font-mincho);
  font-size: 1.05rem;
  color: var(--gold);
  letter-spacing: 0.12em;
}

.rail-hint {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: rgba(180, 190, 210, 0.55);
}

.archive-rail {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0.15rem 0.9rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--gold-dim) transparent;
}

.archive-rail:focus-visible {
  outline: 1px solid var(--line);
  outline-offset: 4px;
}

.archive-card {
  flex: 0 0 240px;
  width: 240px;
  scroll-snap-align: start;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--panel);
  border: 1px solid rgba(198, 166, 97, 0.22);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.archive-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  text-decoration: none;
}

.archive-card.is-plain {
  cursor: default;
}

.archive-card.is-plain:hover {
  transform: none;
}

.archive-thumb {
  position: relative;
  background: #050812;
  overflow: hidden;
  border-bottom: 1px solid rgba(198, 166, 97, 0.16);
}

.archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.archive-thumb img.is-loaded {
  opacity: 1;
}

.archive-thumb img.is-center {
  object-position: center top;
}

.archive-thumb img[src*="shinjuku-ale-cosplay"] {
  object-fit: contain;
  object-position: center top;
  background: #050812;
}

body.portfolio .archive-thumb img[src*="shinjuku-ale-cosplay"] {
  object-fit: cover;
  object-position: center;
}

.archive-thumb.is-fallback,
.archive-thumb.is-error {
  display: grid;
  place-items: center;
  background:
    linear-gradient(160deg, rgba(198, 166, 97, 0.12), transparent 55%),
    #0a1230;
}

.archive-thumb.is-fallback::after,
.archive-thumb.is-error::after {
  content: attr(data-label);
  font-family: var(--font-mincho);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-align: center;
  padding: 0 0.8rem;
  line-height: 1.4;
}

.archive-body {
  display: grid;
  gap: 0.28rem;
  padding: 0.8rem 0.85rem 0.95rem;
  align-content: start;
}

.archive-body strong {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--cream);
}

.archive-body .src {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.close-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.2rem;
  align-items: stretch;
}

body.portfolio #sec-close .close-layout {
  align-items: center;
  overflow: visible;
}

.close-copy {
  padding: 1.5rem 1.4rem;
}

.close-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  line-height: 1.4;
}

.close-copy p {
  margin: 0 0 0.9rem;
  line-height: 1.9;
  color: var(--muted);
}

.close-benefits {
  display: flex;
  flex-direction: column;
}

.benefit-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.benefit-list li {
  display: grid;
  grid-template-columns: minmax(8.5rem, 0.75fr) 1.25fr;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0 0 0.7rem;
  border-bottom: 1px solid rgba(198, 166, 97, 0.18);
}

.benefit-list strong {
  font-family: var(--font-mincho);
  color: var(--gold);
  letter-spacing: 0.08em;
}

.benefit-list span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.close-copy .portfolio-more {
  margin: auto 0 0;
  padding-top: 1rem;
  color: var(--cream);
  font-size: 0.86rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

.portfolio-more a {
  color: var(--gold);
  text-underline-offset: 0.2em;
}

.contact {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.45rem;
}

.contact-label {
  margin: 0 0 0.2rem !important;
  color: var(--gold-dim) !important;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
}

.close-visual {
  margin: 0;
  display: grid;
  align-content: center;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(198, 166, 97, 0.14), transparent 55%),
    #050812;
  overflow: hidden;
  min-height: 280px;
}

body.portfolio #sec-close .close-visual.close-libra {
  background: transparent;
  overflow: visible;
  min-height: 0;
  border: none;
  box-shadow: none;
}

body.portfolio #sec-close .close-libra .libra-constellation {
  overflow: visible;
  padding: 0.4rem 0.2rem 0;
}

body.portfolio #sec-close .close-libra .libra-svg {
  overflow: visible;
  width: 100%;
  max-height: min(58vh, 420px);
}

.close-visual img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.95;
}

.close-fade-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  overflow: hidden;
}

.close-fade-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: closeImageFade 18s ease-in-out infinite;
}

.close-fade-stage img:nth-child(1) { animation-delay: 0s; }
.close-fade-stage img:nth-child(2) { animation-delay: 3s; }
.close-fade-stage img:nth-child(3) { animation-delay: 6s; }
.close-fade-stage img:nth-child(4) { animation-delay: 9s; }
.close-fade-stage img:nth-child(5) { animation-delay: 12s; }
.close-fade-stage img:nth-child(6) { animation-delay: 15s; }

@keyframes closeImageFade {
  0% { opacity: 0; transform: scale(1.025); }
  3%,
  14% { opacity: 1; transform: scale(1); }
  17%,
  100% { opacity: 0; transform: scale(0.99); }
}

body.slide-deck #sec-close.is-active {
  flex-direction: column;
  overflow: hidden;
  padding-top: 1.2rem;
  padding-bottom: 4.5rem;
}

body.slide-deck #sec-close .close-layout {
  flex: 1;
  min-height: 0;
  grid-template-columns: 1fr;
  align-content: center;
  max-width: 64rem;
  margin-inline: auto;
  width: 100%;
}

body.slide-deck #sec-close .close-copy {
  padding: 0.8rem 1rem;
}

body.slide-deck #sec-close .close-benefits .scene-title {
  justify-content: center;
}

body.slide-deck #sec-close .benefit-list {
  margin-top: 1.2rem;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.slide-deck #sec-close .benefit-list.benefit-pillars li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  border-bottom: 0;
  grid-template-columns: none;
  text-align: center;
}

body.slide-deck #sec-close .benefit-visual {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.28rem;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(198, 166, 97, 0.28);
  background: #050812;
}

body.slide-deck #sec-close .benefit-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

body.slide-deck #sec-close .benefit-visual img:first-child {
  grid-row: 1 / span 2;
}

body.slide-deck #sec-close .benefit-list strong {
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  line-height: 1.35;
  letter-spacing: 0.06em;
}

body.slide-deck #sec-close .scene-title-text {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

body.slide-deck #sec-close .close-copy .portfolio-more {
  padding-top: 1.4rem;
  font-size: clamp(0.95rem, 1.6vw, 1.18rem);
  text-align: center;
}

body.slide-deck #sec-close .close-fade-stage {
  min-height: 0;
}

body.slide-deck #sec-close .site-footer {
  flex-shrink: 0;
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  gap: 0.35rem;
}

/* Closing slide: circular assets floating up like stars */
body.slide-deck #sec-close {
  position: relative;
}

.close-star-float {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.close-star-float img {
  position: absolute;
  left: var(--x, 50%);
  top: 100%;
  width: var(--s, 6rem);
  height: var(--s, 6rem);
  border-radius: 50%;
  object-fit: cover;
  background: radial-gradient(circle, rgba(13, 23, 64, 0.55), rgba(5, 8, 18, 0.6));
  border: 1px solid rgba(198, 166, 97, 0.22);
  box-shadow:
    0 0 10px rgba(198, 166, 97, 0.12),
    0 0 22px rgba(198, 166, 97, 0.06);
  opacity: 0;
  filter: saturate(0.85) brightness(0.92);
  animation: closeStarRise var(--t, 18s) linear infinite;
  animation-delay: calc(-8s - var(--d, 0s));
}

@keyframes closeStarRise {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  8% {
    opacity: 0.44;
  }
  50% {
    transform: translateY(calc(-50vh - 50%)) translateX(0.45rem);
    opacity: 0.52;
  }
  88% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(calc(-100vh - 120%)) translateX(-0.3rem);
    opacity: 0;
  }
}

body.slide-deck #sec-close .close-layout {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .close-star-float {
    display: none;
  }
}

.libra-constellation {
  position: relative;
  width: 100%;
  padding: 1rem 0.8rem 0.2rem;
  overflow: visible;
}

.libra-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.libra-line {
  fill: none;
  stroke: rgba(198, 166, 97, 0.42);
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.libra-star .hit {
  fill: transparent;
  cursor: default;
}

.libra-star .glow {
  opacity: 0.28;
  transform-origin: center;
  transform-box: fill-box;
  transition: opacity 0.35s ease, transform 0.45s ease;
  pointer-events: none;
}

.libra-star .spike {
  fill: #f3e6b8;
  opacity: 0.92;
  transform-origin: center;
  transform-box: fill-box;
  transition: opacity 0.35s ease, transform 0.45s ease, fill 0.35s ease;
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(255, 239, 166, 0.45));
}

.libra-star .core {
  fill: #fffef6;
  opacity: 0.95;
  filter: drop-shadow(0 0 2px rgba(255, 239, 166, 0.7));
  transition: fill 0.3s ease, filter 0.35s ease, opacity 0.3s ease;
  pointer-events: none;
}

/* Portfolio: hover glow + click-to-name */
body.portfolio .libra-star .hit {
  cursor: pointer;
  outline: none;
}

body.portfolio .libra-star .hit:focus,
body.portfolio .libra-star .hit:focus-visible {
  outline: none;
}

body.portfolio .libra-star:hover .glow,
body.portfolio .libra-star:focus-within .glow {
  opacity: 0.95;
  transform: scale(1.35);
}

body.portfolio .libra-star:hover .core,
body.portfolio .libra-star:focus-within .core {
  fill: #fffef6;
  filter: drop-shadow(0 0 6px rgba(255, 239, 166, 0.95));
}

body.portfolio .libra-star:hover .spike,
body.portfolio .libra-star:focus-within .spike {
  fill: #fff8e7;
  opacity: 1;
  transform: scale(1.12) rotate(12deg);
  filter: drop-shadow(0 0 8px rgba(255, 239, 166, 0.95));
}

/* Named: label only — no selection frame / persistent ring */
body.portfolio .libra-star.is-named .glow {
  opacity: 0.55;
  transform: none;
}

body.portfolio .libra-star.is-named .core {
  fill: #fffef6;
  filter: drop-shadow(0 0 3px rgba(255, 239, 166, 0.7));
}

body.portfolio .libra-star.is-named .spike {
  fill: #f3e6b8;
  opacity: 0.95;
  transform: none;
}

body.portfolio .libra-label {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

body.portfolio .libra-star.is-named .libra-label {
  opacity: 1;
}

body.portfolio .libra-label-bayer,
body.portfolio .libra-label-name {
  fill: #f2e3b2;
  font-family: var(--font-gothic);
  paint-order: stroke fill;
  stroke: rgba(8, 14, 36, 0.88);
  stroke-width: 2.6px;
  stroke-linejoin: round;
}

body.portfolio .libra-label-bayer {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

body.portfolio .libra-label-name {
  font-size: 6.8px;
  letter-spacing: 0.01em;
  fill: #d8c48a;
}

body.portfolio .libra-hint {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

body.portfolio .libra-secret {
  max-width: none;
  margin: 0.9rem 0 0;
  padding: 0;
  opacity: 0;
  transform: translateX(-0.8rem);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    opacity 0.55s ease,
    transform 0.55s ease,
    max-height 0.55s ease;
}

body.portfolio .libra-secret.is-revealed {
  opacity: 1;
  transform: translateX(0);
  max-height: 32rem;
  pointer-events: auto;
}

body.portfolio .close-copy.has-secret .contact {
  opacity: 0.35;
  transition: opacity 0.4s ease;
}

body.portfolio .libra-secret-kicker {
  margin: 0 0 0.55rem;
  text-align: left;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--gold-dim, #8c7646);
}

body.portfolio .libra-secret p {
  margin: 0 0 0.75rem;
  font-family: var(--font-mincho);
  font-size: clamp(0.82rem, 1.35vw, 0.95rem);
  line-height: 1.95;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-align: left;
}

body.portfolio .libra-secret p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  body.portfolio .libra-secret {
    transform: translateY(0.6rem);
  }

  body.portfolio .libra-secret.is-revealed {
    transform: translateY(0);
  }

  body.portfolio .libra-secret-kicker {
    text-align: center;
  }
}

body.portfolio .libra-star:hover ~ .libra-line,
body.portfolio .libra-svg:has(.libra-star:hover) .libra-line {
  stroke: rgba(198, 166, 97, 0.72);
  transition: stroke 0.35s ease;
}

/* Slides: elegant auto cascade glow */
body.slide-deck .libra-star .glow {
  animation: libraAutoGlow 5.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

body.slide-deck .libra-star .core {
  animation: libraAutoCore 5.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

body.slide-deck .libra-star .spike {
  animation: libraAutoSpike 5.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

body.slide-deck .libra-line {
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  animation: libraLineFlow 7.2s ease-in-out infinite;
}

body.slide-deck .libra-line:nth-child(1) { animation-delay: 0.05s; }
body.slide-deck .libra-line:nth-child(2) { animation-delay: 0.2s; }
body.slide-deck .libra-line:nth-child(3) { animation-delay: 0.35s; }
body.slide-deck .libra-line:nth-child(4) { animation-delay: 0.5s; }
body.slide-deck .libra-line:nth-child(5) { animation-delay: 0.65s; }
body.slide-deck .libra-line:nth-child(6) { animation-delay: 0.8s; }
body.slide-deck .libra-line:nth-child(7) { animation-delay: 0.95s; }
body.slide-deck .libra-line:nth-child(8) { animation-delay: 1.1s; }
body.slide-deck .libra-line:nth-child(9) { animation-delay: 1.25s; }
body.slide-deck .libra-line:nth-child(10) { animation-delay: 1.4s; }

@keyframes libraAutoGlow {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.85);
  }
  40%,
  55% {
    opacity: 1;
    transform: scale(1.4);
  }
}

@keyframes libraAutoCore {
  0%,
  100% {
    fill: #e8d9a8;
    filter: drop-shadow(0 0 1px rgba(255, 239, 166, 0.35));
  }
  40%,
  55% {
    fill: #fffef6;
    filter: drop-shadow(0 0 8px rgba(255, 239, 166, 1));
  }
}

@keyframes libraAutoSpike {
  0%,
  100% {
    opacity: 0.75;
    fill: #e8d9a8;
    transform: scale(0.92) rotate(0deg);
    filter: drop-shadow(0 0 2px rgba(255, 239, 166, 0.35));
  }
  40%,
  55% {
    opacity: 1;
    fill: #fff8e7;
    transform: scale(1.18) rotate(14deg);
    filter: drop-shadow(0 0 10px rgba(255, 239, 166, 1));
  }
}

@keyframes libraLineFlow {
  0% {
    stroke-dashoffset: 280;
    stroke: rgba(198, 166, 97, 0.2);
  }
  28%,
  72% {
    stroke-dashoffset: 0;
    stroke: rgba(198, 166, 97, 0.7);
  }
  100% {
    stroke-dashoffset: 0;
    stroke: rgba(198, 166, 97, 0.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.slide-deck .libra-star .glow,
  body.slide-deck .libra-star .core,
  body.slide-deck .libra-star .spike,
  body.slide-deck .libra-line {
    animation: none;
  }

  .close-fade-stage img {
    animation: none;
  }

  .close-fade-stage img:first-child {
    opacity: 1;
  }
}

.close-visual figcaption {
  padding: 0.75rem 1rem 1rem;
  text-align: center;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer {
  margin-top: 1.6rem;
  border-top: 1px solid rgba(198, 166, 97, 0.18);
  padding-top: 1.2rem;
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  text-align: center;
}

.footer-mark {
  width: min(420px, 70%);
  height: auto;
  border: 1px solid rgba(198, 166, 97, 0.25);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

/* Gold waving frame */
.wave-frame {
  position: relative;
  isolation: isolate;
}

.wave-frame::before {
  content: "";
  position: absolute;
  inset: -2px;
  padding: 2px;
  border-radius: 2px;
  background: linear-gradient(
    120deg,
    rgba(198, 166, 97, 0.15),
    rgba(198, 166, 97, 0.95),
    rgba(245, 240, 230, 0.55),
    rgba(198, 166, 97, 0.95),
    rgba(198, 166, 97, 0.15)
  );
  background-size: 280% 280%;
  animation: goldWave 4.8s linear infinite;
  z-index: -1;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes goldWave {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.hud {
  position: fixed;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  z-index: 20;
  width: auto;
  display: grid;
  justify-items: center;
  pointer-events: none;
}

.hud > * {
  pointer-events: auto;
}

.slide-nav-btn {
  appearance: none;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--line);
  background: rgba(8, 14, 36, 0.82);
  color: var(--gold);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}

.slide-nav-btn:hover {
  background: rgba(198, 166, 97, 0.14);
}

.slide-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  align-items: center;
}

.slide-dot {
  appearance: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.slide-dot.is-active {
  background: var(--gold);
  border-color: var(--gold);
}

.progress {
  width: 100%;
  height: 1px;
  background: rgba(180, 190, 210, 0.25);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gold);
}

.timer,
.hint {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.hint {
  grid-column: 1 / -1;
  opacity: 0.65;
  text-align: center;
  pointer-events: none;
}

body.clean .site-nav,
body.clean .hint,
body.clean .slide-counter,
body.clean .slide-nav-btn,
body.clean .slide-dots,
body.clean .play-btn {
  opacity: 0;
  pointer-events: none;
}

body.clean .hud .timer {
  opacity: 0.4;
}

/* Panel detail modal */
.panel-open {
  cursor: pointer;
}

.panel-open:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.panel-modal[hidden] {
  display: none;
}

.panel-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.panel-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 20, 0.72);
}

.panel-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  max-height: min(82vh, 720px);
  overflow: auto;
  background: #0a1230;
  border: 1px solid var(--line);
  padding: 2.6rem 1.35rem 1.5rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.panel-modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  z-index: 2;
  appearance: none;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-gothic);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.panel-modal-close:hover,
.panel-modal-close:focus-visible {
  color: var(--gold);
  background: rgba(198, 166, 97, 0.12);
}

.panel-modal-media {
  margin: 0 0 1rem;
  border: 1px solid rgba(198, 166, 97, 0.22);
  background: #050812;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.panel-modal-media.is-portrait {
  aspect-ratio: 3 / 4;
  max-height: min(62vh, 30rem);
  width: min(100%, 22rem);
  margin-left: auto;
  margin-right: auto;
}

.panel-modal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.panel-modal-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.panel-modal-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
}

.panel-modal-dialog h3 {
  margin: 0 0 0.9rem;
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.panel-modal-body {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.panel-modal-link {
  display: inline-flex;
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  padding: 0.55rem 0.95rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  font-size: 0.82rem;
  text-decoration: none;
}

.panel-modal-link + .panel-modal-link {
  margin-left: 0.65rem;
}

.panel-modal-link[hidden] {
  display: none !important;
}

.panel-modal-link:hover {
  background: rgba(198, 166, 97, 0.12);
  text-decoration: none;
}

.demo-cap .detail-chip,
.archive-body .detail-chip {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--gold-dim);
}

@media (max-width: 980px) {
  .grid-3,
  .media-row,
  .demo-grid,
  .close-layout,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  body.slide-deck #sec-stream .stream-feature-row,
  body.slide-deck #sec-tools .tools-feature-row,
  body.slide-deck #sec-profile .slide-feature-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.slide-deck .close-layout {
    grid-template-columns: 1fr !important;
  }

  .archive-card {
    flex-basis: 210px;
    width: 210px;
  }

  .site-nav {
    display: none;
  }

  .scene {
    min-height: auto;
    padding: 2.4rem 1.1rem 2.8rem;
  }

  body.slide-deck .scene {
    padding: 1.1rem 1.2rem 4.4rem;
  }

  .stage-shell {
    width: 100%;
  }
}
