:root {
  --pink: #f19aaa;
  --pink-deep: #df7f91;
  --pink-soft: #fff0f4;
  --rose: #c98391;
  --ink: #4e4648;
  --muted: #8b7f83;
  --line: #f4d7dd;
  --white: #fff;
  --blue: #e9f8ff;
  --shadow: 0 18px 45px rgba(196, 125, 145, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.button,
.card-button,
.outline-button,
.wide-link {
  min-height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.card-button:hover,
.outline-button:hover,
.wide-link:hover {
  transform: translateY(-2px);
}

.button-primary,
.card-button {
  color: #fff;
  background: linear-gradient(135deg, #f39baa, #e9899d);
  box-shadow: 0 12px 28px rgba(226, 128, 151, 0.28);
}

.button-secondary,
.outline-button,
.wide-link {
  color: var(--pink-deep);
  background: rgba(255, 255, 255, 0.8);
  border-color: #f2b8c3;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 28px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 34px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  color: var(--pink);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  letter-spacing: 0.06em;
}

.section-icon {
  color: var(--pink);
  font-size: 1.8rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 34px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(244, 215, 221, 0.8);
  backdrop-filter: blur(16px);
}

.brand img {
  width: 170px;
  height: auto;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.7vw, 38px);
  font-size: 0.92rem;
  color: #3f393b;
}

.global-nav a {
  white-space: nowrap;
}

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.site-footer {
  padding: 54px 44px 22px;
  background: linear-gradient(180deg, #fff8fa, #fff0f4);
}

.footer-brand img {
  width: 130px;
}

.footer-brand p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 28px;
  max-width: 800px;
  margin-left: auto;
  margin-top: -58px;
}

.footer-columns h2 {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: #695c60;
}

.footer-columns a {
  display: block;
  margin: 0.32rem 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.fiction-note {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid rgba(223, 127, 145, 0.18);
  text-align: center;
  color: #aa949b;
  font-size: 0.78rem;
  line-height: 1.6;
}

.fiction-note p {
  margin: 0.2rem 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 50;
  min-width: min(320px, calc(100vw - 40px));
  padding: 14px 18px;
  border: 1px solid rgba(242, 184, 195, 0.75);
  border-radius: 999px;
  color: var(--pink-deep);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 220ms ease, transform 220ms ease;
}

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

.page-count {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  min-width: 58px;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(242, 184, 195, 0.82);
  border-radius: 999px;
  color: var(--pink-deep);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px rgba(204, 156, 168, 0.18);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  text-align: center;
}

.archive-toggle {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 46;
  min-height: 40px;
  padding: 0.42rem 0.9rem;
  border: 1px solid rgba(242, 184, 195, 0.82);
  border-radius: 999px;
  color: var(--pink-deep);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 26px rgba(204, 156, 168, 0.18);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.archive-panel {
  position: fixed;
  left: 18px;
  bottom: 70px;
  z-index: 47;
  width: min(320px, calc(100vw - 36px));
  max-height: min(560px, calc(100vh - 110px));
  overflow: auto;
  border: 1px solid rgba(242, 184, 195, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.archive-panel-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(244, 215, 221, 0.86);
  background: rgba(255, 248, 251, 0.96);
}

.archive-panel-header h2 {
  margin: 0;
  color: var(--pink-deep);
  font-size: 0.98rem;
}

.archive-panel-header button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: var(--pink-deep);
  background: rgba(255, 240, 244, 0.9);
  cursor: pointer;
}

.archive-list {
  margin: 0;
  padding: 12px 18px 16px 38px;
  color: #b29fa5;
  font-size: 0.86rem;
}

.archive-list li {
  margin: 0.2rem 0;
  padding: 0.2rem 0 0.2rem 0.1rem;
}

.archive-list li::marker {
  color: rgba(167, 128, 138, 0.72);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
}

.archive-list li.is-locked {
  color: rgba(158, 143, 149, 0.62);
}

.archive-list li.is-current {
  font-weight: 700;
}

.archive-list a {
  color: #6b5f63;
  text-decoration: underline;
  text-decoration-color: rgba(223, 127, 145, 0.42);
  text-underline-offset: 3px;
}

.archive-list span {
  letter-spacing: 0.08em;
}

.click-sparkle {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  pointer-events: none;
  color: #ef8fa4;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Times New Roman", serif;
  font-size: 1.15rem;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 178, 204, 0.8), 0 0 22px rgba(255, 226, 236, 0.95);
  transform: translate(-50%, -50%);
  animation: clickSparkleFloat 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

.click-sparkle:nth-of-type(2n) {
  color: #f6b5c7;
  font-size: 0.95rem;
}

.click-sparkle:nth-of-type(3n) {
  color: #ffffff;
  font-size: 0.82rem;
}

@keyframes clickSparkleFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.55) rotate(0deg);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--sparkle-x, 0px)), -92px) scale(1.16) rotate(var(--sparkle-rotate, 14deg));
  }
}

@media (max-width: 860px) {
  .site-header {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .global-nav {
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .footer-columns {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    margin: 34px 0 0;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 50px 18px;
  }

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

  .page-count,
  .archive-toggle {
    bottom: 12px;
  }

  .page-count {
    right: 12px;
  }

  .archive-toggle {
    left: 12px;
  }

  .archive-panel {
    left: 12px;
    bottom: 62px;
    width: calc(100vw - 24px);
    max-height: min(72vh, calc(100vh - 96px));
  }

  .archive-list {
    padding: 10px 16px 18px 36px;
    font-size: 0.9rem;
  }

  .archive-list li {
    margin: 0.12rem 0;
    padding: 0.3rem 0;
  }

  .archive-list a,
  .archive-list span {
    display: inline-block;
    min-height: 28px;
    line-height: 28px;
  }
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .click-sparkle {
    display: none;
  }
}
