:root {
  --bg: #0a0917;
  --bg-panel: #151228;
  --bg-panel-soft: #1c1836;
  --purple: #8b6ef2;
  --purple-soft: #c9baff;
  --blue: #5aa9ff;
  --text: #ece9fb;
  --muted: #9891c0;
  --border: rgba(201, 186, 255, 0.14);
  --font-display: "Shippori Mincho", serif;
  --font-body: "Zen Kaku Gothic New", sans-serif;

  transition: color 0.3s ease;
}

html[data-theme="light"] {
  --bg: #f6f2fb;
  --bg-panel: #ffffff;
  --bg-panel-soft: #f1eaf9;
  --purple: #7c5cf0;
  --purple-soft: #5a3fd1;
  --blue: #2f6fd6;
  --text: #241f3a;
  --muted: #6b6485;
  --border: rgba(90, 63, 209, 0.15);
}

html[data-theme="light"] body {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(139, 110, 242, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(47, 111, 214, 0.06), transparent 60%),
    var(--bg);
}

html[data-theme="light"] .hero {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(139, 110, 242, 0.1), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(47, 111, 214, 0.08), transparent 60%);
}

html[data-theme="light"] .hero-title {
  background: linear-gradient(120deg, #5a3fd1, #2f6fd6 70%);
  -webkit-background-clip: text;
  background-clip: text;
}

html[data-theme="light"] .btn-primary,
html[data-theme="light"] .filter-chip.is-active,
html[data-theme="light"] .sort-btn.is-active {
  color: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.8;
  overflow-x: hidden;
}

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

#orb-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
}

/* ---------- HERO ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px clamp(20px, 6vw, 80px);
  z-index: 1;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(139, 110, 242, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(90, 169, 255, 0.12), transparent 60%);
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--purple-soft);
}

.nav-links {
  display: flex;
  gap: clamp(14px, 2vw, 32px);
}

.nav-links a {
  color: var(--muted);
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--purple-soft);
}

.hero-body {
  max-width: 720px;
  margin: auto 0;
  padding-top: 12vh;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.25;
  margin: 0 0 20px;
  background: linear-gradient(120deg, var(--purple-soft), var(--blue) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title-sub {
  display: block;
  font-size: 0.42em;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  margin-top: 10px;
  font-weight: 500;
}

.hero-lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 46ch;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(120deg, var(--purple), var(--blue));
  color: #0a0917;
  font-weight: 700;
  box-shadow: 0 0 30px rgba(139, 110, 242, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(139, 110, 242, 0.55);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--purple-soft);
}

.btn-ghost:hover {
  background: rgba(201, 186, 255, 0.08);
  transform: translateY(-2px);
}

.scroll-cue {
  align-self: center;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
  opacity: 0.6;
}

/* ---------- SECTIONS ---------- */

.section {
  position: relative;
  z-index: 1;
  padding: clamp(64px, 10vw, 120px) clamp(20px, 6vw, 80px);
  border-top: 1px solid var(--border);
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin: 0 0 20px;
  color: var(--purple-soft);
}

.section-note {
  color: var(--muted);
  margin-bottom: 40px;
}

.about-text {
  max-width: 62ch;
  color: var(--text);
}

.about-text-muted {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- WORKS ---------- */

.section-works {
  background: linear-gradient(180deg, transparent, rgba(139, 110, 242, 0.04));
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.work-card:hover,
.work-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(201, 186, 255, 0.4);
  background: var(--bg-panel-soft);
}

.work-glow {
  position: absolute;
  top: -40%;
  right: -30%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(139, 110, 242, 0.35), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.work-card:hover .work-glow {
  opacity: 1;
}

.work-icon {
  font-size: 1.9rem;
  margin-bottom: 14px;
}

.work-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 10px;
  color: var(--text);
}

.work-desc {
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
  margin: 0 0 18px;
}

.work-play {
  font-size: 0.85rem;
  color: var(--blue);
  font-weight: 500;
}

.work-tag-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 0.68rem;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(139, 110, 242, 0.15);
  border: 1px solid rgba(201, 186, 255, 0.3);
  color: var(--purple-soft);
  z-index: 2;
}

/* ---------- LINKS ---------- */

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.link-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 26px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-width: 180px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.link-chip:hover {
  transform: translateY(-3px);
  border-color: rgba(201, 186, 255, 0.4);
}

.link-chip-label {
  font-weight: 700;
  color: var(--purple-soft);
}

.link-chip-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.link-chip-todo {
  opacity: 0.55;
}

.link-footnote {
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- FOOTER ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ---------- MOTION / ACCESSIBILITY ---------- */

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

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
  #orb-field {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-body {
    padding-top: 8vh;
  }
}

/* ============================================================
   拡張機能: プログレスバー / モバイルナビ / 演出強化
   ============================================================ */

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 50;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  box-shadow: 0 0 10px rgba(139, 110, 242, 0.6);
  transition: width 0.1s linear;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(20px, 6vw, 80px);
  font-size: 0.92rem;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}

.site-nav.is-scrolled {
  background: rgba(10, 9, 23, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
  padding: 12px clamp(20px, 6vw, 80px);
}

.nav-links a.is-active {
  color: var(--purple-soft);
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--blue);
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--purple-soft);
  font-size: 0.95rem;
  cursor: pointer;
  margin-left: 12px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(15deg);
  border-color: rgba(201, 186, 255, 0.4);
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 16px;
  margin: 0 auto;
  background: var(--purple-soft);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ヒーロー入場アニメーション */
.reveal-in {
  opacity: 0;
  transform: translateY(14px);
  animation: revealIn 0.9s ease forwards;
  animation-delay: var(--d, 0s);
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- 作品フィルター ---------- */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-chip {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-chip:hover {
  color: var(--purple-soft);
  border-color: rgba(201, 186, 255, 0.4);
}

.filter-chip.is-active {
  background: linear-gradient(120deg, var(--purple), var(--blue));
  color: #0a0917;
  font-weight: 700;
  border-color: transparent;
}

.work-card.is-hidden {
  display: none;
}

/* カードの立体チルト */
.work-card {
  will-change: transform;
  transform-style: preserve-3d;
}

/* ---------- キャラ図鑑 ---------- */

.section-characters {
  background: linear-gradient(180deg, transparent, rgba(90, 169, 255, 0.04));
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.char-card {
  position: relative;
  padding: 22px;
  background: var(--bg-panel);
  border: 1px dashed var(--border);
  border-radius: 16px;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.char-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 186, 255, 0.4);
}

.char-thumb {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--purple-soft);
  background: radial-gradient(circle, rgba(139, 110, 242, 0.25), rgba(90, 169, 255, 0.1));
}

.char-name {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 12px;
  color: var(--text);
}

.char-meta {
  margin: 0 0 14px;
  font-size: 0.78rem;
  color: var(--muted);
}

.char-meta div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
}

.char-meta dt {
  opacity: 0.8;
}

.char-badge,
.status-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(90, 169, 255, 0.12);
  color: var(--blue);
  border: 1px solid rgba(90, 169, 255, 0.3);
}

.status-badge {
  margin-top: 18px;
}

.section-hint {
  margin-top: 22px;
  font-size: 0.82rem;
  color: var(--muted);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 14px 0 0;
}

.section-hint code,
.form-hint code {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.85em;
}

/* ---------- ブログ ---------- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.blog-card {
  padding: 22px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 186, 255, 0.4);
}

.blog-tag {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--purple-soft);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.blog-card h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.05rem;
}

.blog-card p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

/* ---------- リンクグループ ---------- */

.link-group {
  margin-bottom: 30px;
}

.link-group-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--blue);
  margin: 0 0 12px;
  letter-spacing: 0.04em;
}

/* ---------- 相談窓口 / コメント ---------- */

.section-consult,
.section-comments {
  background: linear-gradient(180deg, transparent, rgba(139, 110, 242, 0.03));
}

/* ---------- 依頼・相談リンク ---------- */

.contact-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 26px 0 14px;
}

.contact-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 26px;
  min-width: 220px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.contact-option:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 186, 255, 0.4);
  background: var(--bg-panel-soft);
}

.contact-option-title {
  font-weight: 700;
  color: var(--purple-soft);
}

.contact-option-sub {
  font-size: 0.82rem;
  color: var(--muted);
}

.marshmallow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 13px 28px;
  border-radius: 999px;
  background: linear-gradient(120deg, #ffb6d9, #ff8bd6);
  color: #3a0d24;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: 0 0 24px rgba(255, 139, 214, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.marshmallow-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(255, 139, 214, 0.5);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px dashed var(--border);
}

.contact-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-form label {
  font-size: 0.85rem;
  color: var(--muted);
}

.contact-form select,
.contact-form input,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  resize: vertical;
}

.contact-form select:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139, 110, 242, 0.18);
}

.contact-form .btn {
  align-self: flex-start;
  border: none;
  cursor: pointer;
}

.contact-form .btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---------- フッター ---------- */

.footer-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--purple-soft);
}

/* ---------- トップへ戻るボタン ---------- */

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(21, 18, 40, 0.85);
  backdrop-filter: blur(8px);
  color: var(--purple-soft);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  z-index: 30;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top:hover {
  border-color: rgba(201, 186, 255, 0.5);
}

/* ---------- モバイル対応 ---------- */

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 9, 23, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.is-open {
    max-height: 320px;
  }
  .nav-links a {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
  }
}

/* ============================================================
   遊び心: レトロカウンター / トースト / いきもの演出
   ============================================================ */

.visit-counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px auto 10px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-panel);
  width: fit-content;
}

.visit-counter-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.visit-counter-digits {
  font-family: "Courier New", monospace;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: #baffc9;
  background: #05170a;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(186, 255, 201, 0.25);
  text-shadow: 0 0 6px rgba(186, 255, 201, 0.6);
}

.footer-hint {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.7;
}

/* ---------- トースト通知 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 20px);
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(21, 18, 40, 0.92);
  border: 1px solid var(--border);
  color: var(--purple-soft);
  font-size: 0.88rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 60;
  backdrop-filter: blur(10px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- いきものバースト演出 ---------- */

.critter {
  position: fixed;
  top: -40px;
  font-size: 1.6rem;
  z-index: 55;
  pointer-events: none;
  animation-name: critterFall;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
  filter: drop-shadow(0 0 6px rgba(139, 110, 242, 0.5));
}

@keyframes critterFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(105vh) rotate(360deg);
    opacity: 0.9;
  }
}

.brand-mark {
  cursor: pointer;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .critter {
    display: none;
  }
  .toast {
    transition: none;
  }
}

/* ============================================================
   追加UI: スプラッシュ / 並び替え / 共有ボタン / キャラ検索
   ============================================================ */

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.7s ease;
}

.splash span {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  color: var(--purple-soft);
  animation: splashPulse 1.4s ease-in-out infinite;
}

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

@keyframes splashPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

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

/* ---------- 並び替え ---------- */

.sort-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.sort-label {
  color: var(--muted);
}

.sort-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s ease;
}

.sort-btn:hover {
  color: var(--purple-soft);
}

.sort-btn.is-active {
  border-color: rgba(201, 186, 255, 0.5);
  color: var(--purple-soft);
  background: rgba(139, 110, 242, 0.12);
}

/* ---------- work-card-wrap / 共有ボタン ---------- */

.work-card-wrap {
  position: relative;
}

.work-card-wrap.is-hidden {
  display: none;
}

.work-share {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 9, 23, 0.55);
  color: var(--purple-soft);
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  z-index: 2;
}

.work-card-wrap:hover .work-share,
.work-share:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.work-share:hover {
  border-color: rgba(201, 186, 255, 0.5);
}

/* ---------- キャラ検索 ---------- */

.char-toolbar {
  margin-bottom: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.char-search {
  width: 100%;
  max-width: 420px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
}

.char-search:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139, 110, 242, 0.18);
}

.char-fav-filter-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.char-fav-filter-btn:hover {
  color: var(--pink, #ff8bd6);
}

.char-fav-filter-btn.is-active {
  border-color: rgba(255, 139, 214, 0.5);
  color: #ff8bd6;
  background: rgba(255, 139, 214, 0.1);
}

.char-fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.char-fav-btn:hover {
  transform: scale(1.15);
}

.char-fav-btn.is-fav {
  color: #ff8bd6;
}

.char-card.is-hidden {
  display: none;
}

.char-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.char-empty.is-hidden {
  display: none;
}

.char-world {
  font-size: 0.78rem;
  color: var(--blue);
  margin: 0 0 10px;
}

.char-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 14px;
}

.char-tag {
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(90, 169, 255, 0.1);
  border: 1px solid rgba(90, 169, 255, 0.25);
  color: var(--blue);
}

/* ---------- 実績表示 ---------- */

.achievement-line {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 10px 0 0;
}

/* ---------- 隠し部屋(発見済みミニゲームへの扉) ---------- */

.hidden-room {
  margin: 14px 0;
  padding: 14px 20px;
  border: 1px dashed rgba(201, 186, 255, 0.3);
  border-radius: 14px;
  background: rgba(139, 110, 242, 0.05);
}

.hidden-room.is-hidden {
  display: none;
}

.hidden-room-title {
  font-size: 0.82rem;
  color: var(--purple-soft);
  margin: 0 0 8px;
}

.hidden-room-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.hidden-room-link {
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(201, 186, 255, 0.3);
  color: var(--purple-soft);
  transition: background 0.25s ease;
}

.hidden-room-link:hover {
  background: rgba(201, 186, 255, 0.1);
}

/* ---------- ポータル出現トースト用リンク ---------- */

.toast a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  margin-left: 6px;
}

/* ---------- 相談窓口 ---------- */

.section-consult {
  background: linear-gradient(180deg, transparent, rgba(139, 110, 242, 0.03));
}

/* ============================================================
   コメント欄(giscus)/ ブログ(note連携)
   ============================================================ */

.giscus-wrap {
  margin-top: 18px;
  min-height: 120px;
}

.giscus-wrap.is-hidden {
  display: none;
}

/* ---------- ブログ(note連携) ---------- */

.blog-loading {
  color: var(--muted);
  font-size: 0.88rem;
  grid-column: 1 / -1;
}

.blog-card {
  display: flex;
  flex-direction: column;
}

.blog-card a {
  color: inherit;
}

.blog-card-date {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 10px;
}

.blog-more-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--blue);
}

/* ---------- 更新履歴 ---------- */

.section-changelog {
  background: linear-gradient(180deg, transparent, rgba(90, 169, 255, 0.03));
}

.changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
}

.changelog-list li {
  position: relative;
  padding: 4px 0 18px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}

.changelog-list li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 8px rgba(139, 110, 242, 0.6);
}

.changelog-date {
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  color: var(--blue);
  min-width: 100px;
}

.changelog-text {
  color: var(--text);
  font-size: 0.9rem;
}
