/* 兔兔商城官網。全站樣式都在這裡，不共用開店管家的 theme.css */
:root {
  color-scheme: dark;
  --bg: #0a0e17;
  --panel: #121926;
  --panel-2: #192233;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #eff3f9;
  --muted: #98a4b8;
  --moon: #ffd98a;
  --moon-deep: #f0b34e;
  --teal: #5de4d0;
  --blurple: #5865f2;
  --green: #5ee0a0;
  --red: #ff8080;
  --radius: 14px;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; margin: 0; }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; background: var(--bg); color: var(--text); font-family: -apple-system, "PingFang TC", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans TC", sans-serif; line-height: 1.6; }
/* 背景：深色底、兩道柔光，右上角的方塊是商標耳朵散開的那些方塊 */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: url(/pixels.svg) right top / min(1440px, 180vw) auto no-repeat, radial-gradient(760px 460px at 88% -8%, rgba(255, 217, 138, .14), transparent 72%), radial-gradient(720px 480px at -6% 12%, rgba(88, 101, 242, .13), transparent 70%); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--moon); text-decoration: none; }
a:hover { color: #ffe7b5; }
:focus-visible { outline: 2px solid var(--moon); outline-offset: 2px; }
h1 { margin: 0; font-size: clamp(26px, 4.4vw, 34px); line-height: 1.3; letter-spacing: .01em; }
h2 { margin: 0 0 14px; font-size: 17px; }
.lead { margin: 6px 0 0; color: var(--muted); }
small { font-size: 13px; }

/* 頁首 */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(10, 14, 23, .82); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.topbar .in { display: flex; align-items: center; gap: 8px 22px; max-width: var(--wrap); margin: 0 auto; padding: 11px 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 800; font-size: 17px; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand img { display: block; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.nav { display: flex; gap: 2px; margin-right: auto; }
.nav a { padding: 7px 12px; border-radius: 9px; color: var(--muted); font-size: 15px; white-space: nowrap; }
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--text); background: rgba(255, 255, 255, .07); }
.who { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.who .bal { padding: 6px 11px; border-radius: 9px; background: rgba(255, 217, 138, .1); color: var(--moon); font-size: 14px; font-weight: 700; white-space: nowrap; }
.who .ava { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--panel-2); }
.who button { padding: 6px 4px; border: 0; background: none; color: var(--muted); font-size: 14px; cursor: pointer; white-space: nowrap; }
.who button:hover { color: var(--text); }
.announce { background: #1d1c1c; border-bottom: 1px solid rgba(255, 217, 138, .18); color: var(--moon); font-size: 14px; }
.announce div { max-width: var(--wrap); margin: 0 auto; padding: 8px 16px; }

/* 版面 */
.page { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 32px 16px 64px; display: grid; gap: 22px; align-content: start; }
.page > * { min-width: 0; }
.page.doc { max-width: 800px; }
.page.center { max-width: 460px; align-content: center; }
.back { color: var(--muted); font-size: 14px; }
.panel { padding: 22px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.state { padding: 28px 0; color: var(--muted); text-align: center; }

/* 頁尾 */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot .in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; max-width: var(--wrap); margin: 0 auto; padding: 22px 16px 28px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
.foot nav { display: flex; gap: 18px; }

/* 按鈕 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 20px; border: 0; border-radius: 11px; background: var(--moon); color: #241a06; font-weight: 700; font-size: 15px; line-height: 1.4; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { background: #ffe7b5; color: #241a06; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.wide { display: flex; width: 100%; padding: 13px 20px; }
.btn.quiet { background: rgba(255, 255, 255, .08); color: var(--text); }
.btn.quiet:hover { background: rgba(255, 255, 255, .14); color: var(--text); }
.btn.discord { background: var(--blurple); color: #fff; }
.btn.discord:hover { background: #6d78f5; color: #fff; }
.btn.sm { padding: 7px 13px; font-size: 14px; border-radius: 9px; }
.btn svg { flex: none; width: 20px; height: 20px; fill: currentColor; }

/* 表單 */
form { display: grid; gap: 14px; }
.f { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=search], select { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, .28); color: var(--text); font-size: 16px; outline: none; }
input:focus, select:focus { border-color: var(--moon); }
input:disabled { color: var(--muted); }
select option { background: var(--panel); }
input[type=radio], input[type=checkbox] { accent-color: var(--moon-deep); }
.err { min-height: 20px; color: var(--red); font-size: 14px; }
.ok { min-height: 20px; color: var(--green); font-size: 14px; }
.hint { margin: 0; color: var(--muted); font-size: 14px; }
.agree { display: flex; gap: 9px; align-items: flex-start; color: var(--muted); font-size: 14px; line-height: 1.6; }
.agree input { margin-top: 4px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.choices label { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); font-size: 14px; cursor: pointer; }
.choices label:has(input:checked) { border-color: var(--moon); background: rgba(255, 217, 138, .08); }
.choices label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--muted); font-size: 14px; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--moon); border-color: var(--moon); color: #241a06; font-weight: 700; }

/* 首頁 */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 44px 0 30px; }
.hero h1 { font-size: clamp(34px, 6vw, 54px); line-height: 1.18; letter-spacing: .01em; }
.hero h1 em { color: var(--moon); font-style: normal; }
.hero .lead { max-width: 30em; margin-top: 16px; font-size: 17px; }
.hero .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero .acts .btn { padding: 13px 24px; font-size: 16px; }
.eyebrow { margin: 0 0 12px; color: var(--teal); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.mascot { justify-self: center; width: min(320px, 62vw); }
.mascot svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 0 46px rgba(255, 217, 138, .28)); }
.perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.perk { padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.perk b { display: block; margin-bottom: 2px; }
.perk span { color: var(--muted); font-size: 14px; }
.sect { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sect h2 { margin: 0; font-size: 22px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; counter-reset: s; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: s; padding: 18px 20px; border-left: 3px solid var(--moon); background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted); font-size: 14px; }
.steps li::before { content: "步驟 " counter(s); display: block; color: var(--moon); font-size: 13px; font-weight: 700; }
.steps b { display: block; color: var(--text); font-size: 16px; }

/* 商品列表 */
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 10px; align-items: center; }
.instock { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; white-space: nowrap; cursor: pointer; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 14px; }
.grid > .state { grid-column: 1 / -1; }
.card { display: flex; flex-direction: column; min-height: 170px; padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: border-color .15s, transform .15s, background .15s; }
a.card:hover { color: var(--text); border-color: rgba(255, 217, 138, .5); background: var(--panel-2); transform: translateY(-2px); }
.card small { color: var(--muted); }
.card b { margin: 2px 0 14px; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.card .bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; }
.price { color: var(--moon); font-size: 25px; font-weight: 800; line-height: 1.2; }
.stock { padding: 2px 9px; border-radius: 999px; background: rgba(94, 224, 160, .12); color: var(--green); font-size: 13px; white-space: nowrap; }
.card.out { opacity: .55; }
.card.out .stock { background: rgba(255, 255, 255, .08); color: var(--muted); }

/* 商品頁 */
.buy { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.summary { position: sticky; top: 80px; display: grid; gap: 16px; }
.specs { display: grid; gap: 8px; margin-top: 16px; }
.spec { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 13px 15px; border-radius: 11px; border: 1px solid var(--line-strong); background: none; text-align: left; cursor: pointer; }
.spec:hover { border-color: rgba(255, 217, 138, .5); }
.spec.on { border-color: var(--moon); background: rgba(255, 217, 138, .08); }
.spec:disabled { opacity: .5; cursor: not-allowed; }
.spec span { min-width: 0; overflow-wrap: anywhere; }
.spec small { display: block; color: var(--muted); }
.spec em { flex: none; color: var(--moon); font-style: normal; font-weight: 800; font-size: 18px; }
.stepper { display: inline-grid; grid-template-columns: 38px 48px 38px; align-items: center; }
.stepper button { height: 38px; border: 1px solid var(--line-strong); border-radius: 9px; background: none; font-size: 18px; cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { text-align: center; font-weight: 700; }
.line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.line.total { padding-top: 14px; border-top: 1px solid var(--line); }
.line.total b { color: var(--moon); font-size: 28px; line-height: 1.2; }
.rules { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.85; }

/* 客戶專區 */
.shell { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 26px; align-items: start; }
.shell > .main { display: grid; gap: 18px; min-width: 0; }
.side { position: sticky; top: 80px; display: grid; gap: 3px; }
.side a { padding: 9px 13px; border-radius: 9px; color: var(--muted); font-size: 15px; white-space: nowrap; }
.side a:hover { color: var(--text); }
.side a.on { color: var(--text); background: rgba(255, 255, 255, .07); font-weight: 700; }
.hello { display: flex; align-items: center; gap: 14px; }
.hello img { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--panel-2); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.stat small { display: block; color: var(--muted); }
.stat b { display: block; font-size: 27px; line-height: 1.3; }
.stat a { font-size: 14px; }
.stat.main-stat b { color: var(--moon); }
.notice { padding: 12px 15px; border-radius: 11px; background: rgba(255, 217, 138, .1); border: 1px solid rgba(255, 217, 138, .25); color: var(--moon); font-size: 14px; }
.rows { display: grid; }
.row { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); color: var(--text); }
a.row:hover { color: var(--moon); }
.row:first-child { border-top: 0; }
.row div { min-width: 0; overflow-wrap: anywhere; }
.row small { display: block; color: var(--muted); }
.row .num { flex: none; text-align: right; font-weight: 700; }
.plus { color: var(--green); }
.minus { color: var(--red); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bigprice { color: var(--moon); font-size: 36px; font-weight: 800; line-height: 1.25; }

/* 登入 */
.auth { padding: 32px 26px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.auth .logo { display: block; width: 92px; height: 92px; margin: 0 auto 16px; animation: float 4s ease-in-out infinite; }
.auth .btn { margin-top: 22px; }
.auth ul { margin: 20px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; text-align: left; }
.auth li { padding: 7px 0 7px 22px; border-top: 1px solid var(--line); position: relative; }
.auth li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px; background: var(--teal); }
.auth .err { margin-top: 12px; min-height: 0; }
.who-card { display: flex; align-items: center; gap: 12px; margin: 16px 0 20px; padding: 11px 13px; border-radius: 11px; background: var(--panel-2); }
.who-card img { width: 38px; height: 38px; border-radius: 50%; }

/* 訂單頁 */
.detail h1 { font-size: 23px; }
.status { color: var(--moon); font-weight: 700; }
dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 16px; margin: 16px 0 0; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; user-select: all; }
.warn { margin-top: 14px; color: var(--moon); font-size: 14px; }
.detail .btn { margin-top: 16px; }

/* 條款 */
.legal { line-height: 1.9; }
.legal h1 { margin-bottom: 12px; }
.legal h2 { margin: 28px 0 8px; font-size: 18px; }
.legal p { margin: 8px 0; }
.legal ul { margin: 8px 0; padding-left: 22px; }
.legal li { margin: 4px 0; }

/* 會員等級 */
.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tier { position: relative; display: grid; gap: 2px; padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden; transition: transform .2s, border-color .2s; }
.tier:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.tier small { color: var(--muted); font-weight: 700; letter-spacing: .06em; }
.tier b { font-size: 19px; }
.tier span { color: var(--muted); font-size: 14px; }
.tier .off { color: var(--moon); font-weight: 700; }
.tier::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #dfe5ee; }
.t-member2::after { background: #b9c6d8; }
.t-member3::after { background: var(--moon); }
.t-agent::after { background: linear-gradient(90deg, var(--teal), var(--blurple)); }
.badge { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 217, 138, .14); color: var(--moon); font-size: 13px; font-weight: 700; vertical-align: middle; }
.bar { height: 8px; margin-top: 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; width: var(--w, 0); height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--moon-deep), var(--moon)); animation: grow 1s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
.price s, .spec s { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }

/* 動畫 */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes float { 50% { transform: translateY(-9px); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes ear-l { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(-7deg); } 95% { transform: rotate(3deg); } }
@keyframes ear-r { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(8deg); } 91% { transform: rotate(-3deg); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes bit { 0%, 100% { opacity: 1; transform: translate(0, 0); } 50% { opacity: .45; transform: translate(7px, -8px); } }
@keyframes drift { 50% { transform: translate(-2.5%, 2%) scale(1.05); } }
@keyframes shine { to { left: 130%; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } }
body::after { content: ""; position: fixed; inset: -10%; z-index: -1; pointer-events: none; background: radial-gradient(500px 340px at 74% 12%, rgba(93, 228, 208, .07), transparent 70%), radial-gradient(520px 360px at 18% 30%, rgba(255, 217, 138, .05), transparent 70%); animation: drift 16s ease-in-out infinite; }
.page > * { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.page > *:nth-child(2) { animation-delay: .07s; }
.page > *:nth-child(3) { animation-delay: .14s; }
.page > *:nth-child(n+4) { animation-delay: .2s; }
.auth { animation: pop .5s cubic-bezier(.2, .9, .3, 1.15) both; }
.card { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
.will { opacity: 0; transform: translateY(16px); }
.will.seen { opacity: 1; transform: none; transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.mascot svg { animation: float 4.5s ease-in-out infinite; }
.mark .ear { transform-box: fill-box; transform-origin: 50% 100%; }
.mark .ear-l { animation: ear-l 6s ease-in-out infinite; }
.mark .ear-r { animation: ear-r 7s ease-in-out infinite; }
.mark .eyes { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.mark .bits rect { animation: bit 3.2s ease-in-out infinite; }
.mark .bits rect:nth-child(2) { animation-delay: .5s; }
.mark .bits rect:nth-child(3) { animation-delay: 1s; }
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg); background: rgba(255, 255, 255, .28); opacity: 0; }
.btn:hover::after { opacity: 1; animation: shine .6s ease-out; }
.hero h1 em { background: linear-gradient(90deg, var(--moon), #ffefc9, var(--moon)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s linear infinite; }
@keyframes sheen { to { background-position: -200% 0; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .mascot { grid-row: 1; width: 170px; justify-self: start; }
  .perks, .steps { grid-template-columns: minmax(0, 1fr); }
  .tiers { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .buy, .split { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .shell { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .side { position: static; display: flex; overflow-x: auto; }
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .topbar .in { flex-wrap: wrap; }
  .brand { margin-right: auto; }
  .nav { order: 3; width: 100%; margin: 0 -4px; overflow-x: auto; }
  .toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .toolbar input[type=search] { grid-column: 1 / -1; }
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat.main-stat, .stat:nth-child(2) { grid-column: 1 / -1; }
  .page { padding-top: 22px; }
  .panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .will { opacity: 1; transform: none; }
}
