:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: #203c54;
  background: #f1f9fe;
  font-synthesis: none;
  --ink: #203c54;
  --muted: #59758a;
  --line: #d5e8f3;
  --accent: #0079b5;
  --wish: #f2a900;
  --wish-soft: #fff8e1;
  --wish-text: #7a5200;
  --owned: #0a5fa8;
  --owned-hover: #084a84;
  --owned-soft: #dff1ff;
  --soft: #e3f5ff;
  --sky: #39baf0;
  --accent-hover: #00689c;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
body { background-image: radial-gradient(circle at 85% 0, #dff5ff 0, transparent 540px), linear-gradient(120deg, transparent 78%, #d9eef94d 78%, #d9eef94d 78.08%, transparent 78.08%); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a, input, select, summary, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.topbar {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 86px;
  padding: 0 max(32px, calc((100vw - 1456px) / 2));
  background: #fff;
  border-top: 3px solid var(--sky);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 750; line-height: 1.4; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; background: var(--accent); color: #fff; font-size: 14px; letter-spacing: -.04em; }
.brand-mark { position: relative; border-radius: 2px 10px 2px 2px; }
.brand-mark::before { content: ""; position: absolute; width: 27px; height: 9px; border: 1.5px solid var(--sky); border-radius: 50%; top: -6px; right: -5px; transform: rotate(-18deg); background: #ffffffd9; }
.brand-sub { display: block; font-size: 11px; font-weight: 450; color: var(--muted); letter-spacing: .1em; }
.collection-toolbar { display: flex; align-items: center; gap: 15px; margin-left: auto; }
.collection-pill, .pill-action { border: 0; padding: 9px 0; background: transparent; font-size: 13px; }
.collection-pill { display: flex; align-items: center; gap: 8px; }
.collection-pill strong { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; background: #eaf4fb; border-radius: 3px; font-size: 11px; }
.collection-pill.active, .collection-pill:hover { color: var(--accent); }
.collection-pill.active strong { background: var(--accent); color: #fff; }
.pill-action { color: var(--muted); }
.pill-action:hover { color: var(--ink); }
main { max-width: 1520px; margin: auto; padding: 30px 32px 0; }
.intro-title { display: flex; align-items: baseline; gap: 16px; }
h1 { font-size: 30px; line-height: 1.4; letter-spacing: -.035em; margin: 0; font-weight: 700; color: var(--accent); }
.total-count { font-size: 12px; color: var(--muted); }
.total-count strong { font-weight: 500; }
.catalog-intro { position: relative; isolation: isolate; overflow: hidden; min-height: 176px; padding: 24px 28px; margin-bottom: 28px; border: 1px solid #c4e7f5; border-left: 3px solid var(--sky); background: linear-gradient(105deg, #fff 15%, #f0fbff 62%, #e4f7ff); }
.catalog-intro::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(90deg, var(--sky) 0 42px, transparent 42px 48px, #94d9f1 48px 68px, transparent 68px); }
.intro-copy { position: relative; z-index: 1; width: fit-content; max-width: 68%; }
.intro-themes { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; color: #297b9f; font-size: 11px; font-weight: 650; letter-spacing: .15em; }
.intro-themes i { color: #46b8de; font-size: 14px; font-weight: 400; font-style: normal; }
.intro-description { margin: 9px 0 0; color: #376b85; font-size: 13px; line-height: 1.8; }
.site-navigation { display: flex; align-items: center; gap: 24px; }
.site-navigation a, .site-navigation button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.site-navigation a:hover, .site-navigation button:hover, .site-navigation [aria-current="page"] { color: var(--accent); }
html:has(#changelog-dialog[open], #scope-dialog[open]) { overflow: hidden; }
#changelog-dialog, #scope-dialog { width: min(640px, calc(100vw - 32px)); overflow: hidden; }
#changelog-dialog[open], #scope-dialog[open] { display: flex; flex-direction: column; }
.scope-body { padding-top: 20px; }
.scope-body h3 { margin: 24px 0 8px; font-size: 14px; }
.scope-body p { margin: 0 0 12px; font-size: 14px; line-height: 1.85; color: var(--muted); }
@media (max-width: 1000px) {
  .topbar { flex-wrap: wrap; gap: 0 20px; padding-top: 14px; }
  .topbar .site-navigation { order: 3; flex-basis: 100%; justify-content: center; gap: 28px; }
}
.changelog-head { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #f1faff; }
.changelog-head h2 { margin: 0; font-size: 19px; }
.changelog-head h2:focus { outline: none; }
.changelog-head form { margin: 0; }
.changelog-close { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; }
.changelog-close:hover { color: var(--accent); border-color: var(--accent); }
.changelog-body { overflow: auto; overscroll-behavior: contain; padding: 4px 22px 24px; }
.changelog-day { padding: 20px 0; border-bottom: 1px solid var(--line); }
.changelog-day:last-child { padding-bottom: 0; border: 0; }
.changelog-day h3 { margin: 0 0 10px; font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; }
.changelog-day ul { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.85; }
.changelog-day li + li { margin-top: 6px; }
.intro-description span { display: block; color: var(--muted); font-size: 11px; }
.intro-art { position: absolute; right: 22px; top: 50%; width: min(44%, 460px); height: auto; transform: translateY(-50%); pointer-events: none; }
.catalog-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: max-content minmax(0, 1fr); grid-template-areas: "sidebar search" "sidebar results"; column-gap: 30px; align-items: start; }
.sidebar { grid-area: sidebar; position: sticky; top: var(--sidebar-top, 20px); }
.filter-panel { background: #fff; border: 1px solid var(--line); border-radius: 3px; }
.filter-panel > summary { display: none; }
.filter-content { padding: 22px 20px 18px; }
.filter-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.filter-heading h2 { color: var(--accent); margin: 0; font-size: 15px; font-weight: 650; }
.text-button { background: none; border: 0; padding: 0; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--accent); }
.filter-section { border-bottom: 1px solid #eaf4fb; padding-bottom: 20px; margin-bottom: 20px; }
.filter-section h3, .filter-label, .filter-fields label { display: block; font-size: 12px; font-weight: 650; margin: 0 0 10px; }
.catalog-search { grid-area: search; min-width: 0; margin-bottom: 20px; padding: 16px 18px; border: 1px solid #b5dcee; border-left: 3px solid var(--sky); border-radius: 3px; background: var(--soft); }
.catalog-control-label { display: block; margin-bottom: 9px; color: var(--accent); font-size: 13px; font-weight: 650; }
.catalog-search-controls { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: end; gap: 10px; }
.catalog-search-field, .catalog-sort { min-width: 0; }
.catalog-sort select { display: block; width: 100%; height: 52px; padding: 12px 30px 12px 12px; border: 1px solid #86c8e6; border-radius: 3px; background: #fff; color: var(--ink); font-size: 16px; }
.catalog-sort select:focus-visible { border-color: var(--accent); }
.search-wrap { position: relative; min-width: 0; }
.search-wrap input { border: 1px solid #86c8e6; border-radius: 3px; width: 100%; min-width: 0; height: 52px; padding: 12px 14px 12px 44px; background: #fff; color: var(--ink); font-size: 16px; }
.search-wrap input::placeholder { color: #59758a; }
.search-wrap input:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.6; pointer-events: none; }
.tabs { display: flex; flex-direction: column; gap: 4px; }
.category-group { min-width: 0; margin: 10px 0 0; padding: 0; border: 0; }
.category-group legend { padding: 0 10px; margin-bottom: 6px; color: var(--ink); font-size: 12px; font-weight: 650; }
.category-children { display: flex; flex-direction: column; gap: 4px; margin-left: 10px; padding-left: 6px; border-left: 1px solid var(--line); }
.category-branch { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.category-subchildren { display: flex; flex-direction: column; gap: 4px; margin-left: 10px; padding-left: 6px; border-left: 1px solid var(--line); }
.tab, .size-tab { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; min-height: 38px; border: 0; border-radius: 2px; background: transparent; color: #365a73; font-size: 13px; text-align: left; }
.size-tab { font-size: 12px; }
.tab span, .size-tab span { font-size: 11px; color: #59758a; font-variant-numeric: tabular-nums; }
.tab:hover, .size-tab:hover { background: #f0f9ff; }
.tab.active, .size-tab.active { background: var(--soft); color: var(--accent); font-weight: 650; }
.tab.active span, .size-tab.active span { color: var(--accent); }
.filter-fields select { display: block; width: 100%; min-width: 0; min-height: 39px; border: 1px solid #bedbea; border-radius: 3px; background: #fff; color: #203c54; padding: 8px 28px 8px 10px; font-size: 12px; text-overflow: ellipsis; }
.filter-fields label:not(:first-child) { margin-top: 18px; }
.ownership-filters { min-width: 0; margin-inline: 0; padding-inline: 0; border-top: 0; border-left: 0; border-right: 0; }
.ownership-filters legend { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 650; }
.ownership-filters .text-button:disabled { color: #8ba3b4; cursor: default; text-decoration: none; }
.ownership-option { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 6px 4px; border-radius: 3px; color: #365a73; font-size: 12px; cursor: pointer; }
.ownership-option:hover { background: #f0f9ff; }
.ownership-option:has(input:checked) { background: var(--soft); color: var(--accent); }
.ownership-option input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.ownership-count { margin-left: auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.ownership-filters .filter-note { margin-top: 8px; }
.filter-note { margin: 0; font-size: 11px; line-height: 1.7; color: #59758a; }
.mobile-filter-apply { display: none; }
.catalog-results { grid-area: results; min-width: 0; }
.result-row { min-height: 53px; display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 0 0 17px; }
.result-row h2 { font-size: 17px; margin: 0 0 6px; font-weight: 650; }
#result-count { margin: 0; font-size: 12px; color: var(--muted); }
.active-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 17px; }
.filter-chip { display: inline-flex; align-items: center; gap: 12px; padding: 6px 9px; border: 1px solid #b5dcee; border-radius: 3px; background: var(--soft); color: var(--accent); font-size: 11px; max-width: 100%; overflow-wrap: anywhere; }
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip span { font-size: 15px; color: #59758a; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 16px; }
.card { position: relative; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.card:hover { border-color: #42aee0; }
/* 已擁有：沿用蔚藍主題，以較深的藍色外框、頂條、淺藍底色與實心按鈕同步強調，縮圖瀏覽時也能一眼辨識。 */
.card.is-owned { border-color: var(--owned); box-shadow: 0 0 0 2px var(--owned); background: var(--owned-soft); }
.card.is-owned::before, .card.is-ordered::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--owned); z-index: 1; }
/* 已訂購：同色系但改用斜紋頂條、虛線外框與淺藍底，與「已擁有」的實心外觀區隔。 */
.card.is-ordered { border-color: var(--owned); background: #f0f8fe; }
.card.is-ordered::before { background: repeating-linear-gradient(135deg, var(--owned) 0 6px, #7fb8e6 6px 12px); }
.card.is-ordered .card-visual { background: #f0f8fe; }
/* 願望清單只強調右上角標籤，不改變卡片本身的顏色與框線。 */
.card.is-ordered::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border: 3px dashed var(--owned); }
.card.is-owned .card-visual { background: var(--owned-soft); }
.card.is-owned .card-foot { border-top-color: #b8dcf5; }
.card-open { display: flex; flex-direction: column; height: 100%; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.card-open:hover h3 { color: var(--accent); }
.card-visual { position: relative; width: 100%; aspect-ratio: 1 / 1.13; background: #f2f8fc; overflow: hidden; }
.card-visual img { width: 100%; height: 100%; display: block; object-fit: contain; }
.card-id { color: #7d93a4; font-variant-numeric: tabular-nums; }
.image-source-tag { position: absolute; left: 10px; top: 10px; padding: 4px 7px; border-radius: 2px; background: #f4ecdf; color: #805e24; font-size: 10px; }
.image-pending { display: block; margin-top: 40%; text-align: center; font-size: 12px; color: var(--muted); }
.card-collect-btn { display: flex; align-items: center; gap: 4px; position: absolute; top: 10px; right: 10px; min-height: 31px; padding: 5px 8px; border: 1px solid #bedbea; border-radius: 3px; background: #fffffff0; color: #365a73; font-size: 11px; }
.card-collect-btn:hover { background: var(--soft); border-color: #42aee0; color: var(--accent); }
.card-collect-btn.is-owned { background: var(--owned); border-color: var(--owned); color: #fff; font-weight: 650; }
.card-collect-btn.is-owned:hover { background: var(--owned-hover); border-color: var(--owned-hover); color: #fff; }
.card-collect-btn.is-ordered { background: #fff; border: 1px dashed var(--owned); color: var(--owned); font-weight: 650; }
.card-collect-btn.is-wishlist { background: var(--wish); border: 1px solid var(--wish); color: #3d2a00; font-weight: 700; box-shadow: 0 1px 4px #7a520040; }
.card-collect-btn.is-wishlist:hover { background: #ffbb1f; border-color: #ffbb1f; color: #3d2a00; }
.collect-menu-item.is-wishlist span, .btn-collect-detail.is-wishlist span { color: var(--wish); }
.card-collect-btn.is-wishlist .collect-icon { font-size: 17px; }
.collect-menu { position: fixed; z-index: 20; display: flex; flex-direction: column; min-width: 148px; padding: 4px; border: 1px solid #bedbea; border-radius: 4px; background: #fff; box-shadow: 0 8px 24px #183c6030; }
.collect-menu[hidden] { display: none; }
.collect-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; border: 0; border-radius: 3px; background: transparent; color: #365a73; font-size: 13px; text-align: left; }
.collect-menu-item:hover, .collect-menu-item:focus-visible { background: var(--soft); color: var(--accent); }
.collect-menu-item[aria-checked="true"] { font-weight: 650; color: var(--owned); }
.collect-menu-item.is-owned { background: var(--owned-soft); }
.collect-menu-item.is-wishlist { background: var(--wish-soft); color: var(--wish-text); }
.collect-menu-clear { margin-top: 4px; border-top: 1px solid #eaf4fb; border-radius: 0 0 3px 3px; color: #59758a; }
.collect-icon { font-size: 15px; line-height: 1; }
.card-body { width: 100%; padding: 14px 13px 13px; flex: 1; display: flex; flex-direction: column; }
.card-series { font-size: 10px; color: #59758a; margin-bottom: 5px; }
.card h3 { font-size: 13px; font-weight: 600; line-height: 1.65; margin: 0 0 6px; overflow-wrap: anywhere; }
.card-maker { font-size: 11px; line-height: 1.5; margin: 0 0 9px; color: #59758a; }
.card-release { font-size: 11px; color: #365a73; margin: auto 0 5px; padding-top: 4px; }
.card-preorder { font-size: 10px; color: #59758a; line-height: 1.6; margin: 0 0 10px; }
.card-preorder.open { color: #176b55; }
.card-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid #eaf4fb; }
.card-price { font-size: 13px; font-weight: 650; color: var(--accent); }
.card-price.price-pending { font-size: 11px; font-weight: 400; color: #59758a; }
.status { font-size: 10px; color: #365a73; padding: 3px 5px; background: #eaf4fb; border-radius: 2px; }
.status.plan { color: #796443; background: #f5f0e7; }
.empty { padding: 70px 20px; background: #fff; border: 1px solid var(--line); text-align: center; }
.empty h3 { font-size: 18px; margin: 0 0 10px; }
.empty p { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.primary-button { border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: #fff; padding: 10px 18px; font-size: 13px; }
.primary-button:hover, .source-link:hover, .btn-col-action.primary:hover { background: var(--accent-hover); }
.back-to-top { position: fixed; right: calc(24px + env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 5; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--accent); border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 3px 12px #0079b529; }
.back-to-top svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.back-to-top:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.back-to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 22px max(32px, calc((100vw - 1456px) / 2)); border-top: 1px solid var(--line); font-size: 11px; color: #59758a; background: #fff; }
dialog { width: min(880px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; color: var(--ink); background: #fff; border: 1px solid #bedbea; border-radius: 5px; box-shadow: 0 15px 60px #163f622e; overflow: auto; }
dialog::backdrop { background: #183c6099; }
.close, .close-col, #close-student-detail { display: grid; place-items: center; width: 35px; height: 35px; padding: 0; border: 1px solid #bedbea; border-radius: 3px; background: #fff; color: #365a73; font-size: 24px; line-height: 1; }
.dialog-close-icon { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.close { position: absolute; right: 12px; top: 12px; z-index: 2; }
.detail-layout { display: grid; grid-template-columns: 43% minmax(0, 1fr); }
.detail-img { background: #f2f8fc; display: flex; align-items: center; justify-content: center; min-height: 420px; }
.detail-img img { max-width: 100%; width: auto; height: auto; max-height: calc(100dvh - 70px); object-fit: contain; }
.detail-info { padding: 40px 30px 30px; min-width: 0; }
.detail-info .eyebrow { margin: 0 0 9px; color: var(--muted); font-size: 11px; }
.detail-info h2 { font-size: 23px; font-weight: 650; line-height: 1.5; margin: 0 0 17px; overflow-wrap: anywhere; }
.detail-ownership-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.btn-collect-detail { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 132px; min-height: 44px; border: 1px solid #bedbea; border-radius: 6px; padding: 9px 14px; font-size: 14px; font-weight: 600; background: #fff; color: #365a73; }
.btn-collect-detail:hover { background: #f5fbff; border-color: var(--accent); color: var(--accent); }
.btn-collect-detail { min-width: 0; flex: 1 1 0; }
.btn-collect-detail.is-wishlist { background: var(--wish-soft); border-color: var(--wish); color: var(--wish-text); box-shadow: inset 0 0 0 1px var(--wish); }
.btn-collect-detail.is-ordered { background: #f0f8fe; border: 1px dashed var(--owned); color: var(--owned); box-shadow: inset 0 0 0 1px var(--owned); }
.btn-collect-detail.is-owned { background: var(--owned); border-color: var(--owned); color: #fff; }
.detail-sub { font-size: 12px; color: var(--muted); margin: 0 0 18px; }
.detail-list { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 13px 12px; padding: 20px 0; margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.8; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.detail-list a, .detail-note a, .mfc-source-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.detail-note { font-size: 11px; color: var(--muted); line-height: 1.8; margin: 15px 0; overflow-wrap: anywhere; }
.source-link { display: inline-flex; align-items: center; gap: 16px; background: var(--accent); color: #fff; padding: 10px 13px; border-radius: 3px; font-size: 12px; }
.mfc-source-link { display: inline-block; margin: 13px 10px 0 0; font-size: 11px; }
#collection-dialog, #collection-share-dialog { width: min(520px, calc(100vw - 32px)); }
.col-dialog-box { padding: 25px; }
.col-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.col-dialog-head h3 { margin: 0; font-size: 19px; }
.col-dialog-desc { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 0 0 16px; }
.col-dialog-stats { background: #eaf4fb; padding: 12px 14px; font-size: 13px; margin-bottom: 16px; }
.col-dialog-field label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.col-dialog-field textarea { display: block; width: 100%; resize: vertical; border: 1px solid #bedbea; border-radius: 3px; padding: 12px; font-family: monospace; font-size: 12px; color: var(--ink); background: #fff; }
.col-dialog-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn-col-action, .btn-col-danger { border: 1px solid #bedbea; border-radius: 3px; background: #fff; padding: 9px 12px; color: #365a73; font-size: 12px; }
.btn-col-action:hover { background: #e3f5ff; }
.btn-col-action.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-col-danger { margin-left: auto; border-color: #e1c5c5; color: #a34949; }
.col-dialog-msg { margin-top: 15px; padding: 11px 12px; background: #edf7f2; color: #27694a; font-size: 12px; border-radius: 3px; }
.col-dialog-msg.error { background: #fbefef; color: #a23e3e; }
.col-share-section { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.col-share-section h4 { margin: 0 0 8px; font-size: 14px; }
#col-share-output { margin-top: 14px; }
#col-share-link { width: 100%; min-height: 42px; padding: 10px; border: 1px solid #bedbea; border-radius: 3px; color: var(--ink); background: #f6fbfe; font-size: 12px; }
.col-share-hint { margin: 7px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.btn-col-action:disabled { opacity: .55; cursor: default; }
.share-preview-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.share-preview-stats span { padding: 7px 10px; background: var(--soft); color: var(--accent); font-size: 12px; }
.share-preview-details { border-top: 1px solid var(--line); padding-top: 12px; font-size: 12px; }
.share-preview-details summary { cursor: pointer; min-height: 34px; }
.share-preview-details ul { padding: 0; margin: 8px 0; list-style: none; }
.share-preview-details li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.share-item-name { overflow-wrap: anywhere; line-height: 1.6; }
.share-item-status { color: var(--accent); }
@media (max-width: 1250px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-layout { grid-template-columns: 220px minmax(0, 1fr); column-gap: 24px; }
  .filter-content { padding: 20px 16px; }
}
@media (max-width: 960px) {
  .catalog-search-controls { grid-template-columns: minmax(0, 1fr); gap: 14px 10px; }
  .catalog-search-field { grid-column: 1 / -1; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { gap: 25px; }
}
@media (max-width: 730px) {
  .topbar { min-height: 72px; padding: 14px 18px 0; gap: 14px; }
  .topbar .site-navigation { display: flex; gap: 16px; }
  .brand { font-size: 14px; gap: 9px; }
  .brand-mark { width: 32px; height: 32px; font-size: 12px; }
  .brand-sub { font-size: 10px; }
  .collection-toolbar { gap: 12px; }
  .collection-pill, .pill-action { font-size: 11px; }
  .collection-pill { gap: 5px; }
  main { padding: 23px 18px 0; }
  h1 { font-size: 25px; }
  .catalog-intro { min-height: 138px; padding: 17px 16px; margin-bottom: 20px; }
  .intro-copy { max-width: 100%; }
  .intro-themes { margin-bottom: 8px; gap: 10px; font-size: 10px; }
  .intro-description { font-size: 12px; margin-top: 6px; }
  .intro-description span { font-size: 10px; }
  .intro-art { width: 245px; right: -55px; opacity: .18; }
  .catalog-layout { display: block; }
  .sidebar { position: static; margin-bottom: 20px; }
  .filter-panel > summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
  .filter-panel > summary::-webkit-details-marker { display: none; }
  .filter-panel[open] > summary { border-bottom: 1px solid var(--line); }
  .filter-chevron { width: 7px; height: 7px; border-right: 1.5px solid #59758a; border-bottom: 1.5px solid #59758a; transform: rotate(45deg); margin: -4px 3px 0 auto; }
  .filter-panel[open] .filter-chevron { transform: rotate(225deg); margin-top: 4px; }
  .filter-count { background: var(--soft); color: var(--accent); padding: 1px 5px; border-radius: 3px; font-size: 11px; }
  .filter-heading h2 { display: none; }
  .filter-heading { justify-content: flex-end; margin-bottom: 14px; }
  .filter-content { padding: 16px; }
  .mobile-filter-apply { display: block; width: 100%; margin-top: 18px; }
  .category-children { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-branch { grid-column: 1 / -1; }
  .category-subchildren { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-fields { display: grid; grid-template-columns: 1fr; }
  .catalog-search { padding: 12px; margin-bottom: 18px; }
  .result-row { margin-bottom: 14px; min-height: 45px; }
  .result-row h2 { font-size: 16px; }
  .grid { gap: 14px 10px; }
  .card-body { padding: 11px 10px; }
  .card h3 { font-size: 12px; }
  .card-visual { aspect-ratio: 1 / 1.22; }
  .card-collect-btn { padding: 4px 6px; right: 7px; top: 7px; font-size: 10px; min-height: 29px; }
  .image-source-tag { left: 7px; top: 7px; font-size: 9px; }
  .card-price { font-size: 12px; }
  .card-foot { gap: 5px; }
  .back-to-top { right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  footer { padding: 20px 18px; font-size: 10px; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-img { min-height: 240px; }
  .detail-img img { max-height: 55dvh; }
  .detail-info { padding: 25px 20px; }
  .detail-info h2 { font-size: 20px; }
  .detail-list { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 370px) {
  .topbar { padding: 14px 12px 0; }
  .collection-toolbar { gap: 7px; }
  .brand-mark { display: none; }
  main { padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  html[data-motion="on"] .halo-orbit { transform-origin: 296px 94px; animation: halo-drift 16s ease-in-out infinite alternate; animation-play-state: paused; }
  html[data-motion="on"] .intro-plane { animation: plane-drift 6s ease-in-out infinite alternate; animation-play-state: paused; }
  html[data-motion="on"] .catalog-intro[data-running="true"] .halo-orbit,
  html[data-motion="on"] .catalog-intro[data-running="true"] .intro-plane { animation-play-state: running; }
  html[data-motion="on"] :is(.card, .tab, .size-tab, .card-open h3, .ownership-option, .filter-chip, .school-option, .club-option, .card-collect-btn, .btn-collect-detail) { transition: border-color .16s, color .16s, background-color .16s, box-shadow .16s; }
  html[data-motion="on"] .card-visual img { transition: transform .24s ease-out; }
  html[data-motion="on"] .search-wrap { transition: box-shadow .2s; }
  html[data-motion="on"] .search-wrap:focus-within { box-shadow: 0 0 0 4px #39baf01c; }
  html[data-motion="on"] :is(.collect-menu:not([hidden]), dialog[open] .detail-info, .role-navigation[open] .role-content) { animation: panel-appear .18s ease-out; }
  html[data-motion="on"] :is(.card-collect-btn, .btn-collect-detail, .primary-button):active { transform: scale(.97); }
  @media (hover: hover) and (pointer: fine) {
    html[data-motion="on"] .card:hover { box-shadow: 0 4px 16px #1f82b51a; }
    html[data-motion="on"] .card.is-owned:hover { box-shadow: 0 0 0 2px var(--owned), 0 4px 16px #1f82b526; }
    html[data-motion="on"] .card-open:hover .card-visual img { transform: scale(1.025); }
  }
}
@keyframes halo-drift { from { transform: rotate(-6deg); } to { transform: rotate(9deg); } }
@keyframes plane-drift { from { transform: translate(0, 0); } to { transform: translate(7px, -5px); } }
@keyframes panel-appear { from { opacity: .3; } to { opacity: 1; } }

/* Character navigation is a separate, naturally scrolling layer above the results. */
.role-navigation { margin-bottom: 20px; border: 1px solid var(--line); border-radius: 3px; background: #fff; }
.role-navigation > summary { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 12px 18px; cursor: pointer; list-style: none; }
.role-navigation > summary::-webkit-details-marker { display: none; }
.role-title { flex-shrink: 0; font-size: 14px; font-weight: 650; color: var(--accent); }
.role-current { min-width: 0; font-size: 12px; color: #59758a; overflow-wrap: anywhere; }
.role-expand { margin-left: auto; flex-shrink: 0; color: var(--accent); font-size: 11px; }
.role-chevron { flex-shrink: 0; width: 7px; height: 7px; border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(45deg); margin: -4px 3px 0 0; }
.role-navigation[open] > summary { border-bottom: 1px solid var(--line); }
.role-navigation[open] .role-chevron { transform: rotate(225deg); margin-top: 4px; }
.role-content { padding: 18px; }
.role-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.role-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.role-mode { padding: 7px 10px; min-height: 36px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: #365a73; font-size: 12px; }
.role-mode.active { border-color: var(--accent); background: var(--soft); color: var(--accent); }
.role-mode span, .club-option span { margin-left: 8px; color: #59758a; font-size: 11px; font-variant-numeric: tabular-nums; }
.role-schools, .role-clubs { min-width: 0; padding: 0; margin: 0; border: 0; }
.role-schools legend, .role-clubs legend { padding: 0; margin-bottom: 10px; font-size: 12px; font-weight: 650; }
.school-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.school-option { min-width: 0; display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 7px; padding: 12px 5px 10px; min-height: 104px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); font-size: 12px; }
.school-option img { width: 40px; height: 40px; object-fit: contain; filter: brightness(0); opacity: .7; }
.school-option .school-count { color: #59758a; font-size: 11px; font-variant-numeric: tabular-nums; }
.school-option.active { border-color: var(--accent); background: var(--soft); color: var(--accent); box-shadow: inset 0 -2px var(--sky); }
.school-option.active img { opacity: 1; }
.school-option:hover:not(:disabled), .club-option:hover:not(:disabled) { border-color: var(--accent); background: var(--soft); }
.role-mode:disabled, .school-option:disabled, .club-option:disabled { opacity: .45; cursor: default; }
.role-clubs { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.club-options { display: flex; flex-wrap: wrap; gap: 8px; }
.club-option { padding: 8px 12px; min-height: 38px; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: #365a73; font-size: 12px; }
.club-option.active { border-color: var(--accent); background: var(--soft); color: var(--accent); font-weight: 650; }
.role-hint { margin: 14px 0 0; color: #59758a; font-size: 11px; line-height: 1.7; }
.role-affiliation-list { margin: 0; padding: 0; list-style: none; }
.role-affiliation-list li + li { margin-top: 6px; }
.role-affiliation-list a { color: var(--accent); font-size: 11px; }
@media (max-width: 1250px) { .school-options { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 730px) {
  .role-navigation > summary { padding: 12px; gap: 10px; }
  .role-current { font-size: 11px; }
  .role-expand { display: none; }
  .role-chevron { margin-left: auto; }
  .role-content { padding: 12px; }
  .role-tools { flex-wrap: wrap; }
  .school-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .school-option { min-height: 100px; }
}

.preorder-history { margin-top: 10px; }
.preorder-history summary { color: var(--accent); cursor: pointer; }
.preorder-history ol { margin: 8px 0 0; padding-left: 20px; }
.preorder-history li + li { margin-top: 10px; }
.preorder-audit-note { color: var(--muted); }

/* 廠商／品牌與系列使用獨立展開按鈕，展開不會更動商品篩選。 */
.plush-categories, .plush-children { display: flex; flex-direction: column; gap: 4px; }
.plush-children[hidden] { display: none; }
.plush-branch, .plush-leaf { min-width: 0; }
.plush-branch-row { display: flex; align-items: stretch; }
.plush-branch-row > .tab { flex: 1; min-width: 0; padding-left: 5px; gap: 8px; }
.plush-expand { display: grid; place-items: center; flex: 0 0 30px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #59758a; }
.plush-expand:hover { background: #f0f9ff; color: var(--accent); }
.plush-chevron { width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.plush-expand[aria-expanded="true"] .plush-chevron { transform: rotate(45deg); }
.plush-branch.has-selected-category > .plush-branch-row { box-shadow: inset 2px 0 var(--accent); background: #f5fbff; }
.plush-children { margin-top: 4px; margin-left: 15px; }
.plush-leaf > .tab, .plush-children > .category-branch > .tab { width: 100%; gap: 8px; }
.plush-children .tab { font-size: 12px; }
.plush-children .category-subchildren { display: flex; flex-direction: column; }
@media (max-width: 730px) {
  .plush-categories { grid-column: 1 / -1; }
  .plush-expand { flex-basis: 38px; min-height: 44px; }
  .plush-branch-row > .tab, .plush-leaf > .tab { min-height: 44px; }
}
