/* 羽衣粉筆預覽站｜商品選購頁 2026-11-24 */
:root {
  color-scheme: light;
  --ink: #1A1A1A;
  --chalk: #EFE9DE;
  --paper: #FAFAFA;
  --card: #FAFAFA;
  --muted: #41474D;
  --line: #DADEE2;
  --field: #AEB6BD;
  --focus: #17477B;
  --gold: #E2C07A;
  --pink: #E39A9C;
  --blue: #8FB8C9;
  --brown: #A67938;
  --orange: #DFA77A;
  --swatch-edge: #D4CBC0;
  --picked: #17477B;
  --picked-bg: #E2E7EC;
  --accent: #17477B;
  --accent-hover: #0F3560;
  --on-accent: #F5F6F7;
  --tile: #F0F1F2;
  --sans: "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif;
  --sans-kr: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --brand: #D96F00;
  --wordmark: var(--sans);
  font-family: var(--sans);
  line-height: 1.75;
  font-size: 16px;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  padding-bottom: 24px;
}
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.wrap { width: min(1100px, calc(100% - 32px)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: .5rem; translate: 0 -200%; padding: .5rem 1rem; background: var(--card); z-index: 4; }
.skip:focus { translate: 0; }
.top { position: sticky; top: 0; z-index: 3; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar, .foot { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.wm-kr { font: 400 1.25rem/1.2 var(--sans-kr); color: var(--accent); padding-right: .8rem; border-right: 1px solid var(--field); white-space: nowrap; }
.wm-brand { display: grid; padding-left: .8rem; font: 700 1.3rem/1.1 var(--wordmark); letter-spacing: .03em; color: var(--brand); }
.wordmark small { font: 400 .72rem/1.3 var(--sans); letter-spacing: .04em; color: var(--muted); }
.bar:has(nav) { flex-wrap: wrap; row-gap: 10px; padding-top: 12px; }
.bar:has(nav) .shop-link { display: none; }
nav { display: flex; align-items: center; order: 1; width: 100%; gap: 2.2rem; min-height: 48px; border-top: 1px solid var(--line); font-size: .9rem; }
nav a { text-decoration: none; color: var(--ink); font-weight: 700; }
nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.shop-link { margin-left: auto; }
.cart-toggle { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; flex-shrink: 0; }
.cart-toggle:hover { background: var(--tile); }
.cart-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 { font-weight: 700; line-height: 1.22; }
h1 { font-size: clamp(2rem, 7vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 4vw, 1.8rem); letter-spacing: -.01em; }
h3 { font-size: 1.05rem; line-height: 1.45; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: .7rem 1.25rem; border: 0; border-radius: 0; text-decoration: none; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.button.compact { min-height: 44px; padding: .45rem 1rem; font-size: .88rem; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover { background: var(--accent-hover); }
.ghost { background: transparent; color: var(--ink); border: 1px solid var(--field); }
.ghost:hover { background: var(--card); }
.hero { display: grid; gap: 32px; padding-block: 36px 28px; position: relative; }
.hero-copy, .board { position: relative; z-index: 1; }
.hero-copy > p { margin-top: 1.1rem; color: var(--muted); line-height: 1.85; max-width: 32ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.board { margin: 0; position: relative; background: transparent; border: 0; box-shadow: none; overflow: visible; }
.chalk-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 100%; min-width: 0; background: transparent; }
.chalk-stage canvas { display: block; max-width: 100%; touch-action: pan-y; cursor: grab; }
.chalk-stage canvas:active { cursor: grabbing; }

.catalog { padding-block: 32px 40px; border-top: 1px solid var(--line); }
.catalog-title { font-weight: 400; margin-bottom: 1.6rem; }
.product-grid { display: grid; gap: 44px; }
.product-card { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 16px; }
.product-media { display: grid; grid-template-rows: auto 1fr; }
.product-media img.js-main-photo { grid-area: 1 / 1; display: block; width: 100%; height: auto; aspect-ratio: 100 / 82; object-fit: cover; mix-blend-mode: multiply; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs button { width: 52px; height: 52px; padding: 0 0 3px; border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-bottom-color: var(--accent); }
.thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.product-body { display: flex; flex-direction: column; }
.product-body h3 { margin-top: 0; }
.spec { margin-top: .45rem; color: var(--muted); font-size: .92rem; line-height: 1.7; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .7rem; }
.swatches span { width: 14px; height: 14px; border-radius: 50%; border: 1px solid transparent; }
.swatches span.edge { border-color: var(--swatch-edge); }
.buy-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 1rem; }
.qty { grid-column: 1 / -1; display: inline-flex; align-items: center; width: max-content; border: 1px solid var(--field); background: transparent; }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; font: inherit; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.qty input { width: 3.4rem; border: 0; text-align: center; font: inherit; min-height: 44px; background: transparent; color: var(--ink); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { appearance: none; margin: 0; }

 .cart-empty { margin: 1rem 0 0; color: var(--muted); font-size: .92rem; }
.cart-items { list-style: none; margin: 0.4rem 0 0; padding: 0; flex: 1; overflow: auto; }
.cart-items li { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: .85rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.cart-items li:last-of-type { border-bottom: 1px solid var(--line); }
.cart-item-name { grid-column: 1; }
.cart-item-remove { grid-column: 2; justify-self: end; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: .82rem; text-decoration: underline; text-underline-offset: 2px; padding: .25rem; }
.cart-item-qty { grid-column: 1 / -1; }
.cart-overlay { position: fixed; inset: 0; z-index: 6; background: rgba(20, 30, 40, 0.28); opacity: 0; pointer-events: none; transition: opacity .22s ease; }
.cart-overlay.is-open, .cart-overlay:not([hidden]).is-open { opacity: 1; pointer-events: auto; }
.cart-drawer { position: fixed; top: 0; right: 0; z-index: 7; display: flex; flex-direction: column; width: min(400px, 100%); height: 100%; padding: 1.1rem 1.15rem 1.4rem; background: var(--card); box-shadow: -12px 0 32px rgba(20, 30, 40, 0.1); transform: translateX(100%); visibility: hidden; transition: transform .24s ease, visibility .24s; }
.cart-drawer.is-open { transform: translateX(0); visibility: visible; }
.cart-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; }
.cart-drawer-head h2 { font-size: 1.3rem; }
.cart-close { width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.cart-close:hover { background: var(--tile); }
.cart-drawer-actions { margin-top: auto; padding-top: 1rem; }
.cart-drawer-actions .button { width: 100%; }
.cart-drawer-actions .button[aria-disabled="true"] { pointer-events: none; opacity: .45; }

.article { padding-block: 40px 72px; }
.article > p { margin-top: 1rem; color: var(--muted); max-width: 52ch; line-height: 1.8; }
.video { position: relative; aspect-ratio: 16 / 9; margin-top: 1.2rem; background: var(--tile); overflow: hidden; }
.video iframe,
.video .js-play-video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .js-play-video { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; background: transparent; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.play-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); position: relative; }
.play-mark::after { content: ""; position: absolute; top: 50%; left: 54%; width: 0; height: 0; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--on-accent); translate: -50% -50%; }
.article .source { font-size: .86rem; }
.article h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
.article h2 { margin-top: 2.6rem; }
.article .video { max-width: 800px; }
.prose { max-width: 44rem; line-height: 1.9; }
.prose p, .prose ul, .prose ol { margin-top: 1rem; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-top: .4rem; }
.prose h2 { font-size: 1.35rem; }
.prose a:not(.button), .related a { color: var(--accent); text-underline-offset: 3px; }
.prose .button { color: var(--on-accent); }
.prose .tbl { overflow-x: auto; margin-top: 1rem; }
.prose table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .92rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .6rem .5rem; text-align: left; vertical-align: top; }
.related { margin-top: 3.2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.article .related h2 { margin-top: 0; font-size: 1.2rem; }
.related ul { margin: .8rem 0 0; padding-left: 1.2em; }
.related li { margin-top: .4rem; }
.article-list { list-style: none; margin: 1.6rem 0 0; padding: 0; border-bottom: 1px solid var(--line); }
.article-list li { border-top: 1px solid var(--line); padding: 1.2rem 0; }
.article-list a { font-size: 1.1rem; font-weight: 700; text-decoration: none; }
.article-list a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.article-list p { margin-top: .3rem; color: var(--muted); }
.article .source a { color: var(--accent); text-underline-offset: 3px; }

.faq { padding-bottom: 56px; }
.faq h2 { margin-bottom: 1.2rem; }
details { border-top: 1px solid var(--line); padding: 1.05rem 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; }
details p { margin: .7rem 0 0 0; color: var(--muted); max-width: 56ch; line-height: 1.8; }
footer { border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.foot { padding-block: 18px; min-height: 0; flex-wrap: wrap; }
footer a { color: var(--accent); }
footer [lang="ko"] { font-family: var(--sans-kr); }
.js-cart-count { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .chalk-stage canvas { cursor: default; }
  .button { transition: none; }
}
@media (min-width: 760px) {
  .wrap { width: min(1100px, calc(100% - 72px)); }
  .bar { min-height: 80px; }
  .hero { grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(36px, 6vw, 80px); padding-block: 64px 56px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 56px 28px; }
  .catalog { padding-block: 48px 56px; }
  .faq { padding-block: 24px 72px; }
}
@media (max-width: 759px) {
  .top .button { margin-left: auto; }
  .hero-copy > p { max-width: none; }
  .board { max-width: 420px; margin-inline: auto; width: 100%; }
}
@media (max-width: 370px) {
  .wm-kr { font-size: 1.05rem; padding-right: .55rem; }
  .wm-brand { font-size: 1.1rem; padding-left: .55rem; }
  .bar:has(nav) .shop-link { display: none; }
  .wrap { width: calc(100% - 24px); }
  .buy-bar { grid-template-columns: 1fr; }
}

/* 結帳頁 */
.checkout { padding-block: 36px 64px; max-width: 40rem; }
.checkout h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.checkout-lead { margin-top: 1rem; color: var(--muted); }
.checkout-box { margin-top: 1.6rem; padding: 1.4rem 0 0; border-top: 1px solid var(--line); }
.checkout-box h2 { font-size: 1.15rem; margin-bottom: .8rem; }
.checkout-user { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: 1rem; }
.checkout-actions { display: grid; gap: .7rem; margin-top: 1.2rem; }
.checkout .button { width: 100%; }
.checkout-note { margin-top: .8rem; font-size: .88rem; color: var(--muted); }
body.cart-lock { overflow: hidden; }

@media (min-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
