:root {
  --paper: #fff8ea;
  --paper-deep: #f5ead9;
  --ink: #2c3157;
  --blue: #3157c9;
  --blue-soft: #dce8ff;
  --rose: #f9b8c4;
  --coral: #ef6b5f;
  --mint: #b8dfc4;
  --matcha: #82a96d;
  --butter: #f4cf6a;
  --lavender: #b8a8ec;
  --line: rgba(71, 77, 126, 0.18);
  --shadow: 0 22px 55px rgba(83, 65, 42, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(49, 87, 201, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(49, 87, 201, 0.052) 1px, transparent 1px),
    var(--paper);
  background-size: 96px 96px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 240px;
  height: 240px;
  border: 2px dashed rgba(49, 87, 201, 0.14);
  border-radius: 50%;
  content: "";
}

body::before {
  top: 120px;
  left: -120px;
}

body::after {
  right: -110px;
  bottom: 90px;
  background: rgba(184, 223, 196, 0.2);
}

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

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(49, 87, 201, 0.08) 0.8px, transparent 0.8px),
    radial-gradient(rgba(239, 107, 95, 0.08) 0.7px, transparent 0.7px);
  background-position: 0 0, 18px 22px;
  background-size: 42px 42px, 38px 38px;
  mix-blend-mode: multiply;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 14px;
  border-bottom: 1px dashed rgba(44, 49, 87, 0.2);
  background: transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 38px;
  color: #fff;
  background: var(--blue);
  border: 2px solid var(--ink);
  border-radius: 52% 46% 60% 42%;
  box-shadow: 3px 3px 0 var(--butter);
  font-family: "Comic Sans MS", "Marker Felt", cursive;
  font-size: 0.82rem;
  transform: rotate(-5deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  color: rgba(44, 49, 87, 0.62);
  font-size: 0.74rem;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.segmented button,
.button {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(44, 49, 87, 0.18);
  border-radius: var(--radius);
  background: #fffaf0;
  box-shadow: 2px 2px 0 rgba(44, 49, 87, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.nav-links a {
  padding: 9px 12px;
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a.active,
.segmented button:hover,
.segmented button.active {
  background: var(--blue-soft);
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 4px 5px 0 rgba(49, 87, 201, 0.14);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(44, 49, 87, 0.18);
  border-radius: var(--radius);
  background: #fffaf0;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--blue);
}

main {
  width: min(1180px, calc(100% - 28px));
  margin: 18px auto 0;
}

.journal-band,
.section-shell,
.calendar-section,
.diary-board,
.tips-layout,
.product-grid,
.gallery-wall {
  position: relative;
  margin: 24px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 26px;
  align-items: center;
  min-height: clamp(520px, 76vh, 720px);
  padding: clamp(28px, 5vw, 54px);
  overflow: hidden;
}

.hero-immersive {
  --hero-pan-x: 0px;
  --hero-pan-y: 0px;
  display: flex;
  align-items: center;
  isolation: isolate;
  min-height: clamp(580px, 78vh, 760px);
  padding: clamp(26px, 5vw, 58px);
  background-position: 0 0, calc(50% + var(--hero-pan-x)) calc(50% + var(--hero-pan-y));
  background-size: auto, cover;
  transition: background-position 180ms ease-out;
}

.hero-immersive.journal-band {
  background:
    linear-gradient(90deg, rgba(255, 248, 234, 0.95) 0%, rgba(255, 248, 234, 0.82) 30%, rgba(255, 248, 234, 0.18) 57%, rgba(255, 248, 234, 0) 88%),
    url("generated/cat-journal-hero-bg.jpg") center / cover no-repeat;
  background-position: 0 0, calc(50% + var(--hero-pan-x)) calc(50% + var(--hero-pan-y));
  background-size: auto, cover;
}

.hero-immersive::after {
  position: absolute;
  inset: 14px;
  z-index: -1;
  border: 1px dashed rgba(49, 87, 201, 0.22);
  border-radius: var(--radius);
  pointer-events: none;
  content: "";
}

.journal-band {
  border: 1px solid rgba(44, 49, 87, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(44, 49, 87, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(44, 49, 87, 0.08) 1px, transparent 1px),
    rgba(255, 250, 240, 0.92);
  background-size: 170px 150px;
  box-shadow: var(--shadow);
}

.hero h1,
.page-hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--blue);
  font-family: "Comic Sans MS", "Marker Felt", "PingFang SC", cursive;
  font-size: clamp(2.6rem, 7vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-text,
.page-hero p {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: clamp(1rem, 1.6vw, 1.24rem);
}

.hero-actions,
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 5px 6px 0 rgba(44, 49, 87, 0.14);
}

.button.primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--ink);
}

.button.ghost {
  background: #fff5c9;
}

.button.small {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.hero-immersive .hero-copy {
  position: relative;
  z-index: 2;
  max-width: min(610px, 58%);
}

.hero-immersive .hero-text {
  max-width: 540px;
}

.hero-link-board {
  position: absolute;
  right: clamp(20px, 4.8vw, 70px);
  bottom: clamp(24px, 5vw, 58px);
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 12px;
  width: min(580px, 52%);
}

.hero-chip {
  --chip-rotate: -1.4deg;
  --chip-x: 0px;
  --chip-y: 0px;
  --chip-lift: 0px;
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(44, 49, 87, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.78);
  box-shadow: 5px 6px 0 rgba(44, 49, 87, 0.11);
  backdrop-filter: blur(8px);
  transform: translate(var(--chip-x), calc(var(--chip-y) + var(--chip-lift))) rotate(var(--chip-rotate));
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.hero-chip:hover {
  --chip-lift: -4px;
  --chip-rotate: 0deg;
  background: rgba(255, 253, 247, 0.95);
  box-shadow: 7px 8px 0 rgba(49, 87, 201, 0.15);
}

.hero-chip span {
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
  font-family: "Comic Sans MS", "Marker Felt", cursive;
  font-size: 0.78rem;
}

.hero-chip strong {
  align-self: end;
  font-size: 1rem;
  line-height: 1.28;
}

.chip-care {
  --chip-rotate: 1.5deg;
  background: rgba(255, 245, 201, 0.78);
}

.chip-gallery {
  --chip-rotate: -0.5deg;
  background: rgba(232, 245, 235, 0.78);
}

.hero-art {
  position: relative;
  align-self: stretch;
  min-height: 430px;
  transform: rotate(1.5deg);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 10px solid #fffaf0;
  border-radius: var(--radius);
  box-shadow: 10px 14px 0 rgba(49, 87, 201, 0.12), var(--shadow);
}

.sticker {
  position: absolute;
  display: block;
  pointer-events: none;
  animation: floaty 5s ease-in-out infinite;
}

.sticker-star {
  right: -10px;
  top: 10%;
  width: 70px;
  height: 58px;
  color: transparent;
  background: var(--butter);
  clip-path: polygon(50% 0, 62% 32%, 98% 35%, 68% 54%, 79% 90%, 50% 68%, 20% 90%, 31% 54%, 2% 35%, 38% 32%);
  transform: rotate(9deg);
}

.sticker-washi {
  left: -18px;
  top: 24px;
  width: 130px;
  height: 34px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.3) 0 8px, transparent 8px 16px),
    var(--rose);
  transform: rotate(-13deg);
}

.sticker-heart {
  right: 9%;
  bottom: -16px;
  width: 58px;
  height: 58px;
  border: 4px solid var(--coral);
  border-radius: 58% 42% 58% 42%;
  background: rgba(239, 107, 95, 0.13);
  transform: rotate(18deg);
}

.eyebrow {
  margin: 0 0 8px;
  color: rgba(44, 49, 87, 0.65);
  font-family: "Comic Sans MS", "Marker Felt", cursive;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: lowercase;
}

.blue-ink {
  color: var(--blue);
  font-size: clamp(2.2rem, 7vw, 5.2rem);
  line-height: 1;
}

.tape {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(184, 223, 196, 0.75);
  transform: rotate(-2deg);
}

.section-shell {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(44, 49, 87, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.8);
  box-shadow: var(--shadow);
}

.intro-strip {
  display: grid;
  grid-template-columns: 0.62fr 1.38fr;
  gap: 24px;
  align-items: start;
}

.intro-strip h2,
.calendar-heading h2,
.memo-card h2,
.tips-layout h2,
.calculator-note h2,
.product-card h2,
.diary-copy h2,
.gallery-modal h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.3vw, 2.1rem);
  line-height: 1.16;
}

.cat-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(44, 49, 87, 0.14);
  border-radius: var(--radius);
  background: #fffdf7;
  box-shadow: 6px 8px 0 rgba(184, 168, 236, 0.16);
  transform-style: preserve-3d;
}

.profile-card img {
  width: 130px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 6px solid #fff;
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 rgba(44, 49, 87, 0.14);
}

.profile-card p {
  margin: 6px 0 0;
}

.profile-kicker,
.date-chip {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  padding: 2px 8px;
  border: 1px dashed rgba(44, 49, 87, 0.28);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.78rem;
}

.profile-card h3 {
  margin: 6px 0 0;
}

.calendar-section {
  padding: clamp(18px, 3vw, 30px);
}

.calendar-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.planner-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.9);
  overflow-x: auto;
}

.day-note {
  position: relative;
  min-height: 142px;
  padding: 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.day-note:hover {
  z-index: 3;
  background: #fffdf7;
  transform: scale(1.03) rotate(-1deg);
  box-shadow: 0 16px 26px rgba(44, 49, 87, 0.12);
}

.day-note.blank {
  color: rgba(44, 49, 87, 0.38);
  cursor: default;
}

.day-note.blank:hover {
  transform: none;
  box-shadow: none;
}

.day-note span {
  display: block;
  color: var(--blue);
  font-family: "Comic Sans MS", "Marker Felt", cursive;
  font-size: 1.35rem;
}

.day-note strong {
  display: block;
  margin-top: 8px;
  font-weight: 600;
}

.day-note img {
  width: 78%;
  height: 78px;
  margin: 8px auto 5px;
  object-fit: cover;
  border: 5px solid #fff;
  box-shadow: 2px 3px 0 rgba(44, 49, 87, 0.12);
  transform: rotate(-3deg);
}

.doodle {
  position: absolute;
  opacity: 0.88;
}

.doodle.flower {
  right: 20px;
  bottom: 22px;
  width: 42px;
  height: 42px;
  border: 5px solid var(--matcha);
  border-radius: 50% 40% 50% 42%;
}

.doodle.scribble,
.doodle.grass {
  right: 16px;
  bottom: 24px;
  width: 52px;
  height: 22px;
  border-top: 5px solid var(--blue);
  border-radius: 50%;
  transform: rotate(8deg);
}

.doodle.sun {
  right: 24px;
  bottom: 26px;
  width: 42px;
  height: 42px;
  border: 6px solid var(--butter);
  border-radius: 50%;
}

.doodle.paw {
  right: 20px;
  bottom: 24px;
  width: 46px;
  height: 36px;
  border: 5px solid var(--coral);
  border-radius: 45% 45% 55% 55%;
}

.doodle.moon {
  right: 24px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: -10px 0 0 var(--lavender);
}

.split-feature {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

.memo-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.memo-card,
.checklist-note,
.calculator-note,
.tip-card,
.stamp-board {
  border: 1px solid rgba(44, 49, 87, 0.14);
  border-radius: var(--radius);
  background: #fffdf7;
  box-shadow: 6px 8px 0 rgba(44, 49, 87, 0.09);
}

.memo-card {
  padding: 22px;
}

.rotate-left {
  transform: rotate(-1.4deg);
}

.rotate-right {
  transform: rotate(1.4deg);
}

.text-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--blue);
  border-bottom: 2px wavy var(--rose);
}

.stamp-board {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 260px;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 25%, rgba(244, 207, 106, 0.24), transparent 26%),
    #fffdf7;
}

.stamp {
  position: absolute;
  display: grid;
  place-items: center;
  width: 78px;
  height: 58px;
  border: 3px solid var(--blue);
  border-radius: 46% 54% 48% 52%;
  color: transparent;
  background: rgba(220, 232, 255, 0.85);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.stamp::after {
  color: var(--blue);
  font-family: "Comic Sans MS", "Marker Felt", cursive;
  font-size: 0.88rem;
  content: attr(data-stamp);
}

.stamp:hover,
.stamp.active {
  background: rgba(249, 184, 196, 0.8);
  transform: scale(1.08) rotate(-8deg);
}

.stamp:nth-child(1) {
  left: 24px;
  top: 24px;
}

.stamp:nth-child(2) {
  right: 22px;
  top: 42px;
  transform: rotate(6deg);
}

.stamp:nth-child(3) {
  left: 42%;
  bottom: 22px;
  transform: rotate(-4deg);
}

.stamp-output {
  margin-top: 10px;
  padding: 8px 12px;
  background: #fff5c9;
  border: 1px dashed rgba(44, 49, 87, 0.22);
  border-radius: var(--radius);
}

.page-hero.compact {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 360px);
  gap: 24px;
  align-items: center;
  min-height: 330px;
  padding: clamp(24px, 4vw, 42px);
  overflow: hidden;
}

.page-hero.compact h1 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.page-hero.compact img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border: 8px solid #fffaf0;
  border-radius: var(--radius);
  box-shadow: 8px 10px 0 rgba(49, 87, 201, 0.12);
  transform: rotate(2deg);
}

.toolbar-row {
  justify-content: space-between;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented button {
  min-height: 38px;
  padding: 8px 12px;
  cursor: pointer;
}

.diary-board {
  column-count: 3;
  column-gap: 22px;
}

.diary-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  border: 1px solid rgba(44, 49, 87, 0.14);
  border-radius: var(--radius);
  background: #fffdf7;
  box-shadow: var(--shadow);
  break-inside: avoid;
  cursor: pointer;
  transition: opacity 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.diary-card.hidden {
  display: none;
}

.diary-card:hover {
  transform: translateY(-5px) rotate(0deg);
  box-shadow: 10px 14px 0 rgba(244, 207, 106, 0.25), var(--shadow);
}

.polaroid {
  padding: 12px 12px 18px;
}

.diary-card img {
  width: 100%;
  aspect-ratio: 1 / 0.88;
  object-fit: cover;
  border-radius: 4px;
}

.diary-copy {
  padding: 16px 4px 0;
}

.diary-copy p {
  margin: 9px 0 0;
}

.like-pin {
  margin-top: 14px;
  padding: 7px 10px;
  border: 1px dashed rgba(44, 49, 87, 0.26);
  border-radius: var(--radius);
  background: rgba(184, 223, 196, 0.45);
  cursor: pointer;
}

.like-pin.liked {
  background: rgba(249, 184, 196, 0.65);
  animation: pop 260ms ease;
}

.tips-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
}

.checklist-note {
  align-self: start;
  padding: 22px;
  position: sticky;
  top: 110px;
}

.checklist-note label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  cursor: pointer;
}

.checklist-note input,
.toggle-row input {
  accent-color: var(--blue);
}

.progress-shell {
  height: 14px;
  margin-top: 18px;
  border: 1px solid rgba(44, 49, 87, 0.18);
  border-radius: 999px;
  background: #fff4c8;
  overflow: hidden;
}

.progress-shell span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--blue-soft), var(--rose));
  transition: width 260ms ease;
}

.progress-text {
  margin: 8px 0 0;
  color: rgba(44, 49, 87, 0.66);
}

.accordion-stack {
  display: grid;
  gap: 14px;
}

.tip-card {
  overflow: hidden;
}

.tip-card > button {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.tip-card > button span {
  display: inline-flex;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--blue);
  background: var(--blue-soft);
}

.tip-card > button strong {
  font-size: 1.08rem;
}

.tip-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 260ms ease;
}

.tip-content > * {
  min-height: 0;
  overflow: hidden;
}

.tip-card.open .tip-content {
  grid-template-rows: 1fr;
}

.tip-content p,
.tip-content ul {
  margin: 0;
  padding: 0 20px 18px 116px;
}

.tip-content ul {
  padding-bottom: 22px;
}

.calculator-note {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 18px;
  padding: clamp(18px, 3vw, 30px);
}

.water-form {
  display: grid;
  gap: 10px;
  align-content: center;
}

.water-form input {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(44, 49, 87, 0.18);
  border-radius: var(--radius);
  background: #fffaf0;
}

.water-form output {
  display: block;
  padding: 12px;
  border: 1px dashed rgba(44, 49, 87, 0.22);
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.pouch-counter {
  padding: 8px 12px;
  border: 1px dashed rgba(44, 49, 87, 0.22);
  border-radius: var(--radius);
  background: #fff5c9;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  display: grid;
  grid-template-rows: 230px 1fr;
  overflow: hidden;
  border: 1px solid rgba(44, 49, 87, 0.14);
  border-radius: var(--radius);
  background: #fffdf7;
  box-shadow: var(--shadow);
  transition: transform 200ms ease, opacity 200ms ease;
}

.product-card.hidden {
  display: none;
}

.product-card:hover {
  transform: translateY(-5px) rotate(-0.8deg);
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card > div {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.product-card p {
  margin: 0;
}

.product-card.added {
  outline: 3px solid rgba(49, 87, 201, 0.22);
}

.gallery-wall {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 16px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 8px solid #fffaf0;
  border-radius: var(--radius);
  background: #fffdf7;
  box-shadow: 7px 9px 0 rgba(44, 49, 87, 0.11);
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.gallery-item:hover {
  transform: rotate(-1deg) scale(1.02);
  box-shadow: 10px 12px 0 rgba(249, 184, 196, 0.32);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 10px;
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.86);
  box-shadow: 2px 3px 0 rgba(44, 49, 87, 0.1);
}

.gallery-item.tall {
  grid-row: span 2;
}

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

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px dashed rgba(44, 49, 87, 0.22);
  border-radius: var(--radius);
  background: #fffdf7;
}

body.no-float .sticker,
body.no-float .gallery-item {
  animation: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(44, 49, 87, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: min(760px, 90vh);
  overflow: auto;
  border: 1px solid rgba(44, 49, 87, 0.16);
  border-radius: var(--radius);
  background: #fffdf7;
  box-shadow: 16px 18px 0 rgba(49, 87, 201, 0.18), var(--shadow);
  transform: translateY(16px) rotate(-1deg);
  transition: transform 180ms ease;
}

.modal.show .modal-panel {
  transform: translateY(0) rotate(-1deg);
}

.note-modal {
  padding: 28px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.3rem;
  line-height: 1;
}

.photo-modal,
.gallery-modal {
  display: grid;
  gap: 18px;
  padding: 16px;
}

.photo-modal img,
.gallery-modal img {
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--paper-deep);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 28px));
  margin: 34px auto 24px;
  padding: 18px 0;
  color: rgba(44, 49, 87, 0.68);
  border-top: 1px solid rgba(44, 49, 87, 0.14);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--blue);
}

.beian-link {
  justify-self: center;
  color: rgba(44, 49, 87, 0.74);
  white-space: nowrap;
}

.confetti-bit {
  position: fixed;
  z-index: 70;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti 720ms ease forwards;
}

.pop-sticker,
.ink-trail {
  position: fixed;
  z-index: 70;
  pointer-events: none;
}

.pop-sticker {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(44, 49, 87, 0.18);
  border-radius: 46% 54% 47% 53%;
  color: var(--blue);
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 3px 4px 0 rgba(44, 49, 87, 0.1);
  font-family: "Comic Sans MS", "Marker Felt", cursive;
  font-size: 0.78rem;
  transform: translate(-50%, -50%);
  animation: stickerPop 1180ms cubic-bezier(.2, .75, .22, 1) forwards;
}

.ink-trail {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(49, 87, 201, 0.28);
  border-radius: 48% 42% 52% 44%;
  transform: translate(-50%, -50%) rotate(8deg);
  animation: inkTrail 760ms ease-out forwards;
}

.reveal-on-scroll {
  opacity: 0;
  translate: 0 26px;
  scale: 0.985;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  translate: 0 0;
  scale: 1;
  transition:
    opacity 520ms ease var(--reveal-delay, 0ms),
    translate 620ms cubic-bezier(.2, .75, .22, 1) var(--reveal-delay, 0ms),
    scale 620ms cubic-bezier(.2, .75, .22, 1) var(--reveal-delay, 0ms);
}

.paper-press {
  animation: paperPress 360ms ease;
}

.ripple {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 520ms ease-out forwards;
  pointer-events: none;
}

@keyframes floaty {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  60% {
    transform: scale(1.12) rotate(-2deg);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes confetti {
  to {
    opacity: 0;
    transform: translate(var(--x), var(--y)) rotate(240deg);
  }
}

@keyframes ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(12);
  }
}

@keyframes stickerPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72) rotate(-8deg);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1.08) rotate(var(--r));
  }
}

@keyframes inkTrail {
  to {
    opacity: 0;
    scale: 1.8;
    rotate: 24deg;
  }
}

@keyframes paperPress {
  0% {
    scale: 1;
  }
  42% {
    scale: 0.965;
    rotate: -0.7deg;
  }
  100% {
    scale: 1;
  }
}

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

@media (max-width: 980px) {
  .hero,
  .intro-strip,
  .split-feature,
  .tips-layout,
  .calculator-note,
  .page-hero.compact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-immersive {
    display: block;
    min-height: 700px;
  }

  .hero-immersive.journal-band {
    background:
      linear-gradient(90deg, rgba(255, 248, 234, 0.96) 0%, rgba(255, 248, 234, 0.78) 44%, rgba(255, 248, 234, 0.1) 82%),
      url("generated/cat-journal-hero-bg.jpg") center / cover no-repeat;
    background-position: 0 0, calc(50% + var(--hero-pan-x)) calc(50% + var(--hero-pan-y));
    background-size: auto, cover;
  }

  .hero-immersive .hero-copy {
    max-width: 70%;
  }

  .hero-link-board {
    right: 22px;
    bottom: 22px;
    grid-template-columns: 1fr;
    width: min(260px, 42%);
  }

  .hero-art {
    min-height: 360px;
  }

  .cat-duo,
  .memo-stack,
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }

  .diary-board {
    column-count: 2;
  }

  .checklist-note {
    position: static;
  }

  .gallery-wall {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .nav-links {
    display: none;
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(44, 49, 87, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 248, 234, 0.68);
    box-shadow: none;
  }

  .nav-links.open {
    display: grid;
  }

  .nav-links a {
    width: 100%;
  }

  .hero,
  .page-hero.compact,
  .section-shell,
  .calendar-section {
    padding: 18px;
  }

  .hero-immersive {
    min-height: 760px;
    padding: 22px;
  }

  .hero-immersive.journal-band {
    background:
      linear-gradient(180deg, rgba(255, 248, 234, 0.98) 0%, rgba(255, 248, 234, 0.9) 34%, rgba(255, 248, 234, 0.34) 56%, rgba(255, 248, 234, 0.02) 88%),
      url("generated/cat-journal-hero-bg.jpg") 58% bottom / cover no-repeat;
    background-position: 0 0, 58% bottom;
    background-size: auto, cover;
  }

  .hero-immersive .hero-copy {
    max-width: 100%;
  }

  .hero-immersive .hero-text {
    max-width: 100%;
  }

  .hero-link-board {
    position: relative;
    right: auto;
    bottom: auto;
    grid-template-columns: 1fr;
    width: min(100%, 320px);
    margin-top: 28px;
  }

  .hero-chip {
    min-height: 74px;
    padding: 12px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(2.35rem, 14vw, 3.6rem);
  }

  .hero-art {
    min-height: 280px;
  }

  .cat-duo,
  .memo-stack,
  .product-grid,
  .gallery-wall {
    grid-template-columns: 1fr;
  }

  .profile-card {
    grid-template-columns: 98px 1fr;
  }

  .profile-card img {
    width: 98px;
  }

  .calendar-heading,
  .toolbar-row,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .planner-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .diary-board {
    column-count: 1;
  }

  .tip-card > button {
    grid-template-columns: 1fr;
  }

  .tip-content p,
  .tip-content ul {
    padding-left: 20px;
  }

  .gallery-item.tall,
  .gallery-item.wide {
    grid-column: span 1;
    grid-row: span 1;
  }
}
