/* 咖啡陪你 Kafi & Friends — 元件樣式 v0.3
   所有數值取自 tokens.css。元件一律以 kf- 開頭；首頁原型與設計系統的元件預覽共用這一份。
   版面想法：每一段是小鎮裡的一個地方，用一整條滿版色帶表示；換段就換顏色。 */

/* ---------- 基礎 ---------- */
*,*::before,*::after{box-sizing:border-box;min-width:0}
html{scroll-padding-top:96px;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--color-surface);color:var(--color-ink);font:400 var(--text-body)/var(--leading-body) var(--font-sans);overflow-x:clip}
img{max-width:100%;height:auto;display:block}
a{color:inherit}
button,input{font:inherit;color:inherit}
button{cursor:pointer}
h1,h2,h3,h4,p,figure{margin:0}
h1,h2{font-family:var(--font-display);font-weight:400;text-wrap:balance}
:focus-visible{outline:3px solid var(--color-focus);outline-offset:3px;border-radius:6px}
.kf-on-dark :focus-visible,.kf-on-dark:focus-visible{outline-color:var(--color-focus-on-dark)}
.kf-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.kf-wrap{max-width:calc(var(--layout-max) + 2 * var(--layout-gutter));margin-inline:auto;padding-inline:var(--layout-gutter)}

/* ---------- 色帶 ---------- */
.kf-band{padding-block:var(--band-pad);position:relative}
.kf-band--free{background:var(--color-zone-free)}
.kf-band--books{background:var(--color-zone-books)}
.kf-band--shop{background:var(--color-zone-shop)}
.kf-band--raised{background:var(--color-surface-raised)}
.kf-band--night{background:var(--color-zone-night);color:var(--color-on-dark)}
.kf-band--free,.kf-band--books,.kf-band--shop{--kf-muted:var(--color-ink-soft)}
:root{--kf-muted:var(--color-ink-muted)}

/* 雲朵邊：取自背心上的白雲，只用在首屏下緣與頁尾上緣 */
.kf-cloud-edge{display:block;position:absolute;left:0;right:0;height:28px;pointer-events:none;background:var(--kf-edge,var(--color-surface));
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 28'%3E%3Cpath d='M0 28V16q30-18 60 0q45-22 90 0q25-14 50 0q40-20 80 0q40-16 80 0V28z'/%3E%3C/svg%3E") repeat-x left bottom/360px 28px;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 28'%3E%3Cpath d='M0 28V16q30-18 60 0q45-22 90 0q25-14 50 0q40-20 80 0q40-16 80 0V28z'/%3E%3C/svg%3E") repeat-x left bottom/360px 28px}
.kf-cloud-edge--bottom{bottom:-1px}
.kf-cloud-edge--top{top:-27px}

/* ---------- 區塊標題 ---------- */
.kf-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:var(--space-4) var(--space-8);margin-bottom:var(--space-12)}
.kf-head h2{font-size:var(--text-h1);line-height:var(--leading-h1)}
.kf-head p{color:var(--kf-muted);max-width:30em;margin-top:var(--space-2)}
.kf-head--center{flex-direction:column;align-items:center;text-align:center}
.kf-band--night .kf-head p{color:var(--color-on-dark-soft)}

/* ---------- 按鈕與連結 ---------- */
.kf-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-2);min-height:48px;padding:0 var(--space-6);border-radius:var(--radius-full);border:2px solid var(--color-line-strong);background:var(--color-surface-raised);color:var(--color-ink);font-weight:700;font-size:16px;line-height:1.2;text-decoration:none;white-space:nowrap;transition:background var(--motion-fast) var(--motion-ease),color var(--motion-fast) var(--motion-ease),border-color var(--motion-fast) var(--motion-ease),transform var(--motion-fast) var(--motion-ease)}
.kf-btn:hover{background:var(--color-ink);color:var(--color-on-dark)}
.kf-btn:active{transform:translateY(1px)}
.kf-btn--primary{background:var(--color-action);border-color:var(--color-action);color:var(--color-on-dark)}
.kf-btn--primary:hover{background:var(--color-action-hover);border-color:var(--color-action-hover)}
.kf-btn--dark{background:var(--color-ink);color:var(--color-on-dark)}
.kf-btn--dark:hover{background:#2C3E6B;border-color:#2C3E6B}
.kf-btn--buy{border-color:var(--color-action);color:var(--color-action)}
.kf-btn--buy:hover,.kf-btn--buy[aria-pressed="true"]{background:var(--color-action);color:var(--color-on-dark)}
.kf-btn--gold{background:var(--color-accent-bright);border-color:var(--color-accent-bright);color:var(--color-ink)}
.kf-btn--gold:hover{background:#F0C877;border-color:#F0C877;color:var(--color-ink)}
.kf-btn--sm{min-height:var(--tap-min);padding:0 var(--space-4);font-size:15px}
.kf-btn--block{width:100%}
.kf-btn[disabled]{opacity:.45;cursor:not-allowed}
.kf-link{color:var(--color-action);font-weight:700;text-underline-offset:4px;text-decoration-thickness:1.5px}
.kf-link:hover{text-decoration-thickness:3px}
.kf-more{display:inline-flex;align-items:center;gap:6px;min-height:var(--tap-min);font-weight:700;text-decoration:none;border-bottom:2px solid currentColor;padding:0 2px;line-height:1.2;align-self:flex-end}
.kf-more svg{transition:transform var(--motion-fast) var(--motion-ease)}
.kf-more:hover svg{transform:translateX(4px)}
.kf-iconbtn{min-width:var(--tap-min);min-height:var(--tap-min);display:grid;place-items:center;border:0;background:none;border-radius:var(--radius-full);position:relative}
.kf-iconbtn:hover{background:rgba(30,45,82,.08)}
.kf-iconbtn__count{position:absolute;top:2px;right:0;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--color-action);color:var(--color-on-dark);font-size:12px;font-weight:700;line-height:20px;text-align:center}

/* ---------- 篩選標籤、主題標籤、徽章 ---------- */
.kf-chips{display:flex;gap:var(--space-2);overflow-x:auto;scrollbar-width:none;padding:3px}
.kf-chips::-webkit-scrollbar{display:none}
.kf-chip{flex:none;min-height:var(--tap-min);padding:0 18px;border-radius:var(--radius-full);border:2px solid var(--color-line-strong);background:var(--color-surface-raised);font-weight:500;font-size:15px}
.kf-chip:hover{background:var(--color-surface)}
.kf-chip[aria-pressed="true"]{background:var(--color-ink);color:var(--color-on-dark)}
.kf-chip--quiet{border-color:transparent;background:rgba(255,255,255,.62)}
.kf-chip--quiet[aria-pressed="true"]{background:var(--color-surface-raised);color:var(--color-ink);border-color:var(--color-line-strong)}
.kf-topic{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700;line-height:1;padding:6px 12px 6px 8px;border-radius:var(--radius-full);background:var(--color-surface-raised);border:1.5px solid var(--color-ink)}
.kf-topic::before{content:"";width:9px;height:11px;border-radius:50%;background:var(--color-accent);transform:rotate(-24deg)}
.kf-badge{display:inline-block;font-size:12px;font-weight:700;line-height:1;padding:5px 9px;border-radius:var(--radius-full);background:var(--color-ink);color:var(--color-on-dark)}
.kf-demo{display:inline-block;font-size:11px;font-weight:700;line-height:1;padding:3px 6px;border-radius:4px;border:1px dashed currentColor;color:var(--kf-muted);vertical-align:middle;margin-left:6px;white-space:nowrap}

/* ---------- 價格 ---------- */
.kf-price{font:700 var(--text-price)/var(--leading-price) var(--font-sans);font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--color-action)}
.kf-price s{font-size:14px;font-weight:400;color:var(--kf-muted);margin-left:8px}

/* ---------- 素材位置（待 GPT 交付） ---------- */
.kf-slot{position:relative;display:grid;place-items:center;overflow:hidden;background:rgba(255,255,255,.55);border:1.5px dashed rgba(30,45,82,.34);border-radius:var(--radius-md);color:var(--color-ink)}
.kf-slot::after{content:none}
.kf-slot__tag{position:absolute;inset:auto 8px 8px 8px;z-index:2;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:12px;line-height:1.35;color:var(--color-ink-soft)}
.kf-slot__tag b{background:var(--color-ink);color:var(--color-on-dark);padding:3px 7px;border-radius:5px;font-weight:700;letter-spacing:.02em;white-space:nowrap}
.kf-slot--paper{background:var(--color-surface-raised);border-style:solid;border-color:var(--color-line);border-radius:2px}
.kf-slot--book{border-radius:var(--radius-book);background:var(--color-surface-raised);border:0;box-shadow:inset 10px 0 0 rgba(30,45,82,.06),inset 11px 0 0 rgba(30,45,82,.10),var(--shadow-book)}
.kf-slot--round{border-radius:50%}
.kf-slot--on-dark{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.42);color:var(--color-on-dark)}
.kf-slot--on-dark .kf-slot__tag{color:var(--color-on-dark-soft)}
.kf-slot--on-dark .kf-slot__tag b{background:var(--color-accent-bright);color:var(--color-ink)}
.kf-slot--tiny .kf-slot__tag{inset:auto 4px 4px 4px;font-size:10px}
.kf-slot--tiny .kf-slot__tag span{display:none}
/* 已有 v0.1 測試素材的位置 */
.kf-art{position:relative}
.kf-art__tag{position:absolute;left:12px;bottom:12px;z-index:3;display:flex;align-items:center;gap:8px;font-size:12px;line-height:1.35;background:rgba(255,255,255,.92);color:var(--color-ink);padding:5px 10px 5px 5px;border-radius:7px}
.kf-art__tag b{background:var(--color-accent);color:var(--color-ink);padding:3px 7px;border-radius:5px;white-space:nowrap}
.kf-notes-off .kf-slot__tag,.kf-notes-off .kf-art__tag,.kf-notes-off .kf-demo{display:none}

/* ---------- 原型說明列 ---------- */
.kf-protobar{background:var(--color-ink);color:var(--color-on-dark-soft);font-size:13px;line-height:1.5}
.kf-protobar .kf-wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 16px;padding-block:8px}
.kf-protobar b{color:var(--color-on-dark)}
.kf-protobar__more{margin-left:.6em}
.kf-switch{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:0 12px 0 10px;border-radius:var(--radius-full);border:1.5px solid rgba(255,255,255,.5);background:none;color:var(--color-on-dark);font-size:13px;font-weight:500}
.kf-switch::before{content:"";width:10px;height:10px;border-radius:50%;background:var(--color-accent-bright)}
.kf-switch[aria-pressed="false"]::before{background:none;box-shadow:inset 0 0 0 1.5px var(--color-on-dark-soft)}

/* ---------- 頁首 ---------- */
.kf-header{position:sticky;top:0;z-index:40;background:var(--color-surface);border-bottom:1px solid var(--color-line)}
.kf-header__bar{display:flex;align-items:center;gap:var(--space-6);height:84px}
.kf-logo{flex:none;display:block;text-decoration:none;border-radius:var(--radius-sm)}
.kf-logo img{height:68px;width:auto}
.kf-nav{display:flex;gap:2px;margin-inline:auto}
.kf-nav a{display:flex;align-items:center;min-height:var(--tap-min);padding:0 14px;border-radius:var(--radius-full);font-weight:500;font-size:16px;text-decoration:none;white-space:nowrap}
.kf-nav a:hover{background:rgba(30,45,82,.08)}
.kf-nav a[aria-current="true"]{background:var(--color-ink);color:var(--color-on-dark)}
.kf-header__tools{display:flex;align-items:center;gap:var(--space-1);flex:none}
.kf-burger{display:none}

/* ---------- 首屏 ---------- */
.kf-hero{position:relative;background:var(--color-surface-wash);overflow:hidden}
.kf-hero__art{position:relative;aspect-ratio:2/1;max-height:780px;width:100%}
.kf-hero__art picture{display:contents}
.kf-hero__art img{width:100%;height:100%;object-fit:cover;object-position:60% 50%}
.kf-photo img{height:auto}
.kf-hero__copy{position:absolute;z-index:2;left:clamp(16px,max(8.34vw,calc(50vw - 700px)),13.5vw);top:47%;transform:translateY(-50%);width:356px;display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-5)}
.kf-hero__copy::before{content:"";position:absolute;inset:-56px -64px;z-index:-1;background:radial-gradient(closest-side,var(--color-surface-wash) 62%,rgba(254,247,227,0));pointer-events:none}
.kf-hero__hello{display:inline-flex;align-items:center;gap:10px;font:400 20px/1.3 var(--font-display)}
.kf-hero__hello img{width:28px;height:auto}
.kf-hero h1{font-size:var(--text-display);line-height:var(--leading-display);letter-spacing:.01em}
.kf-hero h1 span{display:block}
.kf-hero__sub{color:var(--color-ink-soft);font-size:17px;line-height:28px}
.kf-hero__sub span{display:block}
.kf-hero__cta{display:flex;flex-wrap:wrap;gap:var(--space-3)}
.kf-hero .kf-art__tag{left:auto;right:16px;bottom:40px}

/* ---------- 三個承諾 ---------- */
.kf-promise{background:var(--color-surface);padding-block:var(--space-12) 0}
.kf-promise ul{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.kf-promise li{display:grid;grid-template-columns:auto 1fr;gap:var(--space-4);align-items:start;padding:var(--space-2) var(--space-8)}
.kf-promise li+li{border-left:1px solid var(--color-line)}
.kf-promise li:first-child{padding-left:0}
.kf-promise li:last-child{padding-right:0}
.kf-promise svg{width:40px;height:40px;color:var(--color-ink)}
.kf-promise h3{font:500 18px/26px var(--font-sans)}
.kf-promise p{color:var(--color-ink-muted);font-size:15px;line-height:24px;margin-top:2px}

/* ---------- 最新消息 ---------- */
.kf-news{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,9fr);gap:var(--space-12);align-items:start}
.kf-news__side h2{font-size:var(--text-h1);line-height:var(--leading-h1)}
.kf-news__side p{color:var(--color-ink-muted);margin-top:var(--space-3)}
.kf-news__ctl{display:flex;gap:var(--space-2);margin-top:var(--space-6)}
.kf-news__ctl button{width:48px;height:48px;border-radius:50%;border:2px solid var(--color-line-strong);background:var(--color-surface-raised);display:grid;place-items:center}
.kf-news__ctl button:hover{background:var(--color-ink);color:var(--color-on-dark)}
.kf-scroller{display:flex;gap:var(--space-6);overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin-right:calc(-1 * var(--layout-gutter));padding:3px var(--layout-gutter) 3px 3px}
.kf-scroller::-webkit-scrollbar{display:none}
.kf-newscard{flex:0 0 min(620px,84%);scroll-snap-align:start;text-decoration:none;display:flex;flex-direction:column;gap:var(--space-3)}
.kf-newscard .kf-slot{aspect-ratio:5/2}
.kf-newscard__kind{font-size:13px;font-weight:700;color:var(--color-action);letter-spacing:.04em}
.kf-newscard h3{font:500 var(--text-h3)/var(--leading-h3) var(--font-sans)}
.kf-newscard p{color:var(--color-ink-muted);font-size:15px;line-height:24px}
.kf-newscard:hover h3{text-decoration:underline;text-underline-offset:4px}

/* ---------- 免費資源 ---------- */
.kf-filters{display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-6);margin-bottom:var(--space-8);align-items:center}
.kf-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-6)}
.kf-res{display:flex;flex-direction:column;gap:var(--space-3)}
.kf-res .kf-slot{aspect-ratio:210/297}
.kf-res__pages{position:absolute;top:8px;right:8px;z-index:2}
.kf-res h3{font:500 17px/26px var(--font-sans)}
.kf-res__meta{font-size:var(--text-small);line-height:var(--leading-small);color:var(--kf-muted);margin-top:-8px;flex:1}
.kf-res .kf-btn{align-self:flex-start}
.kf-empty{grid-column:1/-1;background:var(--color-surface-raised);border-radius:var(--radius-md);padding:var(--space-8);text-align:center}
.kf-empty p{margin-bottom:var(--space-4)}
.kf-band__foot{display:flex;justify-content:center;margin-top:var(--space-12)}

/* ---------- 繪本書架 ---------- */
.kf-shelf{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-12) var(--space-8)}
.kf-book{display:flex;flex-direction:column}
.kf-book__cover{margin-inline:calc(var(--space-8) / -2);padding:0 calc(var(--space-8) / 2 + 8px);border-bottom:14px solid var(--color-fur-shade)}
.kf-book__cover .kf-slot{aspect-ratio:1}
.kf-book__body{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-2);padding-top:var(--space-6);flex:1}
.kf-book h3{font:400 22px/30px var(--font-display)}
.kf-book__meta{font-size:var(--text-small);line-height:var(--leading-small);color:var(--kf-muted)}
.kf-book__row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--space-2) var(--space-3);width:100%;margin-top:var(--space-2);flex:1;align-content:flex-end}
.kf-book .kf-btn{margin-top:var(--space-2)}

/* ---------- 商店 ---------- */
.kf-shophead{display:grid;grid-template-columns:auto 1fr auto;gap:var(--space-8);align-items:center;margin-bottom:var(--space-12)}
.kf-shophead img{width:250px;height:auto}
.kf-shophead .kf-art__tag{position:static;display:inline-flex;margin-top:6px;background:rgba(255,255,255,.7)}
.kf-shophead h2{font-size:var(--text-h1);line-height:var(--leading-h1)}
.kf-shophead p{color:var(--kf-muted);max-width:30em;margin-top:var(--space-2)}
.kf-product{background:var(--color-surface-raised);border-radius:var(--radius-md);padding:var(--space-3);display:flex;flex-direction:column;gap:var(--space-3)}
.kf-product .kf-slot{aspect-ratio:1;border-radius:var(--radius-sm);background:var(--color-surface)}
.kf-product__body{display:flex;flex-direction:column;gap:var(--space-1);padding:0 var(--space-1);flex:1}
.kf-product h3{font:500 17px/26px var(--font-sans)}
.kf-product__meta{font-size:var(--text-small);line-height:var(--leading-small);color:var(--color-ink-muted);flex:1}
.kf-product .kf-price{margin-top:var(--space-2)}
.kf-deal{margin-top:var(--space-6);background:var(--color-ink);color:var(--color-on-dark);border-radius:var(--radius-lg);display:grid;grid-template-columns:148px 1fr auto;gap:var(--space-6) var(--space-8);align-items:center;padding:var(--space-6) var(--space-8) var(--space-6) var(--space-6)}
.kf-deal .kf-slot{aspect-ratio:1}
.kf-deal__label{font-size:13px;font-weight:700;color:var(--color-accent-bright);letter-spacing:.04em}
.kf-deal h3{font:400 26px/34px var(--font-display);margin-top:2px}
.kf-deal p{color:var(--color-on-dark-soft);font-size:16px;line-height:26px;margin-top:var(--space-1)}
.kf-deal__buy{display:flex;flex-direction:column;align-items:flex-end;gap:var(--space-3)}
.kf-deal .kf-price{font-size:30px;line-height:34px;color:var(--color-accent-bright)}
.kf-deal .kf-price s{color:var(--color-on-dark-soft)}

/* ---------- 咖啡的世界 ---------- */
.kf-world{display:grid;grid-template-columns:1fr 1fr}
.kf-world__panel{padding:var(--band-pad) var(--layout-gutter);display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-4)}
.kf-world__panel:first-child{background:var(--color-fur-soft);padding-left:max(var(--layout-gutter),calc((100vw - var(--layout-max)) / 2))}
.kf-world__panel:last-child{background:var(--color-zone-night);color:var(--color-on-dark);padding-right:max(var(--layout-gutter),calc((100vw - var(--layout-max)) / 2))}
.kf-world h2{font-size:var(--text-h1);line-height:var(--leading-h1)}
.kf-world p{max-width:28em;color:var(--color-ink-soft)}
.kf-world__panel:last-child p{color:var(--color-on-dark-soft)}
.kf-world .kf-slot{width:100%;aspect-ratio:5/3;margin-block:var(--space-2)}

/* ---------- 親子好物 ---------- */
.kf-disclosure{display:flex;gap:var(--space-3);align-items:flex-start;font-size:15px;line-height:24px;color:var(--color-ink-soft);border:1.5px solid var(--color-line);border-radius:var(--radius-md);padding:var(--space-3) var(--space-4);max-width:32em;background:var(--color-surface-raised)}
.kf-disclosure svg{flex:none;margin-top:2px}
.kf-picks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--space-8)}
.kf-pick{display:grid;grid-template-columns:112px 1fr;gap:var(--space-4);align-items:start}
.kf-pick .kf-slot{aspect-ratio:1;background:var(--color-surface-raised)}
.kf-pick h3{font:500 18px/26px var(--font-sans)}
.kf-pick p{font-size:15px;line-height:24px;color:var(--color-ink-muted);margin:2px 0 6px}
.kf-pick small{display:block;font-size:12px;line-height:18px;color:var(--color-ink-muted)}

/* ---------- 品牌故事 ---------- */
.kf-story{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:var(--space-16);align-items:center}
.kf-photo{justify-self:center;width:min(340px,100%);background:var(--color-surface-raised);padding:14px 14px 0;transform:rotate(-2.5deg);box-shadow:var(--shadow-book)}
.kf-photo img{aspect-ratio:3/4;object-fit:cover;width:100%}
.kf-photo figcaption{font:400 17px/1 var(--font-display);text-align:center;padding:16px 0 18px}
.kf-story h2{font-size:var(--text-h1);line-height:var(--leading-h1);margin-bottom:var(--space-5)}
.kf-story p{max-width:33em}
.kf-story p+p{margin-top:var(--space-4)}
.kf-pending{border-left:0;border:1.5px dashed rgba(30,45,82,.34);border-radius:var(--radius-md);padding:var(--space-4) var(--space-5);color:var(--color-ink-soft);font-size:15px;line-height:25px;max-width:35em;margin-bottom:var(--space-5)}
.kf-pending b{display:block;color:var(--color-ink);margin-bottom:2px}
.kf-notes-off .kf-pending{border-style:solid;border-color:var(--color-line)}
.kf-story__cta{margin-top:var(--space-6)}

/* ---------- 電子報 ---------- */
.kf-newsletter{display:grid;grid-template-columns:168px 1fr;gap:var(--space-8);align-items:center;background:var(--color-zone-free);border-radius:var(--radius-lg);padding:var(--space-8) var(--space-12)}
.kf-newsletter .kf-slot{aspect-ratio:1}
.kf-newsletter h2{font-size:var(--text-h2);line-height:var(--leading-h2)}
.kf-newsletter p{color:var(--color-ink-soft);margin-top:var(--space-1)}
.kf-form{display:flex;flex-wrap:wrap;gap:var(--space-3);margin-top:var(--space-4)}
.kf-input{flex:1 1 240px;min-height:48px;border-radius:var(--radius-full);border:2px solid var(--color-line-strong);background:var(--color-surface-raised);padding:0 var(--space-5);font-size:16px}
.kf-input::placeholder{color:var(--color-ink-muted)}
.kf-input[aria-invalid="true"]{border-color:var(--color-action)}
.kf-form__msg{font-size:var(--text-small);line-height:var(--leading-small);color:var(--color-ink-soft);margin-top:var(--space-2)}
.kf-form__msg[data-state="error"]{color:var(--color-action);font-weight:700}

/* ---------- 頁尾 ---------- */
.kf-footer{background:var(--color-zone-night);color:var(--color-on-dark-soft);padding:var(--space-16) 0 var(--space-12);position:relative;margin-top:28px}
.kf-footer__grid{display:grid;grid-template-columns:minmax(0,1.5fr) repeat(4,minmax(0,1fr));gap:var(--space-8)}
.kf-footer__brand img{width:236px;height:auto}
.kf-footer__brand p{margin-top:var(--space-4);font-size:15px;line-height:25px;max-width:17em}
.kf-footer h3{font:700 15px/22px var(--font-sans);color:var(--color-on-dark);margin-bottom:var(--space-2)}
.kf-footer a{display:flex;align-items:center;min-height:36px;font-size:15px;text-decoration:none}
.kf-footer a:hover{color:var(--color-on-dark);text-decoration:underline;text-underline-offset:4px}
.kf-footer__note{margin-top:var(--space-12);padding-top:var(--space-6);border-top:1px solid rgba(255,255,255,.18);font-size:13px;line-height:21px;display:flex;flex-wrap:wrap;gap:var(--space-2) var(--space-8);justify-content:space-between}

/* ---------- 購物籃抽屜、對話框 ---------- */
.kf-scrim{position:fixed;inset:0;z-index:60;background:rgba(20,28,50,.46);opacity:0;pointer-events:none;transition:opacity var(--motion-fast)}
.kf-scrim.is-on{opacity:1;pointer-events:auto}
.kf-drawer{position:fixed;inset:0 0 0 auto;z-index:70;width:min(420px,100%);background:var(--color-surface-raised);display:flex;flex-direction:column;transform:translateX(100%);visibility:hidden;transition:transform var(--motion-slow) var(--motion-ease),visibility 0s var(--motion-slow);border-radius:var(--radius-lg) 0 0 var(--radius-lg);box-shadow:var(--shadow-float)}
.kf-drawer.is-on{transform:none;visibility:visible;transition-delay:0s}
.kf-drawer__head{display:flex;align-items:center;justify-content:space-between;padding:var(--space-4) var(--space-4) var(--space-4) var(--space-6);border-bottom:1px solid var(--color-line)}
.kf-drawer__head h2{font-size:24px;line-height:32px}
.kf-drawer__lines{flex:1;overflow:auto;padding:0 var(--space-6)}
.kf-line{display:grid;grid-template-columns:60px 1fr auto;gap:var(--space-3);align-items:center;padding:var(--space-4) 0;border-bottom:1px solid var(--color-line)}
.kf-line .kf-slot{aspect-ratio:1;border-radius:var(--radius-sm)}
.kf-line__name{font-weight:500;font-size:16px;line-height:24px}
.kf-line__price{font-weight:700;font-variant-numeric:tabular-nums;color:var(--color-action);font-size:15px}
.kf-line button{border:0;background:none;min-width:var(--tap-min);min-height:var(--tap-min);color:var(--color-ink-muted);font-size:14px;text-decoration:underline;text-underline-offset:3px}
.kf-drawer__empty{text-align:center;padding:var(--space-12) var(--space-4);color:var(--color-ink-muted)}
.kf-drawer__empty .kf-slot{width:168px;aspect-ratio:1;margin:0 auto var(--space-4)}
.kf-drawer__foot{padding:var(--space-5) var(--space-6) var(--space-6);border-top:1px solid var(--color-line)}
.kf-drawer__total{display:flex;justify-content:space-between;font-weight:700;font-size:18px;margin-bottom:var(--space-3);font-variant-numeric:tabular-nums}
.kf-drawer__foot small{display:block;font-size:13px;line-height:20px;color:var(--color-ink-muted);margin-top:var(--space-3)}
.kf-dialog{position:fixed;left:50%;top:50%;z-index:70;width:min(440px,calc(100vw - 32px));background:var(--color-surface-raised);border-radius:var(--radius-lg);padding:var(--space-8);box-shadow:var(--shadow-float);transform:translate(-50%,-46%);opacity:0;visibility:hidden;transition:opacity var(--motion-fast),transform var(--motion-fast) var(--motion-ease),visibility 0s var(--motion-fast)}
.kf-dialog.is-on{opacity:1;visibility:visible;transform:translate(-50%,-50%);transition-delay:0s}
.kf-dialog h2{font-size:24px;line-height:32px}
.kf-dialog__meta{font-size:var(--text-small);color:var(--color-ink-muted);margin:var(--space-1) 0 var(--space-3)}
.kf-dialog .kf-btn{margin-top:var(--space-5)}

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

/* ---------- 平板以下 ---------- */
@media (max-width:1279px){
  .kf-hero__art{max-height:none;--kf-edge:var(--color-surface-wash)}
  .kf-hero__copy{position:static;transform:none;width:auto;align-items:center;text-align:center;padding:var(--space-8) var(--layout-gutter) var(--space-16)}
  .kf-hero__copy::before{display:none}
  .kf-hero h1 span{display:inline}
  .kf-hero__cta{justify-content:center}
  .kf-hero .kf-art__tag{bottom:auto;top:12px;right:12px}
  .kf-nav a{padding:0 10px;font-size:15px}
}
@media (max-width:1023px){
  .kf-header__bar{height:68px;gap:var(--space-3)}
  .kf-logo img{height:50px}
  .kf-burger{display:grid}
  .kf-header__tools{margin-left:auto}
  .kf-nav{display:none;position:absolute;top:100%;left:0;right:0;flex-direction:column;gap:0;background:var(--color-surface);border-bottom:1px solid var(--color-line);padding:var(--space-2) var(--layout-gutter) var(--space-4);box-shadow:0 18px 30px rgba(20,28,50,.12)}
  .kf-nav.is-open{display:flex}
  .kf-nav a{min-height:52px;font-size:18px;border-radius:var(--radius-sm);border-bottom:1px solid var(--color-line)}
  .kf-nav a:last-child{border-bottom:0}
  .kf-promise ul{grid-template-columns:1fr;gap:var(--space-5)}
  .kf-promise li,.kf-promise li:first-child,.kf-promise li:last-child{padding:0}
  .kf-promise li+li{border-left:0}
  .kf-news{grid-template-columns:1fr;gap:var(--space-6)}
  .kf-news__side{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:var(--space-3)}
  .kf-news__side p{flex-basis:100%;order:3;margin-top:0}
  .kf-news__ctl{margin-top:0}
  .kf-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-6) var(--space-4)}
  .kf-shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-8) var(--space-4)}
  .kf-book__cover{margin-inline:calc(var(--space-4) / -2);padding:0 calc(var(--space-4) / 2 + 6px);border-bottom-width:10px}
  .kf-book__body{padding-top:var(--space-4)}
  .kf-shophead{grid-template-columns:1fr;gap:var(--space-4);margin-bottom:var(--space-8)}
  .kf-shophead img{width:200px}
  .kf-shophead .kf-more{justify-self:start}
  .kf-deal{grid-template-columns:112px 1fr;padding:var(--space-5)}
  .kf-deal__buy{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between}
  .kf-world{grid-template-columns:1fr}
  .kf-world__panel,.kf-world__panel:first-child,.kf-world__panel:last-child{padding:var(--band-pad) var(--layout-gutter)}
  .kf-picks{grid-template-columns:1fr;gap:var(--space-6)}
  .kf-story{grid-template-columns:1fr;gap:var(--space-12)}
  .kf-photo{width:min(280px,82%)}
  .kf-newsletter{grid-template-columns:1fr;padding:var(--space-8) var(--space-5);text-align:center;justify-items:center}
  .kf-newsletter .kf-slot{width:128px}
  .kf-form{justify-content:center}
  .kf-footer__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kf-footer__brand{grid-column:1/-1}
}
@media (max-width:699px){
  .kf-hero__art{aspect-ratio:1038/887}
  .kf-hero__art img{object-position:50% 50%}
  .kf-hero h1 span{display:block}
  .kf-hero__copy{padding-bottom:var(--space-12);gap:var(--space-4)}
  .kf-protobar__more{display:none}
  .kf-hero .kf-art__tag{font-size:11px;top:8px;right:8px}
  .kf-head{margin-bottom:var(--space-8)}
  .kf-head .kf-more{align-self:flex-start}
  .kf-filters{margin-inline:calc(-1 * var(--layout-gutter));gap:var(--space-1)}
  .kf-filters .kf-chips{padding-inline:var(--layout-gutter);width:100%}
  .kf-newscard{flex-basis:86%}
  .kf-res h3,.kf-product h3{font-size:16px;line-height:24px}
  .kf-book h3{font-size:19px;line-height:27px}
  .kf-product{padding:var(--space-2)}
  .kf-btn--sm{padding:0 var(--space-3)}
  .kf-deal h3{font-size:22px;line-height:30px}
  .kf-pick{grid-template-columns:88px 1fr}
  .kf-drawer{border-radius:0}
}
