/* 誌造所官網：極簡白底黑字，色票跟下單系統同一套（ziner-order-system/site/index.html :root） */
:root {
  --ink: #111111;
  --ink-2: #2F2F30;
  --paper: #FFFFFF;
  --paper-2: #FAFAFA;
  --lav: #C7B8E0;          /* 誌造所紫（跟下單系統同一組） */
  --lav-soft: #EEE7F7;
  --lav-strong: #8A76BE;
  --lav-ink: #6B58A6;       /* 紫字用（白底上要讀得清楚，比 lav-strong 深一點） */
  --line: #E5E5E5;
  --muted: #4D4D4D;
  --font-cn: "PingFang TC", "Noto Sans TC", -apple-system, "Microsoft JhengHei", sans-serif;
  --font-round: 'Chiron GoRound TC WS', var(--font-cn);
  --wrap: 1080px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-cn); font-size: 16px; line-height: 1.85; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-round); font-weight: 700; line-height: 1.35; margin: 0 0 .6em; }
p { margin: 0 0 .9em; }
/* 捲軸：整頁細黑圓角、軌道透明；選單塊裡更細的淺灰（穆穆 10/15：預設的太粗） */
html { scrollbar-width: thin; scrollbar-color: var(--ink) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 999px; border: 3px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: #444; }
/* 選單塊：不顯示捲軸，放不下時上下出現小箭頭（穆穆 10/15：捲軸太長） */
.side { position: relative; }
.side__inner { scrollbar-width: none; }
.side__inner::-webkit-scrollbar { display: none; }
.side__arrow { position: absolute; left: 1px; right: 1px; height: 30px; display: grid; place-items: center; border: 0; background: var(--paper); color: var(--ink); font-size: 12px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 2; }
.side__arrow--up { top: 1px; border-radius: 15px 15px 0 0; border-bottom: 1px solid var(--line); }
.side__arrow--down { bottom: 1px; border-radius: 0 0 15px 15px; border-top: 1px solid var(--line); }
.side__arrow.is-on { opacity: 1; pointer-events: auto; }
.side__arrow:hover { background: #F2F2F2; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--ink); color: var(--paper); padding: 6px 12px; }

/* ── 左側固定側欄（電腦）／上方列＋抽屜（手機、平板）── */
/* 左欄是一塊浮動選單：黏在左上、捲到底跟著內容離開，頁尾橫跨整頁（穆穆 10/15）；選單精簡後收窄 252→216、字 14→15（穆穆 10/15） */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 0 12px; padding: 20px 0 0 20px; }
.rail { position: sticky; top: 20px; align-self: start; z-index: 40; display: flex; flex-direction: column; gap: 14px; }   /* 選單塊＋底下的瑞蘇一起黏著 */
.side { position: relative; width: 100%; max-height: calc(100vh - 128px); border: 1px solid var(--ink); border-radius: 16px; background: var(--paper); z-index: 40; display: flex; }
.side__inner { flex: 1; overflow-y: auto; padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 18px; }
.side__logo { align-self: center; }   /* logo 置中（穆穆 10/15） */
.side__logo img { width: 156px; display: block; }
.side__order { display: block; text-align: center; background: var(--paper); color: var(--lav-ink); border: 1.5px solid var(--lav-strong); border-radius: 999px; padding: 9px 4px; text-decoration: none; font-size: 14px; font-weight: 700; letter-spacing: .02em; transition: background .18s, color .18s; }   /* 下單鈕：紫框紫字白底，滑過去填滿（穆穆 10/15 挑的） */
.side__order:hover, .side__order[aria-current] { background: var(--lav-strong); color: #fff; }
/* Q&A 凹槽：側欄右邊的框線在工具那一排往內繞出一個標籤（穆穆 10/15 手繪＋選定）。進頁面畫一次、滑過去再畫一次 */
.side__qa { position: absolute; right: -1px; top: 0; width: 74px; height: 62px; z-index: 3; text-decoration: none; color: var(--ink); visibility: hidden; }
.side__qa.is-set { visibility: visible; }
.side__qa-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.side__qa-cut { fill: var(--paper); }
.side__qa-notch { fill: none; stroke: var(--ink); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 200; stroke-dashoffset: 0; }
.side__qa-t { position: absolute; left: 6px; right: 4px; top: 6px; bottom: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.side__qa-t b { font-family: var(--font-round); font-size: 15px; font-weight: 700; }
.side__qa-t small { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.side__qa:hover .side__qa-t b, .side__qa[aria-current] .side__qa-t b { color: var(--lav-ink); }
.side__qa.is-draw .side__qa-notch { animation: qa-draw .8s cubic-bezier(.45,0,.25,1) both; }
.side__qa.is-draw .side__qa-cut { animation: qa-cut .8s cubic-bezier(.45,0,.25,1) both; }
.side__qa.is-draw .side__qa-t { animation: qa-text .45s .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes qa-draw { from { stroke-dashoffset: 200; } to { stroke-dashoffset: 0; } }
@keyframes qa-cut { from { opacity: 0; } to { opacity: 1; } }
@keyframes qa-text { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.side__qa-li { display: none; }
.side__grp:first-of-type a { margin-right: 62px; }   /* 工具那兩行：滑過去／選中的底色收短，不要壓到右邊的 Q&A 凹槽 */   /* 手機：不做凹槽動態，改成選單裡普通的一行，放在說明書上面（穆穆 10/15） */
@media (max-width: 999px) { .side__qa { display: none; } .side__qa-li { display: list-item; } .side__grp:first-of-type a { margin-right: -10px; } }
@media (prefers-reduced-motion: reduce) { .side__qa.is-draw .side__qa-notch, .side__qa.is-draw .side__qa-cut, .side__qa.is-draw .side__qa-t { animation: none; } }
.side__nav { display: flex; flex-direction: column; gap: 18px; }
.side__grp ul { list-style: none; margin: 0; padding: 0; }
.side__grp a { display: block; padding: 4px 10px; margin: 0 -10px; border-radius: 6px; text-decoration: none; font-size: 15px; line-height: 1.6; color: var(--ink-2); transition: background .15s; }
.side__grp a:hover { background: #F2F2F2; }
.side__grp a[aria-current] { background: var(--lav-strong); color: #fff; }   /* 目前這頁：誌造所深紫＋反白字（跟下單系統選中的樣子一樣；穆穆 10/15） */
.side__grp + .side__grp { border-top: 1px solid var(--line); padding-top: 14px; }   /* 小標題拿掉後，用細線分三段（穆穆 10/15） */
.side__more summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 4px 10px; margin: 0 -10px; border-radius: 6px; font-size: 15px; line-height: 1.6; color: var(--ink-2); cursor: pointer; transition: background .15s; }
.side__more summary::-webkit-details-marker { display: none; }
.side__more summary::after { content: "▾"; font-size: 11px; color: #8A8A8A; transition: transform .2s; }
.side__more[open] summary::after { transform: rotate(180deg); }
.side__more summary:hover { background: #F2F2F2; }
.side__more ul { padding-left: 12px !important; border-left: 1px solid var(--line); margin: 2px 0 4px 2px !important; }
.ext { font-size: 11px; color: #8A8A8A; }
.side__grp a[aria-current] .ext { color: inherit; }
.side__foot { padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; }
.sns { display: flex; align-items: center; justify-content: center; gap: 12px; }   /* 文字說明拿掉、三個圖示置中（穆穆 10/15） */
.sns img { width: 30px; height: 30px; }
.topbar { display: none; }
.side__scrim { position: fixed; inset: 0; background: rgba(17,17,17,.28); z-index: 35; }

/* ── 內容 ── */
main { max-width: 1000px; margin: 0 auto; padding: 0 var(--gutter); }
main:has(.pg--app) { max-width: none; padding: 0; }   /* 嵌入工具的頁：撐滿右邊整欄 */
.pg { padding: 40px 0 80px; }
.pg section { margin: 0 auto 110px; }
.display { font-size: clamp(38px, 7vw, 58px); letter-spacing: .02em; margin: 26px 0 30px; }
.lead { text-align: center; line-height: 2; }
.hero { text-align: center; }
.hero__art { width: min(352px, 72vw); margin: 0 auto; filter: url(#riso3d); }   /* 紅青錯版：照 Wix 原頁的 3D 濾鏡參數（左青右紅各偏 3px） */

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 56px; max-width: 680px; }
.card img { width: 100%; max-width: 260px; margin: 0 auto 18px; }
.card h2, .split h2, .block h2 { font-size: 26px; text-align: center; }
.card p { text-align: justify; font-size: 15px; }
.cards .more { grid-column: 1 / -1; margin: 0; }
.more, .block .more { text-align: center; margin-top: 28px; }

.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 44px; align-items: center; max-width: 920px; }
.split h2 { text-align: left; }
.split p { text-align: justify; font-size: 15px; }
.split .btn { margin-top: 8px; }

.block { max-width: 440px; }
.block p { text-align: justify; font-size: 15px; }
.block .gap { margin-top: 1.9em; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-width: 142px; min-height: 40px; padding: 6px 22px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; font-size: 14px; letter-spacing: .06em; transition: background .18s, color .18s; }
.btn:hover { background: var(--ink); color: var(--paper); }

/* RISO COLORS 墨色色票（顏色照 Wix 原頁的色塊） */
.inks { text-align: center; max-width: 520px; }
.inks__title { font-size: 26px; letter-spacing: .08em; }
.inks__grid { list-style: none; margin: 34px auto 0; padding: 0; display: grid; grid-template-columns: repeat(3, 122px); justify-content: center; gap: 22px 24px; }
.ink { position: relative; isolation: isolate; width: 122px; height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; font-family: var(--font-round); font-weight: 700; font-size: 19px; line-height: 1.25; }
.ink::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--c); -webkit-mask: var(--blob) center / 100% 100% no-repeat; mask: var(--blob) center / 100% 100% no-repeat; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.ink:hover::before { transform: rotate(18deg) scale(1.04); }
.ink span { font-size: 15px; letter-spacing: .04em; }
.ink--light { color: var(--ink-2); }
.ink--skip { visibility: hidden; }
:root { --blob: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='32.351 33.259 136.298 134.482'%3E%3Cpath d='M168.282 88.417c-1.487-7.768-7.206-13.734-14.387-16.027 1.973-7.113-.004-15.049-5.851-20.522-6.282-5.88-15.266-7.267-22.797-4.25-2.558-7.58-9.47-13.383-18.104-14.249-8.039-.806-15.465 2.876-19.69 8.971-6.441-3.869-14.777-4.261-21.758-.321S54.908 53.202 55.136 60.578c-7.523.535-14.498 4.98-17.787 12.179-3.291 7.198-2.039 15.27 2.554 21.145-5.763 4.735-8.746 12.343-7.104 20.082 1.641 7.74 7.479 13.595 14.707 15.75-1.831 7.15.304 15.046 6.259 20.408 5.955 5.362 14.174 6.789 21.306 4.411 2.795 6.865 9.241 12.073 17.262 13.032 8.019.959 15.52-2.58 19.868-8.592 6.364 3.991 14.689 4.543 21.748.74 7.058-3.805 11.009-10.974 10.93-18.353 7.533-.39 14.596-4.701 18.03-11.834 3.434-7.133 2.344-15.226-2.131-21.187 5.856-4.625 8.991-12.173 7.504-19.942'/%3E%3C/svg%3E"); }

/* 嵌入的應用程式（分色模擬器、落版計算機、免費腳本、下單）：滿版、高度照 Wix 原設定；手機改成一個螢幕高、在框裡捲 */
.pg--app { padding: 0 0 40px; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.app-frame { width: 100%; }
.app-frame iframe { display: block; width: 100%; height: var(--h, 1400px); border: 0; }
.app-hero { width: 100%; margin: 0; background: #2F2F30; color: #fff; text-align: center; padding: 44px 20px 52px; }
.app-hero__kicker { font-family: var(--font-round); font-size: 26px; font-weight: 700; margin: 0 0 18px; }
.app-hero__box { display: inline-block; border: 1px solid rgba(255,255,255,.7); padding: 14px 40px 6px; }
.app-hero h1 { font-size: clamp(30px, 5vw, 46px); margin: 0 0 4px; }
@media (max-width: 600px) {
  .app-frame iframe { height: calc(100dvh - 20px); }
  .app-hero__kicker { font-size: 20px; }
  .app-hero__box { padding: 12px 18px 4px; }
}

/* ── 頁尾：網站地圖＋聯絡，橫跨整頁 ── */
.ft { border-top: 1px solid var(--line); margin-top: 40px; padding: 44px 40px 60px; font-size: 13px; line-height: 1.7; }
.ft__map { display: grid; grid-template-columns: repeat(4, auto); justify-content: center; gap: 24px clamp(40px, 7vw, 96px); margin: 0 auto 36px; }   /* 欄寬貼著字、整組置中（穆穆 10/15：1fr 欄讓重心歪左、右邊一片空） */
.ft__label { font-size: 11px; letter-spacing: .12em; color: #8A8A8A; margin: 0 0 8px; }
.ft__map ul { list-style: none; margin: 0; padding: 0; }
.ft__map li { margin: 0 0 4px; }
.ft__map a { text-decoration: none; }
.ft__map a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ft__info { text-align: center; border-top: 1px solid var(--line); padding-top: 28px; max-width: 1100px; margin: 0 auto; }
.ft__info p { margin: 0 0 6px; }
.ft__sns { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; }
.ft__sns img { width: 40px; height: 40px; }
.ft__copy { margin-top: 14px !important; color: var(--muted); font-size: 12px; }

/* ── 右下浮動：回頂端 ── */
.float { position: fixed; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 10px; z-index: 30; }
.float__top { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ink); background: var(--paper); display: grid; place-items: center; text-decoration: none; opacity: 0; pointer-events: none; transition: opacity .2s; }
.float__top.is-on { opacity: 1; pointer-events: auto; }

/* ── 輕微的進場動態：沒有 JS 時一律直接顯示 ── */
/* 確定捲動偵測有在動（site.js 第一次回報）才把還沒捲到的藏起來，偵測不動的環境內容一律照常顯示 */
html.reveal-ready .reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
html.reveal-ready .reveal:not(.is-in) { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.reveal-ready .reveal, html.reveal-ready .reveal:not(.is-in) { opacity: 1; transform: none; transition: none; }
  .ink::before { transition: none; }
}

/* ── 平板、手機：側欄收起來，上方列＋漢堡，點開從左邊滑出 ── */
@media (max-width: 999px) {
  .shell { display: block; padding: 0; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100%; max-height: none; border: 0; border-right: 1px solid var(--ink); border-radius: 0; transform: translateX(-102%); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
  .ft { padding: 36px var(--gutter) 50px; }
  .ft__map { grid-template-columns: repeat(2, auto); gap: 24px clamp(32px, 12vw, 64px); }
  .side.is-open { transform: none; }
  .rail { position: static; display: block; }
  .side__logo { display: none; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px var(--gutter); }
  .topbar__logo { margin-right: auto; }
  .topbar__logo img { width: 128px; }
  .topbar__order { text-decoration: none; background: var(--paper); color: var(--lav-ink); border: 1.5px solid var(--lav-strong); border-radius: 999px; padding: 4px 15px; font-size: 13px; font-weight: 700; letter-spacing: .1em; }
  .topbar__order[aria-current] { background: var(--lav-strong); color: #fff; }
  .topbar__burger { display: grid; gap: 5px; width: 40px; height: 40px; place-content: center; background: none; border: 1px solid var(--ink); border-radius: 50%; cursor: pointer; }
  .topbar__burger span { display: block; width: 16px; height: 1.5px; background: var(--ink); transition: transform .2s, opacity .2s; }
  .topbar__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .topbar__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .topbar__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}
@media (max-width: 860px) {
  .pg section { margin-bottom: 80px; }
  .split { grid-template-columns: 1fr; gap: 24px; max-width: 520px; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .cards { grid-template-columns: 1fr; max-width: 360px; gap: 56px; }
  .inks__grid { grid-template-columns: repeat(3, 96px); gap: 16px 12px; }
  .ink { width: 96px; height: 94px; font-size: 16px; }
  .ink span { font-size: 12px; }
}

/* ── 瑞蘇問答櫃檯：選單塊正下方的頭像，點開長出對話（穆穆 10/15） ── */
.risu { position: relative; display: flex; justify-content: center; }
/* 名牌：掛在選單塊下面，滑過去會像吊牌一樣晃一晃（穆穆 10/15：只有一顆頭怪怪的） */
.risu__btn { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ink); border-radius: 14px; background: var(--paper); font: inherit; color: var(--ink); text-align: left; cursor: pointer; transform-origin: 50% -10px; transition: box-shadow .2s; }
.risu__btn img { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink); object-fit: cover; }
.risu__tag { display: inline-flex; flex-direction: column; line-height: 1.3; margin-right: auto; }
.risu__name { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }   /* 英文名靠右，跟上面的「孔版問答櫃檯」右邊切齊（穆穆 10/15） */
.risu__name i { font-style: normal; font-size: 11px; color: #8A8A8A; letter-spacing: .08em; }
.risu__tag small { font-size: 11px; color: #8A8A8A; letter-spacing: .08em; }
.risu__tag b { font-family: var(--font-round); font-size: 17px; letter-spacing: .1em; }
.risu__ask { font-size: 12px; border: 1px solid var(--ink); border-radius: 999px; padding: 2px 10px; transition: background .15s, color .15s; }
.risu__btn:hover { animation: risu-swing .9s ease-out; box-shadow: 0 8px 20px rgba(17,17,17,.1); }
.risu__btn:hover .risu__ask { background: var(--ink); color: var(--paper); }
.risu__btn[aria-expanded="true"] { border-color: var(--lav-strong); background: var(--lav-soft); box-shadow: none; }   /* 打開對話時：黑框換紫線、底色淡紫（穆穆 10/15：外圈紫框怪怪的） */
.risu__btn[aria-expanded="true"] .risu__ask { background: var(--lav-strong); border-color: var(--lav-strong); color: #fff; }
@keyframes risu-swing { 0% { transform: rotate(0); } 20% { transform: rotate(3.5deg); } 45% { transform: rotate(-2.5deg); } 70% { transform: rotate(1.2deg); } 100% { transform: rotate(0); } }
.risu__hi { position: absolute; left: calc(100% + 12px); bottom: 18px; white-space: nowrap; font: inherit; font-family: var(--font-round); font-weight: 700; font-size: 14px; color: var(--ink); background: var(--paper); border: 0; border-radius: 14px; padding: 8px 14px; box-shadow: 0 8px 24px rgba(17,17,17,.14), 0 1px 3px rgba(17,17,17,.08); cursor: pointer; animation: risu-pop .45s cubic-bezier(.2,1.4,.4,1) both; transform-origin: 0 100%; }
.risu__hi::before { content: ""; position: absolute; left: -5px; bottom: 12px; width: 10px; height: 10px; background: var(--paper); transform: rotate(45deg); }
@keyframes risu-pop { from { opacity: 0; transform: scale(.5) translateY(6px); } to { opacity: 1; transform: none; } }
.risu__chat { position: absolute; left: calc(100% + 14px); bottom: 0; width: 360px; height: min(540px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--paper); border-radius: 18px; box-shadow: 0 18px 50px rgba(17,17,17,.18), 0 2px 8px rgba(17,17,17,.08); overflow: hidden; transform-origin: 0 100%; animation: risu-open .42s cubic-bezier(.2,1.25,.35,1) both; }
.risu__chat[hidden] { display: none; }
.risu__chat.is-closing { animation: risu-close .18s ease-in both; }
.risu__chat:focus { outline: none; }
@keyframes risu-open { from { opacity: 0; transform: translate(-24px, 10px) scale(.35); } to { opacity: 1; transform: none; } }
@keyframes risu-close { to { opacity: 0; transform: translate(-16px, 8px) scale(.6); } }
.risu__head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.risu__head img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ink); }
.risu__head p { margin: 0 auto 0 0; line-height: 1.3; }
.risu__head b { display: block; font-family: var(--font-round); font-size: 15px; }
.risu__head span { font-size: 11px; color: #8A8A8A; letter-spacing: .08em; }
.risu__icon { width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; font-size: 17px; line-height: 1; color: #6B6B6B; cursor: pointer; transition: background .15s, color .15s; }
.risu__icon:hover { background: #F2F2F2; color: var(--ink); }
.risu__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.risu__msg { white-space: pre-line; align-self: flex-start; max-width: 82%; background: #F3F3F3; border-radius: 16px 16px 16px 4px; padding: 9px 14px; font-size: 14.5px; line-height: 1.6; animation: risu-in .3s cubic-bezier(.2,1.3,.4,1) both; transform-origin: 0 100%; }
.risu__msg--me { align-self: flex-end; background: var(--lav); border-radius: 16px 16px 4px 16px; transform-origin: 100% 100%; margin-top: 4px; }
@keyframes risu-in { from { opacity: 0; transform: translateY(8px) scale(.92); } to { opacity: 1; transform: none; } }
.risu__typing { display: flex; gap: 4px; padding: 13px 14px; }
.risu__typing i { width: 6px; height: 6px; border-radius: 50%; background: #9A9A9A; animation: risu-dot 1s ease-in-out infinite; }
.risu__typing i:nth-child(2) { animation-delay: .15s; }
.risu__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes risu-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.risu__links { align-self: flex-start; display: flex; flex-direction: column; gap: 6px; max-width: 82%; animation: risu-in .3s .08s cubic-bezier(.2,1.3,.4,1) both; }
.risu__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--ink); border-radius: 12px; padding: 8px 14px; font-size: 14px; text-decoration: none; transition: background .15s, color .15s; }
.risu__link::after { content: "→"; transition: transform .15s; }
.risu__link:hover { background: var(--ink); color: var(--paper); }
.risu__link:hover::after { transform: translateX(3px); }
.risu__opts { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 16px; border-top: 1px solid var(--line); min-height: 20px; }
.risu__opts:empty { display: none; }
.risu__chip { font: inherit; font-size: 13.5px; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: 999px; padding: 6px 13px; cursor: pointer; animation: risu-in .28s cubic-bezier(.2,1.3,.4,1) both; transition: background .15s; }
.risu__chip:hover { background: var(--lav-soft); }
.risu__chip--sub { border-color: var(--line); color: #6B6B6B; }
html:not(.js) .risu { display: none; }
@media (prefers-reduced-motion: reduce) {
  .risu__btn, .risu__btn:hover, .risu__hi, .risu__chat, .risu__msg, .risu__links, .risu__chip, .risu__typing i { animation: none !important; }
}
@media (max-width: 999px) {
  .risu { position: fixed; right: 16px; bottom: 16px; z-index: 34; }
  .risu__btn { width: 56px; height: 56px; padding: 0; border-radius: 50%; overflow: hidden; box-shadow: 0 6px 18px rgba(17,17,17,.14); }
  .risu__tag, .risu__ask { display: none; }
  .risu__btn img { width: 100%; height: 100%; border: 0; }
  .risu__btn:hover { animation: none; }
  .risu__hi { left: auto; right: calc(100% + 12px); bottom: 10px; transform-origin: 100% 100%; }
  .risu__hi::before { left: auto; right: -5px; }
  .risu__chat { position: fixed; left: 0; right: 0; bottom: 0; width: auto; height: min(78vh, 620px); border-radius: 18px 18px 0 0; transform-origin: 90% 100%; }
  .risu__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }   /* 手機：選項兩個兩個一排（穆穆 10/16） */
  .risu__chip { padding: 9px 10px; text-align: center; }
  @keyframes risu-open { from { opacity: 0; transform: translateY(40%) scale(.6); } to { opacity: 1; transform: none; } }
  .float { bottom: 86px; }
}

/* ── 翻面放大卡：全站零件（孔版說明書、油墨、紙材共用；穆穆 10/15「全站同一套零件」） ── */
.fc { container-type: inline-size; perspective: 1200px; aspect-ratio: 9 / 10; }
.fc__in { position: relative; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3,.7,.2,1); }
.fc__front, .fc__back { position: absolute; inset: 0; border: 0; border-radius: 16px; background: var(--paper); box-shadow: 0 8px 28px rgba(17,17,17,.08), 0 1px 4px rgba(17,17,17,.06); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fc__front { display: flex; flex-direction: column; align-items: center; gap: 3cqi; padding: 7cqi 6cqi 5cqi; font: inherit; color: var(--ink); cursor: pointer; text-align: center; transition: box-shadow .2s, transform .2s; }
.fc .fc__front:hover { box-shadow: 0 14px 34px rgba(17,17,17,.12), 0 2px 6px rgba(17,17,17,.06); transform: translateY(-3px); }
.fc.is-lifted { visibility: hidden; }
.fc__fig { display: block; width: 100%; flex: 1 1 0; min-height: 0; }
.fc__fig img, .fc__svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.fc__q { font-family: var(--font-round); font-weight: 700; font-size: clamp(13px, 6.6cqi, 40px); line-height: 1.4; }
.fc__hint { font-size: clamp(11px, 4.4cqi, 26px); color: #8A8A8A; letter-spacing: .08em; }
.fc__hint::after { content: " ↻"; }
.fc__back { transform: rotateY(180deg); padding: 26px 30px 20px; overflow-y: auto; display: flex; flex-direction: column; }
.fc__back h3 { font-size: 22px; margin: 0 0 12px; }
.fc__back .gap { margin-top: 1.4em; }
.fc__back p { font-size: 15px; line-height: 1.9; margin: 0 0 .7em; text-align: justify; }
.fc__actions { margin-top: auto !important; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; }
.fc__actions .btn { min-width: 0; min-height: 36px; font-size: 13.5px; padding: 4px 18px; }
.fc__flip { font: inherit; font-size: 13px; color: #6B6B6B; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; margin-left: auto; }
html.js .fc:not(.fc--flip) .fc__back { display: none; }
/* 原地翻面（fc--flip，例：油墨圖鑑；穆穆 10/15：不要跳出來）：卡片在原位轉到背面 */
.fc--flip.is-flipped .fc__in { transform: rotateY(180deg); }
.fc--flip .fc__back { cursor: pointer; }   /* 小卡只有正面，說明在放大的卡裡看 */

/* 放大的卡：背面撐開高度，正面蓋在上面 */
.fc-scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(17,17,17,.32); opacity: 0; transition: opacity .45s; }
.fc-scrim.is-on { opacity: 1; }
.fc-big { container-type: inline-size; position: fixed; z-index: 1001; perspective: 1600px; transform-origin: 0 0; }
.fc-big.is-anim { transition: transform .6s cubic-bezier(.3,.7,.2,1); }
.fc-big .fc__in { height: auto; }
.fc-big .fc__front { pointer-events: none; bottom: auto; top: calc(50% - var(--fh) / 2); height: var(--fh); }   /* 正面維持小卡的比例，翻到側面時才換成背面的高度 */
.fc-big .fc__back { position: relative; min-height: calc(var(--w) * .45); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); }
.fc-big .fc__front, .fc-big .fc__back { box-shadow: 0 24px 60px rgba(17,17,17,.18), 0 2px 8px rgba(17,17,17,.08); }
.fc-big:not(.is-anim) .fc__in { transition: none; }
.fc-big.is-flipped .fc__in { transform: rotateY(180deg); }

/* 沒有 JS 時：正反面上下排，全部看得到 */
html:not(.js) .fc { aspect-ratio: auto; }
html:not(.js) .fc__in { transform: none; }
html:not(.js) .fc__front, html:not(.js) .fc__back { position: static; transform: none; backface-visibility: visible; }
html:not(.js) .fc__fig { flex: none; height: 180px; }
html:not(.js) .fc__flip, html:not(.js) .fc__hint { display: none; }
@media (prefers-reduced-motion: reduce) { .fc__in, .fc-big.is-anim { transition: none; } }
@media (max-width: 600px) {
  .fc__back { padding: 22px 20px 16px; }
  .fc__back p { font-size: 14.5px; }
}
