/* Webフォントは各HTMLの<link>で読込(非ブロック)。ここに@importを戻すと二重読込+レンダーブロックになる */
:root {
  /* Outer night frame and white content surfaces */
  --night: #0d0b10;
  --night-soft: #17141d;
  --panel: #ffffff;
  --panel-soft: #f7f5fa;

  /* Text */
  --ink: #494949;
  --ink-soft: #6d6871; /* panel-soft上5.01:1。AAコントラストに余裕を確保 */
  --ink-on-night: #e9e5ef;
  --ink-on-night-soft: #b3aec0;

  /* Plum accent */
  --plum: #7a5f9e;
  --plum-hover: #61497f;
  --plum-tint: #ece5f4;
  --botanical-stroke: #9b87b8;

  /* Decorative pastels: do not use for text */
  --pastel-mizu: #cfe8f0;
  --pastel-momo: #f7d8e0;
  --pastel-ki: #f6ecc8;

  /* Lines */
  --line-dot: rgba(211, 134, 255, 0.4);
  --line: rgba(73, 73, 73, 0.16);
  --line-on-night: rgba(233, 229, 239, 0.22);

  --r-card: 20px;
  --r-btn: 999px;
  --r-input: 12px;
  --r-tag: 999px;

  --dur-s: 250ms;
  --dur-m: 600ms;
  --dur-l: 800ms;
  --ease-veil: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-fade: cubic-bezier(0.33, 0, 0.2, 1);

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
  --space-7: 128px;
  --space-8: 160px;
  --space-9: 192px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.04em;
  font-feature-settings: "palt" 1;
  color: var(--ink);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
  radial-gradient(ellipse 45% 15% at 50% 0%, rgba(150, 100, 215, 1), transparent),
  var(--night);
}

h1,
h2,
h3 {
  font-family: "Shippori Mincho", serif;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.08em;
  font-feature-settings: "palt" 1;
  color: var(--ink);
}

h1 {
  font-size: clamp(1.625rem, 2.8vw + 0.7rem, 2.5rem);
}

h2 {
  font-size: clamp(1.375rem, 1.6vw + 0.9rem, 1.875rem);
}

h3 {
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

p {
  max-width: 36em;
}

em,
i {
  font-style: normal;
  font-weight: 700;
}

.label-en {
  font-family: "Cormorant", serif;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--plum);
}

.num-en {
  font-family: "Cormorant", serif;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.text-soft {
  color: var(--ink-soft);
}

a {
  color: var(--plum);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--plum-hover);
}

:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  color: var(--ink);
  background: var(--plum-tint);
}

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

img {
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: 32px;
  background: transparent;
}

.section > .container {
  width: min(1080px, calc(100% - 48px));
  padding: var(--space-6) clamp(24px, 5vw, 64px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.28),
    0 24px 56px rgba(0, 0, 0, 0.34);
}

.section-alt {
  background: transparent;
}

.section-alt > .container {
  background: var(--panel-soft);
}

.hairline-v {
  width: 1px;
  height: 56px;
  margin-inline: auto;
  background: var(--line-dot);
}

.hairline-side {
  display: inline-block;
  width: 48px;
  height: 1px;
  vertical-align: middle;
  background: var(--line-dot);
}

@media (min-resolution: 2dppx) {
  .hairline-v {
    transform: scaleX(0.5);
  }
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 44px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--panel);
  background: var(--plum);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--dur-s) var(--ease-veil),
    color var(--dur-s) var(--ease-fade),
    background var(--dur-s) var(--ease-fade),
    border-color var(--dur-s) var(--ease-fade);
}

.btn:hover {
  color: var(--panel);
  background: var(--plum-hover);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
}

.btn-ghost {
  color: var(--plum);
  background: transparent;
  border-color: var(--plum);
  box-shadow: none;
}

.btn-ghost:hover {
  color: var(--panel);
  background: var(--plum-hover);
  border-color: var(--plum-hover);
}

.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
  transform: none;
}

@keyframes veil-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--dur-m) var(--ease-fade),
    transform var(--dur-m) var(--ease-veil);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-timeout:not(.js-ready) .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.js .reveal[data-rise="2"] {
  transition-delay: 120ms;
}

.js .reveal[data-rise="3"] {
  transition-delay: 240ms;
}

.js .reveal[data-rise="4"] {
  transition-delay: 360ms;
}

.js .reveal[data-rise="5"] {
  transition-delay: 480ms;
}

@media (max-width: 640px) {
  .container {
    padding-inline: 16px;
  }

  .section {
    padding-block: 20px;
  }

  .section > .container {
    width: calc(100% - 24px);
    padding: var(--space-4) 20px;
    border-radius: 16px;
  }

  .btn {
    width: 100%;
    padding-inline: 24px;
  }
}

/* --- 画像反転用 --- */
.img-inverse {
transform: scale(-1,1);
}

/* --- 点滅アニメーション設定 --- */
.blinking {
  animation: blink 1.2s ease-in-out infinite;
}

/* アニメーションの具体的な動き（透明度100% → 20% → 100%） */
@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.2; /* 一番薄くなったときの透明度（完全に消したい場合は0） */
  }
  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media print {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Request flow and FAQ */
.flow-list,
.faq-list {
  display: grid;
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}

.flow-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 24px;
  padding-block: 24px;
  border-bottom: 1px dotted var(--line-dot);
}

.flow-item:first-child {
  border-top: 1px dotted var(--line-dot);
}

.flow-item > * {
  min-width: 0;
}

.flow-number {
  font-family: "Cormorant", serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--plum);
}

.flow-row {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 24px;
  padding-block: 24px;
  border-bottom: 1px dotted var(--line-dot);
}

.flow-row:first-child {
  border-top: 1px dotted var(--line-dot);
}

.flow-row dt,
.flow-row dd {
  min-width: 0;
}

.flow-row dt {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: "Cormorant", serif;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--plum);
}

.flow-row dt::before {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  content: "STEP";
  color: var(--ink-soft);
}

.flow-row dd {
  padding-left: 24px;
  border-left: 1px dotted var(--line-dot);
}

.flow-title {
  font-family: "Shippori Mincho", serif;
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
  font-feature-settings: "palt" 1;
  color: var(--ink);
}

.flow-description {
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 0.875rem;
  line-height: 1.9;
  color: var(--ink-soft);
}

@media (max-width: 560px) {
  .flow-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
  }

  .flow-row dt {
    display: grid;
    align-content: start;
    gap: 4px;
    font-size: 1.25rem;
  }

  .flow-row dd {
    padding-left: 16px;
  }

  .flow-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
  }
}

/* Footer */
.footer {
  position: relative;
  padding-block: 80px 40px;
  color: var(--ink-on-night);
  background: var(--night-soft);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.34);
}

.footer::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 8px;
  content: "";
  pointer-events: none;
  background-color: var(--night);
  background-image:
    repeating-linear-gradient(45deg, rgba(233, 229, 239, 0.2) 0 4px, transparent 4px 8px),
    repeating-linear-gradient(-45deg, rgba(233, 229, 239, 0.12) 0 4px, transparent 4px 8px);
  background-size: 8px 8px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 64px;
}

.footer-brand {
  min-width: 0;
}

.footer-logo {
  display: inline-block;
  font-family: "Italiana", "Cormorant", serif;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.14em;
  color: var(--ink-on-night);
  text-decoration: none;
}

.footer-logo:hover {
  color: var(--ink-on-night);
}

.footer-tagline {
  margin-top: 16px;
  font-size: 0.8125rem;
  line-height: 1.9;
  color: var(--ink-on-night-soft);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 32px;
  align-content: start;
}

.footer a {
  overflow-wrap: anywhere;
  color: var(--ink-on-night);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-on-night);
}

.footer a:hover {
  color: var(--ink-on-night-soft);
  text-decoration-color: currentColor;
}

.footer-link {
  display: inline-block;
  padding-block: 10px;
  font-size: 0.875rem;
  line-height: 1.7;
  letter-spacing: 0.06em;
}

.footer-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line-on-night);
}

.footer-note,
.footer-copyright {
  max-width: none;
  font-size: 0.8125rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--ink-on-night-soft);
}

.footer-copyright {
  font-family: "Cormorant", serif;
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .footer {
    padding-block: 64px 40px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 40px;
  }

  .footer-copyright {
    white-space: normal;
  }
}

/* Lightbox: without .js, gallery anchors remain ordinary full-image links. */
.js .lightbox-trigger {
  cursor: zoom-in;
}

.lightbox[hidden] {
  display: none;
}

.lightbox {
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lightbox-panel {
  position: relative;
  display: grid;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  place-items: center;
  padding: 40px;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 24px 56px -16px rgba(0, 0, 0, 0.18);
}

.lightbox-figure {
  display: grid;
  min-width: 0;
  max-width: 100%;
  justify-items: center;
  gap: 16px;
}

.lightbox-image {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px);
  object-fit: contain;
}

.lightbox-caption {
  max-width: 48em;
  overflow-wrap: anywhere;
  font-size: 0.8125rem;
  line-height: 1.7;
  text-align: center;
  color: var(--ink-soft);
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-dot);
  border-radius: var(--r-btn);
  color: var(--ink);
  background: rgba(255, 253, 251, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition:
    color var(--dur-s) var(--ease-fade),
    background var(--dur-s) var(--ease-fade),
    transform var(--dur-s) var(--ease-veil);
}

.lightbox-close:hover {
  color: var(--panel);
  background: var(--plum-hover);
  transform: translateY(-2px);
}

.lightbox-close:focus-visible {
  outline: 2px solid var(--plum);
  outline-offset: 3px;
}

body:has(.lightbox[open]) {
  overflow: hidden;
}

@media (max-width: 560px) {
  .lightbox {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .lightbox-panel {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 64px 16px 24px;
    border-radius: 16px;
  }

  .lightbox-image {
    max-height: calc(100vh - 144px);
    max-height: calc(100dvh - 144px);
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-close {
    transition: none !important;
  }

  .lightbox-close:hover {
    transform: none !important;
  }
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--ink-on-night);
  background: var(--night-soft);
  border-bottom: 1px solid var(--line-on-night);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
}

.nav::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 7px;
  content: "";
  pointer-events: none;
  background-color: var(--night);
  background-image:
    repeating-linear-gradient(45deg, rgba(233, 229, 239, 0.2) 0 4px, transparent 4px 8px),
    repeating-linear-gradient(-45deg, rgba(233, 229, 239, 0.12) 0 4px, transparent 4px 8px);
  background-size: 8px 8px;
}

.nav-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  flex: 0 0 auto;
  font-family: "Italiana", "Cormorant", serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--ink-on-night);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--ink-on-night-soft);
}

.nav-links {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.nav-link {
  position: relative;
  padding: 8px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--ink-on-night);
  text-decoration: none;
}

.nav-link::after {
  position: absolute;
  right: 10px;
  bottom: 2px;
  left: 10px;
  height: 1px;
  content: "";
  background: var(--plum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms var(--ease-veil);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--ink-on-night);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-cta {
  min-height: 40px;
  margin-left: 8px;
  padding: 10px 20px;
  font-size: 0.8125rem;
}

.nav-mobile {
  display: none;
}

.nav-mobile summary {
  list-style: none;
}

.nav-mobile summary::-webkit-details-marker {
  display: none;
}

@media (max-width: 899px) {
  .nav-inner {
    min-height: 64px;
    gap: 16px;
  }

  .nav-logo {
    max-width: calc(100vw - 92px);
    overflow: hidden;
    font-size: 1.25rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-links {
    display: none;
  }

  .nav-mobile {
    position: relative;
    display: block;
    flex: 0 0 auto;
  }

  .nav-mobile summary {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--r-btn);
    color: var(--ink);
    background: var(--panel);
    cursor: pointer;
  }

  .nav-mobile[open] summary {
    color: var(--panel);
    background: var(--plum);
    border-color: var(--plum);
  }

  .nav-sheet {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: grid;
    width: min(280px, calc(100vw - 32px));
    max-height: calc(100vh - 88px);
    max-height: calc(100dvh - 88px);
    gap: 4px;
    padding: 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.06),
      0 16px 40px rgba(0, 0, 0, 0.12);
  }

  .nav-sheet a {
    min-width: 0;
    padding: 10px 14px;
    overflow-wrap: anywhere;
    border-radius: var(--r-input);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
  }

  .nav-sheet a:hover,
  .nav-sheet a[aria-current="page"] {
    color: var(--plum);
    background: var(--panel-soft);
  }

  .nav-sheet .btn {
    min-height: 48px;
    margin-top: 8px;
    padding: 12px 16px;
    color: var(--panel);
    background: var(--plum);
  }
}

/* Hero */
.hero {
  position: relative;
  padding-block: 3px 64px;
  overflow: hidden;
  color: var(--ink-on-night);
  text-align: center;
  background-image: url("../race.svg");
  background-repeat: repeat-x;
  vertical-align: bottom;
  preserveAspectRatio: none;
  background-size: 10%;
}

.hero .hairline-v {
  background: var(--line-on-night);
}

.hero-inner {
  display: grid;
  justify-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 16px;
}

.hero-label {
  font-family: "Cormorant", serif;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-on-night-soft);
}

.hero-display {
  font-family: "Cormorant", serif;
  font-size: clamp(2rem, 6vw + 0.3rem, 4.75rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.04em;
  color: var(--ink-on-night);
}

.hero-title {
  max-width: 24em;
  font-family: "Shippori Mincho", serif;
  font-size: clamp(1.3rem, 1.6vw + 0.8rem, 1.5rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.1em;
  font-feature-settings: "palt" 1;
  color: var(--ink-on-night);
}

.hero-lead {
  max-width: 36em;
  margin-top: 3px;
  font-size: 0.9rem;
  line-height: 1.3;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.hero .hero-lead {
  color: var(--ink-on-night-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.hero-media {
  position: relative;
  isolation: isolate;
  width: min(420px, 78vw);
  margin-top: 40px;
  transform: translateX(8%);
}

/* 画像装飾裏 */
.hero-media::before {
}

/* 画像装飾表 */
.hero-photo {
 filter: drop-shadow(0px 0px 2px #2075b0) drop-shadow(0px 0px 1px #a470eb);
}

.hero [data-rise] {
  opacity: 0;
  animation: veil-up var(--dur-l) var(--ease-veil) forwards;
}

.hero [data-rise="1"] { animation-delay: 0ms; }
.hero [data-rise="2"] { animation-delay: 120ms; }
.hero [data-rise="3"] { animation-delay: 240ms; }
.hero [data-rise="4"] { animation-delay: 360ms; }
.hero [data-rise="5"] { animation-delay: 480ms; }
.hero [data-rise="6"] { animation-delay: 600ms; }

@media (max-width: 640px) {
  .hero {
    padding-block: 64px;
  }

  .hero-copy {
    gap: 16px;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-media {
    width: min(340px, 82vw);
    transform: translateX(4%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero [data-rise] {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 64px 32px;
}

.gallery-card {
  min-width: 0;
}

.gallery-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.gallery-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--panel);
  border: 6px solid var(--panel);
  outline: 1px dotted var(--line-dot);
  outline-offset: 0;
  border-radius: var(--r-card);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.24),
    0 16px 36px rgba(0, 0, 0, 0.3);
  transition:
    transform var(--dur-s) var(--ease-veil),
    box-shadow var(--dur-s) var(--ease-fade);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--dur-m) var(--ease-veil);
}

.gallery-card--oval .gallery-thumb {
  aspect-ratio: 3 / 4;
  border-radius: 50%;
}

.gallery-card--oval .gallery-thumb img {
  object-position: 50% 30%;
}

.gallery-card--arch .gallery-thumb {
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px 0 0;
}

.gallery-card--wide {
  grid-column: span 2;
}

.gallery-card--wide .gallery-thumb {
  aspect-ratio: 16 / 10;
}

.gallery-link:hover .gallery-thumb,
.gallery-link:focus-visible .gallery-thumb {
  transform: translateY(-3px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.28),
    0 22px 48px rgba(0, 0, 0, 0.36);
}

/* Material page */
.material-hero-pixel {
  margin-top: 32px;
  padding: 12px;
  background: var(--panel);
  border: 1px dotted var(--line-dot);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.pixel-art {
  width: 218px;
  height: 241px;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.material-terms .flow-row {
  border-bottom: 1px dotted var(--line-dot);
}

.material-terms .flow-row:first-child {
  border-top: 1px dotted var(--line-dot);
}

.material-sample-media {
  display: grid;
  place-items: center;
  padding: 24px;
}

.material-sample-image {
  min-height: 0;
  object-fit: contain;
}

.gallery-link:hover .gallery-thumb img,
.gallery-link:focus-visible .gallery-thumb img {
  transform: scale(1.025);
}

.gallery-link:focus-visible {
  outline-offset: 6px;
}

.gallery-meta {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-bottom: 1px dotted var(--line-dot);
  padding-bottom: 16px;
}

.gallery-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: "Shippori Mincho", serif;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.06em;
  font-feature-settings: "palt" 1;
  color: var(--ink);
}

.gallery-year {
  flex: 0 0 auto;
  font-family: "Cormorant", serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

/* Commercial works */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.works-card {
  display: grid;
  grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.07);
  transition:
    transform var(--dur-s) var(--ease-veil),
    box-shadow var(--dur-s) var(--ease-fade);
}

.works-card:hover,
.works-card:focus-within {
  transform: translateY(-3px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 16px 40px rgba(0, 0, 0, 0.12);
}

.works-card-media {
  min-width: 0;
  background: var(--panel-soft);
  border-right: 1px solid var(--line);
}

.works-card-media img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  object-position: center;
}

.works-card-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 40px 24px;
}

.works-card-kicker {
  margin-bottom: 8px;
  font-family: "Cormorant", serif;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--plum);
}

.works-card-title {
  overflow-wrap: anywhere;
  font-family: "Shippori Mincho", serif;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.06em;
  font-feature-settings: "palt" 1;
  color: var(--ink);
}

.works-card-client,
.works-card-description {
  overflow-wrap: anywhere;
}

.works-card-client {
  margin-top: 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.works-card-description {
  margin-top: 16px;
  font-size: 0.875rem;
  line-height: 1.9;
  color: var(--ink);
}

.works-card-link {
  margin-top: auto;
  padding-top: 24px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.works-card--featured {
  grid-column: 1 / -1;
  grid-template-columns: minmax(240px, 42%) minmax(0, 1fr);
}

.works-card--featured .works-card-media img {
  min-height: 360px;
}

@media (max-width: 860px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .works-card--featured {
    grid-column: auto;
    grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
  }

  .works-card--featured .works-card-media img {
    min-height: 240px;
  }
}

@media (max-width: 560px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card--wide {
    grid-column: auto;
  }

  .gallery-card--oval,
  .gallery-card--arch {
    width: min(100%, 340px);
    margin-inline: auto;
  }

  .works-card,
  .works-card--featured {
    grid-template-columns: 1fr;
  }

  .works-card-media {
    border-right: 0;
    border-bottom: 1px dotted var(--line-dot);
  }

  .works-card-media img,
  .works-card--featured .works-card-media img {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .works-card-body {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-thumb,
  .gallery-thumb img,
  .works-card {
    transition: none !important;
  }

  .gallery-link:hover .gallery-thumb,
  .gallery-link:focus-visible .gallery-thumb,
  .gallery-link:hover .gallery-thumb img,
  .gallery-link:focus-visible .gallery-thumb img,
  .works-card:hover,
  .works-card:focus-within {
    transform: none !important;
  }
}

/* 素材カタログ */
.sozai-grid { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 48px; align-items: flex-end; }
.sozai-item { display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 12px 10px; background: var(--panel); border: 1px dotted var(--line-dot);
  border-radius: 12px; text-decoration: none; color: var(--ink-soft);
  transition: transform var(--dur-s) var(--ease-veil), border-color var(--dur-s) var(--ease-fade); }
.sozai-item:hover { transform: translateY(-3px); border: 1px solid var(--plum); }
.sozai-item img { image-rendering: pixelated; display: block; }
.sozai-name { font-size: 11px; letter-spacing: 0.04em; max-width: 110px;
  white-space: normal; overflow-wrap: anywhere; }
.sozai-toc ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.sozai-toc a { display: inline-block; padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--panel-soft); color: var(--plum); }
.sozai-count { font-family: "Cormorant", serif; font-size: 0.7em; font-weight: 500;
  color: var(--plum); margin-left: 10px; letter-spacing: 0.08em; }
.section-lead { color: var(--ink-soft); margin-top: 12px; font-size: 15px; }

/* 背景装飾レイヤー(月と猫・薔薇の線画/画面固定)。
   負のz-indexは禁止: ダークモード拡張や強制配色がhtml/bodyに背景を足すと装飾ごと隠れる
   (2026-07-18 Firefox/Edge実害)。装飾=z0・本文コンテンツ=z1の明示スタッキングで重ねる */
.bg-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
main#main-content { position: relative; z-index: 1; }
.footer { z-index: 1; }
.bg-layer { position: absolute; }
.bg-layer svg { display: block; width: 100%; height: auto; }
.bg-layer-sky { top: 3vh; right: 3vw; width: min(500px, 52vw); opacity: 0.34; }
.bg-layer-garden { bottom: -6vh; left: 2vw; width: min(400px, 44vw); opacity: 0.24; }
@media (max-width: 768px) {
  .bg-layer-sky { width: 70vw; right: -8vw; opacity: 0.26; }
  .bg-layer-garden { width: 60vw; left: -6vw; opacity: 0.18; }
}

/* heroは透過にして背景装飾(bg-decor)を透けさせる。夜色はbodyが持つ */
.hero { background-color: transparent; }

/* パステル丸バッジの中間折返し防止(文字数に応じて円径を確保) */
.pastel-badge { width: clamp(145px, 12vw, 170px); min-width: 145px; min-height: 145px;
  aspect-ratio: 1; padding: 5px; border: 3px dotted var(--line-dot); border-radius: 50%;
  color: var(--ink); box-shadow: none ; line-height: 1.7;
  text-align: center; letter-spacing: 0.01em; }
.pastel-badge--mizu,
.pastel-badge--mizu:hover { color: var(--ink); background: var(--pastel-mizu); }
.pastel-badge--momo,
.pastel-badge--momo:hover { color: var(--ink); background: var(--pastel-momo); }
.pastel-badge--ki,
.pastel-badge--ki:hover { color: var(--ink); background: var(--pastel-ki); }
.pastel-badge:focus-visible { outline-color: var(--plum); }

/* === UIレビュー修正(ui-review-1.md) === */

/* V1/V2: カードvariant — テキストのみカードは1列・空メディア枠は廃止 */
.works-card--text { grid-template-columns: minmax(0, 1fr); }
.works-card--text .works-card-media { display: none; }

/* V4: 書影カード — 表紙全体を見せる */
.works-card--book .works-card-media { display: flex; align-items: center; justify-content: center;
  padding: 20px; }
.works-card--book { grid-template-columns: 160px minmax(0, 1fr); }
.works-card--book .works-card-media img { width: auto; height: auto; max-width: 100%;
  max-height: 300px; object-fit: contain; min-height: 0; aspect-ratio: auto; }

/* V5: 小型画像カード — 原寸〜2倍まで・引き伸ばさない */
.works-card--smallart .works-card-media { display: flex; align-items: center; justify-content: center;
  padding: 16px; }
.works-card--smallart { grid-template-columns: 160px minmax(0, 1fr); }
.works-card--smallart .works-card-media img { width: auto; height: auto;
  max-width: 120px; object-fit: contain; min-height: 0; aspect-ratio: auto; }

@media (max-width: 560px) {
  .works-card--book,
  .works-card--smallart {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* V3: FAQは質問を番号列に入れず縦積みにする */
.faq-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px;
  padding-block: 24px; border-bottom: 1px dotted var(--line-dot); }
.faq-item:first-child { border-top: 1px dotted var(--line-dot); }
.faq-item > * { min-width: 0; }
.faq-item dt { font-family: "Zen Kaku Gothic New", sans-serif; font-size: 1rem;
  font-weight: 700; color: var(--ink); letter-spacing: 0.04em; }
.faq-item dd { color: var(--ink); }
.faq-item dt::before { content: "Q. "; color: var(--plum); font-weight: 700; }
.faq-item dd::before { content: "A. "; color: var(--ink-soft); font-weight: 700; }

/* V9: 利用規約はSTEP表記にしない */
.flow-list--terms .flow-row dt::before { content: none; }

/* スキップリンク(キーボード利用者向け・フォーカス時のみ表示) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 200;
  padding: 10px 20px; background: var(--panel); color: var(--plum);
  border-radius: 999px; border: 1px solid var(--plum); text-decoration: none;
  font-size: 14px; transition: top var(--dur-s) var(--ease-fade); }
.skip-link:focus-visible { top: 12px; }

/* V8: 3枚構成グリッド用 */
.works-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.works-grid--commercial { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .works-grid--three,
  .works-grid--commercial { grid-template-columns: minmax(0, 1fr); }
}
.works-grid--single { grid-template-columns: minmax(0, 1fr); }

/* inline style集約ユーティリティ */
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.mt-48 { margin-top: 48px; } .mt-56 { margin-top: 56px; } .mt-64 { margin-top: 64px; }
.ta-c { text-align: center; }
.grid-single { grid-template-columns: minmax(0, 1fr); }

/* Aboutプロフィールアイコン(pixivと同一画像・円形表示) */
.profile-avatar { border-radius: 50%; }
