:root {
  --ink: #26384f;
  --muted: #66798d;
  --bg: #f4fbff;
  --paper: rgba(255, 255, 255, 0.82);
  --line: rgba(61, 143, 184, 0.2);
  --water: #85d7ee;
  --water-deep: #4a9ed0;
  --pink: #f1a8c7;
  --lavender: #b7b7ec;
  --mint: #9be2cf;
  --sun: #f2d073;
  --shadow: 0 18px 60px rgba(55, 117, 151, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(245, 252, 255, 0.96), rgba(233, 247, 255, 0.98)),
    repeating-linear-gradient(120deg, rgba(133, 215, 238, 0.08) 0 2px, transparent 2px 24px);
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  overflow-x: hidden;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(246, 252, 255, 0.72);
  border-bottom: 1px solid rgba(94, 161, 202, 0.18);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(58, 137, 180, 0.2);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: #365774;
  font-size: 14px;
}

.main-nav a:hover {
  background: rgba(133, 215, 238, 0.18);
}

.language-switch {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, 38px);
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(74, 158, 208, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.language-switch button {
  width: 38px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: #517087;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.language-switch button:hover {
  background: rgba(133, 215, 238, 0.16);
}

.language-switch button[aria-pressed="true"] {
  color: #ffffff;
  background: #4a9ed0;
  box-shadow: 0 4px 12px rgba(61, 151, 204, 0.2);
}

.hero {
  position: relative;
  display: grid;
  min-height: 92svh;
  align-items: center;
  padding: 110px clamp(20px, 8vw, 108px) 72px;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(110deg, rgba(246, 252, 255, 0.96) 0%, rgba(236, 249, 255, 0.82) 42%, rgba(198, 235, 247, 0.35) 100%),
    url("../images/natsusou-kawaii.png") right 5% bottom -34px / min(48vw, 540px) auto no-repeat;
}

.hero::after {
  position: absolute;
  right: -4vw;
  bottom: 0;
  z-index: -1;
  width: 58vw;
  height: 28%;
  content: "";
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(132, 211, 238, 0.22));
  clip-path: polygon(0 48%, 16% 36%, 36% 58%, 58% 34%, 78% 50%, 100% 28%, 100% 100%, 0 100%);
}

.hero-copy {
  width: min(640px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--water-deep);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: clamp(64px, 13vw, 164px);
  line-height: 0.9;
  letter-spacing: 0;
  color: #2f6f9d;
  text-shadow: 0 12px 40px rgba(76, 153, 198, 0.18);
}

.hero-name {
  margin-bottom: 20px;
  color: #64829a;
  font-size: clamp(24px, 4vw, 54px);
  font-weight: 700;
}

.hero-lead {
  max-width: 520px;
  margin-bottom: 26px;
  color: #425e74;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-actions,
.rail-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--water-deep), var(--water));
  box-shadow: 0 12px 28px rgba(61, 151, 204, 0.25);
}

.button.ghost {
  color: #2d6b96;
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(75, 156, 204, 0.25);
}

.hero-art {
  position: absolute;
  right: clamp(8px, 6vw, 96px);
  bottom: -2px;
  z-index: -1;
  width: min(42vw, 520px);
  max-height: 84vh;
  object-fit: contain;
  object-position: bottom right;
  filter: drop-shadow(0 28px 38px rgba(57, 112, 150, 0.2));
  pointer-events: none;
}

.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  width: 28px;
  height: 42px;
  border: 1px solid rgba(55, 129, 178, 0.35);
  border-radius: 18px;
  transform: translateX(-50%);
}

.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  border-radius: 4px;
  background: var(--water-deep);
  transform: translateX(-50%);
  animation: cue 1.6s ease-in-out infinite;
}

.section {
  scroll-margin-top: 84px;
  padding: 86px clamp(20px, 7vw, 96px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading.inline {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

h2 {
  margin-bottom: 0;
  color: #2d5879;
  font-size: clamp(34px, 6vw, 74px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  color: #2e536f;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 24px;
  align-items: stretch;
}

.portrait-panel,
.profile-list,
.range-visual,
.download-card,
.video-frame,
.guide-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.portrait-panel {
  display: grid;
  min-height: 360px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(205, 239, 250, 0.56)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.32) 0 8px, transparent 8px 16px);
}

.portrait-panel img {
  width: min(92%, 330px);
  filter: drop-shadow(0 18px 22px rgba(72, 128, 160, 0.2));
}

.profile-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  padding: 1px;
  background: rgba(91, 169, 210, 0.18);
}

.profile-list div {
  min-height: 92px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.profile-list span,
.guide-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-list strong,
.guide-grid strong {
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.35;
}

.range-visual {
  margin-top: 22px;
  padding: 22px;
}

.range-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  color: #357ca9;
  font-weight: 900;
}

.range-fill {
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(92, 169, 212, 0.16);
}

.range-fill::after {
  position: absolute;
  inset: 0 8% 0 12%;
  content: "";
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lavender), var(--water), var(--mint), var(--sun));
}

.range-visual p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.gallery-section {
  padding-right: 0;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(68, 149, 197, 0.24);
  border-radius: 8px;
  color: #2d6f99;
  background: rgba(255, 255, 255, 0.78);
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(68, 133, 173, 0.13);
}

.art-rail {
  display: grid;
  grid-auto-columns: minmax(260px, 34vw);
  grid-auto-flow: column;
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 10px clamp(20px, 7vw, 96px) 24px 0;
  scroll-behavior: smooth;
  scroll-padding-inline: 20px;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(74, 158, 208, 0.45) rgba(255, 255, 255, 0.7);
}

.art-card {
  position: relative;
  display: grid;
  height: clamp(520px, 70vh, 720px);
  align-items: end;
  overflow: hidden;
  border: 1px solid rgba(74, 158, 208, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(218, 244, 251, 0.8)),
    repeating-linear-gradient(90deg, rgba(132, 215, 238, 0.08) 0 1px, transparent 1px 18px);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.art-card img {
  position: absolute;
  inset: 18px 0 88px;
  width: 100%;
  height: calc(100% - 112px);
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 24px 26px rgba(64, 124, 160, 0.18));
  transition: transform 300ms ease;
}

.art-card:hover img {
  transform: translateY(-8px) scale(1.02);
}

.art-card div {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 72px;
  align-items: center;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.86);
  border-top: 1px solid rgba(84, 163, 204, 0.16);
}

.art-card strong,
.art-card span {
  display: block;
}

.art-card strong {
  color: #3d7598;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.art-card span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.download-grid,
.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.download-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
}

.download-card.featured {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(219, 247, 254, 0.92));
  border-color: rgba(61, 151, 204, 0.38);
}

.download-card p {
  color: var(--muted);
  line-height: 1.7;
}

.download-card .button {
  width: 100%;
  margin-top: auto;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 8px;
  color: #2c6f96;
  background: rgba(133, 215, 238, 0.2);
  font-size: 12px;
  font-weight: 900;
}

.terms-section {
  background: rgba(225, 245, 252, 0.32);
  border-top: 1px solid rgba(74, 158, 208, 0.12);
  border-bottom: 1px solid rgba(74, 158, 208, 0.12);
}

.terms-section .guidelines-content {
  width: min(100%, 1080px);
}

.guidelines-intro {
  padding: 28px 30px;
  border-left: 4px solid var(--water-deep);
  background: rgba(255, 255, 255, 0.68);
}

.guidelines-title {
  margin: 0 0 8px;
  color: #2d5879;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
}

.guidelines-updated {
  color: var(--water-deep);
  font-size: 13px;
  font-weight: 800;
}

.guidelines-content p,
.guidelines-content li {
  color: #526b7f;
  font-size: 16px;
  line-height: 1.8;
}

.guidelines-content p:last-child,
.guideline-section ul:last-child,
.guideline-credit:last-child {
  margin-bottom: 0;
}

.guideline-section {
  padding: 28px 30px;
  border-top: 1px solid rgba(74, 158, 208, 0.16);
}

.guideline-section:nth-child(odd) {
  background: rgba(255, 255, 255, 0.34);
}

.guideline-section h4 {
  margin: 0 0 16px;
  color: #2f658b;
  font-size: 22px;
  line-height: 1.35;
}

.guideline-section ul {
  margin: 10px 0 18px;
  padding-left: 24px;
  columns: 2 300px;
  column-gap: 48px;
}

.guideline-section li {
  margin-bottom: 7px;
  break-inside: avoid;
}

.guideline-section li::marker {
  color: var(--water-deep);
}

.guideline-credit {
  display: grid;
  width: min(100%, 520px);
  grid-template-columns: minmax(100px, 0.4fr) 1fr;
  gap: 1px;
  margin: 12px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(74, 158, 208, 0.18);
  border-radius: 8px;
  background: rgba(74, 158, 208, 0.16);
}

.guideline-credit dt,
.guideline-credit dd {
  margin: 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.84);
}

.guideline-credit dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.guideline-credit dd {
  color: #315c7a;
  font-weight: 800;
}

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

.terms-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.terms-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 55, 73, 0.58);
  backdrop-filter: blur(8px);
}

.terms-dialog {
  position: relative;
  display: grid;
  width: min(960px, 100%);
  max-height: min(900px, calc(100dvh - 48px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(111, 188, 224, 0.36);
  border-radius: 8px;
  background: #f7fcff;
  box-shadow: 0 28px 90px rgba(21, 62, 88, 0.34);
}

.terms-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(74, 158, 208, 0.16);
  background: rgba(240, 250, 255, 0.96);
}

.terms-dialog-header .eyebrow {
  margin-bottom: 6px;
}

.terms-dialog-header h2 {
  font-size: 28px;
  line-height: 1.2;
}

.modal-close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(74, 158, 208, 0.24);
  border-radius: 50%;
  color: #3f6f8e;
  background: #ffffff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.terms-modal-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(74, 158, 208, 0.5) rgba(234, 247, 253, 0.9);
}

.terms-modal-scroll .guidelines-intro,
.terms-modal-scroll .guideline-section {
  padding: 22px 24px;
}

.terms-modal-scroll .guidelines-title {
  font-size: 24px;
}

.terms-modal-scroll .guideline-section ul {
  columns: 1;
}

.terms-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border-top: 1px solid rgba(74, 158, 208, 0.16);
  background: #ffffff;
}

.terms-consent {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
  color: #3d5d73;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
}

.terms-consent input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--water-deep);
}

.terms-dialog-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.terms-dialog-actions .button {
  white-space: nowrap;
  cursor: pointer;
}

.button:disabled {
  color: #8395a3;
  background: #dce8ee;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

body.modal-open {
  overflow: hidden;
}

.video-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

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

.guide-grid > div {
  min-height: 132px;
  padding: 22px;
}

.site-footer {
  padding: 34px 20px 46px;
  color: var(--muted);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

.ripple {
  position: fixed;
  z-index: 1000;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(74, 158, 208, 0.58);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: ripple 650ms ease-out forwards;
}

@keyframes cue {
  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: 0.3;
  }
  45% {
    transform: translate(-50%, 12px);
    opacity: 1;
  }
}

@keyframes ripple {
  to {
    width: 58px;
    height: 58px;
    opacity: 0;
  }
}

@media (max-width: 1100px) {
  .download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-art {
    opacity: 0.55;
    width: min(58vw, 480px);
  }

  .site-header {
    align-items: flex-start;
  }

  .header-tools {
    align-items: flex-end;
    flex-direction: column-reverse;
    gap: 6px;
  }
}

@media (max-width: 820px) {
  .section {
    scroll-margin-top: 112px;
  }

  .site-header {
    position: fixed;
    width: 100vw;
    max-width: 100vw;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    min-height: 104px;
    padding: 10px 16px;
  }

  .main-nav {
    display: grid;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    min-width: 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }

  .header-tools {
    display: block;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    min-width: 0;
  }

  .language-switch {
    position: fixed;
    top: 10px;
    right: auto;
    left: calc(100vw - 120px);
    z-index: 51;
    width: 104px;
    grid-template-columns: repeat(3, 32px);
  }

  .language-switch button {
    width: 32px;
  }

  .main-nav a {
    text-align: center;
    padding: 7px 6px;
    font-size: 12px;
  }

  .hero {
    min-height: 88svh;
    padding-top: 142px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(246, 252, 255, 0.97) 0%, rgba(236, 249, 255, 0.78) 52%, rgba(198, 235, 247, 0.35) 100%),
      url("../images/natsusou-kawaii.png") right -80px bottom -18px / 360px auto no-repeat;
  }

  .hero-art {
    display: none;
  }

  .profile-layout,
  .profile-list,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .section-heading.inline {
    align-items: start;
    flex-direction: column;
  }

  .gallery-section {
    padding-left: 20px;
  }

  .art-rail {
    grid-auto-columns: minmax(250px, 82vw);
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 104px;
  }

  .hero {
    padding-top: 142px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .guidelines-intro,
  .guideline-section {
    padding: 22px 20px;
  }

  .guideline-section ul {
    columns: 1;
  }

  .terms-modal {
    padding: 0;
  }

  .terms-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .terms-dialog-header {
    padding: 16px;
  }

  .terms-dialog-header h2 {
    font-size: 21px;
  }

  .terms-modal-scroll .guidelines-intro,
  .terms-modal-scroll .guideline-section {
    padding: 20px 16px;
  }

  .terms-dialog-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px 16px;
  }

  .terms-dialog-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(88px, 0.7fr) minmax(0, 1.3fr);
  }

  .terms-dialog-actions .button {
    min-width: 0;
    padding: 8px 10px;
    white-space: normal;
    line-height: 1.35;
  }

  .download-card {
    min-height: 220px;
  }

  .art-card {
    height: 560px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
