/* =========================================================
   testime — style（参考デザイン準拠 v2）
   淡いピンク × ホワイト・ラベンダー・ベージュ / ローズブラウン文字
   ========================================================= */
:root {
  --pink-50: #fff7f9;
  --pink-100: #fdecf1;
  --pink-200: #f9dbe4;
  --pink-300: #f0bfce;
  --lavender-50: #f8f4fd;
  --lavender-100: #efe8fa;
  --lavender-300: #b8a3df;
  --beige-50: #fdf8f2;
  --beige-100: #f9efe3;
  --beige-300: #dcb48c;
  --white: #ffffff;
  --text: #6e4a52;          /* ローズブラウン */
  --text-soft: #8f6f76;
  --text-strong: #7a3f50;   /* 見出し：参考画像のローズ寄り */
  --logo: #b86a80;
  --cta: #c47388;           /* くすみピンク */
  --cta-hover: #b0607a;
  --line: rgba(196, 115, 136, .2);
  --shadow: 0 12px 30px -16px rgba(160, 90, 110, .35);
  --shadow-sm: 0 4px 14px -8px rgba(160, 90, 110, .35);
  --radius-lg: 26px;
  --radius-pill: 999px;
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "IPAPGothic", sans-serif;
  --font-en: "Cormorant Garamond", "Didot", "Times New Roman", serif;
  --header-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--pink-50);
  line-height: 1.8;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sp { display: inline; }
@media (min-width: 768px) { .sp { display: none; } }

.sr-only {
  position: absolute !important; 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: 12px; top: -60px; z-index: 100;
  background: var(--white); color: var(--text-strong); padding: 10px 16px;
  border-radius: var(--radius-pill); box-shadow: var(--shadow-sm); transition: top .2s;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #a85a70; outline-offset: 3px; border-radius: 12px; }

.container { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* ---------- HEADER ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .3s, box-shadow .3s;
}
.site-header.is-scrolled { background: rgba(255, 247, 249, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.header-logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--logo); }
.header-logo svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.header-logo span { font-family: var(--font-en); font-weight: 600; font-size: 25px; letter-spacing: .06em; line-height: 1; }
.menu-btn {
  width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 14px;
}
.menu-btn span { display: block; width: 26px; height: 2px; border-radius: 2px; background: var(--logo); transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.menu-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(110, 74, 82, .18); }
.site-menu {
  position: fixed; z-index: 45; top: calc(var(--header-h) + env(safe-area-inset-top) + 4px); right: 12px; left: 12px;
  max-width: 380px; margin-left: auto;
  padding: 20px 18px; border-radius: 24px;
  background: rgba(255, 255, 255, .97); box-shadow: var(--shadow);
  animation: menuIn .25s ease;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.menu-title { font-size: 12px; color: var(--text-soft); margin-bottom: 8px; }
.menu-cats a, .menu-links a {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px;
  border-radius: 14px; text-decoration: none; font-weight: 700; color: var(--text-strong); font-size: 15px;
}
.menu-cats a:hover, .menu-links a:hover { background: var(--pink-100); }
.mi { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: #fff; flex: 0 0 auto; }
.mi-love { background: #e79ab0; } .mi-relation { background: #b29cdc; } .mi-self { background: #d8ac80; }
.menu-links { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.menu-links a { font-weight: 500; font-size: 14px; color: var(--text); }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + 4px) 0 34px;
  background:
    radial-gradient(70% 45% at 85% 18%, rgba(255, 255, 255, .9) 0%, transparent 70%),
    radial-gradient(80% 50% at 10% 60%, rgba(255, 255, 255, .75) 0%, transparent 70%),
    radial-gradient(60% 40% at 90% 70%, rgba(230, 214, 248, .7) 0%, transparent 70%),
    linear-gradient(180deg, #f8d9e3 0%, #fbe5ec 45%, #fdf0f4 80%, var(--pink-50) 100%);
}
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.cloud { position: absolute; border-radius: 50%; background: #fff; filter: blur(18px); opacity: .75; }
.cloud.c1 { width: 220px; height: 70px; top: 120px; left: -60px; }
.cloud.c2 { width: 260px; height: 80px; top: 70px; right: -90px; opacity: .6; }
.cloud.c3 { width: 300px; height: 90px; top: 330px; left: -110px; opacity: .65; }
.cloud.c4 { width: 280px; height: 90px; top: 360px; right: -120px; opacity: .7; }
.hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 0 16px; }

.hero-mark { width: 64px; margin: 0 auto -4px; }
.hero-mark svg { fill: none; stroke: var(--logo); stroke-width: 2; stroke-linecap: round; }
.hero-mark .rays { stroke-width: 1.6; opacity: .8; }
.hero-logo {
  font-family: var(--font-en); font-weight: 600;
  font-size: clamp(54px, 17vw, 88px); line-height: 1.05; letter-spacing: .08em;
  color: var(--logo);
  background: linear-gradient(180deg, #c9798f 0%, #a95b73 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-copy { margin-top: 8px; font-size: clamp(15px, 4.4vw, 19px); font-weight: 500; letter-spacing: .14em; color: var(--text-strong); }

.glass-heart { position: relative; width: min(78vw, 330px); aspect-ratio: 320 / 200; margin: 14px auto 0; }
.glass-heart .gheart {
  position: absolute; left: 50%; top: 2%; width: 66%; transform: translateX(-50%);
  filter: drop-shadow(0 18px 24px rgba(226, 140, 170, .45));
  animation: floaty 5s ease-in-out infinite;
}
.orbit { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, .95); stroke-width: 1.4; }
.orbit-back { opacity: .55; }
.orbit-front { stroke-width: 1.8; }
.twinkle { position: absolute; fill: #fff; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9)); animation: twinkle 3s ease-in-out infinite; }
.twinkle.t1 { width: 26px; top: 6%; right: 6%; }
.twinkle.t2 { width: 14px; bottom: 12%; left: 8%; animation-delay: -1.5s; }
@keyframes floaty { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -7px); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.hero-sub { margin-top: 10px; font-size: 14px; color: var(--text-soft); }

/* ---------- SECTION COMMON ---------- */
.section { padding: 36px 0 44px; }
.section-title {
  text-align: center; font-weight: 700; color: var(--text-strong);
  font-size: clamp(20px, 5.8vw, 30px); line-height: 1.5; letter-spacing: .08em;
}
.section-title:focus { outline: none; }
.swash {
  display: block; width: 96px; height: 10px; margin: 6px auto 0;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10'%3E%3Cpath d='M3 7C30 2 70 1 97 5' fill='none' stroke='%23e3a4b6' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.section-title.lined { display: flex; align-items: center; gap: 14px; }
.section-title.lined::before, .section-title.lined::after { content: ""; flex: 1; height: 1px; background: rgba(196, 115, 136, .45); }
.heart-inline { color: var(--cta); font-size: .8em; }

/* ---------- CATEGORIES ---------- */
.cat-list { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-list > li { display: flex; }
.cat-card {
  position: relative; overflow: hidden; isolation: isolate;
  width: 100%; display: flex; flex-direction: column; align-items: flex-start;
  min-height: 236px; padding: 18px 10px 14px;
  text-align: left; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 22px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.cat-card:hover { transform: translateY(-3px); }
.cat-card:active { transform: scale(.98); }
.cat-card.is-active { border-color: currentColor; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), var(--shadow); }
.cat-love     { color: #c46d86; background: linear-gradient(160deg, #fde8ee 0%, #f9d6e1 100%); }
.cat-relation { color: #8a72c0; background: linear-gradient(160deg, #f1ecfb 0%, #e6dcf6 100%); }
.cat-self     { color: #c08d5d; background: linear-gradient(160deg, #fdf5ea 0%, #f8e7d3 100%); }
/* 右上の写真風アクセント（桜・空・木漏れ日をCSSで表現） */
.cat-photo { position: absolute; z-index: -1; top: -20px; right: -26px; width: 120px; height: 110px; border-radius: 50%; filter: blur(2px); opacity: .9; }
.cat-love .cat-photo { background:
  radial-gradient(circle at 30% 40%, #fff 0 5px, transparent 6px),
  radial-gradient(circle at 55% 60%, #ffd3df 0 7px, transparent 8px),
  radial-gradient(circle at 70% 30%, #fff1f5 0 6px, transparent 7px),
  radial-gradient(circle at 45% 25%, #f8bfd0 0 4px, transparent 5px),
  radial-gradient(circle, rgba(255, 220, 230, .9), transparent 70%); }
.cat-relation .cat-photo { background:
  radial-gradient(ellipse at 40% 60%, #fff 0 18px, transparent 30px),
  radial-gradient(ellipse at 70% 45%, rgba(255, 255, 255, .9) 0 14px, transparent 26px),
  radial-gradient(circle, rgba(197, 214, 245, .95), transparent 70%); }
.cat-self .cat-photo { background:
  radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, .85) 0 14px, transparent 30px),
  radial-gradient(circle, rgba(230, 205, 170, .75), transparent 70%); }
.cat-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cat-label { margin-top: 12px; font-size: clamp(12.5px, 3.35vw, 17px); font-weight: 700; line-height: 1.55; color: var(--text-strong); letter-spacing: 0; word-break: keep-all; }
.cat-desc { margin-top: 8px; font-size: clamp(10.5px, 2.9vw, 13px); line-height: 1.75; color: var(--text-soft); letter-spacing: .02em; }
.cat-arrow {
  margin: auto auto 0; padding-top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: currentColor; flex: 0 0 auto;
}
.cat-arrow svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cat-desc + .cat-arrow { margin-top: auto; }
.cat-lead { margin-top: 24px; text-align: center; font-size: 13.5px; line-height: 2; color: var(--text); }

/* ---------- BOOKS ---------- */
.books { padding-top: 12px; }
.book-icon { width: 34px; margin: 0 auto 2px; }
.book-icon svg { fill: none; stroke: var(--cta); stroke-width: 1.6; stroke-linejoin: round; }

.filter { margin: 20px auto 0; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.chip {
  min-height: 44px; padding: 6px 14px;
  border-radius: var(--radius-pill); border: 1.5px solid var(--pink-300);
  background: rgba(255, 255, 255, .8); color: var(--text);
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chip[aria-pressed="true"] { background: var(--cta); border-color: var(--cta); color: #fff; font-weight: 700; }
.filter-status { margin-top: 10px; text-align: center; font-size: 12.5px; color: var(--text-soft); }

.book-list { margin-top: 16px; display: grid; gap: 14px; }
.book-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 96px 1fr; grid-template-areas: "cover info" "body body";
  column-gap: 14px;
  padding: 18px 16px 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .9) 0%, rgba(253, 236, 241, .85) 100%);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.book-deco { position: absolute; right: 10px; top: 10px; width: 64px; opacity: .55; pointer-events: none; }
.book-deco svg { fill: none; stroke: #e2a6b7; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.book-cover { grid-area: cover; align-self: start; display: flex; justify-content: center; }
.cover-img {
  width: 96px; height: auto; aspect-ratio: 1 / 1; object-fit: contain;
  border-radius: 6px; background: transparent;
}
.cover-ph {
  width: 84px; aspect-ratio: 1 / 1.42;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 6px; text-align: center;
  border-radius: 6px; border: 1.5px dashed var(--pink-300);
  background: repeating-linear-gradient(135deg, var(--pink-50) 0 8px, #fff 8px 16px);
  color: var(--text-soft);
}
.ph-heart { font-size: 15px; color: var(--pink-300); line-height: 1; }
.ph-title { font-size: 10px; font-weight: 700; line-height: 1.45; color: var(--text); }
.ph-note { font-size: 9.5px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--pink-100); }

.book-info { grid-area: info; min-width: 0; position: relative; padding-left: 14px; border-left: 1px solid rgba(196, 115, 136, .3); align-self: center; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 10.5px; padding: 0 9px; border-radius: var(--radius-pill); line-height: 1.9; }
.tag-love { background: #fbe1e9; color: #ad5670; }
.tag-relation { background: var(--lavender-100); color: #6f58a2; }
.tag-self { background: var(--beige-100); color: #8f6136; }
.book-title { margin-top: 6px; font-size: 17px; font-weight: 700; line-height: 1.45; color: var(--text-strong); padding-right: 30px; }
.book-subtitle { margin-top: 2px; font-size: 11.5px; line-height: 1.6; color: var(--text-soft); }
.book-author { margin-top: 4px; font-size: 11.5px; color: var(--text-soft); }
.book-body { grid-area: body; min-width: 0; }
.book-desc { margin-top: 14px; font-size: 13.5px; line-height: 1.9; }
.book-target { margin-top: 10px; font-size: 12.5px; color: var(--text-soft); padding: 8px 12px; background: rgba(255, 255, 255, .75); border-radius: 12px; line-height: 1.7; }
.book-target span { display: block; font-weight: 700; color: var(--cta); font-size: 11px; }

.btn-rakuten {
  margin-top: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; min-height: 50px; padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--cta); color: #fff;
  font-weight: 700; font-size: 15px; letter-spacing: .08em; text-decoration: none;
  box-shadow: 0 8px 18px -10px rgba(196, 115, 136, .9);
  transition: background .2s, transform .15s;
}
.btn-rakuten svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-rakuten:hover { background: var(--cta-hover); }
.btn-rakuten:active { transform: scale(.98); }
.books-note { margin-top: 22px; font-size: 11.5px; color: var(--text-soft); line-height: 1.8; }

/* ---------- FOOTER ---------- */
.footer { padding: 8px 0 calc(32px + env(safe-area-inset-bottom)); text-align: center; }
.pr-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--text); padding: 14px 0 22px; border-bottom: 1px solid var(--line); }
.pr-note svg { width: 18px; height: 18px; fill: none; stroke: var(--cta); stroke-width: 1.6; stroke-linecap: round; flex: 0 0 auto; }
.footer-logo { margin-top: 26px; display: inline-flex; align-items: center; gap: 6px; color: var(--logo); }
.footer-logo svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.footer-logo span { font-family: var(--font-en); font-weight: 600; font-size: 28px; letter-spacing: .06em; line-height: 1; }
.footer-copy { margin-top: 6px; font-size: 12.5px; color: var(--text-soft); }
.btn-tiktok {
  margin: 18px auto 0; max-width: 320px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--white); border: 1.5px solid var(--pink-300);
  color: var(--text-strong); text-decoration: none; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.btn-tiktok svg { width: 18px; height: 18px; fill: var(--text-strong); }
.footer-links { margin-top: 14px; display: flex; justify-content: center; gap: 4px 18px; flex-wrap: wrap; font-size: 12.5px; }
.footer-links a { display: inline-block; padding: 10px 2px; color: var(--text-soft); }
.copyright { margin-top: 6px; color: var(--text-soft); }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 小さいスマホ（〜359px）：カテゴリーを1列に ---------- */
@media (max-width: 359px) {
  .cat-list { grid-template-columns: 1fr; }
  .cat-card { min-height: 0; display: grid; grid-template-columns: 40px 1fr 30px; column-gap: 12px; align-items: center; padding: 16px 14px; }
  .cat-card .cat-icon { grid-row: 1 / 3; }
  .cat-card .cat-label { margin-top: 0; }
  .cat-card .cat-desc { margin-top: 2px; grid-column: 2; }
  .cat-card .cat-arrow { grid-row: 1 / 3; grid-column: 3; margin: 0; }
  .cat-label br { display: none; }
}

/* ---------- 書籍カード：本文を右カラムに（600px〜） ---------- */
@media (min-width: 600px) {
  .book-card { grid-template-columns: 128px 1fr; grid-template-areas: "cover info" "cover body"; column-gap: 0; padding: 24px 26px; }
  .book-cover { padding-right: 22px; }
  .cover-img { width: 128px; }
  .cover-ph { width: 110px; }
  .book-info, .book-body { padding-left: 24px; border-left: 1px solid rgba(196, 115, 136, .3); }
  .book-info { align-self: end; }
  .btn-rakuten { width: auto; min-width: 260px; }
  .book-deco { width: 90px; right: 18px; top: auto; bottom: 18px; }
}

/* ---------- TABLET / PC ---------- */
@media (min-width: 768px) {
  .hero { padding-bottom: 48px; }
  .glass-heart { width: 380px; }
  .hero-sub { font-size: 16px; }
  .section { padding: 56px 0 64px; }
  .cat-list { gap: 18px; margin-top: 30px; }
  .cat-card { min-height: 280px; padding: 26px 22px 20px; }
  .cat-icon svg { width: 40px; height: 40px; }
  .cat-arrow { width: 34px; height: 34px; }
  .cat-lead { font-size: 15px; }
  .book-list { gap: 18px; max-width: 820px; margin-left: auto; margin-right: auto; }
}
