:root {
  --cream: #FBF5EE;   /* 主要背景 */
  --peach: #E8A0A8;   /* 品牌重點色 */
  --wood: #C89B72;    /* 裝飾與輔助色 */
  --ink: #4A3426;     /* 主要文字 */
  --ink-soft: #6B5243;
  --peach-pale: #F8E3E2;
  --wood-pale: #F1E4D3;
  --font: "Huninn", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.75 var(--font); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
section[id] { scroll-margin-top: 72px; }

.skip { position: absolute; left: -999px; top: 8px; padding: 8px 14px; background: #fff; z-index: 20; }
.skip:focus { left: 8px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
h2 { font-size: clamp(28px, 4vw, 36px); line-height: 1.3; font-weight: 400; margin-bottom: 8px; }

/* 頁首 */
.site-head { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 24px; background: var(--cream); border-bottom: 2px solid var(--wood-pale); }
.brand { min-width: 0; font-size: 23px; text-decoration: none; white-space: nowrap; }
.site-head nav { display: flex; flex-shrink: 0; gap: 4px; }
.site-head nav a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 22px; text-decoration: none; white-space: nowrap; word-break: keep-all; }
@media (min-width: 769px) and (max-width: 960px) {
  .site-head nav a { padding: 0 9px; font-size: 15px; }
}
.site-head nav a:hover { background: var(--peach-pale); }

/* 按鈕 */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 28px; border-radius: 26px; font: inherit; text-decoration: none; cursor: pointer; }
.btn-solid { background: var(--ink); border: 2px solid var(--ink); color: var(--cream); }
.btn-solid:hover { background: #5E4534; }
.btn-line { background: transparent; border: 2px solid var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--peach-pale); }
.btn[hidden] { display: none; }
.btn:disabled { background: #D9CBBC; border-color: #D9CBBC; color: var(--ink); cursor: not-allowed; }

/* 層架：全站共用的記憶點，作品都擺在這塊木板上 */
.plank { position: relative; height: 16px; border-radius: 3px 3px 5px 5px; background: linear-gradient(#D6AE86 0 5px, var(--wood) 5px); box-shadow: 0 9px 10px -5px rgba(74, 52, 38, .32); }

/* 主視覺 */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; max-width: 1160px; margin: 0 auto; padding: 56px 24px 72px; }
.hero-text { min-width: 0; }
.hero h1 { font-size: clamp(30px, 3.9vw, 44px); line-height: 1.32; font-weight: 400; }
.hero p { margin-top: 18px; color: var(--ink-soft); font-size: 19px; max-width: 26em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.scene { min-width: 0; margin: 0; }
.scene-hero-image { display: block; width: 100%; height: auto; border-radius: 20px; box-shadow: 0 12px 30px -16px rgba(74, 52, 38, .32); }
.scene figcaption { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }

/* 關於 MOMO TAFFY */
.about { padding: 64px 0 72px; background: #fff; }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; }
.about-image { position: -webkit-sticky; position: sticky; top: 88px; min-width: 0; margin: 0; }
.about-image img { width: 100%; height: auto; border-radius: 20px; box-shadow: 0 12px 30px -16px rgba(74, 52, 38, .32); }
.about-text { min-width: 0; }
.about-text h2 { margin-bottom: 20px; }
.about-text p + p { margin-top: 14px; }
.about-text .about-brand { margin-top: 24px; padding-top: 16px; border-top: 2px solid var(--wood-pale); color: var(--ink-soft); font-size: 15px; }

/* 作品 */
.works { padding: 64px 0 72px; background: var(--wood-pale); }
.pending-note { color: var(--ink-soft); }
.shelf-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin-top: 32px; }
.work { min-width: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 6px; align-items: end; }
.pair figure { position: relative; min-width: 0; margin: 0; }
.pair img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.pair figure:first-child img { padding: 5px; background: #fff; border-radius: 4px; }
.pair .made img { border-radius: 10px 10px 0 0; }
.pair figcaption { position: absolute; left: 6px; bottom: 6px; padding: 0 9px; border-radius: 11px; background: rgba(255, 255, 255, .92); font-size: 13px; line-height: 22px; }
.work > p { margin-top: 14px; }
.reserved { margin-top: 36px; padding: 18px 20px; border: 2px dashed var(--wood); border-radius: 12px; text-align: center; color: var(--ink-soft); }

/* 與一般 3D 列印的差異 */
.diff { padding: 64px 0 72px; background: #fff; }
.diff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.diff-card { min-width: 0; padding: 24px; border: 2px solid var(--wood-pale); border-radius: 16px; background: var(--cream); }
.diff-card h3 { margin: 0 0 8px; font-size: 20px; font-weight: 400; }
.diff-card p + p { margin-top: 8px; }
.diff-ours { border-color: var(--peach); background: var(--peach-pale); }

/* 訂製方式 */
.how { padding: 72px 0; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: 28px 0 20px; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; min-width: 0; padding-top: 68px; counter-increment: step; text-align: center; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 50%; margin-left: -26px; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--peach); font-size: 24px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 25px; left: calc(50% + 36px); right: calc(8px - 50%); border-top: 3px dotted var(--wood); }
.steps b { display: block; font-size: 20px; font-weight: 400; }
.steps span { display: block; color: var(--ink-soft); }

/* 常見問題 */
.faq { padding: 64px 0; background: #fff; }
.faq h2 { margin-bottom: 18px; }
details { border-bottom: 2px solid var(--wood-pale); }
summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 60px; padding: 8px 0; cursor: pointer; list-style: none; font-size: 18px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex-shrink: 0; font-size: 26px; line-height: 1; color: var(--wood); }
details[open] summary::after { content: "−"; }
details p { padding-bottom: 16px; }
.tbd { color: var(--ink-soft); }

/* 聯絡 */
.contact { padding: 64px 0 72px; background: var(--peach); text-align: center; }
.contact img { width: 128px; height: 128px; margin: 0 auto 16px; padding: 14px; border-radius: 50%; background: var(--cream); }
.contact p { margin-bottom: 24px; }
.contact .contact-state { margin: 12px 0 0; font-size: 15px; }

/* 頁尾 */
.site-foot { padding: 44px 0 28px; background: var(--ink); color: var(--cream); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 2.4fr 1fr 1fr 1.1fr; gap: 32px; }
#company { scroll-margin-top: 72px; }
@media (max-width: 1000px) {
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
.foot-grid > div { min-width: 0; }
.foot-brand { font-size: 22px; margin-bottom: 6px; }
.foot-title { margin-bottom: 6px; color: #E7CFBB; }
.site-foot ul { margin: 0; padding: 0; list-style: none; }
.site-foot a { display: inline-flex; align-items: center; min-height: 44px; }
.site-foot a[hidden] { display: none; }
/* 頁尾最下方：細分隔線＋版權與集團歸屬小字 */
.foot-bottom { margin-top: 32px; padding-top: 16px; border-top: 1px solid rgba(251, 245, 238, .2); color: #D4BFAE; font-size: 13px; line-height: 1.6; text-align: center; }
.foot-bottom a { text-decoration: underline; }
@media (max-width: 768px) {
  .foot-bottom { margin-top: 24px; font-size: 12.5px; }
}
.foot-note { margin-top: 24px; color: #D4BFAE; font-size: 13px; }

.works-compare { margin: 32px 0 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.works-compare img { display: block; width: 100%; height: auto; }
.works-note { margin: 12px 0 0; text-align: center; font-size: 14px; color: var(--ink-soft); }
@media (max-width: 768px) {
  .works-compare img { width: 760px; max-width: none; }
}

@media (max-width: 1000px) {
  .shelf-row { grid-template-columns: 1fr; max-width: 560px; }
  .diff-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; max-width: 720px; }
  .about-image { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(2)::after { display: none; }
}

/* 關於我們配圖（橫式）：平板寬度（769～1000px）最寬 560px 並置中；圖片依原比例完整顯示、不裁切 */
@media (min-width: 769px) and (max-width: 1000px) {
  .about-image { width: 100%; max-width: 560px; justify-self: center; }
}

@media (max-width: 768px) {
  body { font-size: 16px; padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  section[id] { scroll-margin-top: 56px; }
  .wrap { padding: 0 16px; }
  .site-head { justify-content: center; padding: 6px 16px; }
  .brand { font-size: 21px; }
  /* 手機導覽放在拇指搆得到的底部 */
  .site-head nav { position: fixed; left: 0; right: 0; bottom: 0; gap: 0; padding-bottom: env(safe-area-inset-bottom); background: var(--cream); border-top: 2px solid var(--wood-pale); }
  .site-head nav a { flex: 1 1 0; min-width: 0; justify-content: center; min-height: 58px; padding: 0 2px; border-radius: 0; font-size: 14px; line-height: 1.3; text-align: center; white-space: normal; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 28px 16px 56px; }
  .hero h1 { font-size: clamp(27px, 7.6vw, 36px); }
  .hero p { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 140px; }
  .scene { padding-top: 0; }
  .works, .about, .diff, .how, .faq, .contact { padding-top: 48px; padding-bottom: 52px; }
  .steps { grid-template-columns: 1fr; gap: 0; margin-bottom: 12px; }
  .steps li { padding: 0 0 24px 68px; min-height: 76px; text-align: left; }
  .steps li::before { left: 0; margin-left: 0; }
  .steps li:not(:last-child)::after { display: block; top: 58px; left: 25px; right: auto; bottom: 6px; border-top: 0; border-left: 3px dotted var(--wood); }
  .foot-grid { grid-template-columns: 1fr; gap: 20px; }
  .foot-grid > div:first-child { grid-column: auto; }
  .contact .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
