/* 全站區塊元件（源自 Showcase 服務總覽頁 v7；2026-10-14 起是全站規範，見 docs/design-system.md）：
   首屏、客人的一天、麻煩清單、卡片格子、合作四步、FAQ、結尾大卡。每頁都載；色都從 site.css 的 token 推。小畫面在 v7-scenes.css。 */
/* 區塊間距照 v7（不畫分隔線）；寬度沿用全站 .wrap，頁首頁尾才對得齊 */
.v-sec { padding: 0 0 clamp(56px, 8vw, 112px); }
/* 錨點（#services、#how、#web…）：頁首黏著，捲過去要往下留一段 */
[id] { scroll-margin-top: 84px; }
/* 大標只在標點斷行（「從認／識你」這種斷法難看）；真的放不下才硬斷 */
.sv-title, .sd-title, .story-head h2, .sv-cta h2, .sv-faq-title h2, .tile h3 { word-break: keep-all; overflow-wrap: anywhere; }

/* 捲到才出現：JS 只對還在畫面下方的元素加 .is-wait（關掉 JS 一律直接顯示） */
[data-reveal].is-wait { opacity: 0; filter: blur(6px); transform: translateY(10px); }
[data-reveal].is-in {
  transition: opacity var(--dur-3) var(--ease-out), filter var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}

/* ── 首屏：通欄大標＋左說明右規格欄 ── */
.sv-hero { padding: clamp(40px, 7vw, 96px) 0 clamp(32px, 4.4vw, 56px); }
.sv-title { margin: 0; font: 900 clamp(38px, 6.4vw, 92px)/1.14 var(--font-sans); letter-spacing: 0; font-feature-settings: 'palt'; }
.sv-pre { display: block; color: var(--ink-3); font-weight: 700; }
.sv-main { display: block; }
.sv-sub { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 28px clamp(32px, 6vw, 96px); align-items: end; margin-top: clamp(24px, 3.2vw, 44px); }
.sv-lead { margin: 0; max-width: 30em; font: 500 clamp(19px, 1.9vw, 25px)/1.5 var(--font-sans); color: var(--ink-2); }
.sv-lead .hl { font-weight: 700; }
.sv-lead span { color: var(--ink-2); }
.hl {
  color: var(--ink); text-decoration: none; border-radius: .18em; padding: .02em .14em; margin-inline: -.02em; white-space: nowrap;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; background: var(--hl); transition: filter .25s var(--ease);
}
.hl[data-tone='1'] { --hl: #e3f7a6; }
.hl[data-tone='2'] { --hl: #d9e4ff; }
.hl[data-tone='3'] { --hl: #ffdccc; }
/* 英文片語長，不能整段不斷行（手機會被切掉） */
:lang(en) .hl { white-space: normal; }
@media (hover: hover) and (pointer: fine) { .hl:hover { filter: saturate(1.8) brightness(.97); } }
.spec { margin: 0; border-top: 1.5px solid var(--accent); }
.spec div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.spec dt { font-size: 13px; color: var(--ink-2); }
.spec dd { margin: 0; font: 600 15px/1 var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── 各服務頁：左字右小畫面 ── */
.sd-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.sv-hero.sd { padding-bottom: clamp(56px, 8vw, 112px); }
.sd-text { display: grid; gap: 18px; min-width: 0; }
.sd-title { margin: 0; font: 900 clamp(34px, 5vw, 60px)/1.15 var(--font-sans); font-feature-settings: 'palt'; word-break: keep-all; overflow-wrap: anywhere; }
.sd-lead { margin: 0; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.6; color: var(--ink-2); }
.sd-text .spec { max-width: 320px; }
.sd-text .hero-cta { margin-top: 4px; }
.sd-scene, .frame-card { padding: 12px; border-radius: 26px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); min-width: 0; }
.sd-scene .scene { height: clamp(240px, 30vw, 340px); border-radius: 18px; }
.frame-card img { border-radius: 18px; }
@media (max-width: 860px) { .sd-hero { grid-template-columns: minmax(0, 1fr); } }

/* ── 客人的一天＋麻煩清單 ── */
.story-head { margin-bottom: clamp(24px, 3vw, 40px); }
.story-head h2 { margin: 0; font: 900 clamp(28px, 3.8vw, 46px)/1.2 var(--font-sans); }
.story-head p { margin: 10px 0 0; max-width: 40em; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; color: var(--ink-2); }
.say { margin: 0; font-size: 15.5px; line-height: 1.6; }
.say.big { font-size: 18px; }
.uses { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.uses > span { margin-right: 2px; font-size: 12.5px; color: var(--ink-3); }
.use { padding: 6px 10px; border-radius: 999px; background: color-mix(in oklab, var(--accent) 9%, var(--surface)); color: var(--accent); text-decoration: none; font: 600 13px/1.2 var(--font-sans); transition: background-color var(--dur-1) var(--ease); }
.use::after { content: ' →'; }
@media (hover: hover) and (pointer: fine) { .use:hover { background: color-mix(in oklab, var(--accent) 16%, var(--surface)); } }
@media (pointer: coarse) { .use { padding: 9px 12px; } }

.day { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.day-step { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.day-when { position: relative; isolation: isolate; display: flex; align-items: center; gap: 2px; font: 500 13px/1 var(--font-sans); color: var(--ink-2); }
.day-step:not(:last-child) .day-when::after { content: ''; position: absolute; left: 30px; right: -14px; top: 50%; z-index: -1; border-top: 2px dotted color-mix(in oklab, var(--accent) 45%, transparent); }
.day-when span { padding: 0 8px; background: var(--bg); }
.day-dot { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 14px/1 var(--font-sans); font-style: normal; }
.day-step h3 { margin: 4px 0 0; font: 900 23px/1.2 var(--font-sans); }
.day-step .scene { border-radius: 16px; }
.day + p { margin: clamp(24px, 3vw, 36px) 0 0; }

.pain { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.pain.is-live { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.pain-qs { display: grid; gap: 8px; }
.pain-q {
  display: flex; gap: 12px; align-items: center; width: 100%; padding: 16px 20px 16px 16px; border: 0; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  text-align: left; font: 700 clamp(17px, 1.5vw, 20px)/1.45 var(--font-sans); color: var(--ink); transition: box-shadow .25s var(--ease), color .25s var(--ease);
}
.pain.is-live .pain-q { cursor: pointer; color: var(--ink-2); }
.pain-mark { flex: none; position: relative; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in oklab, var(--accent) 10%, var(--surface)); }
.pain-mark::before {
  content: ''; position: absolute; inset: 7px; background: var(--accent);
  -webkit-mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIgZD0iTTIuOTkyIDE2LjM0MmEyIDIgMCAwIDEgLjA5NCAxLjE2N2wtMS4wNjUgMy4yOWExIDEgMCAwIDAgMS4yMzYgMS4xNjhsMy40MTMtLjk5OGEyIDIgMCAwIDEgMS4wOTkuMDkyYTEwIDEwIDAgMSAwLTQuNzc3LTQuNzE5TTggMTJoLjAxTTEyIDEyaC4wMU0xNiAxMmguMDEiLz48L3N2Zz4=) center / contain no-repeat;
  mask: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMiIgZD0iTTIuOTkyIDE2LjM0MmEyIDIgMCAwIDEgLjA5NCAxLjE2N2wtMS4wNjUgMy4yOWExIDEgMCAwIDAgMS4yMzYgMS4xNjhsMy40MTMtLjk5OGEyIDIgMCAwIDEgMS4wOTkuMDkyYTEwIDEwIDAgMSAwLTQuNzc3LTQuNzE5TTggMTJoLjAxTTEyIDEyaC4wMU0xNiAxMmguMDEiLz48L3N2Zz4=) center / contain no-repeat;
}
.pain.is-live .pain-q[aria-selected='true'] { color: var(--ink); box-shadow: 0 0 0 2px var(--accent), 0 14px 30px -22px rgb(20 40 90 / .5); }
@media (hover: hover) and (pointer: fine) { .pain.is-live .pain-q:not([aria-selected='true']):hover { color: var(--ink); } }
.pain-panel { display: grid; gap: 14px; padding: 22px; border-radius: 22px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.pain:not(.is-live) .pain-panel { margin: 0 0 12px; }
.pain-panels .pain-panel { position: sticky; top: 84px; }
.pain-panel[hidden] { display: none; }
.pain-after { margin: 0; font: 700 13px/1 var(--font-sans); color: var(--accent); }
.pain-panel .scene { height: 240px; border-radius: 16px; }

/* ── 服務清單：灰井底、白卡，格子 auto-fill 不寫斷點 ── */
.sec-head { display: flex; align-items: baseline; gap: 12px; border-top: 1px solid var(--line-2); padding-top: 18px; margin-bottom: clamp(20px, 3vw, 32px); }
.sec-head h2 { margin: 0; font: 700 clamp(22px, 2.6vw, 30px)/1.2 var(--font-sans); }
.sec-more { margin-left: auto; font: 600 14px/1.4 var(--font-sans); text-decoration: none; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .sec-more:hover { text-decoration: underline; } }
.count { font: 500 15px/1 var(--font-mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.filter {
  position: relative; isolation: isolate; display: flex; gap: 2px; width: max-content; max-width: 100%;
  margin: 0 0 clamp(18px, 2.4vw, 28px); padding: 4px; border-radius: 999px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.filter[hidden] { display: none; }
.filter::-webkit-scrollbar { display: none; }
.filter-ind { position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; right: 100%; border-radius: 999px; background: var(--accent); }
.filter-btn {
  flex: none; border: 0; background: none; cursor: pointer; padding: 10px 16px; border-radius: 999px;
  font: 600 14px/1 var(--font-sans); color: var(--ink-2); white-space: nowrap; transition: color var(--dur-1) var(--ease);
}
.filter-btn[aria-pressed='true'] { color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .filter-btn:not([aria-pressed='true']):hover { color: var(--ink); } }
@media (pointer: coarse) { .filter-btn { min-height: 44px; } }

.svc-grid, .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; padding: 12px; border-radius: 26px; background: var(--well); }
.svc-card, .tile {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 22px 22px 18px; border-radius: 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  transition: transform var(--dur-2) var(--spring), box-shadow var(--dur-1) var(--ease);
}
.svc-card[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .svc-card:hover, .tile:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-2), 0 18px 36px -24px rgb(0 0 0 / .35); } }
/* 分類錨點（#web、#ops…）：不跑 JS 也跳得到那一類的第一張卡，頁首黏著所以往上留一段 */
.grp-anchor { position: absolute; top: -84px; left: 0; width: 1px; height: 1px; }
.svc-scene { margin: -10px -10px 4px; }
.svc-top { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.svc-icon { position: relative; width: 32px; height: 32px; border-radius: 10px; background: var(--well); box-shadow: inset 0 0 0 1px var(--line); }
.svc-icon::before { content: ''; position: absolute; inset: 8px; background: var(--ink); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.has-demo .svc-icon { background: var(--lime); box-shadow: none; }
.has-demo .svc-icon::before { background: var(--on-lime); }
.svc-no { font: 500 12.5px/1 var(--font-mono); color: var(--ink-3); }
.svc-title { margin: 0; font: 800 21px/1.3 var(--font-sans); }
@media (hover: hover) and (pointer: fine) { .svc-title a:hover { color: var(--accent); } }
.svc-gain { margin: 0; font-size: 16px; line-height: 1.6; }
.svc-eg { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--well); font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.svc-eg b { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font: 600 12px/1.5 var(--font-sans); color: var(--ink); }
.svc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.svc-time { font: 500 13px/1 var(--font-sans); color: var(--ink-2); padding: 6px 9px; border-radius: 999px; background: var(--well); }
.svc-demo {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px 9px 14px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font: 600 13px/1 var(--font-sans); transition: transform var(--dur-2) var(--spring);
}
.svc-demo svg { width: 14px; height: 14px; transition: transform var(--dur-2) var(--spring); }
.svc-demo:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .svc-demo:hover svg { transform: translate(2px, -2px); } }
@media (pointer: coarse) { .svc-demo { min-height: 44px; } }
.price-note { margin: 14px 4px 0; font-size: 13px; color: var(--ink-3); }
.svc-card.flash { animation: svc-flash 1.8s var(--ease); }
@keyframes svc-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--lime), 0 0 0 1px var(--line); } }

/* 卡片格子的通用白卡（首頁作品精選）：大圖、標題、說明、標籤膠囊 */
.tiles-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.tile h3 { margin: 4px 0 0; font: 800 21px/1.3 var(--font-sans); }
.tile p { margin: 0; color: var(--ink-2); line-height: 1.6; }
.tile-shot { display: block; margin: -10px -10px 6px; }
.tile-shot img { border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.pills li { padding: 5px 10px; border-radius: 999px; background: var(--well); font: 500 13px/1.2 var(--font-sans); color: var(--ink-2); }

/* 製作時間一覽（原站的「工期一覽」表，收成摺疊區） */
.svc-table { margin-top: 18px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.svc-table summary { cursor: pointer; padding: 14px 18px; font-weight: 700; }
.svc-table .table-wrap { padding: 0 18px 12px; }
.svc-table th, .svc-table td { border-bottom-color: var(--line); }

/* ── 合作方式 ── */
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.how-step { position: relative; padding: 20px 20px 22px; border-radius: 18px; background: var(--well); }
.step-no { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 600 13px/1 var(--font-mono); }
.how-step:first-child .step-no { background: var(--lime); color: var(--on-lime); }
.how-step h3 { margin: 16px 0 6px; font: 800 19px/1.3 var(--font-sans); }
.how-step p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }

/* ── 常見問題：<details>，不靠 JS 也能開關 ── */
.sv-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.sv-faq-title { position: sticky; top: 90px; display: grid; gap: 12px; justify-items: start; }
.sv-faq-title h2 { margin: 0; font: 700 clamp(22px, 2.6vw, 30px)/1.2 var(--font-sans); }
.sv-faq-title .sec-more { margin: 0; }
.faq7 { min-width: 0; }
/* FAQ 頁：一整欄，跟首頁右欄同一種問答（不另包白卡） */
.faq-page { max-width: 860px; }
.faq7 details { border-top: 1px solid var(--line-2); }
.faq7 details:last-child { border-bottom: 1px solid var(--line-2); }
.faq7 summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; font: 700 18px/1.4 var(--font-sans); }
.faq7 summary::-webkit-details-marker { display: none; }
.faq__icon { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--well); transition: transform var(--dur-2) var(--spring), background-color var(--dur-1) var(--ease); }
.faq__icon::before, .faq__icon::after { content: ''; position: absolute; left: 8px; top: 13px; width: 12px; height: 1.75px; border-radius: 2px; background: var(--ink); }
.faq__icon::after { transform: rotate(90deg); }
.faq7 details[open] .faq__icon { transform: rotate(45deg); background: var(--lime); }
.faq7 details[open] .faq__icon::before, .faq7 details[open] .faq__icon::after { background: var(--on-lime); }
.faq7 details p { margin: 0; padding: 0 48px 24px 0; color: var(--ink-2); line-height: 1.7; }

/* ── 結尾：淡藍底大卡，按鈕用全站的 .btn ── */
.sv-cta { display: grid; gap: 14px; justify-items: start; padding: clamp(28px, 5vw, 64px); border-radius: 26px; background: color-mix(in oklab, var(--accent) 8%, var(--surface)); }
.sv-cta h2 { margin: 0; font: 900 clamp(26px, 3.6vw, 44px)/1.15 var(--font-sans); }
.sv-cta p { margin: 0; max-width: 34em; font-size: 17px; line-height: 1.7; color: var(--ink-2); }

/* ── 關於、聯絡：白卡 ── */
.prose-card, .form-card { padding: clamp(22px, 3.4vw, 40px); border-radius: 26px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); min-width: 0; }
.prose-card { max-width: 760px; font-size: 17px; }
.prose-card p:last-child { margin-bottom: 0; }
.contact-hero { align-items: start; }
.form-card .form .muted { margin: 0; }

/* ── 窄螢幕 ── */
@media (max-width: 1100px) { .day { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; } .day-step:nth-child(3) .day-when::after { display: none; } }
@media (max-width: 960px) { .how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sv-sub { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .sv-faq { grid-template-columns: minmax(0, 1fr); }
  .sv-faq-title { position: static; }
  .day { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .day-step { padding-left: 42px; }
  .day-when { margin-left: -42px; }
  .day-step .day-when::after { display: none; }
  .day-step:not(:last-child)::before { content: ''; position: absolute; left: 14px; top: 34px; bottom: -24px; border-left: 2px dotted color-mix(in oklab, var(--accent) 45%, transparent); }
  .pain.is-live { grid-template-columns: minmax(0, 1fr); }
  .pain-panels { display: none; }
  .pain-qs .pain-panel { position: static; margin-bottom: 8px; }
  .faq7 summary { font-size: 16.5px; padding: 18px 0; }
  .faq7 details p { padding-right: 0; }
}
@media (min-width: 1101px) { .day-step h3 { min-height: 2.4em; } } /* 五欄時標題折兩行的那欄，小畫面才不會往下掉 */
@media (max-width: 520px) {
  .how-steps { grid-template-columns: minmax(0, 1fr); }
  .svc-grid, .tiles { padding: 8px; gap: 8px; border-radius: 20px; }
  .frame-card, .sd-scene, .sv-cta, .form-card, .prose-card { border-radius: 20px; } /* 手機大塊一律 20px */
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; } /* 兩顆按鈕放不下時各自滿寬，不會一長一短 */
  .svc-card { padding: 18px 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal].is-wait { opacity: 1; filter: none; transform: none; }
}
