/* 蜂鋪商城（v2/layout/base.php）。商家活動頁另用 merchant.css */
:root {
    --ink: #1C1917;
    --ink-2: #57534E;
    --ink-3: #78716C;
    --honey: #F5A50A;
    --honey-soft: #FEF3D6;
    --price: #C81E1E;
    --line: #E7E5E4;
    --bg: #FAFAF9;
    --card: #FFFFFF;
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 20px;
    --tap: 44px;
    --shadow: 0 1px 2px rgba(28, 25, 23, .06), 0 4px 16px rgba(28, 25, 23, .06);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--ink); color: #fff; border-radius: var(--r-sm); }
.show-sm { display: none; }
@media (max-width: 767px) {
    .hide-sm { display: none !important; }
    .show-sm { display: flex; }
}

/* 按鈕、標籤 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 999px; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-line { background: #fff; color: var(--ink); border-color: var(--honey); }
.btn-line:hover { background: var(--honey-soft); }
.btn-block { width: 100%; min-height: var(--tap); }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.5; }
.badge-red { background: var(--price); color: #fff; }
.badge-honey { background: var(--honey-soft); color: #8A5A00; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.icon-btn:hover { background: var(--bg); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--price); color: #fff; font-size: 12px; font-weight: 700; }

/* header：上方黑色細條會捲走，logo／搜尋／選單這兩列固定在畫面頂端（top 由 hive.js 依細條高度設定） */
.site-header { position: sticky; top: var(--topbar-h, -36px); z-index: 50; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.is-stuck { box-shadow: 0 4px 20px rgba(28, 25, 23, .08); }
.topbar { background: var(--ink); color: #E7E5E4; font-size: 13px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.topbar a { text-decoration: none; padding: 6px 0; }
.topbar a:hover, .topbar a[aria-current] { color: var(--honey); }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; }
.hello { color: #fff; }
.header-main { display: flex; align-items: center; gap: 8px 24px; min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.menu-btn, .search-toggle { display: none; }
.logo { flex: none; display: flex; align-items: center; }
.logo img { height: 44px; width: auto; }
.search { flex: 1; min-width: 0; max-width: 680px; margin: 0 auto; }
.search-box { display: flex; align-items: stretch; height: var(--tap); border: 2px solid var(--honey); border-radius: 999px; overflow: hidden; background: #fff; }
.search-box select { flex: none; max-width: 30%; padding: 0 6px 0 14px; border: 0; border-right: 1px solid var(--line); background: var(--honey-soft); font-size: 14px; cursor: pointer; }
.search-box .search-cat { background: #fff; }
.search-box input { flex: 1; min-width: 0; padding: 0 14px; border: 0; font-size: 16px; outline: 0; }
.search-box button { flex: none; width: 56px; border: 0; background: var(--honey); color: var(--ink); cursor: pointer; }
.search-box:focus-within { box-shadow: 0 0 0 3px rgba(245, 165, 10, .25); }
.bee-btn { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 16px; border-radius: 999px; background: var(--honey); color: var(--ink); font-weight: 700; text-decoration: none; }
.bee-btn:hover, .bee-btn[aria-current] { background: #E09400; }
.mainnav { border-top: 1px solid var(--line); }
.mainnav-inner { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.mainnav-inner > a, .cat-menu summary { display: flex; align-items: center; min-height: 48px; padding: 0 14px; font-weight: 500; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; cursor: pointer; }
.mainnav-inner > a:hover, .cat-menu summary:hover { color: #B87800; }
.mainnav-inner > a[aria-current], .cat-menu summary[aria-current] { border-bottom-color: var(--honey); font-weight: 700; }
.cat-menu { position: static; }
.cat-menu summary { list-style: none; gap: 6px; }
.cat-menu summary::-webkit-details-marker { display: none; }
.cat-menu summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.cat-menu-list { position: absolute; z-index: 30; margin-top: 2px; min-width: 220px; max-height: 70vh; overflow: auto; padding: 8px; border-radius: var(--r-md); background: #fff; box-shadow: 0 12px 40px rgba(28, 25, 23, .16); display: grid; }
.cat-menu-list a, .side-nav a, .drawer-nav a, .drawer-nav summary { display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 12px; border-radius: var(--r-sm); text-decoration: none; }
.cat-menu-list a:hover, .side-nav a:hover, .drawer-nav a:hover { background: var(--honey-soft); }
.cat-menu-list a[aria-current], .side-nav a[aria-current], .drawer-nav a[aria-current] { background: var(--honey-soft); font-weight: 700; color: #8A5A00; }

/* 手機選單 */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(28, 25, 23, .45); }
.drawer-panel { width: min(320px, 86vw); height: 100%; overflow-y: auto; background: #fff; padding: 12px 12px 32px; box-shadow: 8px 0 32px rgba(0, 0, 0, .2); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.drawer-head img { height: 38px; width: auto; }
.drawer-nav { display: grid; gap: 2px; }
.drawer-nav summary { list-style: none; cursor: pointer; font-weight: 500; }
.drawer-nav summary::-webkit-details-marker { display: none; }
.drawer-nav summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.drawer-nav details[open] summary::after { transform: rotate(-135deg); }
.drawer-nav details a { padding-left: 28px; font-size: 15px; }
.drawer-bee { background: var(--honey); font-weight: 700; }
.drawer-bee:hover { background: #E09400 !important; }

@media (max-width: 1023px) {
    .search-box .search-cat { display: none; }
}
/* 手機：固定的是「選單、logo、搜尋鈕、蜜蜂專區」這一列；搜尋框在頁面最上方時顯示，捲下去後點搜尋鈕展開 */
@media (max-width: 767px) {
    .header-main { flex-wrap: wrap; gap: 4px; min-height: 0; padding-top: 6px; padding-bottom: 6px; }
    .menu-btn, .search-toggle { display: inline-flex; }
    .menu-btn { margin-left: -10px; }
    .logo { margin-right: auto; }
    .logo img { height: 36px; }
    .search { flex-basis: 100%; max-width: none; order: 5; padding: 4px 0 6px; }
    .search-scope { max-width: 38% !important; }
    .site-header.is-stuck .search:not(.is-open) { display: none; }
    .site-header:not(.is-stuck) .search-toggle { display: none; }
    .bee-btn { width: var(--tap); padding: 0; justify-content: center; }
    .bee-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .bee-btn .count { position: absolute; top: -4px; right: -6px; }
}

/* 共用區塊 */
.section { margin: 32px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { position: relative; margin: 0; padding-left: 14px; font-size: 20px; line-height: 1.35; }
.section-title::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 3px; background: var(--honey); }
.section-title a { text-decoration: none; }
.more { flex: none; display: inline-flex; align-items: center; min-height: var(--tap); font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.more::after { content: "›"; margin-left: 4px; font-size: 18px; }
.more:hover { color: #B87800; }
.empty { padding: 40px 16px; text-align: center; color: var(--ink-3); }

/* 商品卡（v2_card） */
.grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.grid-cards-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 479px) {
    .grid-cards, .grid-cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--card); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(28, 25, 23, .06), 0 10px 28px rgba(28, 25, 23, .10); }
.card-img { position: relative; display: block; aspect-ratio: 1; background: var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-badge { position: absolute; left: 8px; top: 8px; }
.card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 10px 12px 12px; }
.card-shop { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; font-size: 15px; line-height: 1.45; font-weight: 500; text-decoration: none; }
.card-name:hover { color: #B87800; }
.card-price-row { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.price { font-size: 19px; font-weight: 700; color: var(--price); }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.card-actions .btn { padding: 0 6px; font-size: 13px; }
.card-shared { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 40px; border-radius: 999px; background: var(--honey-soft); color: #8A5A00; font-size: 13px; font-weight: 700; }
@media (max-width: 479px) {
    .card-actions { grid-template-columns: 1fr; }
}

/* 橫向捲動列（專區、影音） */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: max(200px, calc((100% - 48px) / 4)); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; margin: -4px -2px 0; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
@media (max-width: 991px) { .rail { grid-auto-columns: max(180px, calc((100% - 32px) / 3)); } }
@media (max-width: 599px) { .rail { grid-auto-columns: 46%; gap: 10px; } }

/* 首頁 */
.home-hero { padding-top: 16px; }
.home-hero-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 767px) { .home-hero-grid { grid-template-columns: minmax(0, 1fr); } }
.side-nav { display: grid; gap: 2px; padding: 10px; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow); }
.side-nav-title { margin: 4px 12px 6px; font-size: 15px; }
.carousel { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--line); box-shadow: var(--shadow); }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: start; }
.carousel-slide img { width: 100%; aspect-ratio: 825 / 478; object-fit: cover; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 2px; }
.carousel-dots button { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.carousel-dots button::before { content: ""; display: block; width: 8px; height: 8px; margin: auto; border-radius: 999px; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); transition: width .2s; }
.carousel-dots button[aria-selected="true"]::before { width: 20px; background: #fff; }
@media (max-width: 599px) { .carousel-arrow { display: none; } .carousel { border-radius: var(--r-md); } }
.chips { gap: 8px; overflow-x: auto; margin: 14px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
.chip { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 500; text-decoration: none; }
.chip:hover { border-color: var(--honey); background: var(--honey-soft); }
.video-card { display: grid; gap: 8px; text-decoration: none; }
.video-thumb { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; background: #000; }
.video-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .92; transition: opacity .15s; }
.video-card:hover .video-thumb img { opacity: 1; }
.video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(200, 30, 30, .92); color: #fff; }
.video-title { font-size: 14px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid-partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.grid-partners a { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 8px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); }
.grid-partners img { max-height: 56px; width: auto; }

/* 分頁 */
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; }
.pager a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); height: var(--tap); padding: 0 10px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 500; }
.pager a:hover { border-color: var(--honey); }
.pager a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* 對話框、提示 */
.dialog { width: min(520px, calc(100% - 32px)); padding: 24px; border: 0; border-radius: var(--r-lg); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.dialog::backdrop { background: rgba(28, 25, 23, .5); }
.dialog-title { margin: 0 0 10px; font-size: 19px; }
.dialog-body { margin: 0 0 20px; line-height: 1.8; color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer; box-shadow: var(--shadow); }

/* footer */
.site-footer { margin-top: 48px; padding: 28px 0 24px; background: var(--ink); color: #D6D3D1; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: var(--tap); font-size: 14px; text-decoration: none; }
.footer-nav a:hover { color: var(--honey); }
.copy { margin: 12px 0 0; font-size: 12px; color: #A8A29E; }

/* 列表頁（分類、搜尋、熱銷、限時、精選、專區） */
.list-page { padding-top: 16px; }
.list-page.with-side { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.list-page.with-side aside { position: sticky; top: 132px; }
@media (max-width: 767px) { .list-page.with-side { grid-template-columns: minmax(0, 1fr); } }
.list-main { min-width: 0; }
.list-main .chips { margin-top: 0; margin-bottom: 8px; }
.chip[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; }
.crumbs a:hover { color: #B87800; }
.list-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin: 4px 0 18px; }
.list-title { margin: 0; font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
.list-count { margin: 4px 0 0; font-size: 14px; color: var(--ink-3); }
.list-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.list-tools label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.list-tools select { min-height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2378716C' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; -webkit-appearance: none; font-size: 14px; cursor: pointer; }
@media (max-width: 767px) { .list-title { font-size: 20px; } }

/* 內容頁（關於我們、聯絡我們、常見問題、訂單查詢、隱私權…） */
.page-narrow { max-width: 880px; padding-top: 16px; }
.page-narrow .list-title { margin: 4px 0 16px; }
.prose { padding: 20px 22px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); line-height: 1.85; color: var(--ink-2); overflow-wrap: anywhere; }
.prose img { height: auto; margin: 0 auto; }
.prose table { max-width: 100%; display: block; overflow-x: auto; }
.prose a { color: #B87800; }
.legal { white-space: pre-line; font-size: 15px; }
.chips-wrap { display: flex; flex-wrap: wrap; overflow: visible; margin: 0 0 16px; padding: 0; }
.faq { display: grid; gap: 10px; }
.faq-item { border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.faq-item summary { display: flex; align-items: flex-start; gap: 12px; min-height: 56px; padding: 16px 48px 16px 18px; list-style: none; cursor: pointer; font-weight: 500; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: 20px; top: 22px; width: 8px; height: 8px; border: solid var(--ink-3); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(-135deg); top: 26px; }
.faq-item summary:hover { background: var(--honey-soft); }
.faq-no { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 999px; background: var(--honey); font-size: 13px; font-weight: 700; }
.faq-answer { border-radius: 0; box-shadow: none; padding-top: 0; }
.form-card { margin-top: 20px; padding: 20px 22px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); }
.form-card .section-title { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px 16px; }
.field { display: grid; gap: 6px; min-width: 0; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field em { color: var(--price); font-style: normal; }
.field-wide { grid-column: 1 / -1; }
.field input, .field textarea { width: 100%; min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 16px; font-weight: 400; color: var(--ink); }
.field textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--honey); outline-offset: 0; border-color: var(--honey); }
.captcha-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.captcha-row input { flex: 1 1 120px; width: auto; }
.captcha-row img { border-radius: 6px; border: 1px solid var(--line); }
.btn-lg { min-height: 48px; padding: 0 28px; font-size: 16px; }
.btn:disabled { opacity: .6; cursor: progress; }
.notice { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--r-sm); font-weight: 500; }
.notice-ok { background: #ECFDF3; color: #166534; }
.notice-err { background: #FEF2F2; color: #991B1B; }

/* 帳號頁（登入、註冊、忘記密碼、重設密碼、重發驗證信） */
.auth-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 24px; align-items: start; max-width: 980px; padding-top: 24px; }
.auth-single { grid-template-columns: minmax(0, 480px); justify-content: center; }
@media (max-width: 767px) { .auth-page { grid-template-columns: minmax(0, 1fr); } .auth-page .bee-promo { order: 2; } }
.auth-card { padding: 24px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow); }
.auth-card .list-title { margin: 0 0 16px; }
.auth-form { display: grid; gap: 14px; }
.auth-form .cf-turnstile { margin: 0 !important; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin: 16px 0 0; font-size: 14px; }
.auth-links a { display: inline-flex; align-items: center; min-height: var(--tap); color: #8A5A00; }
.bee-promo { padding: 28px 24px; border-radius: var(--r-lg); background: linear-gradient(135deg, #FDE68A, var(--honey)); color: var(--ink); }
.bee-promo h2 { margin: 0 0 6px; font-size: 24px; }
.bee-promo p { margin: 0 0 18px; font-size: 16px; }
.bee-promo-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bee-promo .btn-line { border-color: var(--ink); background: rgba(255, 255, 255, .7); }
.reg-step { display: grid; gap: 14px; }
.reg-step + .reg-step { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.reg-step-title { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; }
.reg-otp-send { display: grid; gap: 10px; }
.field-err { font-size: 13px; font-weight: 500; color: var(--price); }
.field-err:empty { display: none; }
.field select, .addr-row select { width: 100%; min-height: var(--tap); padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2378716C' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; -webkit-appearance: none; font-size: 16px; font-weight: 400; color: var(--ink); }
.field input[type="date"] { min-width: 0; }
.field input[readonly] { background: var(--bg); color: var(--ink-3); }
.field small { font-weight: 400; color: var(--ink-3); }
.field-static { margin: 0; min-height: var(--tap); display: flex; align-items: center; font-size: 16px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.check { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: var(--tap); font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--honey); }
.link-btn { padding: 0; border: 0; background: none; color: #8A5A00; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dialog-wide { width: min(720px, calc(100% - 32px)); max-height: calc(100% - 48px); }
.prose-plain { max-height: 60vh; overflow-y: auto; overflow-wrap: anywhere; }
.prose-plain img { height: auto; }

/* 蜜蜂專區（分享清單、請款、修改資料） */
.bee-head { background: linear-gradient(135deg, #FEF3D6, #FDE68A); border-bottom: 1px solid #F3D38A; }
.bee-head-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 18px; padding-bottom: 18px; }
.bee-hello p { margin: 0; }
.bee-hello strong { font-size: 19px; }
.bee-id { font-size: 13px; color: var(--ink-2); }
.bee-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.bee-tab { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: rgba(255, 255, 255, .75); font-size: 14px; font-weight: 500; text-decoration: none; }
.bee-tab:hover { background: #fff; }
.bee-tab[aria-current] { background: var(--ink); color: #fff; font-weight: 700; }
.bee-tab-out { color: var(--ink-3); }
@media (max-width: 767px) { .bee-tabs { width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px; } }
.bee-page { padding-top: 20px; }
.list-count a { color: #8A5A00; }
.filter-bar { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px 12px; align-items: end; margin-bottom: 16px; padding: 16px; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow); }
.filter-bar .filter-kw { grid-column: span 2; }
.filter-bar .btn { grid-column: span 2; }
@media (min-width: 768px) { .filter-bar .btn { grid-column: auto; } }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.share-list { display: grid; gap: 12px; }
.share-item { display: grid; grid-template-columns: auto 120px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow); }
.share-item.is-off { opacity: .72; }
.share-check { display: flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); margin: -8px 0 0 -8px; cursor: pointer; }
.share-check input { width: 20px; height: 20px; accent-color: var(--honey); }
.share-img { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); background: var(--line); }
.share-meta { margin: 0; font-size: 12px; color: var(--ink-3); }
.badge-gray { background: var(--line); color: var(--ink-2); }
.share-name { margin: 4px 0 2px; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.share-shop { margin: 0; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.share-link { grid-column: 3; display: grid; gap: 8px; min-width: 0; }
.share-link > a { font-size: 13px; color: #8A5A00; overflow-wrap: anywhere; }
.share-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.share-stats { grid-column: 4; grid-row: 1 / span 2; margin: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 6px 16px; min-width: 200px; }
.share-stats div { display: grid; }
.share-stats dt { font-size: 12px; color: var(--ink-3); }
.share-stats dd { margin: 0; font-weight: 700; }
.share-stats .price { font-size: 17px; }
@media (max-width: 767px) {
    .share-item { grid-template-columns: auto 88px minmax(0, 1fr); }
    .share-img { width: 88px; }
    .share-link { grid-column: 1 / -1; }
    .share-stats { grid-column: 1 / -1; grid-row: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-top: 10px; border-top: 1px solid var(--line); min-width: 0; }
}
@media (max-width: 399px) { .share-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bonus-bar { position: sticky; top: 76px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--ink); color: #fff; box-shadow: var(--shadow); }
@media (min-width: 768px) { .bonus-bar { top: 132px; } }
.bonus-sum p { margin: 0; font-size: 14px; }
.bonus-sum strong { font-size: 18px; }
.bonus-sum .price { color: #FFD02F; }
.bonus-sum small { color: #A8A29E; }
.bonus-bar .btn-ink { background: var(--honey); color: var(--ink); }
.table-wrap { overflow-x: auto; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { background: var(--bg); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.data-table .num { text-align: right; white-space: nowrap; }
.data-table .col-check { width: 48px; }
.data-table .col-check input { width: 20px; height: 20px; accent-color: var(--honey); }
.data-table tr.is-done td { color: var(--ink-3); }
@media (max-width: 767px) {
    .table-wrap { background: none; box-shadow: none; overflow: visible; }
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
    .data-table tr { position: relative; margin-bottom: 10px; padding: 8px 14px 8px 56px; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow); }
    .data-table td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border: 0; }
    .data-table td::before { content: attr(data-label); flex: none; color: var(--ink-3); font-size: 13px; }
    .data-table td.col-check { position: absolute; left: 12px; top: 10px; width: auto; padding: 0; }
    .data-table td.col-check::before { display: none; }
}
.addr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.bee-save { margin-top: 20px; }

/* 下滑自動載入 */
.infinite-status { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 72px; margin-top: 16px; font-size: 14px; color: var(--ink-3); }
.spinner { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--honey); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* 錯誤頁（v2/layout/error.php） */
.err-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--honey-soft), var(--bg) 60%); }
.err-page { width: 100%; padding: 32px 16px; }
.err-card { max-width: 440px; margin: 0 auto; padding: 36px 28px; border-radius: var(--r-lg); background: #fff; box-shadow: 0 10px 40px rgba(28, 25, 23, .10); text-align: center; }
.err-icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--honey-soft); color: #B87800; }
.err-title { margin: 18px 0 8px; font-size: 22px; }
.err-text { margin: 0 0 24px; color: var(--ink-2); line-height: 1.8; }
