/* 外觀選項（由 theme.js 設在 <html> 的 data-* 上） */

/* 底色風格 */
html[data-skin="mint"] { --cream: #f1faf5; --card: #ffffff; --ink: #2f4a40; --ink-soft: #6c8a7e; --line: #d5ebe0; }
html[data-skin="sky"] { --cream: #eef6ff; --card: #ffffff; --ink: #2c3e57; --ink-soft: #6f84a0; --line: #d6e6f7; }
html[data-skin="kraft"] { --cream: #f3e9d8; --card: #fbf5ea; --ink: #4b3a2a; --ink-soft: #8a7560; --line: #e2d2b8; }
html[data-skin="mono"] { --cream: #fafafa; --card: #ffffff; --ink: #222222; --ink-soft: #777777; --line: #e6e6e6; --shadow: 0 4px 16px rgba(0, 0, 0, .07); }
html[data-skin="lilac"] { --cream: #f6f2ff; --card: #ffffff; --ink: #3d3558; --ink-soft: #7c739c; --line: #e3dcf7; }

/* 背景花紋 */
html[data-pattern="dots"] body { background-image: radial-gradient(color-mix(in srgb, var(--brand) 16%, transparent) 1.5px, transparent 2px); background-size: 22px 22px; }
html[data-pattern="grid"] body { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 26px 26px; }
html[data-pattern="stripes"] body { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--brand) 6%, transparent) 0 12px, transparent 12px 24px); }

/* 形狀 */
html[data-shape="soft"] { --radius: 10px; }
html[data-shape="soft"] .btn, html[data-shape="soft"] .seg button, html[data-shape="soft"] .chip, html[data-shape="soft"] .worn-chip, html[data-shape="soft"] .search, html[data-shape="soft"] select { border-radius: 10px; }
html[data-shape="soft"] .fit-card, html[data-shape="soft"] .modal-panel, html[data-shape="soft"] .logo, html[data-shape="soft"] .stage { border-radius: 12px; }
html[data-shape="square"] { --radius: 3px; }
html[data-shape="square"] .btn, html[data-shape="square"] .seg button, html[data-shape="square"] .chip, html[data-shape="square"] .worn-chip, html[data-shape="square"] .search, html[data-shape="square"] select, html[data-shape="square"] .chip-btn, html[data-shape="square"] .code-pill { border-radius: 3px; }
html[data-shape="square"] .fit-card, html[data-shape="square"] .modal-panel, html[data-shape="square"] .logo, html[data-shape="square"] .stage, html[data-shape="square"] .boxes-in, html[data-shape="square"] .box-card, html[data-shape="square"] .event-card { border-radius: 4px; }
html[data-shape="square"] .btn.primary { box-shadow: 3px 3px 0 var(--brand-deep); }
html[data-shape="square"] .scallop, html[data-shape="soft"] .scallop { display: none; }

/* 頁首 */
html[data-hero="center"] .hero-inner { flex-direction: column; text-align: center; }
html[data-hero="center"] .brand { flex-direction: column; }
html[data-hero="center"] .hero-actions { justify-content: center; }
html[data-hero="banner"] .hero { background: var(--brand); }
html[data-hero="banner"] .hero h1, html[data-hero="banner"] .tagline { color: #fff; }
html[data-hero="banner"] .tagline { opacity: .9; }
html[data-hero="banner"] .hero .btn.primary { background: #fff; color: var(--brand-deep); }
html[data-hero="banner"] .scallop { display: none; }

/* 作品卡片 */
html[data-card="outline"] .card { box-shadow: none; border: 2px solid var(--ink); }
html[data-card="outline"] .card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--brand); border-color: var(--ink); }
html[data-card="flat"] .card { border-color: transparent; background: transparent; }
html[data-card="flat"] .card .thumb { border-radius: var(--radius); }
html[data-card="flat"] .card:hover { box-shadow: none; background: var(--card); }
html[data-card="polaroid"] .card { background: #fff; border: 0; padding: 8px 8px 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); border-radius: 4px; }
html[data-card="polaroid"] .card:nth-child(odd):hover { transform: rotate(-1.5deg) translateY(-3px); }
html[data-card="polaroid"] .card:nth-child(even):hover { transform: rotate(1.5deg) translateY(-3px); }

/* 版面 */
@media (min-width: 960px) {
  html[data-side="right"] .layout { grid-template-columns: minmax(0, 1fr) 370px; }
  html[data-side="right"] .fitting { order: 2; }
}
html[data-density="compact"] .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
html[data-density="large"] .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }

/* ---------------------------------------------------------------- 會員、訂單、衣櫃、活動 */
.btn.acct { gap: 6px; max-width: 180px; }
.btn.acct span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.acct img { width: 24px; height: 24px; border-radius: 50%; }
.btn.acct svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.modal-panel.wide { width: min(980px, 100%); grid-template-columns: 1fr; }
.mb { display: grid; gap: 10px; padding: 22px 20px 22px; }
.mb h2 { font-size: 22px; color: var(--brand-deep); padding-right: 36px; }
.mb h3 { font-size: 16px; margin-top: 8px; color: var(--brand-deep); }
.mb-sub { font-size: 13.5px; color: var(--ink-soft); }
.mb-form { display: grid; gap: 8px; }
.mb-row { display: flex; gap: 8px; flex-wrap: wrap; }
.providers { display: grid; gap: 8px; }
.btn.provider { background: #fff; border-color: var(--line); color: var(--ink); justify-content: center; text-decoration: none; }
.btn.provider.p-line { background: #06c755; border-color: #06c755; color: #fff; }
.btn.provider.p-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn.provider:hover { filter: brightness(.96); }

.events { max-width: 1240px; margin: 0 auto; padding: 12px 20px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.event-card { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1.5px dashed var(--brand-line); border-radius: 16px; padding: 10px 14px; }
.event-tag { flex: none; background: var(--brand); color: #fff; font-size: 12px; border-radius: 999px; padding: 2px 10px; margin-top: 2px; }
.event-card b { font: 400 16px var(--font-title); color: var(--brand-deep); }
.event-card p { font-size: 13.5px; }
.event-card em { font-style: normal; font-weight: 700; color: var(--brand-deep); }
.event-card small { margin-left: 8px; color: var(--ink-soft); font-size: 12px; }
.event-desc { color: var(--ink-soft); }

.price-lines { display: grid; gap: 4px; font-size: 13.5px; margin: 6px 0; }
.price-lines > div { display: flex; justify-content: space-between; gap: 10px; }
.price-lines .off { color: #c0392b; }
.price-lines .gift { color: var(--ok); }
.price-lines .hint-line { color: var(--ink-soft); font-size: 12.5px; }
.price-lines .sum { font-weight: 700; font-size: 16px; border-top: 1.5px solid var(--line); padding-top: 6px; }
.foot-note { font-size: 12px; color: var(--ink-soft); text-align: center; margin: 6px 0 8px; }
.foot-note:empty { display: none; }
#cartFoot #copyOrder { min-height: 38px; font-size: 13px; margin-bottom: 8px; }
.foot-links { display: flex; gap: 16px; justify-content: center; margin-top: 8px; }
.status { display: inline-block; font-size: 12px; border-radius: 999px; padding: 1px 10px; background: var(--brand-soft); color: var(--brand-deep); white-space: nowrap; }
.status.s-paid, .status.s-done { background: #e3f5ea; color: #2b7a4f; }
.status.s-reported { background: #fff3d6; color: #8a5a00; }
.status.s-cancel { background: #eee; color: #777; }
.ord-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ord-items li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 14px; }
.ord-items code, .look-items code { font-size: 12px; background: var(--brand-soft); color: var(--brand-deep); padding: 0 6px; border-radius: 6px; }
.ord-items b { font-weight: 500; }
.ord-list { display: grid; gap: 6px; }
.ord-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 12px; min-height: 52px; }
.ord-list button:hover { border-color: var(--brand); }
.ord-list small { display: block; font-size: 12px; color: var(--ink-soft); }
.pay-list { display: grid; gap: 6px; }
.pay-item { background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 12px; font-size: 13.5px; }
.pay-item pre { margin: 4px 0 0; white-space: pre-wrap; font: inherit; overflow-wrap: anywhere; }
.pay-qr { display: block; width: 180px; max-width: 100%; margin-top: 6px; border-radius: 10px; }
.pay-ok { background: #e3f5ea; color: #2b7a4f; border-radius: 12px; padding: 8px 12px; font-size: 13.5px; }
.gift-codes { display: grid; gap: 6px; }
.gift-codes button { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: #fff8e4; border: 1.5px dashed #e0b84a; border-radius: 12px; padding: 8px 12px; min-height: 44px; }
.gift-codes code { font: 700 16px ui-monospace, Menlo, monospace; letter-spacing: 1px; }
.gift-codes span { font-size: 12px; color: var(--ink-soft); }

.closet-bar { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; background: var(--cream); padding: 6px 0; }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 12px; }
.look { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 10px; }
.look-stage { position: relative; width: 116px; height: 116px; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #dff1ff, #f3fbff 60%, #b9e6a8 60%); }
.look-body { display: grid; gap: 6px; min-width: 0; align-content: start; }
.look-name { border: 1.5px solid transparent; background: transparent; font: 400 16px var(--font-title); color: var(--brand-deep); border-radius: 8px; padding: 2px 6px; width: 100%; }
.look-name:hover, .look-name:focus { border-color: var(--line); background: #fff; }
.look-when { font-size: 12.5px; color: var(--ink-soft); }
.look-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.look-items label { display: grid; grid-template-columns: auto 26px minmax(0, 1fr) auto; gap: 6px; align-items: center; font-size: 13px; min-height: 30px; }
.look-items input { width: 17px; height: 17px; accent-color: var(--brand); }
.look-items img { width: 26px; height: 26px; object-fit: contain; image-rendering: pixelated; }
.look-items span { overflow-wrap: anywhere; line-height: 1.35; }
.look-items small { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.look-total { font-size: 13px; font-weight: 700; }
.look-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.look-actions .btn { min-height: 34px; padding: 2px 12px; font-size: 13px; }
@media (max-width: 959px) { .events { padding: 10px 12px 0; } .look { grid-template-columns: 88px minmax(0, 1fr); } .look-stage { width: 88px; height: 88px; } }
