/* ==========================================================
   Chibi Nails — 猫ネイルチップ
   ========================================================== */

:root {
  --cream: #fbf6f0;
  --paper: #fffdf9;
  --ink: #3b302b;
  --ink-soft: #6f625b;
  --ink-faint: #a3958c;
  --line: #ece1d6;

  --pink: #f2cfcc;
  --pink-deep: #dc9c98;
  --beige: #ecdcc8;
  --beige-deep: #c9a989;
  --rose: #b9675e;       /* call to action */
  --rose-dark: #9c5249;
  --fur: #8a8079;
  --fur-dark: #574d47;

  --radius: 22px;
  --shadow: 0 18px 40px -18px rgba(92, 62, 48, 0.28);
  --max: 1120px;

  --font-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-latin: "Cormorant Garamond", "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  word-break: auto-phrase; /* keeps Japanese phrases together where supported */
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.45; margin: 0; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.latin { font-family: var(--font-latin); font-style: italic; font-weight: 500; letter-spacing: 0.06em; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Items Yoshie still needs to confirm. Hidden when CONFIG.showTodos is false. */
.todo {
  display: inline-block;
  margin-left: 0.4em;
  padding: 0 0.55em;
  border-radius: 6px;
  background: #fff1b8;
  color: #7a5b00;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  line-height: 1.7;
}
.hide-todos .todo { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.95em 2.1em;
  border: 0;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font: 700 1rem/1 var(--font-head);
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 10px 24px -12px rgba(156, 82, 73, 0.7);
}
.btn:hover { background: var(--rose-dark); transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #e7b6a8;
  outline-offset: 3px;
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn--ghost:hover { background: var(--paper); }
.btn[disabled], .btn.is-disabled { background: #cfc4bc; box-shadow: none; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 240, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: baseline; gap: 0.6em; text-decoration: none; white-space: nowrap; }
.brand .latin { font-size: 1.6rem; font-weight: 600; letter-spacing: 0.02em; }
.brand small { font-family: var(--font-head); font-size: 0.78rem; color: var(--ink-soft); }
.nav { display: flex; align-items: center; gap: 1.6rem; font-size: 0.88rem; }
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
.nav .btn { padding: 0.7em 1.4em; font-size: 0.88rem; color: #fff; }
@media (max-width: 820px) {
  .nav a:not(.btn) { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 88px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-block;
  margin-bottom: 1.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--rose);
}
.eyebrow .latin { font-size: 1.05rem; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: 0.06em; margin-bottom: 1.2rem; }
.hero h1 .accent { color: var(--rose); }
.hero .lead { color: var(--ink-soft); font-size: 1.02rem; max-width: 30em; }

.offer {
  margin: 2rem 0 1.6rem;
  padding: 1.4rem 1.6rem;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 460px;
}
.offer-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.offer-label { font-size: 0.82rem; color: var(--ink-soft); }
.price { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; letter-spacing: 0.02em; }
.price small { font-size: 0.8rem; font-weight: 500; color: var(--ink-soft); margin-left: 0.3em; }
.slots { margin-top: 1rem; }
.slots-text { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.45rem; }
.slots-text strong { font-family: var(--font-head); font-size: 1.15rem; color: var(--rose); }
.slots-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.slots-bar span { height: 8px; border-radius: 4px; background: var(--pink); }
.slots-bar span.taken { background: #e3d8cf; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* Hero photos: nail next to the real cat */
.hero-visual { position: relative; height: 470px; }
.polaroid {
  position: absolute;
  margin: 0;
  padding: 10px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 50px -22px rgba(92, 62, 48, 0.45);
  animation: rise 1s cubic-bezier(.2,.8,.2,1) both;
}
.polaroid img { border-radius: 12px; width: 100%; height: auto; }
.polaroid--main { width: 88%; left: 6%; top: 24%; transform: rotate(-1.5deg); z-index: 2; }
.polaroid--a { width: 50%; right: -3%; top: 0; transform: rotate(4deg); z-index: 1; animation-delay: .15s; }
.polaroid--b { width: 46%; left: -4%; bottom: 4%; transform: rotate(-5deg); z-index: 3; animation-delay: .3s; }
@keyframes rise { from { opacity: 0; translate: 0 26px; } }
.hero-visual-caption {
  position: absolute; left: 0; right: 0; bottom: -28px; margin: 0;
  text-align: center; font-size: 0.8rem; color: var(--ink-faint);
}
@media (max-width: 820px) {
  .hero { padding: 24px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { order: -1; height: auto; aspect-ratio: 1 / 0.86; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--paper { background: var(--paper); }
.section-head { text-align: center; margin-bottom: 3.2rem; }
.section-head .latin { display: block; font-size: 1.15rem; color: var(--rose); margin-bottom: 0.3rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: 0.08em; }
.section-head p { margin: 1rem auto 0; max-width: 34em; color: var(--ink-soft); }
@media (max-width: 820px) { .section { padding: 72px 0; } }

/* Story */
.story { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; }
.story-photo { position: relative; margin: 0; max-width: 420px; justify-self: center; }
.story-photo img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%; width: 100%; }
.story-badge {
  position: absolute; right: -18px; bottom: -18px;
  width: 112px; height: 112px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  background: var(--rose); color: #fff;
  font: 600 0.62rem/1.3 var(--font-body); letter-spacing: 0.12em;
  box-shadow: 0 12px 26px -10px rgba(156, 82, 73, 0.6);
  transform: rotate(-8deg);
}
.story-badge b { display: block; font: italic 600 2.4rem/1 var(--font-latin); letter-spacing: 0; }
.story h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-bottom: 1.2rem; }
.story p { color: var(--ink-soft); }
.signature { font-family: var(--font-head); color: var(--ink); margin-top: 1.4rem; }
@media (max-width: 820px) { .story { grid-template-columns: 1fr; gap: 40px; } .story-photo { max-width: 320px; } .story-badge { right: -8px; width: 96px; height: 96px; } }

/* Gallery: justified rows, so every photo shows whole */
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.gallery::after { content: ""; flex-grow: 999; }
.work {
  --h: 200px;
  flex: var(--ar) 1 calc(var(--ar) * var(--h));
  max-width: calc(var(--ar) * var(--h) * 1.5); /* a photo alone on a row never balloons */
  aspect-ratio: var(--ar);
  position: relative;
  border: 0;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--line);
  cursor: zoom-in;
}
.work img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.work:hover img { transform: scale(1.03); }
.work[hidden] { display: none; }
.work-day {
  position: absolute; left: 8px; bottom: 8px;
  padding: 0.05em 0.7em; border-radius: 999px;
  background: rgba(255, 253, 249, 0.92);
  font: italic 600 0.9rem/1.5 var(--font-latin); color: var(--ink);
}
.gallery-more { text-align: center; margin-top: 2.2rem; display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
@media (max-width: 640px) { .gallery { gap: 8px; } .work { --h: 120px; border-radius: 10px; } }

/* For you */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  padding: 2rem 1.8rem;
  border-radius: var(--radius);
  background: var(--cream);
}
.section--paper .card { background: var(--cream); }
.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.12rem; margin-bottom: 0.6rem; }
.card p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; } }

/* Product anatomy */
.anatomy { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.anatomy-photo { margin: 0; }
.anatomy-photo img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 4.4; width: 100%; object-fit: cover; object-position: 50% 80%; }
.section-head--left { text-align: left; margin-bottom: 1.6rem; }
.anatomy-list { list-style: none; margin: 0; padding: 0; }
.anatomy-list li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.anatomy-list li:first-child { padding-top: 0; }
.anatomy-list h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.anatomy-list p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.swatches { display: flex; gap: 1rem; margin-top: 0.7rem; }
.swatch { display: flex; align-items: center; gap: 0.5em; font-size: 0.9rem; }
.swatch i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06); }
@media (max-width: 820px) { .anatomy { grid-template-columns: 1fr; gap: 32px; } .anatomy-photo img { aspect-ratio: 4 / 3.6; } }

/* Flow */
.flow { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; counter-reset: step; }
.flow li {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding-bottom: 2rem;
}
.flow li::before {
  counter-increment: step;
  content: counter(step);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--rose);
  box-shadow: inset 0 0 0 1.5px var(--pink);
}
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 62px;
  bottom: 6px;
  width: 2px;
  background: repeating-linear-gradient(var(--pink) 0 6px, transparent 6px 12px);
}
.flow h3 { font-size: 1.05rem; margin: 0.7rem 0 0.25rem; }
.flow p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.flow .time { display: inline-block; margin-left: 0.5em; font-size: 0.78rem; color: var(--rose); font-family: var(--font-body); font-weight: 500; }

/* Photo guide */
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-card { margin: 0; position: relative; }
.guide-card img { border-radius: 18px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.guide-card figcaption {
  display: flex; align-items: center; gap: 0.5em;
  margin-top: 0.6rem; font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
}
.guide-card figcaption svg { width: 24px; height: 24px; padding: 4px; border-radius: 50%; color: #fff; flex: none; }
.guide-card--ok figcaption svg { background: #6a9a64; }
.guide-card--ng figcaption svg { background: #c8645a; }
.guide-card--ng img { filter: saturate(0.85); }
.guide-note { font-size: 0.78rem; color: var(--ink-faint); text-align: right; margin: 0.6rem 0 2.4rem; }
.photo-table { border-radius: var(--radius); background: var(--paper); padding: 1.8rem 2rem; max-width: 680px; margin: 0 auto; box-shadow: var(--shadow); }
.photo-table h3 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.photo-row { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 0; border-bottom: 1px dashed var(--line); }
.photo-row:last-of-type { border-bottom: 0; }
.photo-row span { font-size: 0.8rem; color: var(--ink-soft); display: block; line-height: 1.6; }
.photo-row b { font-family: var(--font-head); color: var(--rose); white-space: nowrap; margin-left: 1rem; font-size: 1.1rem; }
@media (max-width: 640px) {
  .guide-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .guide-card figcaption { font-size: 0.82rem; }
  .photo-table { padding: 1.4rem; }
}

/* FAQ */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.3rem 2.4rem 1.3rem 0;
  font-family: var(--font-head);
  font-weight: 700;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .answer { padding: 0 0 1.4rem; color: var(--ink-soft); font-size: 0.94rem; }
.faq .answer p:last-child { margin: 0; }

/* ---------- Order form ---------- */
.order-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
@media (max-width: 960px) { .order-layout { grid-template-columns: 1fr; } }

.form-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 2.2rem;
  box-shadow: var(--shadow);
}
@media (max-width: 520px) { .form-card { padding: 1.4rem 1.1rem; border-radius: 16px; } }

.form-section + .form-section { margin-top: 2.6rem; padding-top: 2.2rem; border-top: 1px solid var(--line); }
.form-section > h3 { font-size: 1.15rem; margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.6em; }
.form-section > h3 .num {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--pink); color: var(--rose-dark); font-family: var(--font-latin); font-style: italic; font-size: 1.05rem;
}
.form-section > .hint { font-size: 0.86rem; color: var(--ink-soft); margin-bottom: 1.3rem; }

.field { margin-bottom: 1.2rem; }
.field label, .field .label { display: block; font-weight: 500; font-size: 0.92rem; margin-bottom: 0.4rem; }
.req, .opt { font-size: 0.7rem; padding: 0.1em 0.55em; border-radius: 4px; margin-left: 0.5em; vertical-align: 1px; font-weight: 500; }
.req { background: var(--rose); color: #fff; }
.opt { background: var(--line); color: var(--ink-soft); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea, .field select {
  width: 100%;
  padding: 0.85em 1em;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 1rem; /* keeps iOS from zooming in */
  color: var(--ink);
  transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--pink-deep); outline: none; }
.field textarea { min-height: 120px; resize: vertical; }
.field .help { font-size: 0.8rem; color: var(--ink-faint); margin-top: 0.3rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field-row--zip { grid-template-columns: 180px 1fr; }
@media (max-width: 520px) { .field-row, .field-row--zip { grid-template-columns: 1fr; } }
.is-invalid input, .is-invalid textarea, .is-invalid .dropzone { border-color: #d9534f !important; }
.error-text { display: none; color: #c0392b; font-size: 0.82rem; margin-top: 0.3rem; }
.is-invalid .error-text { display: block; }

/* Choice cards (cat count, color, payment) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: flex;
  align-items: center;
  gap: 0.7em;
  height: 100%;
  padding: 0.9em 1.1em;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}
.choice span small { display: block; font-size: 0.75rem; color: var(--ink-faint); line-height: 1.5; }
.choice input:checked + span { border-color: var(--rose); background: #fdf3f1; box-shadow: inset 0 0 0 1px var(--rose); }
.choice input:focus-visible + span { outline: 3px solid #e7b6a8; outline-offset: 2px; }
.choice .dot { width: 26px; height: 26px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.07); }

/* Cat blocks and photo uploads */
.cat-block { border: 1.5px solid var(--line); border-radius: 18px; padding: 1.5rem; margin-top: 1.2rem; }
.cat-block[hidden] { display: none; }
.cat-block > h4 { margin: 0 0 1rem; font-family: var(--font-head); font-size: 1.05rem; display: flex; align-items: center; gap: 0.5em; }
.cat-block > h4 svg { width: 22px; height: 22px; }
@media (max-width: 520px) { .cat-block { padding: 1rem; } }

.upload-group { margin-top: 1.3rem; }
.upload-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.5rem; }
.upload-head .label { margin: 0; font-weight: 500; font-size: 0.92rem; }
.upload-head .label small { display: block; font-weight: 400; color: var(--ink-faint); font-size: 0.78rem; }
.upload-count { font-family: var(--font-head); font-size: 0.9rem; color: var(--ink-faint); white-space: nowrap; }
.upload-count.is-complete { color: #4e8a4b; }
.upload-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.dropzone, .thumb {
  aspect-ratio: 1;
  border-radius: 14px;
}
.dropzone {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.2rem;
  border: 1.5px dashed var(--pink-deep);
  background: #fdf6f4;
  color: var(--rose);
  font-size: 0.75rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.dropzone:hover, .dropzone.is-over { background: #fbe8e4; }
.dropzone svg { width: 22px; height: 22px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone[hidden] { display: none; }
.thumb { position: relative; overflow: hidden; background: var(--cream); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(59, 48, 43, 0.72);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.slot-empty { aspect-ratio: 1; border-radius: 14px; background: var(--cream); }

.check { display: flex; gap: 0.8em; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 14px; background: var(--cream); margin-bottom: 0.8rem; cursor: pointer; font-size: 0.92rem; }
.check input { width: 20px; height: 20px; margin-top: 0.3em; accent-color: var(--rose); flex: none; }
.check a { color: var(--rose); }

.form-errors { display: none; margin-top: 1.4rem; padding: 1rem 1.2rem; border-radius: 14px; background: #fbeceb; color: #a0322a; font-size: 0.9rem; }
.form-errors.is-shown { display: block; }
.form-errors ul { margin: 0.4rem 0 0; padding-left: 1.2em; }
.form-submit { margin-top: 1.6rem; }
.form-submit .btn { width: 100%; padding: 1.15em; font-size: 1.05rem; }
.form-submit .help { text-align: center; font-size: 0.8rem; color: var(--ink-faint); margin-top: 0.7rem; }

/* Summary */
.summary {
  position: sticky;
  top: 90px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
}
.summary h3 { font-size: 1.05rem; margin-bottom: 1rem; }
.summary dl { margin: 0; }
.summary dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px dashed var(--line); }
.summary dt { color: var(--ink-soft); }
.summary dd { margin: 0; text-align: right; font-weight: 500; }
.summary .total { font-family: var(--font-head); font-size: 1.3rem; }
.summary .note { font-size: 0.8rem; color: var(--ink-faint); margin: 1rem 0 0; }
@media (max-width: 960px) { .summary { position: static; order: -1; } }

/* Sold out */
.soldout-panel { display: none; text-align: center; padding: 3rem 1.5rem; }
.is-soldout .soldout-panel { display: block; }
.is-soldout .order-layout { display: none; }
.soldout-badge { display: none; }
.is-soldout .soldout-badge {
  display: inline-block;
  padding: 0.3em 1em;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 600 1rem var(--font-latin);
  letter-spacing: 0.2em;
}

/* ---------- Mobile sticky order bar ---------- */
.order-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  border-radius: 999px;
  background: rgba(59, 48, 43, 0.94);
  color: #fff;
  font-size: 0.85rem;
  transform: translateY(140%);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.order-bar strong { font-family: var(--font-head); color: #f6c9c3; font-size: 1.05rem; }
.order-bar .btn { padding: 0.8em 1.4em; font-size: 0.9rem; box-shadow: none; }
.order-bar.is-shown { transform: translateY(0); }
@media (max-width: 820px) { .order-bar { display: flex; } }
.is-soldout .order-bar { display: none; }

/* ---------- Dialogs ---------- */
dialog {
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  max-width: min(520px, 92vw);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(40, 25, 20, 0.5);
}
dialog::backdrop { background: rgba(59, 48, 43, 0.5); backdrop-filter: blur(3px); }
.dialog-body { padding: 2.2rem; }
.dialog-body h3 { font-size: 1.2rem; margin-bottom: 0.8rem; }
.dialog-body p { color: var(--ink-soft); font-size: 0.94rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.4rem; }
.lightbox { width: min(1100px, 94vw); max-width: none; background: transparent; box-shadow: none; overflow: visible; }
.lightbox img { border-radius: var(--radius); width: 100%; max-height: 72vh; object-fit: contain; margin: 0 auto; }
.lightbox p { text-align: center; color: #fff; font-family: var(--font-latin); font-style: italic; font-size: 1.2rem; margin: 0.6rem 0 0; }
.lightbox-post { display: block; text-align: center; margin-top: 0.4rem; color: #fff; font-size: 0.85rem; opacity: 0.85; }
.lightbox-nav {
  position: absolute; top: 50%; translate: 0 -70%; z-index: 2;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.9); color: var(--ink);
  font-size: 30px; line-height: 1; padding-bottom: 4px; cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.4);
}
.lightbox-nav:hover { background: #fff; }
.lightbox-nav--prev { left: 10px; }
.lightbox-nav--next { right: 10px; }
.lightbox-count {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 0.15em 0.8em; border-radius: 999px;
  background: rgba(59, 48, 43, 0.7); color: #fff; font-size: 0.8rem;
}
@media (max-width: 640px) { .lightbox-nav { width: 38px; height: 38px; font-size: 24px; } }
.lightbox-close {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.9); font-size: 22px; cursor: pointer;
}

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 120px; text-align: center; font-size: 0.85rem; color: var(--ink-soft); }
.site-footer .brand { justify-content: center; margin-bottom: 1.2rem; }
.social { display: flex; justify-content: center; gap: 12px; margin-bottom: 1.6rem; }
.social a {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line);
}
.social svg { width: 20px; height: 20px; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-bottom: 1rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- Legal page ---------- */
.legal { padding: 64px 0 96px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: 1.7rem; margin-bottom: 0.6rem; }
.legal h2 { font-size: 1.25rem; margin: 3rem 0 1rem; }
.legal table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; font-size: 0.92rem; }
.legal th, .legal td { padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal th { width: 32%; background: #f7efe7; font-weight: 500; }
.legal p, .legal li { color: var(--ink-soft); font-size: 0.94rem; }
@media (max-width: 600px) {
  .legal th, .legal td { display: block; width: 100%; }
  .legal th { border-bottom: 0; padding-bottom: 0.3rem; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s, transform 0.8s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Opening time ---------- */
.opens {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2em 0.5em;
  margin: 0.9rem 0 0; padding-top: 0.9rem; border-top: 1px dashed var(--line);
  font-size: 0.88rem;
}
.opens[hidden] { display: none; }
.opens-label { color: var(--ink-soft); }
.opens strong { font-family: var(--font-head); font-size: 1.05rem; color: var(--ink); }
.opens small { color: var(--ink-soft); }
.opens .countdown { flex-basis: 100%; font-family: var(--font-head); color: var(--rose); font-size: 0.95rem; }
.opens .countdown:empty { display: none; }

/* Before opening: hide the form and summary, show the pre-open panel */
.preopen-panel { display: none; text-align: center; padding: 2.4rem 1.5rem; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 2rem; }
.is-before .preopen-panel { display: block; }
.is-before .order-layout { display: none; }
.preopen-label { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.preopen-countdown { margin: 0.2rem 0 0.8rem; font: 700 clamp(1.6rem, 6vw, 2.4rem)/1.3 var(--font-head); color: var(--rose); }
.preopen-date { margin-bottom: 0.4rem; }
.preopen-hint { font-size: 0.88rem; color: var(--ink-soft); }
.preopen-hint a { color: var(--rose); }
.preopen-panel .social { margin: 1.2rem 0 0; }

/* ---------- Scale photo in the hero ---------- */
.polaroid--scale { width: 27% !important; padding: 8px 8px 30px; }
.polaroid--scale img { aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 78%; }
.polaroid--scale figcaption {
  position: absolute; left: 0; right: 0; bottom: 6px; text-align: center;
  font-family: var(--font-head); font-size: 0.78rem; color: var(--ink-soft);
}
@media (max-width: 820px) { .polaroid--scale { width: 30% !important; padding-bottom: 26px; } .polaroid--scale figcaption { font-size: 0.7rem; } }

/* ---------- Earliest vs latest ---------- */
.growth { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 1.8rem; }
.growth figure { margin: 0; }
.growth img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; }
.growth figcaption { margin-top: 0.4rem; font-size: 0.82rem; color: var(--ink-soft); }
.growth figcaption b { font: italic 600 1rem var(--font-latin); color: var(--ink); margin-right: 0.5em; }
.growth-note { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.8rem; }
@media (max-width: 520px) { .growth { grid-template-columns: 1fr; } }

/* ---------- Care ---------- */
.step-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: care; }
.step-cards li { background: var(--paper); border-radius: var(--radius); padding: 1.6rem 1.4rem; position: relative; }
.step-cards li::before {
  counter-increment: care; content: counter(care);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--pink); color: var(--rose-dark); font: italic 600 1.2rem var(--font-latin); margin-bottom: 0.8rem;
}
.step-cards h3 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.step-cards p { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }
.care-note { max-width: 760px; margin: 1.8rem auto 0; padding: 1rem 1.3rem; border-radius: 14px; background: #fff6e8; font-size: 0.9rem; }
@media (max-width: 960px) { .step-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .step-cards { grid-template-columns: 1fr; } }

/* ---------- Before you order ---------- */
.before-order { max-width: 860px; margin: 0 auto 2rem; padding: 1.6rem 1.8rem; border-radius: var(--radius); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--pink); }
.before-order h3 { font-size: 1.1rem; margin-bottom: 0.8rem; }
.before-order ul { margin: 0; padding-left: 1.2em; }
.before-order li { margin: 0.45em 0; font-size: 0.92rem; color: var(--ink-soft); }
.before-order li b { color: var(--ink); }
.before-order a { color: var(--rose); }
.is-soldout .before-order { display: none; }
@media (max-width: 520px) { .before-order { padding: 1.2rem 1.1rem; } }

/* ---------- Final check above the pay button ---------- */
.final-check { margin-top: 2.2rem; padding: 1.3rem 1.4rem; border-radius: 16px; background: var(--cream); }
.final-check h4 { margin: 0 0 0.6rem; font-family: var(--font-head); font-size: 1rem; }
.final-check dl { margin: 0; }
.final-check dl > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 0.8em; padding: 0.55rem 0; border-top: 1px dashed var(--line); font-size: 0.86rem; }
.final-check dt { color: var(--ink-soft); }
.final-check dd { margin: 0; }
.final-check a { color: var(--rose); }
@media (max-width: 520px) { .final-check dl > div { grid-template-columns: 1fr; gap: 0.1em; } }

/* =========================================================
   Multi-page layout (main page, /order/, /care/)
   ========================================================= */

/* Hero: heading, photos, offer and lead as separate grid areas */
.hero .hero-grid {
  grid-template-areas: "head visual" "lead visual" "offer visual";
  align-items: start;
  row-gap: 0;
}
.hero-head { grid-area: head; align-self: end; }
.hero-visual { grid-area: visual; align-self: center; }
.hero-offer { grid-area: offer; }
.hero-lead { grid-area: lead; margin: 0; }
.hero-offer .offer { margin-top: 1.6rem; }
@media (max-width: 820px) {
  .hero { padding: 14px 0 44px; }
  .hero .hero-grid { grid-template-areas: "head" "visual" "offer" "lead"; gap: 0; }
  .hero h1 { font-size: 1.7rem; margin-bottom: 0.2rem; }
  .eyebrow { margin-bottom: 0.5rem; font-size: 0.74rem; }
  .hero-visual { aspect-ratio: 1 / 0.62; margin: 2px 0 30px; }
  .hero-visual-caption { bottom: -24px; font-size: 0.72rem; }
  .hero-offer .offer { margin: 0 0 0.9rem; padding: 0.95rem 1.1rem; }
  .hero-offer .price { font-size: 1.6rem; }
  .hero-offer .opens { margin-top: 0.6rem; padding-top: 0.6rem; }
  .hero-offer .slots { margin-top: 0.6rem; }
  .hero-lead { margin-top: 1.4rem; font-size: 0.95rem; }
}

/* Gallery on phones: a swipe row first; "すべて見る" opens the full compact grid */
@media (max-width: 640px) {
  .gallery:not(.is-expanded) {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto;
    scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px 10px;
    scrollbar-width: none;
  }
  .gallery:not(.is-expanded)::-webkit-scrollbar { display: none; }
  .gallery:not(.is-expanded)::after { display: none; }
  .gallery:not(.is-expanded) .work {
    flex: 0 0 auto; width: min(80vw, calc(190px * var(--ar))); max-width: none;
    scroll-snap-align: center;
  }
  .gallery.is-expanded .work { --h: 72px; }
}

/* Main page: compact step cards (shared with /care/) */
@media (max-width: 520px) {
  .step-cards li { padding: 1.1rem 1.1rem 1.1rem 3.7rem; }
  .step-cards li::before { position: absolute; left: 1rem; top: 1.05rem; margin: 0; }
}
.step-cards a { color: var(--rose); }

/* Closing call to action */
.cta-band { padding: 64px 0 72px; text-align: center; background: linear-gradient(180deg, var(--cream), #f6e2dc); }
.cta-lead { font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 0.2rem; }
.cta-when { color: var(--ink-soft); margin-bottom: 1.4rem; }
.cta-when strong { color: var(--ink); font-family: var(--font-head); }
.is-soldout .cta-when { display: none; }

/* Tighter sections on the order page */
.section--tight { padding: 56px 0; }
@media (max-width: 820px) { .section--tight { padding: 44px 0; } }

/* Order page top */
.order-top { padding: 36px 0 12px; }
.order-top .wrap { max-width: 860px; }
.order-top h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: 0.08em; margin-bottom: 1rem; }
.offer--wide { max-width: none; margin: 0 0 1rem; }
.order-jump { display: none; margin: 0 0 1rem; }
.order-jump .btn { width: 100%; }
body:not(.is-before):not(.is-soldout) .order-jump { display: block; }
.order-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; counter-reset: os; font-size: 0.85rem; }
.order-steps li { counter-increment: os; }
.order-steps a {
  display: inline-flex; align-items: center; gap: 0.45em; padding: 0.35em 0.95em;
  border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line);
}
.order-steps a::before { content: counter(os); font: italic 600 1rem var(--font-latin); color: var(--rose); }
.is-soldout .order-steps, .is-soldout #photos { display: none; }

/* Photo examples swipe on phones */
@media (max-width: 640px) {
  .guide-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px 8px; gap: 10px; scrollbar-width: none; }
  .guide-grid::-webkit-scrollbar { display: none; }
  .guide-card { flex: 0 0 42%; scroll-snap-align: start; }
}

/* Care page */
.section-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: 0.08em; }
.back-link { text-align: center; margin: 0 0 64px; }
.back-link a { color: var(--rose); }
@media (max-width: 820px) {
  .story-photo { max-width: 230px; }
  .story-badge { width: 84px; height: 84px; right: -14px; bottom: -14px; }
  .story-badge b { font-size: 1.9rem; }
}
