/* =========================================================
   善藝術 sunart.css
   不依賴 Bootstrap / 版型 CSS，單一檔案
   設計方向：「美術館的白牆」——作品放在白色卡紙框裡、下方附展牌。
   色系取自善藝術 Logo：天空藍（主色、連結、按鈕）、太陽金（光芒點綴）、
            蓮花紅（價格與撥號）；底色是帶一點天空感的白。
   長者友善：基本字級 18px、對比 ≥ 4.5:1、點擊區 ≥ 52px
   ========================================================= */

:root {
    --wall:      #fbfcfd;   /* 牆面 */
    --paper:     #ffffff;   /* 卡紙 */
    --mat:       #eef4f8;   /* 區塊底色：淡天空 */
    --ink:       #1b2733;   /* 主文字（對比 14.7:1） */
    --ink-soft:  #4a5866;   /* 次要文字（對比 7:1） */
    --sky:       #1d5b85;   /* 主色：Logo 的天空藍加深，白字對比 7.3:1 */
    --sky-deep:  #143f5e;
    --sun:       #f0a830;   /* 點綴：Logo 的太陽金（只用於裝飾與底色，不當文字色） */
    --sun-soft:  #fdf3df;
    --lotus:     #b8325f;   /* 價格、撥號：Logo 的蓮花紅加深，白字對比 5.7:1 */
    --line:      #d3dee6;
    --focus:     #f0a830;
    --error:     #b00020;

    --serif: "Noto Serif TC", "Noto Serif CJK TC", "Songti TC", "PMingLiU", serif;
    --sans:  "Noto Sans TC", "Noto Sans CJK TC", "PingFang TC", "Microsoft JhengHei", sans-serif;

    --tap: 52px;
    --wrap: 1200px;
    --gutter: 24px;
    --bar-h: 68px;
    --header-h: 140px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html.font-large  { font-size: 20px; }
html.font-xlarge { font-size: 23px; }
body {
    margin: 0; background: var(--wall); color: var(--ink);
    font-family: var(--sans); font-size: 1rem; line-height: 1.85; letter-spacing: .03em;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.4; margin: 0 0 .6em; letter-spacing: .06em; }
a { color: var(--sky); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--sky-deep); text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--sun-soft); color: var(--ink); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -100px; z-index: 10000; background: var(--ink); color: #fff; padding: 12px 18px; }
.skip-link:focus { top: 8px; color: #fff; }

.ico { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- 按鈕 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45em;
    min-height: var(--tap); padding: .55em 1.5em;
    font-size: 1.05rem; font-weight: 700; line-height: 1.3; letter-spacing: .08em;
    border: 2px solid transparent; border-radius: 4px;
    text-decoration: none; text-align: center; white-space: normal;
    transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--sky); border-color: var(--sky); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--sky-deep); border-color: var(--sky-deep); color: #fff; text-decoration: none; }
.btn-outline { background: var(--paper); border-color: var(--sky); color: var(--sky); }
.btn-outline:hover { background: var(--mat); color: var(--sky-deep); text-decoration: none; }
.btn-wide { min-width: 240px; }
/* 小按鈕：視覺較輕，但點擊範圍仍有 44px，長輩一樣好按 */
.btn-sm { min-height: 44px; padding: .35em 1em; font-size: .95rem; letter-spacing: .04em; gap: .4em; }
.btn-sm .ico { width: 1.1em; height: 1.1em; }
.btn-ghost { background: transparent; border-color: var(--line); border-width: 1px; color: var(--ink-soft); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--paper); border-color: var(--sky); color: var(--sky-deep); text-decoration: none; }

/* =========================================================
   載入動畫：旭日東昇
   地平線由中間往兩側畫出 → 太陽從海面升起 → 光芒一圈圈展開 → 海面金光閃動
   → Logo 與標語浮現 → Logo 飛入頁首 Logo 的位置
   ========================================================= */
/* 背景（黎明的天色）寫在 header.php 的內嵌樣式，CSS 還沒下載完就能顯示 */
.show-loader #loader::before {   /* 天色慢慢轉暖 */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse 70% 55% at 50% 52%, rgba(253,226,170,.55), rgba(253,243,223,0) 70%);
    opacity: 0; animation: ld-fade 1.4s ease-out .3s forwards;
}
.loader-mark { position: relative; display: flex; flex-direction: column; align-items: center; }
.loader-sunrise { width: min(300px, 76vw); height: auto; overflow: visible; }
.ld-horizon { transform-box: fill-box; transform-origin: center; transform: scaleX(0); animation: ld-horizon .55s cubic-bezier(.5,0,.2,1) forwards; }
.ld-sun { transform: translateY(58px); animation: ld-rise 1.05s cubic-bezier(.22,.7,.25,1) .25s forwards; }
.ld-glow { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; transform: scale(.4); animation: ld-glow 1.2s ease-out .45s forwards; }
.ld-ray { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; animation: ld-ray .55s ease-out forwards; }
.ld-ray:nth-child(1) { animation-delay: .8s; }
.ld-ray:nth-child(2) { animation-delay: .9s; }
.ld-ray:nth-child(3) { animation-delay: 1s; }
.ld-ray:nth-child(4) { animation-delay: 1.1s; }
.ld-ray:nth-child(5) { animation-delay: 1.2s; }
.ld-wave { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scaleX(.3); animation: ld-wave .6s ease-out forwards, ld-shimmer 1.6s ease-in-out 1.6s infinite alternate; }
.ld-wave:nth-child(1) { animation-delay: .7s, 1.6s; }
.ld-wave:nth-child(2) { animation-delay: .8s, 1.8s; }
.ld-wave:nth-child(3) { animation-delay: .9s, 2s; }
.ld-wave:nth-child(4) { animation-delay: 1s, 2.2s; }
.loader-logo {
    position: relative; width: 104px; max-height: 104px; object-fit: contain; margin-top: 22px;
    opacity: 0; transform: translateY(8px);
    animation: logo-in .6s ease-out 1.05s forwards;
    transform-origin: center;
}
.loader-motto {
    position: relative; margin: 14px 0 0; font-family: var(--serif); font-size: 1.05rem; color: var(--ink-soft); letter-spacing: .3em;
    opacity: 0; animation: ld-fade .6s ease-out 1.25s forwards;
}
@keyframes ld-horizon { to { transform: scaleX(1); } }
@keyframes ld-rise    { to { transform: translateY(0); } }
@keyframes ld-glow    { to { opacity: 1; transform: scale(1); } }
@keyframes ld-ray     { to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes ld-wave    { to { opacity: .8; transform: scaleX(1); } }
@keyframes ld-shimmer { from { opacity: .8; } to { opacity: .35; } }
@keyframes logo-in    { to { opacity: 1; transform: none; } }
@keyframes ld-fade    { to { opacity: 1; } }
@keyframes fade-in    { to { opacity: 1; } }

/* 離場：太陽再升高一點、景色淡出，Logo 由 JS 移到頁首位置 */
.show-loader #loader.is-leaving { background: transparent; transition: background .6s ease .15s; pointer-events: none; }
#loader.is-leaving::before { opacity: 0 !important; transition: opacity .4s ease; animation: none; }
#loader.is-leaving .loader-sunrise { opacity: 0; transform: translateY(-14px); transition: opacity .4s ease, transform .6s ease; }
#loader.is-leaving .loader-motto { opacity: 0 !important; transition: opacity .3s ease; }
#loader.is-leaving .loader-logo { transition: transform .75s cubic-bezier(.65,0,.25,1), opacity .2s ease .7s; }

/* 不喜歡動態效果的使用者：直接顯示日出完成的畫面 */
@media (prefers-reduced-motion: reduce) {
    .ld-horizon, .ld-sun, .ld-glow, .ld-ray, .ld-wave, .loader-logo, .loader-motto, .show-loader #loader::before { animation: none !important; opacity: 1; transform: none; stroke-dashoffset: 0; }
    .ld-wave { opacity: .8; }
}
.show-loader .brand-logo { opacity: 0; }
.brand-logo { transition: opacity .2s ease; }

/* =========================================================
   頁首
   ========================================================= */
.site-header { position: sticky; top: 0; z-index: 500; background: var(--paper); border-bottom: 1px solid var(--line); }
.utility-bar { background: var(--sky-deep); color: #fff; font-size: .95rem; }
.utility-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.utility-phone { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; min-height: 44px; }
.utility-phone:hover { color: #fff; text-decoration: underline; }

.font-switcher { display: flex; align-items: center; gap: 6px; }
.font-switcher-label { margin-right: 4px; opacity: .9; }
.font-switcher button {
    min-width: 52px; min-height: 40px; padding: 2px 12px;
    background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); border-radius: 4px;
    font-size: 1rem; font-weight: 700;
}
.font-switcher button[data-font="large"]  { font-size: 1.12rem; }
.font-switcher button[data-font="xlarge"] { font-size: 1.28rem; }
.font-switcher button[aria-pressed="true"] { background: #fff; color: var(--sky-deep); border-color: #fff; }

.masthead {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center;
    grid-template-areas: "brand . search" "nav nav nav"; column-gap: 24px; padding-top: 10px;
}
.brand { grid-area: brand; }
.header-search { grid-area: search; display: flex; align-items: center; border: 2px solid var(--line); border-radius: 4px; background: var(--paper); }
.header-search:focus-within { border-color: var(--sky); }
.header-search input { width: 240px; min-height: 48px; padding: 6px 12px; border: 0; background: transparent; }
.header-search input:focus { outline: none; }
.header-search button { display: grid; place-items: center; width: 48px; height: 48px; border: 0; background: var(--sky); color: #fff; }
.brand { display: flex; align-items: center; gap: 14px; flex: none; min-height: var(--tap); color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-logo { max-height: 68px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-name { white-space: nowrap; font-family: var(--serif); font-size: 1.3rem; font-weight: 700; letter-spacing: .08em; }
.brand-motto { font-size: .9rem; color: var(--ink-soft); letter-spacing: .25em; }

.site-nav { grid-area: nav; margin-top: 10px; border-top: 1px solid var(--line); }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 0 2px; margin-left: -12px; }
.nav-search { display: none; }
.nav-group { position: relative; }
.nav-group-btn, .nav-link > a {
    display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 12px;
    background: none; border: 0; color: var(--ink); font-size: 1rem; font-weight: 700; text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}
.nav-group-btn:hover, .nav-link > a:hover, .nav-group-btn[aria-expanded="true"] { color: var(--sky); border-bottom-color: var(--sun); }
.caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.nav-group-btn[aria-expanded="true"] .caret { transform: rotate(-135deg) translateY(-1px); }

.nav-sub {
    list-style: none; position: absolute; top: 100%; left: 0; z-index: 20; min-width: 220px; padding: 8px 0;
    background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--sun);
    box-shadow: 0 16px 32px -18px rgba(27,39,51,.45);
    display: none;
}
.nav-group-btn[aria-expanded="true"] + .nav-sub { display: block; }

.nav-sub a { display: flex; align-items: center; min-height: var(--tap); padding: 6px 20px; color: var(--ink); text-decoration: none; }
/* 選單項目很多時（例如「主題」「價格」「藝術家」）：分成多欄，並限制高度可捲動，避免超出畫面點不到 */
@media (min-width: 1081px) {
    .nav-sub { max-height: calc(100vh - var(--header-h) - 24px); overflow-y: auto; overscroll-behavior: contain; }
    /* 由上往下、再換欄排列，價格這類有順序的清單讀起來才直覺 */
    .nav-sub-cols { columns: 2; column-gap: 8px; width: 460px; padding: 10px; }
    .nav-sub-cols-3 { columns: 3; width: 640px; }
    .nav-sub-cols li { break-inside: avoid; -webkit-column-break-inside: avoid; }
    .nav-sub-cols a { padding: 6px 14px; border-radius: 4px; }
    .nav-sub.is-flip { left: auto; right: 0; }
}
.nav-sub a:hover { background: var(--mat); color: var(--sky-deep); }

.nav-search form { display: flex; align-items: center; margin-left: 12px; border: 2px solid var(--line); border-radius: 4px; background: var(--paper); }
.nav-search input { width: 200px; min-height: 48px; padding: 6px 12px; border: 0; background: transparent; }
.nav-search input:focus { outline: none; }
.nav-search form:focus-within { border-color: var(--sky); }
.nav-search button { display: grid; place-items: center; width: 48px; height: 48px; border: 0; background: var(--sky); color: #fff; }

.menu-toggle { display: none; }

/* =========================================================
   首頁輪播
   ========================================================= */
.hero { position: relative; background: var(--ink); }
.hero-track { position: relative; height: clamp(380px, 64vh, 660px); overflow: hidden; }
.hero-slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity .9s ease; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-plaque {
    position: absolute; left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); bottom: 48px;
    max-width: 520px; padding: 26px 30px 28px; background: var(--paper); border-top: 5px solid var(--sun);
    box-shadow: 0 18px 40px -20px rgba(0,0,0,.55);
}
.hero-title { font-size: 1.7rem; margin-bottom: .7em; color: var(--ink); }
.hero-controls { position: absolute; right: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); bottom: 48px; display: flex; align-items: center; gap: 10px; }
.hero-btn {
    display: grid; place-items: center; width: var(--tap); height: var(--tap);
    background: rgba(255,255,255,.92); border: 0; border-radius: 50%; color: var(--ink);
}
.hero-btn:hover { background: #fff; }
.hero-dots { display: flex; gap: 4px; padding: 0 4px; }
.hero-dot { width: 32px; height: 44px; border: 0; background: none; position: relative; }
.hero-dot::after { content: ""; position: absolute; left: 6px; right: 6px; top: 20px; height: 4px; background: rgba(255,255,255,.55); }
.hero-dot[aria-current="true"]::after { background: #fff; }
.hero-count { display: none; }

/* =========================================================
   區塊
   ========================================================= */
.section { padding: 64px 0; }
.section-mat { background: var(--mat); }
.section-title { font-size: 1.55rem; margin: 56px 0 24px; }
.section-title:first-child { margin-top: 0; }
.section-more { margin: 40px 0 0; text-align: center; }

.quick-entry { padding: 32px 0; background: var(--mat); border-bottom: 1px solid var(--line); }
.quick-tile:nth-child(3) { border-left-color: var(--lotus); }
.quick-tile:nth-child(3) .ico { color: var(--lotus); }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.quick-tile {
    display: flex; align-items: center; gap: 14px; min-height: 88px; padding: 16px 20px;
    background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--sky);
    color: var(--ink); font-size: 1.1rem; font-weight: 700; text-decoration: none;
}
.quick-tile .ico { width: 1.8em; height: 1.8em; color: var(--sky); }
.quick-tile:hover { color: var(--sky-deep); border-color: var(--sky); text-decoration: none; }

.about { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; align-items: end; margin-bottom: 8px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.about-copy { max-width: 40em; }
.about-text { margin-bottom: 0; }
.about-sun { width: 240px; height: auto; margin-bottom: -29px; }   /* 太陽坐在分隔線上，呼應 Logo */
.about-title { font-size: 1.55rem; }
.about-text { font-family: var(--serif); font-size: 1.3rem; line-height: 2; color: var(--ink); }

.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.chip {
    display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 24px;
    background: var(--paper); border: 2px solid var(--line); border-radius: 999px;
    color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--sky); color: var(--sky); text-decoration: none; }
.chip.active { background: var(--sky); border-color: var(--sky); color: #fff; }
.chip-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }

/* =========================================================
   作品牆：白色卡紙框 + 展牌
   ========================================================= */
.art-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 44px 32px; }
.art-piece { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.art-frame {
    display: grid; place-items: center; aspect-ratio: 1 / 1; padding: 16px;
    /* 固定格線大小，直式作品的 max-height:100% 才會生效，不會被裁切 */
    grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
    background: var(--paper); border: 1px solid #d9ddd6;
    box-shadow: 0 1px 0 rgba(27,39,51,.04), 0 14px 26px -18px rgba(27,39,51,.5);
    overflow: hidden;
}
.art-frame img {
    max-width: 100%; max-height: 100%; width: auto; height: auto; min-height: 0; object-fit: contain;
    box-shadow: 0 0 0 1px rgba(27,39,51,.12);    /* 卡紙切口 */
    background: var(--mat);
    transition: opacity .35s ease;
}
/* 圖片載入完成才淡入；JS 沒執行時直接顯示 */
.js .art-frame img { opacity: 0; }
.js .art-frame img.is-loaded, .js .art-frame-lg img { opacity: 1; }
.art-label { display: block; padding: 14px 2px 0; border-top: 0; }
.art-name { display: block; font-family: var(--serif); font-size: 1.1rem; font-weight: 700; line-height: 1.5; }
.art-medium { display: block; color: var(--ink-soft); font-size: .95rem; }
.art-piece:hover .art-frame { border-color: var(--sky); }
.art-piece:hover .art-name { color: var(--sky); text-decoration: underline; text-underline-offset: 4px; }

/* =========================================================
   內頁標題
   ========================================================= */
.page-head { position: relative; overflow: hidden; background: var(--mat); border-bottom: 1px solid var(--line); }
/* Logo 的旭日：半圓太陽從標題區底線升起，上方幾道細弧（與 Logo 同樣式） */
.sun-mark { display: block; }
.page-head-sun { position: absolute; right: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); bottom: -1px; width: 260px; height: auto; pointer-events: none; }
.page-head-inner { position: relative; padding-top: 40px; padding-bottom: 40px; }
.page-title { font-size: 2rem; margin: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 10px; color: var(--ink-soft); }
.breadcrumbs a { color: var(--ink-soft); }
.crumb-sep { color: var(--line); }
.page-head.has-bg { background: var(--ink); color: #fff; }
.page-head-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.page-head.has-bg .page-head-inner { padding-top: 72px; padding-bottom: 56px; }
.page-head.has-bg .breadcrumbs, .page-head.has-bg .breadcrumbs a { color: #fff; }

/* ---------- 版面 ---------- */
.layout-side { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; }
.layout-single { max-width: 48em; margin: 0 auto; }
.layout-art { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.layout-contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }

.prose { max-width: 42em; font-size: 1.05rem; line-height: 1.95; }
.prose img { margin: 1.2em 0; height: auto; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 12px; }

.side-title { font-size: 1.15rem; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 2px solid var(--ink); }
.side-menu { list-style: none; margin-bottom: 28px; }
.side-menu a { display: flex; align-items: center; min-height: var(--tap); padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.side-menu a:hover { background: var(--mat); }
.side-menu a.active { background: var(--paper); box-shadow: inset 4px 0 0 var(--sky); font-weight: 700; color: var(--sky-deep); }

.pager-big { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 48px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.pager-info { font-weight: 700; color: var(--ink-soft); }
.pager-art { margin-top: 40px; padding-top: 20px; }
.pager-art .btn { max-width: 34%; }
.pager-art .pager-list { order: 0; }
.pager-art .pager-prev { margin-right: auto; }
.pager-art .pager-next { margin-left: auto; }

/* ---------- 作品頁 ---------- */
.art-main { display: block; position: relative; text-decoration: none; cursor: zoom-in; }
/* 大圖下方的工具列：放大看、掛在我家看看（小而安靜，不蓋住作品） */
.art-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.art-tools .btn-wall .ico { color: var(--lotus); }
.art-frame-lg { aspect-ratio: auto; min-height: 320px; padding: 28px; grid-template-rows: auto; }
.art-frame-lg img { max-height: 75vh; }
.art-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.art-thumbs a { display: block; border: 1px solid var(--line); background: var(--paper); padding: 6px; }
.art-thumbs img { aspect-ratio: 1 / 1; object-fit: contain; width: 100%; background: var(--paper); }   /* 縮圖也完整顯示，不裁切 */
.art-title { font-size: 1.8rem; margin-bottom: .3em; }
.art-price { font-size: 1.1rem; color: var(--ink-soft); margin-bottom: 0; }
.art-price strong { display: block; color: var(--lotus); font-family: var(--serif); font-size: 2rem; letter-spacing: .02em; }
.art-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
/* 標題列：左邊「作品資訊」，右邊小小的「聽介紹」 */
.art-actions + .info-head-row { margin-top: 32px; }
.info-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: .8em; border-bottom: 1px solid var(--line); }
.info-head-row .info-heading { margin: 0; border-bottom: 0; flex: 1 1 auto; }
.read-bar-quiet { margin: 0 0 6px; flex: none; }
.info-head-row + .art-facts { border-top: 0; }
.info-heading { font-size: 1.25rem; margin-bottom: .8em; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.info-block { margin-top: 56px; }
.info-block:first-child { margin-top: 0; }

/* 作品頁下半部：左邊藝術家介紹、右邊詢問表單（捲動時表單跟著） */
.layout-detail { display: grid; grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr); gap: 56px; align-items: start; margin-top: 56px; }
.layout-detail-single { max-width: 760px; margin: 56px auto 0; }
.detail-side { position: sticky; top: var(--sticky-top, 170px); }
.ask-card .form-card-title { font-size: 1.3rem; }
.ask-card .field textarea { min-height: 130px; }

/* 很長的藝術家介紹：先顯示一段，按鈕展開 */
.collapse-box { position: relative; max-height: 24em; overflow: hidden; }
.collapse-box::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7em; background: linear-gradient(rgba(251,252,253,0), var(--wall)); pointer-events: none; }
.collapse-box.is-open { max-height: none; }
.collapse-box.is-open::after { display: none; }
.collapse-toggle { margin-top: 12px; }
.intro-more { margin: 20px 0 0; font-weight: 700; }
.intro-more a { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; }
.prose a { overflow-wrap: anywhere; }
.dd-hint { color: var(--ink-soft); font-size: .9rem; }

/* 作品大圖：桌機捲動時固定在畫面上，邊看介紹邊看作品 */
@media (min-width: 1081px) {
    .art-gallery { position: sticky; top: var(--sticky-top, 170px); }
    /* 讓整個作品區（圖＋按鈕）放得進畫面，黏住時才看得到完整作品 */
    .art-frame-lg img { max-height: max(320px, calc(100vh - var(--sticky-top, 170px) - 170px)); }
}

/* ---------- 搜尋 ---------- */
.filter-form {
    display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 16px; align-items: end;
    padding: 22px; margin: 8px 0 32px; background: var(--paper); border: 1px solid var(--line);
}
.filter-form .field { margin: 0; }
.result-count { font-size: 1.1rem; margin-bottom: 28px; }
.artist-bio { padding: 28px 32px; margin-bottom: 40px; background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--sky); }
/* 「為您找」：系統看懂的條件，每個都可以點掉 */
.search-understood { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -12px 0 28px; padding: 14px 16px; background: var(--sun-soft); border-left: 5px solid var(--sun); }
.su-label { font-weight: 700; }
.su-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px 0 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 700; text-decoration: none; }
.su-chip:hover { border-color: var(--lotus); color: var(--ink); }
.su-x { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--mat); color: var(--ink-soft); font-size: 1.1rem; line-height: 1; }
.su-chip:hover .su-x { background: var(--lotus); color: #fff; }
.su-clear { min-height: 44px; display: inline-flex; align-items: center; color: var(--sky); }

/* 找不到時 */
.empty-box { padding: 36px 28px; background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--sun); }
.empty-title { font-size: 1.35rem; margin-bottom: 18px; }
.empty-lead { margin: 22px 0 10px; font-weight: 700; }
.empty-options { display: flex; flex-wrap: wrap; gap: 10px; }
.opt-type { font-weight: 400; opacity: .85; font-size: .9em; }
.empty-chips { margin-bottom: 0; }
.empty-call { margin: 26px 0 10px; color: var(--ink-soft); }
.empty-call-btn { width: auto; padding: 0 28px; }

/* 打字建議清單 */
.suggest-wrap { position: relative; }
.suggest-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; margin: 0; padding: 6px 0; list-style: none;
    background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--sun); box-shadow: 0 16px 32px -16px rgba(27,39,51,.45);
    max-height: min(60vh, 460px); overflow-y: auto; text-align: left;
}
.suggest-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 16px; cursor: pointer; color: var(--ink); }
.suggest-list li[aria-selected="true"], .suggest-list li:hover { background: var(--mat); }
.sg-label { font-weight: 700; }
.sg-type { flex: none; padding: 2px 10px; border-radius: 999px; background: var(--mat); color: var(--ink-soft); font-size: .85rem; }
.suggest-list li.sg-intent .sg-type { background: var(--sun-soft); color: var(--ink); }
.suggest-list .sg-all { color: var(--sky); }

/* 語音搜尋視窗 */
.voice-overlay { position: fixed; inset: 0; z-index: 2200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(14,24,34,.75); }
.voice-panel { position: relative; width: min(560px, 100%); max-height: 100%; overflow-y: auto; padding: 36px 28px 28px; background: var(--paper); border-top: 6px solid var(--sun); text-align: center; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.voice-close { position: absolute; top: 10px; right: 10px; min-height: 48px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); font-weight: 700; }
.voice-mic { width: 112px; height: 112px; margin: 8px auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--mat); color: var(--sky); }
.voice-mic .ico { width: 54px; height: 54px; }
.voice-overlay[data-state="listening"] .voice-mic { background: var(--lotus); color: #fff; animation: voice-pulse 1.4s ease-in-out infinite; }
.voice-overlay[data-state="error"] .voice-mic { background: #fde8ec; color: var(--error); }
@keyframes voice-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(184,50,95,.45); } 50% { box-shadow: 0 0 0 22px rgba(184,50,95,0); } }
.voice-status { font-size: 1.35rem; margin: 0 0 8px; }
.voice-text { min-height: 1.6em; margin: 0 0 6px; font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.voice-understood { min-height: 1.5em; margin: 0 0 14px; font-size: 1.1rem; font-weight: 700; color: var(--sky-deep); }
.voice-countdown { height: 6px; margin: 0 auto 18px; width: 70%; background: var(--mat); border-radius: 3px; overflow: hidden; visibility: hidden; }
.voice-countdown span { display: block; height: 100%; width: 100%; background: var(--sun); transform-origin: left; transform: scaleX(0); }
.voice-overlay.is-counting .voice-countdown { visibility: visible; }
.voice-overlay.is-counting .voice-countdown span { animation: voice-count 2.5s linear forwards; }
@keyframes voice-count { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.voice-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: var(--tap); }
.voice-actions .btn { min-width: 160px; font-size: 1.15rem; }
.voice-examples { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.voice-examples p { margin: 0 0 10px; color: var(--ink-soft); }
.voice-ex { min-height: 48px; margin: 4px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--mat); color: var(--ink); font-weight: 700; }
.voice-ex:hover { border-color: var(--sky); }
body.voice-open { overflow: hidden; }

/* 語音搜尋 */
.mic-btn { flex: none; display: grid; place-items: center; width: 48px; min-height: 48px; border: 0; background: transparent; color: var(--sky); }
.mic-btn:hover { background: var(--mat); }
.mic-btn.is-listening { color: #fff; background: var(--lotus); animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 6px rgba(184,50,95,.25); } }
.input-with-mic { display: flex; align-items: stretch; border: 2px solid #8d968f; border-radius: 4px; background: var(--paper); }
.input-with-mic:focus-within { border-color: var(--sky); outline: 3px solid rgba(29,91,133,.25); }
.field .input-with-mic input { border: 0; outline: none; min-width: 0; flex: 1; }

/* ---------- 表單 ---------- */
.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field input, .field select, .field textarea {
    display: block; width: 100%; min-height: var(--tap); padding: 10px 14px;
    font-size: 1.05rem; background: var(--paper); color: var(--ink);
    border: 2px solid #8d968f; border-radius: 4px; appearance: none; -webkit-appearance: none;
}
.field select {
    padding-right: 44px;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
    background-position: calc(100% - 24px) 52%, calc(100% - 17px) 52%;
    background-size: 7px 7px; background-repeat: no-repeat;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sky); outline: 3px solid rgba(29,91,133,.25); outline-offset: 0; }
.field-captcha input { max-width: 200px; }
.req { color: var(--error); }
.form-note { color: var(--ink-soft); font-size: .95rem; }
.form-note .ico { vertical-align: -.2em; margin-right: 4px; }
.form-alert { padding: 16px 20px; margin-bottom: 24px; border: 2px solid var(--error); background: #fff4f5; color: var(--error); }
.form-alert strong { display: flex; align-items: center; gap: 6px; }
.form-alert ul { margin: 6px 0 0; padding-left: 1.4em; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 聯絡 / 感謝 ---------- */
.btn-call { width: 100%; min-height: 72px; font-size: 1.5rem; margin: 4px 0 20px; background: var(--lotus); border-color: var(--lotus); color: #fff; }
.btn-call:hover, .btn-call:focus-visible { background: #972650; border-color: #972650; color: #fff; text-decoration: none; }
.layout-contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.contact-card { padding: 28px; background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--sun); }
.contact-card-title, .form-card-title, .faq-title { font-size: 1.35rem; margin-bottom: 18px; }
.contact-list { list-style: none; }
.contact-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: var(--tap); border-top: 1px solid var(--line); }
.contact-list .ico { color: var(--sky); }
.cl-label { font-weight: 700; min-width: 2.6em; }
.form-card { padding: 32px; background: var(--paper); border: 1px solid var(--line); }
.contact-aside .faq { margin-top: 40px; }
.contact-card, .form-card, .contact-aside, .contact-aside .faq, .detail-main, .detail-side { min-width: 0; }
.btn-call { flex-wrap: wrap; }
.contact-line { display: flex; align-items: flex-start; gap: 10px; font-size: 1.05rem; }
.contact-line .ico { margin-top: .35em; color: var(--sky); }
.thanks-box { max-width: 640px; margin: 0 auto; padding: 32px 0; text-align: center; }
.thanks-mark { display: inline-grid; place-items: center; width: 88px; height: 88px; margin-bottom: 16px; border-radius: 50%; background: var(--sky); color: #fff; }
.thanks-mark .ico { width: 48px; height: 48px; }
.thanks-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.lead-text { font-size: 1.15rem; }
.notice-text { color: var(--ink-soft); font-size: 1.1rem; }
/* 網站索引：瀑布流排列，長短不一的分類不會留下大片空白 */
.sitemap-grid { columns: 4 240px; column-gap: 36px; }
.sitemap-col { break-inside: avoid; -webkit-column-break-inside: avoid; margin-bottom: 36px; }
.sitemap-col .side-menu { margin-bottom: 0; }
.sitemap-search { max-width: 640px; margin: 0 0 48px; }
.sitemap-search label { display: block; font-weight: 700; margin-bottom: 8px; }
.sitemap-search-row { display: flex; gap: 10px; }
.sitemap-search input { flex: 1; min-width: 0; min-height: var(--tap); padding: 10px 14px; font-size: 1.05rem; border: 2px solid #8d968f; border-radius: 4px; background: var(--paper); }
.sitemap-search input:focus { border-color: var(--sky); outline: 3px solid rgba(29,91,133,.25); outline-offset: 0; }

/* ---------- 作品資訊表（也讓搜尋引擎與 AI 讀得懂） ---------- */
.art-facts { margin: 0 0 32px; border-top: 1px solid var(--line); }
.art-facts > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.art-facts dt { font-weight: 700; color: var(--ink-soft); }
.art-facts dd { margin: 0; white-space: pre-line; }

/* ---------- 分享區塊 ---------- */
.share-box { margin: 36px 0 0; padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); }
.share-title { font-size: 1.2rem; margin-bottom: 16px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.share-actions .btn { padding-left: 1.1em; padding-right: 1.1em; }
.btn-line { background: #06c755; border-color: #06c755; color: #fff; }
.btn-line:hover, .btn-line:focus-visible { background: #05a548; border-color: #05a548; color: #fff; text-decoration: none; }
.share-label { display: block; margin: 12px 0 4px; font-weight: 700; font-size: .95rem; }
.share-url-input { width: 100%; min-height: 48px; padding: 8px 12px; font-size: .95rem; border: 1px solid var(--line); border-radius: 4px; background: var(--mat); color: var(--ink); }
.share-preview summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--sky); font-weight: 700; }
.share-preview textarea { width: 100%; margin-top: 8px; padding: 12px; font-size: 1rem; line-height: 1.7; border: 1px solid var(--line); background: var(--mat); resize: vertical; }
.search-share { margin-bottom: 28px; }
/* 作品頁的精簡分享列 */
.share-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 32px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.share-inline-label { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; color: var(--ink-soft); font-size: .95rem; font-weight: 700; }
.share-inline .btn-line { border-width: 1px; }
.share-more { position: relative; }
.share-more > summary { list-style: none; cursor: pointer; }
.share-more > summary::-webkit-details-marker { display: none; }
.share-more > summary::after { content: ""; width: .45em; height: .45em; margin-left: .1em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.share-more[open] > summary { border-color: var(--sky); color: var(--sky-deep); }
.share-more[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.share-more-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(360px, calc(100vw - 32px)); padding: 16px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 16px 34px -18px rgba(20,40,60,.45); }
.share-more-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-more-actions .btn { flex: 1 1 auto; }
.share-more-panel textarea { width: 100%; margin-top: 4px; padding: 12px; font-size: 1rem; line-height: 1.7; border: 1px solid var(--line); background: var(--mat); resize: vertical; }

/* 「已複製」提示 */
.toast {
    position: fixed; left: 50%; bottom: 32px; z-index: 3000; transform: translate(-50%, 20px);
    display: flex; align-items: center; gap: 10px; padding: 16px 26px;
    background: var(--ink); color: #fff; font-size: 1.1rem; font-weight: 700; border-radius: 999px;
    box-shadow: 0 14px 30px -12px rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 常見問題 ---------- */
.faq { max-width: 48em; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 1px solid var(--line); }
.faq-item summary {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 12px 0;
    font-family: var(--serif); font-size: 1.15rem; font-weight: 700; cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid var(--sky); border-radius: 50%; color: var(--sky); font-family: var(--sans); font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 0 20px; color: var(--ink); }

/* ---------- 朗讀 ---------- */
.read-bar { margin: 0 0 20px; }
.btn-read { background: var(--sun-soft); border-color: var(--sun); color: var(--ink); }
.btn-read:hover { background: #fbe6bd; color: var(--ink); }
.btn-read[aria-pressed="true"] { background: var(--sun); border-color: var(--sun); }
.btn-read.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-soft); }
.btn-read.btn-ghost .ico { color: var(--sun); }
.btn-read.btn-ghost[aria-pressed="true"] { background: var(--sun-soft); border-color: var(--sun); color: var(--ink); }
.is-reading { background: var(--sun-soft); box-shadow: 0 0 0 8px var(--sun-soft); border-radius: 2px; transition: background-color .2s; }
.read-player {
    position: fixed; left: 50%; bottom: 20px; z-index: 900; transform: translate(-50%, 140%);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px;
    width: min(680px, calc(100% - 24px)); padding: 14px 18px;
    background: var(--ink); color: #fff; border-radius: 14px; box-shadow: 0 16px 40px -14px rgba(0,0,0,.6);
    transition: transform .25s ease;
}
.read-player.is-visible { transform: translate(-50%, 0); }
.read-status { margin: 0; font-weight: 700; min-width: 8em; }
.read-controls, .read-speed { display: flex; align-items: center; gap: 8px; }
.read-btn, .read-speed button {
    min-height: 48px; min-width: 64px; padding: 0 14px; border-radius: 8px;
    border: 2px solid rgba(255,255,255,.6); background: transparent; color: #fff; font-weight: 700; font-size: 1rem;
}
.read-pause { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.read-speed span { opacity: .85; }
.read-speed button { min-width: 48px; }
.read-speed button[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: #fff; }
body:has(.read-player.is-visible) .to-top { display: none; }

/* ---------- 掛在我家看看 ---------- */
.btn-wall:not(.btn-sm) { width: 100%; margin-top: 14px; min-height: 60px; font-size: 1.15rem; background: var(--paper); border-color: var(--sun); color: var(--ink); border-width: 2px; }
.btn-wall .ico { color: var(--lotus); }
.btn-wall:not(.btn-sm):hover { background: var(--sun-soft); color: var(--ink); }
.btn-wall[data-loading="1"] { opacity: .6; cursor: progress; }

.wall-modal { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: stretch; justify-content: center; background: rgba(14,24,34,.7); }
.wall-panel { display: flex; flex-direction: column; width: min(1180px, 100%); max-height: 100%; margin: auto; background: var(--wall); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.wall-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--paper); border-bottom: 1px solid var(--line); border-top: 5px solid var(--sun); }
.wall-head h2 { margin: 0; font-size: 1.35rem; }
.wall-close { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 16px; border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); font-weight: 700; }
.wall-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); gap: 24px; padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
.wall-stage { display: flex; justify-content: center; }
.wall-canvas { display: block; max-width: 100%; background: var(--mat); border: 1px solid var(--line); cursor: grab; touch-action: none; }
.wall-canvas.is-dragging { cursor: grabbing; }
.wall-hint { margin: 10px 0 0; color: var(--ink-soft); font-size: .95rem; }
.wall-size { margin: 4px 0 0; font-weight: 700; }
.wall-group { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.wall-group legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 1.05rem; }
.wall-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.wall-choice, .wall-swatch {
    display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px;
    background: var(--paper); border: 2px solid var(--line); border-radius: 6px; color: var(--ink); font-weight: 700; cursor: pointer;
}
.wall-choice .ico { color: var(--sky); }
.wall-choice:hover, .wall-swatch:hover { border-color: var(--sky); }
.wall-choice[aria-pressed="true"], .wall-swatch[aria-pressed="true"] { border-color: var(--sky); background: var(--mat); box-shadow: inset 0 0 0 1px var(--sky); }
.wall-upload:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.wall-swatch span { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); }
.wall-privacy, .wall-tip { margin: 8px 0 0; color: var(--ink-soft); font-size: .95rem; }
.wall-stepper { display: flex; align-items: center; gap: 12px; }
.wall-step, .wall-art-step { display: grid; place-items: center; width: 56px; height: 56px; border: 2px solid var(--sky); border-radius: 50%; background: var(--paper); color: var(--sky); }
.wall-value, .wall-art-value { min-width: 6.5em; text-align: center; font-size: 1.3rem; font-weight: 700; font-family: var(--serif); }
.wall-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.wall-note { margin: 12px 0 0; font-weight: 700; color: var(--sky-deep); min-height: 1.5em; }
.wall-link { margin-top: 14px; padding: 16px; background: var(--paper); border: 2px solid #06c755; border-radius: 8px; }
.wall-link-tip { margin: 0 0 12px; }
.wall-link-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.wall-link-url { width: 100%; min-height: 48px; padding: 8px 12px; font-size: .95rem; border: 1px solid var(--line); border-radius: 4px; background: var(--mat); color: var(--ink); }
.wall-from-link { margin: 0 0 12px; padding: 12px 14px; background: var(--sun-soft); border-left: 4px solid var(--sun); }

/* =========================================================
   頁尾
   ========================================================= */
.site-footer { background: var(--mat); color: var(--ink); }
.site-footer a { color: var(--ink); }

/* 洽詢帶 */
.footer-cta { position: relative; overflow: hidden; background: var(--sky-deep); color: #fff; border-top: 4px solid var(--sun); }
.footer-cta-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; padding-top: 36px; padding-bottom: 36px; }
.footer-cta-title { margin: 0 0 4px; font-size: 1.5rem; color: #fff; }
.footer-cta-text p { margin: 0; opacity: .92; }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-call { width: auto; min-height: 64px; margin: 0; padding: 0 28px; font-size: 1.35rem; }
.site-footer .footer-call, .site-footer .footer-call:hover { color: #fff; }
.site-footer .footer-msg { min-height: 64px; padding: 0 24px; font-size: 1.1rem; background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.site-footer .footer-msg:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }

/* 主要區塊 */
.footer-main { display: grid; grid-template-columns: 1.15fr 1.35fr 1fr .8fr; gap: 40px; padding-top: 52px; padding-bottom: 40px; }
.footer-logo { display: inline-block; }
.footer-logo img { max-height: 84px; width: auto; }
.footer-motto { margin: 14px 0 6px; font-family: var(--serif); font-size: 1.1rem; letter-spacing: .2em; }
.footer-about { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.footer-heading { font-size: 1.1rem; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--sun); }

.footer-contact { list-style: none; }
.footer-contact a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.footer-contact li:last-child a { border-bottom: 0; }
.footer-contact .ico { width: 22px; height: 22px; color: var(--sky); flex: none; }
.fc-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
.fc-label { font-weight: 700; min-width: 2.5em; }
.fc-value { color: var(--sky); text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.footer-contact a:hover .fc-value { color: var(--sky-deep); text-decoration-thickness: 2px; }

.footer-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.footer-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 700; }
.footer-chips a:hover { border-color: var(--sky); color: var(--sky); }

.footer-links { list-style: none; }
.footer-links a { display: flex; align-items: center; min-height: 48px; color: var(--sky); }

.footer-bottom { border-top: 1px solid var(--line); background: var(--paper); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 16px; padding-bottom: 18px; padding-right: 104px; }   /* 右邊留給「回頁首」按鈕 */
.footer-copy, .footer-note { margin: 0; font-size: .95rem; color: var(--ink-soft); }

/* =========================================================
   右下角：回到頁首
   ========================================================= */
.to-top {
    position: fixed; right: 20px; bottom: 24px; z-index: 600;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
    width: 68px; height: 68px; border: 2px solid #fff; border-radius: 50%;
    background: var(--sky); color: #fff; font-weight: 700;
    box-shadow: 0 10px 24px -10px rgba(20,63,94,.55);
    opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s, background-color .15s;
}
.to-top.is-visible { opacity: 1; transform: none; }
.nav-open .to-top, .lightbox-open .to-top { display: none; }
.to-top:hover { background: var(--sky-deep); }
.to-top .ico { width: 26px; height: 26px; }
.to-top-text { font-size: .8rem; line-height: 1.1; letter-spacing: .1em; }

/* =========================================================
   燈箱
   ========================================================= */
.lightbox { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 72px 16px 24px; background: rgba(14,24,34,.95); color: #fff; }
.lightbox-img { max-width: min(92vw, 1400px); max-height: calc(100vh - 160px); object-fit: contain; background: #fff; padding: 10px; }
.lightbox-caption { margin: 14px 0 0; font-family: var(--serif); font-size: 1.1rem; text-align: center; }
.lightbox-btn { position: absolute; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 60px; min-height: 60px; border: 2px solid rgba(255,255,255,.7); background: rgba(0,0,0,.4); color: #fff; font-weight: 700; border-radius: 4px; }
.lightbox-btn:hover { background: rgba(0,0,0,.7); }
.lightbox-close { top: 12px; right: 12px; padding: 0 18px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .ico { width: 28px; height: 28px; }
body.lightbox-open { overflow: hidden; }
/* 放大檢視或「掛在我家看看」開啟時，把後面的頁面整個隱藏：
   避免部分瀏覽器（特別是 Safari）把頁面上的「分享」區塊等內容畫到視窗上面，
   也讓螢幕閱讀器只讀視窗內容 */
body.lightbox-open > *:not(.wall-modal):not(.lightbox):not(.toast) { visibility: hidden; }
.wall-modal, .lightbox { isolation: isolate; transform: translateZ(0); }

.mobile-bar { display: none; }

/* =========================================================
   平板以下：抽屜式選單
   ========================================================= */
@media (max-width: 1080px) {
    :root { --header-h: 72px; }
    .masthead { display: flex; align-items: center; gap: 16px; padding-top: 0; min-height: var(--header-h); }
    .header-search { display: none; }
    .nav-search { display: block; }
    .menu-toggle {
        display: inline-flex; align-items: center; gap: 10px; margin-left: auto;
        min-height: var(--tap); padding: 0 16px;
        background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; font-weight: 700; font-size: 1.05rem;
    }
    .menu-icon { position: relative; width: 22px; height: 16px; }
    .menu-icon::before, .menu-icon::after, .menu-icon span {
        content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform .2s, opacity .2s;
    }
    .menu-icon::before { top: 0; } .menu-icon span { top: 7px; } .menu-icon::after { bottom: 0; }
    .nav-open .menu-icon::before { transform: translateY(7px) rotate(45deg); }
    .nav-open .menu-icon span { opacity: 0; }
    .nav-open .menu-icon::after { transform: translateY(-7px) rotate(-45deg); }

    .site-nav {
        position: fixed; left: 0; right: 0; top: var(--nav-top, 120px); bottom: 0; margin: 0; border-top: 1px solid var(--line);
        background: var(--paper); border-top: 1px solid var(--line); overflow-y: auto; -webkit-overflow-scrolling: touch;
        display: none;
    }
    .nav-open .site-nav { display: block; }
    .nav-open { overflow: hidden; }
    .nav-list { flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; align-items: stretch; gap: 0; margin-left: 0; padding: 8px var(--gutter) 120px; }
    .nav-group-btn, .nav-link > a { width: 100%; justify-content: space-between; min-height: 60px; padding: 0 4px; border-bottom: 1px solid var(--line); font-size: 1.15rem; }
    .nav-group-btn:hover, .nav-group-btn[aria-expanded="true"] { border-bottom-color: var(--line); }
    .nav-sub { position: static; display: none; min-width: 0; padding: 0 0 8px; border: 0; box-shadow: none; background: var(--mat); }
    .nav-sub a { min-height: 56px; padding-left: 20px; font-size: 1.05rem; border-bottom: 1px solid #fff; }
    .nav-search form { margin: 20px 0 0; }
    .nav-search input { width: 100%; flex: 1; min-height: 56px; }
    .nav-search button { width: 56px; height: 56px; }

    .layout-art, .layout-contact { grid-template-columns: 1fr; gap: 32px; }
    .layout-detail { grid-template-columns: 1fr; gap: 40px; }
    .detail-side { position: static; }
    .wall-body { grid-template-columns: 1fr; }
    /* 手機：電話卡 → 留言表單 → 常見問題 */
    .layout-contact { display: flex; flex-direction: column; }
    .contact-aside { display: contents; }
    .contact-card { order: 1; }
    .form-card { order: 2; }
    .contact-aside .faq { order: 3; margin-top: 8px; }
    .layout-side { grid-template-columns: 1fr; gap: 24px; }
    .filter-form { grid-template-columns: 1fr 1fr; }
    .filter-form .field:first-child { grid-column: 1 / -1; }
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 32px 40px; }
    .footer-brand { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 0 24px; align-items: center; }
    .footer-brand .footer-logo { grid-row: span 2; }
}

/* =========================================================
   手機
   ========================================================= */
@media (max-width: 680px) {
    :root { --gutter: 16px; }
    html.font-xlarge { font-size: 22px; }

    .utility-phone span { font-size: .95rem; }
    .font-switcher-label { display: none; }
    .font-switcher button { min-width: 44px; padding: 2px 8px; }
    .utility-phone { display: none; }
    .utility-inner { justify-content: center; }
    .brand-logo { max-height: 50px; }
    .brand { gap: 10px; flex: 1 1 auto; min-width: 0; }
    .brand-text { min-width: 0; }
    .brand-en { display: none; }
    .menu-toggle { flex: none; }
    .brand-name { font-size: 1.05rem; letter-spacing: .04em; }
    .brand-motto { display: none; }
    .sitemap-search-row { flex-direction: column; }
    .sitemap-grid { columns: 1; }
    .menu-toggle-text { font-size: 1rem; }

    .hero-track { height: auto; display: grid; }
    .hero-slide { position: relative; grid-area: 1 / 1; }
    .hero-img { height: 56vw; min-height: 240px; }
    .hero-plaque { position: static; max-width: none; padding: 18px var(--gutter) 84px; box-shadow: none; }
    .hero-title { font-size: 1.35rem; }
    .hero-plaque .btn { width: 100%; }
    .hero-controls { left: var(--gutter); right: var(--gutter); bottom: 18px; justify-content: space-between; }
    .hero-btn { background: var(--mat); }
    /* 手機：輪播張數多時，圓點會撐破畫面寬度（iPhone 會因此把底部快捷列推出畫面），改顯示「3 / 12」 */
    .hero-dots { display: none; }
    .hero-count { display: inline-flex; align-items: center; justify-content: center; flex: 1; font-weight: 700; color: var(--ink); }

    .section { padding: 44px 0; }
    .section-title { font-size: 1.35rem; margin-top: 44px; }
    .page-title { font-size: 1.6rem; }
    .page-head-inner { padding-top: 28px; padding-bottom: 28px; }
    .about-text { font-size: 1.15rem; }

    .quick-entry { padding: 20px 0; }
    .quick-grid { gap: 10px; }
    .quick-tile { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 104px; padding: 14px; font-size: 1.02rem; border-left-width: 4px; }

    .art-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
    html.font-xlarge .art-wall { grid-template-columns: 1fr; }
    .art-frame { padding: 10px; }
    .art-name { font-size: 1rem; }
    .art-frame-lg { padding: 14px; min-height: 0; }

    .filter-form { grid-template-columns: 1fr; padding: 16px; }
    .filter-form .btn, .btn-wide { width: 100%; }
    /* 兩顆並排；字放大或螢幕太窄放不下時，自動各占一行（字不會被擠成兩行） */
    .art-actions .btn, .art-tools .btn { flex: 1 1 auto; white-space: nowrap; padding-left: .7em; padding-right: .7em; }
    .pager-art { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .pager-art .btn { max-width: none; width: 100%; margin: 0; white-space: nowrap; padding-left: .6em; padding-right: .6em; }
    .pager-art .pager-name { display: none; }
    .pager-art .pager-prev { grid-column: 1; grid-row: 1; }
    .pager-art .pager-next { grid-column: 2; grid-row: 1; }
    .pager-art .pager-list { grid-column: 1 / -1; grid-row: 2; }
    .share-more { position: static; }
    .share-inline { position: relative; }
    .share-more-panel { left: 0; right: 0; width: auto; }
    .share-inline { gap: 6px; }
    .share-inline > .btn, .share-more > summary { white-space: nowrap; }
    .share-inline-label { display: none; }   /* 手機：省掉「分享」字樣，三顆按鈕排一行 */
    .share-inline > .btn, .share-more > summary { padding-left: .7em; padding-right: .7em; }
    .share-inline > .btn { flex: 1 1 auto; }
    .pager-big:not(.pager-art) { flex-direction: column; align-items: stretch; }
    .pager-big:not(.pager-art) .btn { width: 100%; }
    .pager-info { text-align: center; }
    .artist-bio { padding: 20px; }
    .contact-card, .form-card { padding: 20px; }
    .voice-panel { padding: 30px 18px 20px; }
    .voice-actions .btn { flex: 1 1 100%; }
    .voice-text { font-size: 1.45rem; }
    .btn-call { font-size: 1.3rem; padding-left: 12px; padding-right: 12px; }
    .read-player { bottom: calc(var(--bar-h) + 12px); gap: 8px 10px; padding: 12px; }
    .read-status { width: 100%; text-align: center; }
    .wall-panel { margin: 0; height: 100%; }
    .wall-body { grid-template-columns: 1fr; padding: 12px var(--gutter) 24px; gap: 16px; }
    .wall-head { padding: 8px var(--gutter); }
    .wall-actions .btn { flex: 1 1 100%; }
    .wall-link-actions .btn { flex: 1 1 100%; }
    .page-head-sun { width: 128px; right: 10px; opacity: .6; }   /* 手機：縮小變淡，文字疊上去也看得清楚 */
    .about { grid-template-columns: 1fr; }
    .about-sun { display: none; }
    .share-box { padding: 18px; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-left: 0; border-right: 0; }
    .share-actions .btn { flex: 1 1 calc(50% - 5px); }
    .share-actions .btn-line { flex-basis: 100%; }
    .art-facts > div { grid-template-columns: 6.5em 1fr; gap: 8px; }
    .toast { bottom: calc(var(--bar-h) + 24px); }

    .footer-cta-inner { padding-top: 28px; padding-bottom: 28px; }
    .footer-cta-title { font-size: 1.3rem; }
    .footer-cta-actions { width: 100%; }
    .footer-call, .footer-msg { flex: 1 1 100%; }
    .footer-main { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; padding-bottom: 28px; }
    .footer-brand { display: block; text-align: center; }
    .footer-contact a { min-height: 64px; padding: 8px 4px; }
    .fc-text { flex-direction: column; gap: 0; }
    .fc-label { font-size: .9rem; color: var(--ink-soft); }
    .fc-value { font-size: 1.1rem; }
    .footer-chips { display: grid; grid-template-columns: repeat(2, 1fr); }
    .footer-chips a { display: flex; justify-content: center; min-height: 52px; border-radius: 8px; }
    .footer-links a { min-height: 56px; border-bottom: 1px solid var(--line); }
    .footer-bottom-inner { flex-direction: column; text-align: center; padding-right: var(--gutter); padding-bottom: 88px; }   /* 留空間給「頁首」按鈕 */

    /* 底部快捷列 */
    .mobile-bar {
        display: grid; grid-template-columns: repeat(4, 1fr);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 550;
        height: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px -12px rgba(27,39,51,.4);
    }
    .mobile-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink); text-decoration: none; font-weight: 700; }
    .mobile-bar .ico { width: 26px; height: 26px; color: var(--sky); }
    .mobile-bar span { font-size: .85rem; line-height: 1.2; }
    .mobile-bar .mobile-bar-call { background: var(--lotus); color: #fff; }
    .mobile-bar .mobile-bar-call .ico { color: #fff; }
    body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px)); }

    .to-top { right: 14px; bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px) + 14px); width: 60px; height: 60px; }
    .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; }
    .lightbox { padding-bottom: 92px; }
}

@media (max-width: 380px) {
    .brand-text { display: none; }
}
@media (max-width: 360px) {
    .art-wall { grid-template-columns: 1fr; }
    .quick-grid { grid-template-columns: 1fr; }
    .quick-tile { flex-direction: row; min-height: 72px; }
}

/* 系統設定「減少動態效果」 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
    .site-header, .mobile-bar, .to-top, .message-form, .hero-controls, #loader { display: none !important; }
    body { padding: 0; background: #fff; }
}
