:root {
  --bg: #f4f3f2;
  --surface: #fffefd;
  --surface-2: #f8f7f5;
  --ink: #3d3a3f;
  --muted: #777177;
  --line: #e3dfe0;
  --line-strong: #cfc8ca;
  --jade: #789c94;
  --jade-dark: #52756e;
  --coral: #b99098;
  --gold: #b39a6d;
  --night: #3d4143;
  --danger: #a66f7b;
  --mint-soft: #e7efed;
  --pink-soft: #f2e8ea;
  --lilac-soft: #ece9ef;
  --blue-soft: #e9eef1;
  --shadow: 0 16px 38px rgba(64, 57, 62, 0.11);
  --soft-shadow: 0 7px 22px rgba(67, 61, 65, 0.08);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body {
  margin: 0; min-width: 320px; overflow-x: hidden;
  background: var(--bg);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
.is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px 16px;
  display: flex; flex-direction: column; color: #fbfaff;
  background: #3d4242;
  border-right: 1px solid rgba(221,231,227,.24);
  box-shadow: 8px 0 28px rgba(55, 48, 70, .11);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 25px; }
.brand-mark, .modal-mark {
  width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden;
  border: 1px solid rgba(255,255,255,.76); border-radius: 8px; background: #183b6b;
  box-shadow: 0 0 0 3px rgba(142,228,216,.18), 0 7px 18px rgba(13,21,48,.24);
}
.brand-mark img, .modal-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand strong { display: block; font-size: 16px; }
.brand span { display: block; margin-top: 3px; color: #d4d0df; font-size: 11px; }
.main-nav { display: grid; gap: 4px; }
.nav-item {
  width: 100%; min-height: 42px; border: 1px solid transparent; border-radius: 6px;
  display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 10px;
  padding: 0 11px; color: #d8d5e1; background: transparent; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.nav-item.is-active {
  color: #39443f; border-color: rgba(255,255,255,.5);
  background: #e5ece9;
  box-shadow: 0 8px 20px rgba(18,20,38,.18);
}
.nav-item svg { width: 17px; height: 17px; }
.nav-item b { min-width: 22px; color: #e9c975; font-size: 11px; text-align: right; }
.nav-item.is-active b { color: #725b75; }
.sidebar-foot {
  margin-top: auto; display: grid; grid-template-columns: 9px 1fr 34px; align-items: center; gap: 9px;
  padding: 13px 6px 0; border-top: 1px solid rgba(255,255,255,.13);
}
.sidebar-foot strong, .sidebar-foot span { display: block; }
.sidebar-foot strong { font-size: 12px; }
.sidebar-foot span { margin-top: 2px; color: #bcb8c7; font-size: 10px; }
.health-dot { width: 8px; height: 8px; border-radius: 50%; background: #e7bd6c; box-shadow: 0 0 0 3px rgba(231,189,108,.16); }
.health-dot.is-ok { background: #8de4d8; box-shadow: 0 0 0 3px rgba(141,228,216,.17); animation: healthPulse 2.2s ease-in-out infinite; }

.workspace { min-width: 0; padding: 24px clamp(20px, 3vw, 44px) 50px; }
.workspace-header { min-height: 67px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.eyebrow { margin: 0 0 5px; color: var(--jade-dark); font: 700 10px/1.2 Consolas, monospace; }
h1 { margin: 0; font-size: 25px; line-height: 1.2; letter-spacing: 0; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.button, .icon-button {
  border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(255,255,255,.92); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px;
  box-shadow: 0 3px 10px rgba(84,66,102,.06);
}
.button { padding: 0 14px; font-weight: 700; font-size: 12px; }
.button svg, .icon-button svg { width: 16px; height: 16px; }
.button:hover, .icon-button:hover { border-color: #9acfc8; background: #fff; transform: translateY(-1px); box-shadow: var(--soft-shadow); }
.button-primary { background: #6f958d; border-color: #668b83; color: #fff; }
.button-primary:hover { background: #5d837b; border-color: #557970; }
.button-danger { background: #fff2f6; border-color: #efb4c6; color: var(--danger); }

.news-feed-endpoint {
  padding: 7px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.miniprogram-news-table td { vertical-align: middle; }

.news-media-preview {
  position: relative;
  width: 112px;
  height: 70px;
  overflow: hidden;
  background: #e9efed;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.news-media-preview img,
.news-media-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-media-preview span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 6px;
  background: rgba(22, 36, 33, 0.76);
  border-radius: 4px;
  color: white;
  font-size: 10px;
}

.news-title-cell { min-width: 180px; }
.news-title-cell strong,
.news-title-cell span { display: block; }
.news-title-cell span { margin-top: 4px; color: var(--muted); font-size: 12px; }

.news-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.news-status-published { background: #e4ece9; color: #4d6e67; }
.news-status-draft { background: #eee9df; color: #76664a; }
.news-status-archived { background: #ece7e9; color: #6e6267; }

.news-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.news-media-upload { margin: 4px 0 18px; }
.news-editor-layout { display: grid; grid-template-columns: minmax(270px, .82fr) minmax(380px, 1.45fr); gap: 18px; align-items: start; }
.news-editor-media, .news-editor-content { min-width: 0; display: grid; gap: 13px; }
.news-editor-media { padding-right: 18px; border-right: 1px solid var(--line); }
.news-editor-section-head { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.news-editor-section-head strong, .news-editor-section-head span { display: block; }
.news-editor-section-head strong { font-size: 13px; }
.news-editor-section-head span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.news-editor-section-head > svg { width: 20px; height: 20px; color: var(--jade-dark); }
.news-editor-preview { aspect-ratio: 16 / 9; display: grid; place-items: center; align-content: center; gap: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #eef0ee; color: var(--muted); font-size: 10px; text-align: center; }
.news-editor-preview > svg { width: 25px; height: 25px; color: #81968f; }
.news-editor-preview img, .news-editor-preview video { width: 100%; height: 100%; display: block; object-fit: cover; }
.news-source-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.news-source-fieldset legend { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.news-source-switch { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; }
.news-source-switch label { position: relative; min-width: 0; min-height: 38px; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 7px; color: var(--muted); cursor: pointer; }
.news-source-switch label + label { border-left: 1px solid var(--line); }
.news-source-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.news-source-switch label:has(input:checked) { background: var(--mint-soft); color: var(--jade-dark); font-weight: 750; }
.news-source-switch svg { width: 15px; height: 15px; }
.news-source-panel { min-width: 0; }
.news-upload-drop { min-height: 76px; display: grid !important; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px !important; padding: 12px; border: 1px dashed #aebfba; border-radius: 8px; background: #fafbf9; cursor: pointer; }
.news-upload-drop:hover { border-color: var(--jade); background: #f4f8f6; }
.news-upload-drop > svg { width: 25px; height: 25px; color: var(--jade-dark); }
.news-upload-drop span, .news-upload-drop strong, .news-upload-drop small { display: block; }
.news-upload-drop strong { color: var(--ink); font-size: 11px; }
.news-upload-drop small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 400; line-height: 1.4; }
.news-upload-drop input { grid-column: 1 / -1; height: 31px; padding: 3px; border-radius: 6px; font-size: 10px; }
.news-hosted-url { min-width: 0; display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid #ccd9d5; border-radius: 7px; background: #f1f6f4; }
.news-hosted-url > svg { width: 17px; height: 17px; color: var(--jade-dark); }
.news-hosted-url strong, .news-hosted-url code { display: block; }
.news-hosted-url strong { color: var(--jade-dark); font-size: 9px; }
.news-hosted-url code { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.news-publish-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.button-wide { width: 100%; }
.icon-button { width: 34px; height: 34px; min-height: 34px; padding: 0; }
.sidebar .icon-button { color: #ded9e6; background: transparent; border-color: transparent; box-shadow: none; }

.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: rgba(255,255,255,.9); margin: 13px 0 18px; box-shadow: var(--soft-shadow); }
.metric { padding: 15px 17px; min-width: 0; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin-top: 6px; font-size: 24px; font-weight: 650; }
.metric small { color: var(--jade-dark); font-size: 10px; }

.category-tabs {
  display: grid; grid-template-columns: repeat(6, minmax(126px, 1fr)); margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.9); overflow-x: auto;
  box-shadow: var(--soft-shadow); scrollbar-width: none; scroll-snap-type: x proximity;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs button {
  min-height: 42px; padding: 0 11px; border: 0; border-right: 1px solid var(--line);
  background: var(--surface); color: var(--muted); display: grid;
  grid-template-columns: 17px minmax(max-content, 1fr) auto; align-items: center; gap: 7px;
  font-size: 11px; text-align: left; scroll-snap-align: start;
}
.category-tabs button:last-child { border-right: 0; }
.category-tabs button:hover { background: #fdfaff; color: var(--ink); }
.category-tabs button.is-active {
  box-shadow: inset 0 -3px 0 #76cec1;
  background: linear-gradient(110deg, var(--mint-soft), var(--pink-soft), var(--lilac-soft));
  color: #4b4960;
}
.category-tabs svg { width: 16px; height: 16px; }
.category-tabs b { min-width: 20px; color: inherit; font-size: 10px; text-align: right; }

.toolbar {
  min-height: 58px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 9px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.9); box-shadow: var(--soft-shadow);
}
.search-field { flex: 1 1 280px; min-width: 180px; position: relative; }
.search-field svg { position: absolute; left: 11px; top: 10px; width: 17px; height: 17px; color: var(--muted); }
.search-field input { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.select-field { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.select-field select { height: 38px; min-width: 105px; padding: 0 26px 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.segmented { display: grid; grid-template-columns: 36px 36px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented button { height: 36px; border: 0; background: var(--surface); color: var(--muted); display: grid; place-items: center; }
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button.is-active { color: var(--jade-dark); background: linear-gradient(135deg, var(--mint-soft), var(--lilac-soft)); }
.segmented svg { width: 16px; }
.result-count { margin-left: auto; min-width: 43px; color: var(--muted); font-size: 11px; text-align: right; }
.card-download-toolbar {
  min-height: 48px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.82); box-shadow: var(--soft-shadow);
}
.card-select-all { margin-right: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 11px; font-weight: 700; }
.card-select-all input, .card-selection-control input { width: 16px; height: 16px; margin: 0; accent-color: var(--jade-dark); }
.card-download-toolbar > span { color: var(--muted); font-size: 10px; }

.card-collection { display: grid; grid-template-columns: repeat(auto-fill, minmax(174px, 1fr)); gap: 14px; margin-top: 14px; }
.card-item { min-width: 0; position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: rgba(255,255,255,.94); text-align: left; padding: 0; color: inherit; box-shadow: 0 5px 16px rgba(82,63,99,.07); animation: cardArrive .34s both; animation-delay: var(--card-delay, 0ms); }
.card-item:hover { border-color: #a6dcd4; box-shadow: 0 13px 30px rgba(84,68,105,.15), 0 0 0 2px rgba(255,202,217,.26); transform: translateY(-3px); }
.card-item:focus-within { border-color: #7bcfc2; box-shadow: 0 0 0 3px rgba(117,207,194,.2); }
.card-item.is-selected { border-color: #62bfb3; box-shadow: 0 0 0 3px rgba(85,185,173,.2), 0 10px 24px rgba(84,68,105,.12); }
.card-open-hit { position: absolute; z-index: 2; inset: 0; width: 100%; border: 0; border-radius: inherit; padding: 0; background: transparent; cursor: pointer; }
.card-open-hit:focus { outline: 0; }
.card-art { aspect-ratio: 2/3; position: relative; overflow: hidden; background: linear-gradient(145deg, #e4f4f1, #f6eefa); }
.card-art img { width: 100%; height: 100%; display: block; object-fit: cover; }
.card-art-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); font-size: 10px; }
.card-art-empty svg { width: 24px; height: 24px; }
.card-selection-control { position: absolute; z-index: 5; top: 8px; left: 8px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.78); border-radius: 6px; background: rgba(255,255,255,.92); box-shadow: 0 3px 10px rgba(49,42,66,.14); }
.card-art-download { position: absolute; z-index: 5; top: 8px; right: 8px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.78); border-radius: 6px; background: rgba(47,47,62,.86); color: #fff; box-shadow: 0 4px 12px rgba(23,22,34,.2); opacity: 0; pointer-events: none; transform: translateY(-5px); transition: opacity .18s ease, transform .18s ease; }
.card-art-download svg { width: 15px; height: 15px; }
.card-art-download:hover { background: #fff; color: var(--jade-dark); }
.card-item:hover .card-art-download, .card-item:focus-within .card-art-download { opacity: 1; pointer-events: auto; transform: translateY(0); }
.card-art .status-badge { position: absolute; top: 43px; left: 8px; }
.classification-badge { position: absolute; z-index: 3; top: 43px; right: 8px; min-height: 22px; padding: 0 7px; display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.7); border-radius: 4px; background: rgba(255,255,255,.9); color: #56516c; box-shadow: 0 3px 10px rgba(49,42,66,.12); backdrop-filter: blur(4px); font-size: 9px; font-weight: 800; }
.classification-NEW_POOL { background: rgba(255,247,211,.94); color: #8d6b27; }
.classification-DRAW_CREATURE { background: rgba(232,250,247,.94); color: #317d72; }
.classification-ITEM { background: rgba(239,244,255,.94); color: #4f6f9a; }
.classification-WILD { background: rgba(237,248,231,.94); color: #4f7d48; }
.card-quick-actions { position: absolute; z-index: 4; left: 8px; right: 8px; bottom: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.card-item:hover .card-quick-actions, .card-item:focus-within .card-quick-actions { opacity: 1; pointer-events: auto; transform: translateY(0); }
.quick-classify { min-width: 0; min-height: 29px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid rgba(255,255,255,.75); border-radius: 6px; background: rgba(47,47,62,.86); color: #fff; box-shadow: 0 5px 13px rgba(23,22,34,.2); backdrop-filter: blur(7px); font-size: 9px; font-weight: 750; }
.quick-classify:hover { background: #fff; color: var(--ink); transform: translateY(-1px); }
.quick-classify.is-current { background: rgba(87,183,170,.94); }
.quick-classify.quick-TRASHED:hover { color: #a23f62; }
.quick-classify svg { flex: 0 0 auto; width: 13px; height: 13px; }
.status-badge, .rarity-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 4px; font-size: 10px; font-weight: 800; border: 1px solid transparent; }
.status-badge { background: rgba(16,28,24,.84); color: #fff; backdrop-filter: blur(4px); }
.status-badge.listing-ON_SALE { background: rgba(63,157,146,.92); }
.status-badge.listing-OFF_SALE { background: rgba(77,76,96,.88); }
.status-badge.listing-TRASHED { background: rgba(181,83,111,.9); }
.card-item.is-trashed .card-art img { filter: grayscale(.72); opacity: .74; }
.rarity-N { background: #edf8f5; color: #347c72; border-color: #c5e6df; }
.rarity-R { background: #edf5ff; color: #4779a0; border-color: #c9def0; }
.rarity-SR { background: #f4effd; color: #6c56a0; border-color: #ddd0f2; }
.rarity-SSR { background: #fff0f5; color: #a84f72; border-color: #f1bfd0; box-shadow: 0 0 10px rgba(234,141,172,.18); }
.card-copy { padding: 10px 11px 12px; }
.card-copy header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.card-copy h3 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.card-copy p { margin: 6px 0 0; color: var(--muted); font: 10px/1.3 Consolas, monospace; }
.card-collection.is-list { display: block; border: 1px solid var(--line); background: var(--surface); }
.card-collection.is-list .card-item { width: 100%; display: grid; grid-template-columns: 64px 1fr; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.card-collection.is-list .card-art { width: 64px; height: 82px; aspect-ratio: auto; }
.card-collection.is-list .status-badge { display: none; }
.card-collection.is-list .card-selection-control { top: 4px; left: 4px; width: 24px; height: 24px; }
.card-collection.is-list .card-art-download { top: 4px; right: 4px; width: 25px; height: 25px; }
.card-collection.is-list .classification-badge { top: 32px; right: 4px; max-width: 56px; min-height: 18px; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-collection.is-list .card-quick-actions { left: 4px; right: 4px; bottom: 4px; gap: 3px; }
.card-collection.is-list .quick-classify { min-height: 22px; padding: 0; }
.card-collection.is-list .quick-classify span { display: none; }
.card-collection.is-list .card-copy { display: grid; grid-template-columns: minmax(140px, 1fr) auto; align-items: center; gap: 12px; }

.empty-state { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 8px; margin-top: 14px; background: rgba(255,255,255,.48); }
.empty-state svg { width: 28px; height: 28px; }

.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-panel, .recent-panel, .table-panel { background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--soft-shadow); overflow: hidden; }
.chart-panel, .recent-panel { padding: 17px; }
.recent-panel { grid-column: 1 / -1; }
.chart-panel header, .recent-panel header, .table-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chart-panel h3, .recent-panel h3 { margin: 0; font-size: 14px; }
.chart-panel header span, .recent-panel header span, .table-head span { color: var(--muted); font-size: 10px; }
.bar-list { display: grid; gap: 12px; margin-top: 18px; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 30px; align-items: center; gap: 9px; font-size: 11px; }
.bar-track { height: 8px; border-radius: 8px; background: #efebf2; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 8px; background: linear-gradient(90deg, #789c94, #aebbb4); animation: barReveal .62s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
.compact-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.compact-item { display: flex; align-items: center; gap: 8px; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 7px; background: var(--surface-2); }
.compact-item img { width: 36px; height: 48px; object-fit: cover; }
.compact-item strong, .compact-item span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-item strong { font-size: 11px; }
.compact-item span { margin-top: 2px; color: var(--muted); font-size: 9px; }

.batch-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 13px 0 18px; }
.batch-stat { padding: 15px; border-left: 3px solid var(--jade); border-radius: 0 8px 8px 0; background: rgba(255,255,255,.92); box-shadow: var(--soft-shadow); }
.batch-stat span { display: block; color: var(--muted); font-size: 10px; }
.batch-stat strong { display: block; margin-top: 6px; font-size: 21px; }
.barcode-workbench {
  min-height: 276px; display: grid; grid-template-columns: minmax(0, 1fr) 184px; align-items: center; gap: 28px;
  margin-bottom: 16px; padding: 24px 30px; overflow: hidden; border: 1px solid #ccdfe4; border-radius: 8px;
  background: linear-gradient(120deg, rgba(255,255,255,.96), rgba(232,247,247,.9) 58%, rgba(237,241,251,.94));
  box-shadow: var(--soft-shadow);
}
.barcode-workbench-copy { min-width: 0; }
.workbench-kicker { color: #547384; font: 800 9px/1.2 Consolas, monospace; }
.barcode-workbench h3 { margin: 8px 0 0; font-size: 21px; }
.barcode-workbench p { max-width: 560px; margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.barcode-workbench-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 18px 0; border: 1px solid rgba(99,139,153,.2); background: rgba(99,139,153,.16); }
.barcode-workbench-facts div { min-width: 0; padding: 10px 12px; background: rgba(255,255,255,.78); }
.barcode-workbench-facts dt { color: var(--muted); font-size: 9px; }
.barcode-workbench-facts dd { margin: 4px 0 0; overflow: hidden; color: #294d5c; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.barcode-workbench-preview {
  position: relative; width: 164px; aspect-ratio: 2 / 3; justify-self: end; overflow: hidden;
  border: 1px solid rgba(89,119,132,.24); background: #e7eeee; box-shadow: 0 12px 28px rgba(47,73,86,.16);
}
.barcode-workbench-preview > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.barcode-workbench-preview > span { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; color: var(--muted); font-size: 10px; text-align: center; }
.barcode-workbench-overlay { position: absolute; display: flex; overflow: visible; mix-blend-mode: multiply; }
.barcode-workbench-overlay svg { width: 100%; height: 100%; display: block; overflow: visible; }
.table-head { min-height: 58px; padding: 0 15px; border-bottom: 1px solid var(--line); }
.table-head strong, .table-head span { display: block; }
.table-head span { margin-top: 3px; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 11px; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); background: linear-gradient(90deg, #faf8fc, #f3faf8); font-size: 10px; }
.data-table td code { font-family: Consolas, monospace; }
.table-actions { display: flex; justify-content: flex-end; gap: 6px; }
.batch-detail-row td { padding: 0; background: #f7faf8; }
.batch-export-detail { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 18px; padding: 18px; }
.batch-export-preview { position: relative; width: 168px; aspect-ratio: 2 / 3; overflow: hidden; border: 1px solid #cbd7db; border-radius: 5px; background: #e8eeee; box-shadow: 0 10px 24px rgba(47,73,86,.14); }
.batch-export-preview > img:first-child { width: 100%; height: 100%; display: block; object-fit: cover; }
.batch-export-preview.is-empty { display: grid; place-items: center; padding: 18px; color: var(--muted); font-size: 10px; line-height: 1.7; text-align: center; }
.batch-export-barcode { position: absolute; display: block; object-fit: fill; mix-blend-mode: multiply; }
.batch-export-content { min-width: 0; }
.batch-export-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.batch-export-head strong, .batch-export-head span { display: block; }
.batch-export-head span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.batch-export-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.batch-export-warning { margin: 0 0 10px; color: #8b5f34; font-size: 10px; }
.batch-card-cell { min-width: 310px; }
.batch-card-layout { display: flex; align-items: center; gap: 11px; }
.batch-card-visuals { flex: 0 0 auto; display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: #f8fbfa; }
.batch-card-visuals:hover { border-color: #8fcfc5; background: #eef8f5; }
.batch-card-thumbnail { position: relative; width: 38px; height: 52px; display: grid; place-items: center; overflow: hidden; border: 1px solid #d9dfe2; border-radius: 3px; background: #edf1f2; }
.batch-card-thumbnail img { width: 100%; height: 100%; display: block; object-fit: cover; }
.batch-card-thumbnail small { position: absolute; z-index: 1; left: 2px; bottom: 2px; min-width: 15px; padding: 1px 3px; border-radius: 2px; color: #fff; background: rgba(37,43,54,.78); font-size: 8px; line-height: 1.4; text-align: center; }
.batch-card-thumbnail svg { width: 15px; height: 15px; color: var(--muted); }
.batch-card-copy strong, .batch-card-copy code, .batch-card-copy span { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-card-copy strong { font-size: 11px; }
.batch-card-copy code, .batch-card-copy span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.release-detail-row td { padding: 0; background: #f7faf8; }
.release-status { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 4px; font-size: 9px; font-weight: 800; }
.release-DRAFT { color: #765729; background: #fff3d7; }
.release-PUBLISHED { color: #176456; background: #dcf5ed; }
.release-ARCHIVED { color: #6d6875; background: #ece9ef; }
.release-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.release-detail-head strong { font-size: 11px; white-space: normal; }
.release-detail-head span { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.release-detail-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; padding: 10px; background: #f7faf8; }
.release-detail-card { min-width: 0; min-height: 82px; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; text-align: left; background: #fff; }
.release-detail-card:hover { background: #eef8f5; }
.release-detail-card img { width: 48px; height: 64px; object-fit: cover; border-radius: 4px; }
.release-detail-card strong, .release-detail-card code, .release-detail-card span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-detail-card strong { font-size: 11px; }
.release-detail-card code, .release-detail-card span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.release-detail-empty { padding: 16px; color: var(--muted); font-size: 10px; }
.serial-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); }
.serial-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; background: #f7faf8; }
.serial-item span { color: var(--muted); font-size: 10px; }
.operations-grid { display: grid; gap: 14px; }
.user-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.exploration-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.collection-panel {
  margin: 0 0 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(255,255,255,.94); box-shadow: var(--soft-shadow);
}
.collection-panel-head {
  min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 15px 17px; border-bottom: 1px solid var(--line); background: #fcfbfd;
}
.collection-panel-head > div:first-child { min-width: 0; }
.collection-panel-head > div:first-child > span { color: var(--jade-dark); font: 700 9px/1.2 Consolas, monospace; }
.collection-panel-head h3 { margin: 4px 0 0; font-size: 17px; }
.collection-panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.collection-scope-controls { display: flex; align-items: center; gap: 8px; }
.collection-scope-controls .select-field select { min-width: 156px; }
.collection-empty {
  min-height: 230px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 28px;
  color: var(--muted); text-align: center;
}
.collection-empty svg { width: 28px; height: 28px; color: var(--jade-dark); }
.collection-empty strong { color: var(--ink); font-size: 13px; }
.collection-empty span { font-size: 10px; }
.collection-analysis-grid {
  display: grid; grid-template-columns: minmax(250px, 1.15fr) repeat(3, minmax(190px, 1fr));
  border-bottom: 1px solid var(--line);
}
.collection-overall, .collection-chart-block { min-width: 0; min-height: 238px; padding: 16px; border-right: 1px solid var(--line); }
.collection-analysis-grid > :last-child { border-right: 0; }
.collection-user-identity { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 9px; }
.collection-user-avatar { width: 42px; height: 42px; }
.collection-user-identity strong, .collection-user-identity code, .collection-user-identity span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collection-user-identity strong { font-size: 12px; }
.collection-user-identity code { margin-top: 3px; color: var(--muted); font-size: 9px; }
.collection-user-identity span { margin-top: 3px; color: var(--jade-dark); font-size: 9px; font-weight: 700; }
.collection-ring {
  --collection-percent: 0;
  width: 112px; height: 112px; display: grid; place-items: center; margin: 13px auto;
  border-radius: 50%; background: conic-gradient(#55b9ad calc(var(--collection-percent) * 1%), #e9e3ed 0);
  box-shadow: inset 0 0 0 1px rgba(69,113,112,.08);
}
.collection-ring::before { content: ""; grid-area: 1 / 1; width: 82px; height: 82px; border-radius: 50%; background: #fff; box-shadow: 0 2px 9px rgba(70,60,84,.08); }
.collection-ring > div { z-index: 1; grid-area: 1 / 1; text-align: center; }
.collection-ring strong, .collection-ring span { display: block; }
.collection-ring strong { font-size: 22px; line-height: 1; }
.collection-ring span { margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 700; }
.collection-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.collection-kpis > div { min-width: 0; padding: 9px 6px 0; border-right: 1px solid var(--line); text-align: center; }
.collection-kpis > div:last-child { border-right: 0; }
.collection-kpis span, .collection-kpis strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collection-kpis span { color: var(--muted); font-size: 8px; }
.collection-kpis strong { margin-top: 4px; font-size: 11px; }
.collection-chart-block > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.collection-chart-block > header strong, .collection-chart-block > header span { display: block; }
.collection-chart-block > header strong { font-size: 11px; }
.collection-chart-block > header span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.collection-chart-block > header svg { width: 16px; height: 16px; color: var(--jade-dark); }
.collection-bars { display: grid; gap: 11px; margin-top: 14px; }
.collection-bar-row { display: grid; grid-template-columns: minmax(54px, auto) minmax(58px, 1fr) 38px; align-items: center; gap: 7px; }
.collection-bar-row > span { overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.collection-bar-row > strong { font-size: 9px; text-align: right; white-space: nowrap; }
.collection-bar-track { height: 7px; overflow: hidden; border-radius: 7px; background: #ece8ef; }
.collection-bar-track span { display: block; height: 100%; border-radius: inherit; background: #55b9ad; transform-origin: left; animation: barReveal .62s cubic-bezier(.2,.8,.2,1) both; }
.collection-bar-row.is-rarity-r .collection-bar-track span { background: #6fa9d0; }
.collection-bar-row.is-rarity-sr .collection-bar-track span { background: #a889cc; }
.collection-bar-row.is-rarity-ssr .collection-bar-track span { background: #d1a554; }
.collection-source-chart { height: 18px; display: flex; overflow: hidden; margin-top: 24px; border-radius: 4px; background: #ece8ef; }
.collection-source-chart span { min-width: 2px; height: 100%; }
.collection-source-chart .is-physical { background: #4eafa5; }
.collection-source-chart .is-registered { background: #779fcd; }
.collection-source-chart .is-captured { background: #d490aa; }
.collection-source-legend { display: grid; gap: 11px; margin-top: 18px; }
.collection-source-legend > div { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 7px; font-size: 9px; }
.collection-source-legend i { width: 8px; height: 8px; border-radius: 2px; background: #4eafa5; }
.collection-source-legend .is-registered { background: #779fcd; }
.collection-source-legend .is-captured { background: #d490aa; }
.collection-source-legend span { color: var(--muted); }
.collection-gallery-head { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.collection-gallery-head > div:first-child strong, .collection-gallery-head > div:first-child span { display: block; }
.collection-gallery-head > div:first-child strong { font-size: 12px; }
.collection-gallery-head > div:first-child span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.collection-gallery-tools { display: flex; align-items: center; gap: 8px; }
.collection-search { width: min(310px, 28vw); }
.collection-filter { display: inline-grid; grid-template-columns: repeat(3, minmax(58px, 1fr)); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
.collection-filter button { min-height: 34px; padding: 0 10px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; }
.collection-filter button:last-child { border-right: 0; }
.collection-filter button.is-active { color: #255e59; background: var(--mint-soft); }
.collection-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 11px; padding: 14px; background: #f8f7fa; }
.collection-card {
  position: relative; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--ink); text-align: left; box-shadow: 0 3px 10px rgba(70,60,84,.06);
}
.collection-card:hover { border-color: #9acfc8; transform: translateY(-2px); box-shadow: var(--soft-shadow); }
.collection-card-visual { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: #e8e4eb; }
.collection-card-visual img { width: 100%; height: 100%; display: block; object-fit: cover; transition: filter .2s ease, opacity .2s ease, transform .2s ease; }
.collection-card:hover .collection-card-visual img { transform: scale(1.02); }
.collection-card.is-missing .collection-card-visual img { filter: grayscale(1) contrast(.8) brightness(.62); opacity: .52; }
.collection-card-state { position: absolute; z-index: 1; top: 7px; right: 7px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(34,112,102,.9); box-shadow: 0 2px 7px rgba(20,32,38,.22); }
.collection-card.is-missing .collection-card-state { background: rgba(56,53,66,.84); }
.collection-card-state svg { width: 14px; height: 14px; }
.collection-card-rarity { position: absolute; z-index: 1; left: 7px; top: 7px; min-width: 26px; padding: 3px 5px; border-radius: 3px; color: #fff; background: rgba(47,47,62,.82); font: 800 8px/1.2 Consolas, monospace; text-align: center; }
.collection-card-copy { min-height: 62px; padding: 9px; }
.collection-card-copy strong, .collection-card-copy code, .collection-card-copy span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collection-card-copy strong { font-size: 10px; }
.collection-card-copy code { margin-top: 4px; color: var(--muted); font-size: 8px; }
.collection-card-copy span { margin-top: 5px; color: var(--jade-dark); font-size: 8px; font-weight: 700; }
.collection-card.is-missing .collection-card-copy span { color: var(--muted); }
.collection-gallery-empty { min-height: 122px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 18px; color: var(--muted); }
.collection-gallery-empty svg { width: 20px; height: 20px; }
.collection-gallery-empty strong { font-size: 10px; }
.collection-table-progress { width: 118px; display: grid; grid-template-columns: 1fr auto; gap: 3px 7px; padding: 6px 7px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--ink); text-align: left; }
.collection-table-progress:hover { border-color: #b9dcd7; background: #eff9f7; }
.collection-table-progress strong { font-size: 11px; }
.collection-table-progress > span { color: var(--muted); font-size: 9px; text-align: right; }
.collection-table-progress div { grid-column: 1 / -1; height: 5px; overflow: hidden; border-radius: 5px; background: #e9e5ec; }
.collection-table-progress div span { display: block; height: 100%; border-radius: inherit; background: #55b9ad; }
.registration-head { min-height: 64px; flex-wrap: wrap; padding-block: 8px; }
.registration-bulk-actions { display: flex; align-items: center; gap: 6px; }
.registration-bulk-actions > span { min-width: 54px; margin: 0; text-align: right; }
.button-compact { min-height: 32px; padding-inline: 10px; }
.registration-toolbar {
  display: flex; align-items: center; gap: 9px; padding: 9px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
}
.registration-search { flex: 1 1 320px; }
.registration-status-filter { flex: 0 0 auto; }
.selection-column { width: 42px; text-align: center !important; }
.selection-column input, .registration-task-check, .ownership-task-check { width: 16px; height: 16px; margin: 0; accent-color: var(--jade-dark); }
.registration-row.is-selected td, .ownership-row.is-selected td { background: #eff9f7; }
.entity-cell strong, .entity-cell code, .entity-cell span { display: block; }
.entity-cell span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.user-identity-cell { min-width: 210px; }
.user-identity { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 10px; }
.user-avatar {
  width: 44px; height: 44px; overflow: hidden; border: 1px solid #c7ded9; border-radius: 50%;
  background: linear-gradient(145deg, var(--mint-soft), var(--pink-soft)); box-shadow: 0 0 0 3px rgba(102,190,178,.1);
}
.user-avatar img, .user-profile-avatar img, .avatar-preset-option img { width: 100%; height: 100%; display: block; object-fit: cover; }
.user-identity strong, .user-identity code, .user-identity span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.user-identity strong { font-size: 12px; }
.user-identity code { margin-top: 3px; color: var(--muted); font-size: 9px; }
.profile-state { margin-top: 5px !important; color: #28776d !important; font-size: 9px !important; font-weight: 800; }
.profile-state.is-incomplete { color: #9a5b2a !important; }
.avatar-source-cell { min-width: 116px; }
.avatar-source-cell strong, .avatar-source-cell span { display: block; }
.avatar-source-cell strong { font-size: 10px; }
.avatar-source-cell span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.operation-status { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 4px; font-size: 9px; font-weight: 800; }
.operation-status.is-active, .operation-status.is-verified { color: #176456; background: #dcf5ed; }
.operation-status.is-pending { color: #765729; background: #fff3d7; }
.operation-status.is-blocked, .operation-status.is-rejected { color: #8b3853; background: #fde3eb; }
.client-platform { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 4px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.client-platform.platform-android { color: #176456; background: #dcf5ed; }
.client-platform.platform-ios { color: #34455e; background: #e4eaf4; }
.client-platform.platform-miniprogram { color: #176238; background: #dcf4df; }
.table-empty-cell { height: 72px; color: var(--muted); text-align: center !important; }
.daily-exploration-table { min-width: 930px; }
.daily-count-cell strong, .daily-count-cell span { display: block; }
.daily-count-cell strong { color: var(--jade-dark); font-size: 13px; }
.daily-count-cell span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.daily-progress { width: 132px; height: 8px; overflow: hidden; border-radius: 8px; background: #e9edf0; box-shadow: inset 0 1px 2px rgba(55,60,72,.08); }
.daily-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #62bdb2, #ef9ab6); transition: width .28s ease; }
.daily-notice-status { display: inline-flex; min-height: 22px; align-items: center; padding: 0 7px; border-radius: 4px; color: #39766e; background: #e6f5f1; font-size: 9px; font-weight: 800; }
.daily-notice-status.is-pending { color: #8b5a24; background: #fff1d6; }

.detail-drawer {
  position: fixed; z-index: 30; isolation: isolate; top: 0; right: 0;
  width: min(620px, 96vw); height: 100vh; overflow: hidden;
  background-color: #fff; color: var(--ink); opacity: 1; mix-blend-mode: normal;
  border-left: 1px solid #ddcfe4; box-shadow: var(--shadow);
  transform: translateX(105%); transition: transform .34s cubic-bezier(.2,.82,.2,1);
  display: flex; flex-direction: column;
}
.detail-drawer::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: #fff;
}
.detail-drawer.is-open { transform: translateX(0); }
.drawer-scrim { display: none; position: fixed; z-index: 29; inset: 0; border: 0; background: rgba(13,25,21,.35); }
.drawer-scrim.is-open { display: block; }
.drawer-head { flex: 0 0 auto; min-height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--line); background: #fff; }
.drawer-head span { color: var(--muted); font: 10px Consolas, monospace; }
.drawer-head h2 { margin: 4px 0 0; font-size: 18px; }
.drawer-head-actions { display: flex; align-items: center; gap: 7px; }
.drawer-scroll { flex: 1; min-height: 0; overflow: auto; padding: 16px; background: #fff; }
.drawer-art { min-height: 260px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(145deg, #def3ef, #f8eaf1, #ebe5f8); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.65); }
.drawer-art img { width: 100%; max-height: 520px; display: block; object-fit: contain; }
.drawer-art div { color: var(--muted); font-size: 12px; }
.readiness { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 0; border: 1px solid var(--line); }
.ready-cell { padding: 9px; border-right: 1px solid var(--line); }
.ready-cell:last-child { border: 0; }
.ready-cell span, .ready-cell strong { display: block; }
.ready-cell span { color: var(--muted); font-size: 9px; }
.ready-cell strong { margin-top: 3px; font-size: 10px; }
.ready-cell.is-ready strong { color: var(--jade); }
.form-stack { display: grid; gap: 12px; }
.editor-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.editor-tabs button { min-height: 36px; border: 0; border-right: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700; }
.editor-tabs button:last-child { border-right: 0; }
.editor-tabs button.is-active { background: linear-gradient(110deg, var(--mint-soft), var(--pink-soft)); color: #4b4960; }
.editor-panel { display: grid; gap: 12px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; padding-top: 13px; border-top: 1px solid var(--line); }
.section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.section-title strong { font-size: 12px; }
.section-title span { color: var(--muted); font-size: 9px; }
.section-title-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.mini-action { min-height: 28px; padding: 0 9px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--jade-dark); font-size: 10px; }
.mini-action svg { width: 13px; height: 13px; }
.form-stack label, .modal label { display: grid; gap: 6px; }
.form-stack label > span, .modal label > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-triple, .stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.form-quad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.modal-inline-actions { display: flex; justify-content: flex-end; margin: 10px 0 4px; }
.animation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.repeat-list { display: grid; gap: 9px; }
.repeat-item { display: grid; gap: 9px; padding: 11px; border: 1px solid var(--line); border-left: 3px solid #8fd8cd; border-radius: 0 8px 8px 0; background: var(--surface-2); }
.repeat-item > header { display: flex; align-items: center; justify-content: space-between; }
.repeat-item > header strong { font-size: 11px; }
.repeat-item .icon-button { width: 28px; height: 28px; min-height: 28px; }
.story-upload-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.story-upload-actions .button { min-height: 34px; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); }
input, select { height: 38px; padding: 0 10px; }
textarea { padding: 9px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(117,207,194,.2); border-color: #6fc8bc; box-shadow: 0 0 0 1px rgba(255,202,217,.36); }
.upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.upload-row > span { color: var(--muted); font-size: 9px; }
.upload-progress { flex: 1 0 100%; min-height: 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(152px, auto); align-items: center; gap: 9px; }
.upload-progress > div { height: 8px; overflow: hidden; border-radius: 8px; background: #e9edf0; box-shadow: inset 0 1px 2px rgba(55,60,72,.08); }
.upload-progress > div span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #62bdb2, #ef9ab6); transition: width .16s ease; }
.upload-progress.is-preparing > div span { width: 34% !important; animation: upload-preparing 1.05s ease-in-out infinite; }
.upload-progress strong { color: var(--jade-dark); font-size: 10px; line-height: 1.35; text-align: right; }
.upload-progress.is-error > div span { background: #d85f7e; }
.upload-progress.is-error strong { color: #a43d59; }
@keyframes upload-preparing { from { transform: translateX(-110%); } to { transform: translateX(295%); } }
.creature-binding-field { display: grid; gap: 9px; }
.creature-binding-field > header strong, .creature-binding-field > header span { display: block; }
.creature-binding-field > header strong { font-size: 10px; }
.creature-binding-field > header span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.creature-binding-summary {
  min-width: 0; min-height: 64px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; padding: 10px; border: 1px solid #cfe5df; border-left: 3px solid var(--jade);
  border-radius: 0 8px 8px 0; background: #f7fbfa;
}
.creature-binding-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #b9dcd5; border-radius: 8px; color: var(--jade-dark); background: var(--mint-soft); }
.creature-binding-icon svg { width: 17px; height: 17px; }
.creature-binding-summary strong, .creature-binding-summary span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creature-binding-summary strong { font-size: 11px; }
.creature-binding-summary div > span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.technical-details { border-top: 1px dashed var(--line); padding-top: 7px; }
.technical-details summary { width: fit-content; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 700; }
.technical-details[open] summary { margin-bottom: 8px; }
.technical-details input[readonly] { color: var(--muted); background: #f5f4f7; font-family: Consolas, monospace; font-size: 10px; }
.create-creature-profile {
  width: 100%; min-height: 66px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 18px;
  align-items: center; gap: 10px; padding: 10px; border: 1px solid #9fd4ca; border-radius: 8px;
  color: var(--ink); background: #f1faf7; text-align: left;
}
.create-creature-profile:hover { border-color: var(--jade); background: #eaf8f4; }
.create-creature-profile > span:nth-child(2) strong, .create-creature-profile > span:nth-child(2) small { display: block; }
.create-creature-profile > span:nth-child(2) strong { font-size: 11px; }
.create-creature-profile > span:nth-child(2) small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.create-creature-profile > svg { width: 16px; color: var(--jade-dark); }
.creature-profile-search { flex: none; }
.creature-profile-list { max-height: min(430px, 52vh); overflow-y: auto; display: grid; gap: 7px; padding-right: 3px; }
.creature-profile-option {
  width: 100%; min-width: 0; min-height: 72px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px;
  align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); background: #fff; text-align: left;
}
.creature-profile-option:hover { border-color: #8acdc3; background: #f6fbfa; }
.creature-profile-option[aria-pressed="true"] { border-color: var(--jade); background: #edf9f6; box-shadow: 0 0 0 2px rgba(85,185,173,.12); }
.creature-profile-option img, .creature-profile-thumb-empty { width: 44px; height: 60px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); object-fit: cover; }
.creature-profile-thumb-empty svg { width: 16px; color: var(--muted); }
.creature-profile-option strong, .creature-profile-option small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creature-profile-option strong { font-size: 11px; }
.creature-profile-option small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.creature-profile-option > svg { width: 16px; color: transparent; }
.creature-profile-option[aria-pressed="true"] > svg { color: var(--jade-dark); }
#creature-profile-empty { min-height: 100px; margin: 0; }
.model-inspector { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #f5f8f7; }
.model-inspector-head { min-height: 42px; padding: 0 10px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.82); }
.model-inspector-head strong, .model-inspector-head span { display: block; }
.model-inspector-head strong { font-size: 11px; }
.model-inspector-head span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.model-stage { position: relative; height: 260px; overflow: hidden; background: #dfe7e4; }
.model-stage model-viewer { width: 100%; height: 100%; display: block; cursor: grab; opacity: 1; transition: opacity .16s ease; --poster-color: transparent; }
.model-stage model-viewer:active { cursor: grabbing; }
.model-stage model-viewer.is-loading { opacity: 0; }
.model-stage-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 7px; color: #74827f; background: #eef2f1; font-size: 10px; pointer-events: none; }
.model-stage-empty svg { width: 24px; height: 24px; }
.model-stage-empty.is-error { color: #b33a58; background: #fff1f4; }
.model-inspection-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); background: var(--surface); }
.model-inspection-fact { min-width: 0; padding: 9px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.model-inspection-fact:nth-child(4n) { border-right: 0; }
.model-inspection-fact span, .model-inspection-fact strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-inspection-fact span { color: var(--muted); font-size: 8px; }
.model-inspection-fact strong { margin-top: 3px; font-size: 11px; }
.model-animation-controls { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: end; gap: 8px; padding: 10px 11px; border-top: 1px solid var(--line); background: var(--surface); }
.model-animation-controls label { min-width: 0; }
.model-animation-controls .icon-button { width: 36px; height: 36px; }
.model-inspection-warnings { display: grid; gap: 5px; padding: 9px 11px; }
.model-inspection-warning { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 5px; align-items: start; color: #79643e; font-size: 9px; line-height: 1.5; }
.model-inspection-warning svg { width: 13px; height: 13px; margin-top: 1px; }
.model-inspection-warning.is-pass { color: var(--jade-dark); }
.compact-toggle { display: inline-flex !important; grid-template-columns: auto auto; align-items: center; gap: 6px !important; color: var(--muted); font-size: 10px; }
.compact-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--jade); }

.demo-claim-cell { min-width: 78px; }
.demo-claim-switch { display: inline-flex; align-items: center; cursor: pointer; }
.demo-claim-switch input { position: absolute; opacity: 0; pointer-events: none; }
.demo-claim-switch-track {
  position: relative;
  width: 36px;
  height: 20px;
  border: 1px solid rgba(75, 91, 94, 0.24);
  border-radius: 10px;
  background: rgba(75, 91, 94, 0.12);
  transition: background 150ms ease, border-color 150ms ease;
}
.demo-claim-switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(30, 45, 47, 0.24);
  transition: transform 150ms ease;
}
.demo-claim-switch input:checked + .demo-claim-switch-track {
  border-color: var(--jade);
  background: var(--jade);
}
.demo-claim-switch input:checked + .demo-claim-switch-track::after { transform: translateX(16px); }
.demo-claim-switch input:focus-visible + .demo-claim-switch-track { outline: 2px solid var(--jade); outline-offset: 2px; }
.demo-claim-switch input:disabled + .demo-claim-switch-track { cursor: wait; opacity: 0.55; }
.draw-video-preview { width: min(100%, 236px); aspect-ratio: 9 / 16; max-height: 420px; justify-self: center; background: #050807; object-fit: contain; }
.media-preview-status { width: min(100%, 420px); justify-self: center; padding: 9px 11px; border: 1px solid #cfe8e2; border-radius: 6px; color: var(--jade-dark); background: #f1fbf8; font-size: 10px; text-align: center; }
.media-preview-status.is-error { border-color: #efb4c3; color: #9a3854; background: #fff2f5; }
.transition-panel { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 15px; }
.listing-panel { padding: 13px; border: 1px solid #cfe8e2; border-radius: 8px; background: linear-gradient(110deg, #f1fbf8, #fff5f8); }
.transition-panel header { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.transition-panel header span { color: var(--muted); }
.transition-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.drawer-actions { flex: 0 0 auto; min-height: 64px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; }
.drawer-actions .button { width: 100%; }

.modal { width: min(470px, calc(100vw - 28px)); border: 1px solid #dfd2e6; border-radius: 8px; padding: 0; background: linear-gradient(160deg, #fff, #fcf8fd 58%, #f3fbf8); box-shadow: var(--shadow); color: var(--ink); }
.modal[open] { animation: modalBloom .26s cubic-bezier(.2,.82,.2,1) both; }
.modal::backdrop { background: rgba(44,43,58,.5); backdrop-filter: blur(5px) saturate(.92); }
.modal form, .result-dialog { display: grid; gap: 14px; padding: 20px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-head span { color: var(--jade); font: 700 9px Consolas, monospace; }
.modal-head h2 { margin: 4px 0 0; font-size: 19px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.login-modal { width: min(380px, calc(100vw - 28px)); }
.wide-modal { width: min(900px, calc(100vw - 28px)); }
.login-modal form { padding: 26px; }
.login-modal h2 { margin: 0; font-size: 20px; }
.modal-mark { margin-bottom: 5px; }
.form-error { min-height: 16px; margin: 0; color: var(--danger); font-size: 11px; }
.user-profile-summary { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--line); border-left: 3px solid var(--jade); background: #f8fbfa; }
.user-profile-avatar { width: 76px; height: 76px; overflow: hidden; border: 1px solid #bcdad4; border-radius: 50%; background: var(--mint-soft); box-shadow: 0 0 0 4px rgba(100,190,178,.1); }
.user-profile-summary strong, .user-profile-summary code, .user-profile-summary span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-profile-summary strong { font-size: 15px; }
.user-profile-summary code { margin-top: 5px; color: var(--muted); font-size: 9px; }
.user-profile-summary span { margin-top: 5px; color: var(--jade-dark); font-size: 10px; font-weight: 700; }
.user-avatar-fieldset { min-width: 0; display: grid; gap: 10px; margin: 0; padding: 11px; border: 1px solid var(--line); }
.user-avatar-fieldset legend { padding: 0 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.avatar-preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.avatar-preset-option { min-width: 0; min-height: 68px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 16px; align-items: center; gap: 8px; padding: 7px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); background: #fff; text-align: left; }
.avatar-preset-option:hover { border-color: #83c9bf; background: #f4fbf9; }
.avatar-preset-option[aria-pressed="true"] { border-color: #55b9ad; background: #edf9f6; box-shadow: 0 0 0 2px rgba(85,185,173,.13); }
.avatar-preset-option img { width: 48px; height: 52px; border-radius: 6px; background: var(--surface-2); }
.avatar-preset-option strong, .avatar-preset-option small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-preset-option strong { font-size: 10px; }
.avatar-preset-option small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.avatar-preset-option > svg { width: 15px; color: transparent; }
.avatar-preset-option[aria-pressed="true"] > svg { color: var(--jade-dark); }
.user-avatar-fieldset > .button { justify-self: start; }
.check-field { display: flex !important; grid-template-columns: 18px 1fr; align-items: center; }
.check-field input { width: 16px; height: 16px; accent-color: var(--jade); }
.check-field span { color: var(--ink) !important; }
.warning-line, .export-warning { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 11px; background: #fff8e9; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; font-size: 10px; }
.warning-line svg, .export-warning svg { flex: 0 0 auto; width: 18px; }
.export-warning strong, .export-warning span { display: block; }
.export-warning span { margin-top: 3px; color: var(--muted); }
.battle-pair { display: grid; grid-template-columns: 1fr 38px 1fr; align-items: center; gap: 10px; }
.battle-pair section { display: grid; gap: 9px; }
.battle-pair section > strong { color: var(--jade); font-size: 12px; }
.versus { font: 800 12px Consolas, monospace; text-align: center; color: var(--coral); }
.battle-result { border: 1px solid var(--line); background: var(--surface-2); }
.battle-winner { display: block; padding: 12px; border-bottom: 1px solid var(--line); color: var(--jade-dark); }
.battle-log { max-height: 230px; overflow: auto; padding: 8px 12px; font-size: 10px; }
.battle-log div { padding: 5px 0; border-bottom: 1px solid #e6ebe7; }
.battle-log .is-round { margin-top: 4px; color: var(--coral); font-weight: 800; }
.release-picker-head { display: flex; align-items: center; gap: 10px; }
.release-picker-head .search-field { flex: 1; }
.release-picker-head > strong { flex: 0 0 auto; color: var(--jade-dark); font-size: 10px; }
.release-card-picker { max-height: 310px; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 2px; }
.release-card-option { min-width: 0; min-height: 76px; display: grid !important; grid-template-columns: 46px minmax(0, 1fr) 18px; align-items: center; gap: 8px !important; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.release-card-option.is-selected { border-color: #76cabc; background: #edf9f5; box-shadow: 0 0 0 2px rgba(118,202,188,.12); }
.release-card-option img { width: 46px; height: 61px; object-fit: cover; border-radius: 4px; }
.release-card-option strong, .release-card-option code, .release-card-option span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-card-option strong { font-size: 11px; }
.release-card-option code, .release-card-option span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.release-card-option input { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--jade); }
.release-placeholder-cell { min-width: 150px; }
.release-placeholder-cell, .release-placeholder-cell > div { display: flex; align-items: center; gap: 9px; }
.release-placeholder-cell > img { width: 38px; aspect-ratio: 2 / 3; display: block; object-fit: cover; border: 1px solid #c8d3d1; border-radius: 4px; background: #30343b; }
.release-placeholder-cell > div { min-width: 0; align-items: flex-start; flex-direction: column; gap: 3px; }
.release-placeholder-cell strong, .release-placeholder-cell span { display: block; white-space: nowrap; }
.release-placeholder-cell strong { font-size: 10px; }
.release-placeholder-cell span { color: var(--muted); font-size: 9px; }
.release-placeholder-editor { display: grid; grid-template-columns: 156px minmax(0, 1fr); align-items: center; gap: 16px; }
.release-placeholder-preview { width: 156px; aspect-ratio: 2 / 3; overflow: hidden; border: 1px solid #aebfbc; border-radius: 6px; background: #30343b; box-shadow: 0 10px 24px rgba(38,44,48,.18); }
.release-placeholder-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.release-placeholder-copy strong, .release-placeholder-copy code, .release-placeholder-copy span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-placeholder-copy strong { font-size: 15px; }
.release-placeholder-copy code { margin-top: 5px; color: var(--muted); font-size: 9px; }
.release-placeholder-copy span { margin-top: 10px; color: var(--jade-dark); font-size: 10px; font-weight: 800; }
.release-placeholder-copy p { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.release-placeholder-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.release-picker-note { margin: 0; color: var(--muted); font-size: 9px; }
.toast-region { position: fixed; z-index: 50; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(340px, calc(100vw - 36px)); }
.toast { padding: 11px 13px; border-left: 3px solid #8de4d8; border-radius: 0 8px 8px 0; background: #373849; color: #fff; box-shadow: var(--shadow); font-size: 11px; animation: toastIn .28s cubic-bezier(.2,.82,.2,1) both; }
.toast.is-error { border-color: var(--coral); }

.asset-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 13px 0 18px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--line); box-shadow: var(--soft-shadow); }
.asset-stat { padding: 14px 16px; background: var(--surface); }
.asset-stat span, .asset-stat strong { display: block; }
.asset-stat span { color: var(--muted); font-size: 10px; }
.asset-stat strong { margin-top: 5px; font-size: 21px; }
.asset-section { margin-top: 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: rgba(255,255,255,.92); box-shadow: var(--soft-shadow); }
.asset-section > .empty-state { min-height: 145px; margin: 0; border: 0; border-top: 1px dashed var(--line-strong); }
.section-head { min-height: 58px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.section-head strong, .section-head span { display: block; }
.section-head strong { font-size: 13px; }
.section-head span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.card-back-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 14px; }
.card-back-item { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); box-shadow: 0 5px 16px rgba(82,63,99,.06); }
.card-back-item.is-trashed { opacity: .62; }
.card-back-preview { aspect-ratio: 2 / 3; display: grid; place-items: center; overflow: hidden; background: #e2e7e3; color: var(--muted); }
.card-back-preview img { width: 100%; height: 100%; object-fit: cover; }
.card-back-preview svg { width: 26px; }
.card-back-copy { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px; }
.card-back-copy strong, .card-back-copy code { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-back-copy strong { font-size: 11px; }
.card-back-copy code { margin-top: 3px; color: var(--muted); font-size: 9px; }
.card-back-copy .status-badge { margin-top: 6px; }
.card-back-actions { display: flex; align-items: center; gap: 4px; }
.card-back-actions .card-back-actions { padding-left: 3px; border-left: 1px solid var(--line); }
.barcode-layout-editor { display: grid; grid-template-columns: minmax(210px, 280px) minmax(0, 1fr); align-items: start; gap: 18px; }
.barcode-card-preview { position: relative; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; background: #e2e7e3; box-shadow: 0 8px 24px rgba(57,50,72,.16); touch-action: none; }
.barcode-card-preview > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.barcode-overlay { position: absolute; display: flex; overflow: visible; background: transparent; cursor: grab; touch-action: none; outline: 1px dashed rgba(52,126,120,.9); outline-offset: 3px; mix-blend-mode: multiply; }
.barcode-overlay:active { cursor: grabbing; }
.barcode-overlay svg { width: 100%; height: 100%; display: block; overflow: visible; }
.barcode-layout-controls { display: grid; gap: 13px; }
.barcode-layout-controls p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.barcode-preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.barcode-preset-row .button { width: 100%; }
.barcode-safety-note { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 8px; padding: 10px 11px; border-left: 3px solid #69b9ad; background: #edf8f5; color: #42615e; font-size: 10px; line-height: 1.6; }
.barcode-safety-note svg { width: 17px; height: 17px; color: var(--jade-dark); }
.asset-toolbar { margin-bottom: 14px; }
.default-label { padding: 4px 6px; border-radius: 4px; background: linear-gradient(110deg, var(--mint-soft), var(--pink-soft)); color: var(--jade-dark); font-size: 9px; font-weight: 800; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #f4faf8; }

button, .card-item, .compact-item, .card-back-item { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }
.view:not(.is-hidden) { animation: viewArrive .3s ease-out both; }
.brand-mark img, .modal-mark img { animation: iconBreathe 4.8s ease-in-out infinite; }
.category-tabs button.is-active svg { animation: iconTwinkle 1.8s ease-in-out infinite; }
.card-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(112deg, transparent 28%, rgba(255,255,255,.5) 47%, rgba(219,250,244,.25) 54%, transparent 70%);
  transform: translateX(-80%); transition: opacity .2s ease, transform .55s ease;
}
.card-item:hover .card-art::after { opacity: 1; transform: translateX(80%); }

@keyframes viewArrive {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cardArrive {
  from { opacity: 0; transform: translateY(9px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modalBloom {
  from { opacity: 0; transform: translateY(9px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes barReveal {
  from { transform: scaleX(0); opacity: .35; }
  to { transform: scaleX(1); opacity: 1; }
}
@keyframes iconBreathe {
  0%, 100% { filter: saturate(1) brightness(1); transform: scale(1); }
  50% { filter: saturate(1.08) brightness(1.06); transform: scale(1.025); }
}
@keyframes iconTwinkle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.08); }
}
@keyframes healthPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(141,228,216,.17); }
  50% { box-shadow: 0 0 0 6px rgba(141,228,216,.06); }
}

@media (max-width: 1280px) {
  .collection-analysis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-analysis-grid > :nth-child(2) { border-right: 0; }
  .collection-analysis-grid > :nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand > div:last-child, .nav-item span, .nav-item b, .sidebar-foot div { display: none; }
  .nav-item { grid-template-columns: 1fr; place-items: center; padding: 0; }
  .sidebar-foot { grid-template-columns: 1fr; justify-items: center; }
  .overview-grid { grid-template-columns: 1fr; }
  .recent-panel { grid-column: auto; }
  .compact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-panel-head { align-items: flex-start; flex-direction: column; }
  .collection-scope-controls { width: 100%; }
  .collection-scope-controls .select-field { flex: 1 1 0; }
  .collection-scope-controls .select-field select { width: 100%; min-width: 0; }
  .collection-gallery-head { align-items: flex-start; flex-direction: column; }
  .collection-gallery-tools { width: 100%; }
  .collection-search { width: auto; flex: 1 1 auto; }
}

@media (max-width: 720px) {
  .batch-export-detail { grid-template-columns: 1fr; }
  .batch-export-preview { justify-self: center; }
  .batch-export-head { align-items: flex-start; flex-direction: column; }
  .batch-export-actions { justify-content: flex-start; }
  .app-shell { display: block; padding-bottom: 62px; }
  .sidebar { position: fixed; z-index: 20; top: auto; bottom: 0; width: 100%; height: 58px; padding: 6px 12px; border-right: 0; border-top: 1px solid rgba(205,238,231,.34); }
  .brand, .sidebar-foot { display: none; }
  .main-nav { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
  .nav-item { min-height: 45px; grid-template-columns: 1fr; grid-template-rows: 18px auto; place-content: center; place-items: center; gap: 1px; font-size: 9px; }
  .nav-item span { display: inline; white-space: nowrap; }
  .workspace { padding: 18px 12px 30px; }
  .workspace-header { min-height: 58px; }
  .workspace-header h1 { font-size: 21px; }
  .header-actions .button span { display: none; }
  .header-actions .button { width: 38px; padding: 0; }
  .metric-strip { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .toolbar { flex-wrap: wrap; }
  .card-download-toolbar { flex-wrap: wrap; justify-content: flex-start; }
  .card-select-all { flex: 1 1 100%; }
  .category-tabs { grid-template-columns: repeat(6, minmax(120px, 1fr)); }
  .search-field { flex-basis: 100%; }
  .select-field span { display: none; }
  .select-field select { min-width: 100px; }
  .result-count { margin-left: 0; }
  .card-collection { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .batch-summary { grid-template-columns: 1fr; }
  .barcode-workbench { grid-template-columns: minmax(0, 1fr) 142px; gap: 16px; padding: 18px; }
  .barcode-workbench-preview { width: 138px; }
  .user-summary { grid-template-columns: 1fr 1fr; }
  .exploration-summary { grid-template-columns: 1fr 1fr; }
  .asset-summary { grid-template-columns: 1fr 1fr; }
  .collection-analysis-grid { grid-template-columns: 1fr; }
  .collection-overall, .collection-chart-block { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .collection-analysis-grid > :last-child { border-bottom: 0; }
  .collection-gallery-tools { align-items: stretch; flex-direction: column; }
  .collection-filter { width: 100%; }
  .collection-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .collection-scope-controls { align-items: stretch; flex-direction: column; }
  .collection-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-kpis > div:nth-child(2) { border-right: 0; }
  .collection-kpis > div:nth-child(-n+2) { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
  .registration-head { align-items: flex-start; }
  .registration-bulk-actions { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .registration-bulk-actions > span { margin-right: auto; text-align: left; }
  .registration-toolbar { flex-wrap: wrap; }
  .registration-search { flex-basis: 100%; }
  .compact-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .news-editor-layout { grid-template-columns: 1fr; }
  .news-editor-media { padding-right: 0; padding-bottom: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .news-publish-row { grid-template-columns: 1fr 1fr; }
  .creature-binding-summary { grid-template-columns: 34px minmax(0, 1fr); }
  .creature-binding-summary .button { grid-column: 1 / -1; width: 100%; }
  .form-triple, .form-quad, .stat-grid { grid-template-columns: 1fr 1fr; }
  .battle-pair { grid-template-columns: 1fr; }
  .versus { display: none; }
  .animation-grid { grid-template-columns: 1fr; }
  .readiness { grid-template-columns: 1fr 1fr; }
  .release-card-picker { grid-template-columns: 1fr; }
  .release-placeholder-editor { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
  .release-placeholder-preview { width: 112px; }
  .avatar-preset-grid { grid-template-columns: 1fr; }
  .avatar-preset-option { grid-template-columns: 48px minmax(0, 1fr) 16px; }
  .barcode-layout-editor { grid-template-columns: 1fr; }
  .barcode-card-preview { width: min(250px, 100%); margin-inline: auto; }
  .barcode-workbench { grid-template-columns: 1fr; }
  .barcode-workbench-facts { grid-template-columns: 1fr; }
  .barcode-workbench-preview { width: min(220px, 72vw); justify-self: center; }
}

@media (hover: none) {
  .card-quick-actions { opacity: 1; pointer-events: auto; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
