@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Noto+Sans+TC:wght@400;500;700;800&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #0b0f1a;
  --bg-2: #0f172a;
  --card: rgba(15, 23, 42, 0.75);
  --ink: #f8fafc;
  --muted: #b6c3d6;
  --accent: #f97316;
  --accent-2: #22d3ee;
  --border: rgba(148, 163, 184, 0.2);
  --line: var(--border);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-primary: var(--ink);
  --layout-max-width: 1200px;
  --layout-padding: 40px;
  --news-content-max: 1680px;
  --news-home-dock-width: 360px;
  --news-home-dock-gap: 24px;
  --news-full-max: 1840px;
  --news-inline-gutter: clamp(12px, 1.8vw, 32px);
  --news-rail-width: clamp(340px, 24vw, 430px);
  --heading-size: 32px;
  --admin-title-size: 30px;
  --admin-title-weight: 800;
  --admin-title-spacing: 0.01em;
  --admin-title-color: #f8fafc;
  --admin-title-accent-color: #38bdf8;
  --admin-title-border: rgba(56, 189, 248, 0.35);
  --table-padding-y: 6px;
  --table-padding-x: 8px;
  --button-height: 32px;
  --button-font-size: 13px;
  --card-gap: 24px;
  --font-body: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
  --font-display: var(--font-body);
  --theme-motion-page-in: 420ms;
  --theme-motion-hover: 170ms;
  --theme-motion-pop: 240ms;
}

body.frontend-theme-default {
  --line: var(--border);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-primary: var(--ink);
}

body.frontend-theme-cute {
  --bg: #ffeaf3;
  --bg-2: #fff4f9;
  --card: rgba(255, 255, 255, 0.86);
  --ink: #4d2e44;
  --muted: #7f5e75;
  --accent: #ff6ea8;
  --accent-2: #ffc85c;
  --border: rgba(255, 140, 185, 0.28);
  --line: rgba(255, 140, 185, 0.35);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-primary: var(--ink);
}

body.frontend-theme-tech {
  --bg: #030915;
  --bg-2: #081326;
  --card: rgba(7, 18, 38, 0.86);
  --ink: #dce9ff;
  --muted: #8ea5cc;
  --accent: #33d1ff;
  --accent-2: #6d5cff;
  --border: rgba(51, 209, 255, 0.28);
  --line: rgba(92, 174, 255, 0.35);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-primary: var(--ink);
}

body.frontend-theme-cute {
  background: radial-gradient(circle at top, #ffd7ea 0%, var(--bg) 62%);
}

body.frontend-theme-tech {
  background: radial-gradient(circle at top, #0b1b3a 0%, var(--bg) 66%);
}

body.frontend-theme-cute .topbar {
  background: rgba(255, 244, 250, 0.92);
  border-bottom-color: rgba(255, 135, 180, 0.34);
}

body.frontend-theme-tech .topbar {
  background: rgba(4, 12, 26, 0.88);
  border-bottom-color: rgba(58, 165, 255, 0.35);
}

body.frontend-theme-cute .card {
  border-radius: 22px;
  box-shadow: 0 16px 32px rgba(233, 122, 163, 0.2);
}

body.frontend-theme-tech .card {
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(10, 98, 190, 0.24);
}

body.frontend-theme-cute .btn.primary {
  color: #fff;
  box-shadow: 0 12px 26px rgba(255, 110, 168, 0.32);
}

body.frontend-theme-tech .btn.primary {
  color: #041024;
  box-shadow: 0 12px 26px rgba(51, 209, 255, 0.34);
}

body.frontend-theme-cute .store-category-link {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

body.frontend-theme-tech .store-category-link {
  border-radius: 10px;
  background: rgba(8, 23, 45, 0.9);
}

body.frontend-theme-cute .store-card-subtitle,
body.frontend-theme-cute .nav a {
  color: #8a5f7c;
}

body.frontend-theme-tech .store-card-subtitle,
body.frontend-theme-tech .nav a {
  color: #8ea5cc;
}

/* Store V3.4 */
.store-layout {
  align-items: start;
}

.store-category-pane {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.store-category-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.store-category-link {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(11, 19, 37, 0.6);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.store-category-link:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(17, 28, 55, 0.88);
  transform: translateY(-1px);
}

.store-category-link.active {
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(20, 34, 66, 0.95);
  color: #fff;
}

.store-category-link span {
  color: var(--muted);
  font-size: 12px;
  margin-left: 10px;
}

.store-card-link {
  cursor: pointer;
}

.store-card {
  min-height: 330px;
}

.store-card-thumb {
  aspect-ratio: 4 / 3;
}

.store-card-body {
  gap: 10px;
}

.store-card-category {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.store-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card-subtitle {
  margin: -2px 0 0;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.95);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card-meta-icons {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-card-actions,
.store-card-actions-row {
  display: none !important;
}

.store-category-select {
  min-width: 220px;
}

@media (min-width: 1440px) {
  .store-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) and (max-width: 1439px) {
  .store-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .store-category-select {
    display: none !important;
  }
}

@media (max-width: 1079px) {
  .store-layout {
    grid-template-columns: 1fr;
  }

  .store-category-pane {
    display: none !important;
  }

  .store-toolbar {
    grid-template-columns: 1fr;
  }

  .store-search,
  .store-sort,
  .store-category-select {
    width: 100%;
  }

  .store-category-select {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: radial-gradient(circle at top, #1e293b, var(--bg));
  color: var(--ink);
  min-height: 100vh;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  z-index: 0;
}

.bg-orb-1 {
  width: 420px;
  height: 420px;
  background: #f97316;
  top: -120px;
  left: -120px;
}

.bg-orb-2 {
  width: 520px;
  height: 520px;
  background: #22d3ee;
  bottom: -200px;
  right: -140px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5vw;
  background: rgba(11, 15, 26, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 800;
  letter-spacing: 0.12em;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-logo-image {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.85);
}

.brand-logo-text {
  font-weight: 800;
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.topbar-actions .btn {
  white-space: nowrap;
}

.topbar-actions .btn.is-active {
  color: #fff;
  border-color: rgba(56, 189, 248, 0.52);
  background: rgba(14, 116, 144, 0.22);
}

.topbar-actions #customerLoginLink {
  display: none;
}

.admin-dashboard-theme-section {
  margin-top: 20px;
}

.admin-main > .admin-dashboard-theme-section {
  margin-top: 0;
}

.admin-dashboard-theme-section #dashboardThemeMount {
  width: 100%;
  min-height: 1px;
}

.admin-dashboard-theme-section .admin-brand-card {
  margin-top: 0;
}

.admin-brand-card {
  margin-top: 16px;
  padding: 16px;
}

.admin-brand-card h3 {
  margin: 0 0 8px;
}

.admin-brand-card .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.admin-brand-card .field input[type="text"],
.admin-brand-card .field input[type="url"],
.admin-brand-card .field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.75);
  color: var(--ink);
  padding: 9px 10px;
}

.admin-brand-upload {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-brand-preview {
  margin-top: 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  min-height: 54px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
}

.admin-brand-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.frontend-theme-preview {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(9, 14, 27, 0.75);
}

.ftp-shell {
  display: grid;
  gap: 0;
}

.ftp-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.ftp-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.ftp-title {
  font-size: 12px;
  font-weight: 700;
}

.ftp-badge {
  margin-left: auto;
  font-size: 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 8px;
  opacity: 0.85;
}

.ftp-body {
  padding: 10px;
  display: grid;
  gap: 10px;
}

.ftp-subtitle {
  margin: 0;
  font-size: 12px;
  opacity: 0.84;
}

.ftp-card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 10px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
}

.ftp-thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.4), rgba(51, 65, 85, 0.45));
}

.ftp-info {
  display: grid;
  gap: 3px;
}

.ftp-info strong {
  font-size: 13px;
  line-height: 1.2;
}

.ftp-info span {
  font-size: 12px;
  opacity: 0.88;
}

.ftp-card button {
  border: 0;
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: default;
}

.frontend-theme-preview[data-theme="default"] {
  color: #dbeafe;
  background: linear-gradient(150deg, rgba(6, 12, 24, 0.95), rgba(14, 26, 51, 0.84));
}

.frontend-theme-preview[data-theme="default"] .ftp-card button {
  background: #fb923c;
  color: #10203a;
}

.frontend-theme-preview[data-theme="cute"] {
  color: #7a355f;
  background: linear-gradient(145deg, #ffeef7, #ffe3f1);
}

.frontend-theme-preview[data-theme="cute"] .ftp-topbar {
  border-bottom-color: rgba(248, 122, 172, 0.28);
}

.frontend-theme-preview[data-theme="cute"] .ftp-card {
  border-color: rgba(248, 122, 172, 0.3);
  background: rgba(255, 255, 255, 0.72);
}

.frontend-theme-preview[data-theme="cute"] .ftp-thumb {
  background: linear-gradient(135deg, #ffd1e5, #ffc9a8);
}

.frontend-theme-preview[data-theme="cute"] .ftp-card button {
  background: #ff6ea8;
  color: #fff;
}

.frontend-theme-preview[data-theme="tech"] {
  color: #d8eeff;
  background: linear-gradient(150deg, #041229, #0a2144);
}

.frontend-theme-preview[data-theme="tech"] .ftp-topbar {
  border-bottom-color: rgba(61, 198, 255, 0.25);
}

.frontend-theme-preview[data-theme="tech"] .ftp-card {
  border-color: rgba(61, 198, 255, 0.32);
  background: rgba(8, 23, 46, 0.8);
}

.frontend-theme-preview[data-theme="tech"] .ftp-thumb {
  background: linear-gradient(135deg, #1f8dff, #61f0ff);
}

.frontend-theme-preview[data-theme="tech"] .ftp-card button {
  background: #33d1ff;
  color: #081a36;
}

.error-text {
  color: #fca5a5;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user:empty {
  display: none;
}

.mobile-tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(8, 12, 24, 0.9);
  backdrop-filter: blur(10px);
  z-index: 60;
}

.mobile-tabbar a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  border-radius: 10px;
  color: rgba(226, 232, 240, 0.82);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mobile-tabbar a.is-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.42);
  border: 1px solid rgba(59, 130, 246, 0.5);
}

.mobile-install-fab {
  position: fixed;
  right: 16px;
  bottom: calc(74px + env(safe-area-inset-bottom));
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  z-index: 61;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.38);
}

.mobile-install-fab.is-hidden {
  display: none;
}

.user-chip {
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: var(--accent-2);
  background: rgba(34, 211, 238, 0.12);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.user-name {
  font-weight: 700;
  color: var(--ink);
}

.user-menu {
  position: relative;
}

.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  display: grid;
  place-items: center;
  color: var(--ink);
  cursor: pointer;
}

.avatar-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--accent-2);
}

.avatar-icon svg {
  width: 100%;
  height: 100%;
}

.user-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: rgba(10, 15, 28, 0.95);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 10px;
  min-width: 220px;
  z-index: 6;
  box-shadow: 0 16px 40px rgba(8, 12, 24, 0.45);
}

.user-menu.open .user-panel {
  display: flex;
}

.user-section {
  display: grid;
  gap: 8px;
}

.user-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-info {
  display: grid;
  gap: 4px;
}

.user-info span {
  font-size: 12px;
  color: var(--muted);
}

.user-points {
  color: var(--accent);
  font-weight: 700;
}

.user-level-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  margin-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.22);
}

.user-level-badge {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  padding: 3px;
  object-fit: contain;
  object-position: center;
}

.user-level-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.user-level-bonus {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-2);
}

.user-inventory-preview {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--ink);
}

.user-menu-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.user-inventory-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.user-inventory-item .count {
  color: var(--accent);
  font-weight: 700;
}

.user-panel a,
.user-panel button {
  text-align: left;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.user-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.user-setting-row .switch {
  margin-left: auto;
}

.no-scroll {
  overflow: hidden;
}

.page {
  position: relative;
  z-index: 1;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: var(--layout-padding) 5vw calc(var(--layout-padding) * 2);
  display: flex;
  flex-direction: column;
  gap: 90px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  width: min(420px, 92vw);
  display: grid;
  gap: 16px;
  text-align: center;
}

.auth-card-wide {
  width: min(520px, 92vw);
  text-align: left;
}

.auth-card-wide .logo {
  text-align: center;
}

.tab-group {
  display: flex;
  gap: 10px;
}

.tab {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.tab.active {
  color: var(--accent);
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.15);
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
}

.auth-card h1 {
  margin: 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.admin-sidebar {
  background: rgba(11, 15, 26, 0.9);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-sidebar nav {
  display: grid;
  gap: 6px;
}

.admin-sidebar a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.admin-sidebar a:focus-visible,
.admin-sidebar .nav-group summary:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.6);
  outline-offset: 2px;
}

.admin-sidebar .nav-group {
  display: grid;
  gap: 4px;
}

.admin-sidebar .nav-group summary {
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.admin-sidebar .nav-group summary::-webkit-details-marker {
  display: none;
}

.admin-sidebar .nav-group summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.2s ease;
}

.admin-sidebar .nav-group[open] summary::after {
  transform: rotate(180deg);
}

.admin-sidebar .nav-group summary:hover {
  color: var(--ink);
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.5);
}

.admin-sidebar .nav-group[open] summary {
  color: var(--ink);
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.7);
}

.admin-sidebar .nav-sub {
  display: grid;
  gap: 4px;
  margin-left: 6px;
  padding: 6px 6px 6px 12px;
  border-left: 1px dashed var(--border);
  background: rgba(15, 23, 42, 0.35);
  border-radius: 12px;
}

.admin-sidebar .nav-sub a {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.admin-sidebar .nav-sub a:hover {
  color: var(--ink);
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.6);
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
  color: var(--ink);
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.7);
}

.admin-main {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: var(--layout-padding) 5vw calc(var(--layout-padding) * 2);
  display: grid;
  gap: 40px;
}

body[data-layout-page] .admin-main {
  max-width: none;
  width: 100%;
}

.layout-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: rgba(15, 23, 42, 0.65);
  position: fixed;
  top: 20px;
  right: 20px;
  width: min(420px, 92vw);
  z-index: 50;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.45);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

html.layout-loading body[data-layout-page] .admin-main {
  opacity: 0;
  pointer-events: none;
}

html.layout-ready body[data-layout-page] .admin-main {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.layout-toolbar--collapsed {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.layout-toolbar-fab {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 51;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.layout-toolbar-fab.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
}

.layout-toolbar-info {
  display: grid;
  gap: 4px;
}

.layout-toolbar-info strong {
  font-size: 15px;
}

.layout-toolbar-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.layout-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.layout-message {
  margin: 0;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 600;
}

.layout-editing .layout-block {
  position: relative;
  outline: 2px dashed rgba(248, 250, 252, 0.35);
  outline-offset: 4px;
}

.layout-canvas {
  position: relative;
}

.layout-canvas .layout-block {
  position: absolute;
}

.layout-editing .layout-canvas {
  background-image: linear-gradient(
      rgba(148, 163, 184, 0.12) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

.layout-handle,
.layout-resize,
.layout-lock {
  display: none;
}

.layout-editing .layout-handle,
.layout-editing .layout-lock {
  display: inline-flex;
}

.layout-editing .layout-resize {
  display: block;
}

.layout-resize {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  border-right: 2px solid rgba(248, 250, 252, 0.6);
  border-bottom: 2px solid rgba(248, 250, 252, 0.6);
  cursor: se-resize;
  opacity: 0.8;
}

.layout-lock {
  position: absolute;
  top: 8px;
  right: 54px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.85);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  z-index: 2;
}

.layout-locked .layout-handle,
.layout-locked .layout-resize {
  opacity: 0.25;
  pointer-events: none;
}

.layout-dragging {
  user-select: none;
}

.layout-block.dragging {
  opacity: 0.6;
}

.layout-guide-x,
.layout-guide-y {
  position: absolute;
  background: rgba(34, 211, 238, 0.7);
  pointer-events: none;
  z-index: 3;
  display: none;
}

.layout-guide-x {
  top: 0;
  bottom: 0;
  width: 1px;
}

.layout-guide-y {
  left: 0;
  right: 0;
  height: 1px;
}

.layout-handle {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.85);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: grab;
  z-index: 2;
}

.layout-handle:active {
  cursor: grabbing;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 16px;
  display: grid;
  gap: 10px;
}

.stat-setting-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.stat-setting-row input {
  flex: 1;
  min-width: 0;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 10px;
}

.stat-setting-row button {
  white-space: nowrap;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
}


.tag {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.2);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 12px;
  text-transform: uppercase;
}



.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}







.pill {
  background: rgba(34, 211, 238, 0.18);
  color: var(--accent-2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.price {
  font-weight: 700;
  color: var(--accent);
}



.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(120deg, rgba(249, 115, 22, 0.25), rgba(34, 211, 238, 0.25));
  border: 1px solid var(--border);
}

.banner h2 {
  margin: 8px 0 6px;
  font-size: clamp(24px, 3vw, 36px);
}

.banner-pill {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}














.section {
  display: grid;
  gap: 24px;
}

.section.dark {
  background: rgba(15, 23, 42, 0.7);
  padding: 40px;
  border-radius: 24px;
  border: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: var(--heading-size);
}

body[data-layout-page^="admin"] .section-head h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding-bottom: 8px;
  font-size: var(--admin-title-size);
  font-weight: var(--admin-title-weight);
  letter-spacing: var(--admin-title-spacing);
  color: var(--admin-title-color);
}

body[data-layout-page^="admin"] .section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 54px;
  height: 3px;
  border-radius: 999px;
  background: var(--admin-title-accent-color);
  box-shadow: 0 0 0 1px var(--admin-title-border);
}

body[data-layout-page^="admin"].admin-title-style-clean-pro {
  --admin-title-size: 30px;
  --admin-title-weight: 800;
  --admin-title-spacing: 0.01em;
  --admin-title-color: #f8fafc;
  --admin-title-accent-color: #38bdf8;
  --admin-title-border: rgba(56, 189, 248, 0.35);
}

body[data-layout-page^="admin"].admin-title-style-clean-soft {
  --admin-title-size: 29px;
  --admin-title-weight: 700;
  --admin-title-spacing: 0.005em;
  --admin-title-color: #e2e8f0;
  --admin-title-accent-color: #94a3b8;
  --admin-title-border: rgba(148, 163, 184, 0.4);
}

body[data-layout-page^="admin"].admin-title-style-clean-accent {
  --admin-title-size: 30px;
  --admin-title-weight: 800;
  --admin-title-spacing: 0.015em;
  --admin-title-color: #ffffff;
  --admin-title-accent-color: #f97316;
  --admin-title-border: rgba(249, 115, 22, 0.42);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.home-conversion {
  gap: 16px;
}

.home-conversion-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.home-conversion-primary {
  border-radius: 18px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(8, 47, 73, 0.32);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.32);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.home-conversion-primary.is-empty {
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.52);
}

.home-conversion-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 76px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  background: rgba(8, 145, 178, 0.14);
  color: rgba(165, 243, 252, 0.95);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.home-conversion-primary-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: radial-gradient(circle at 50% 0%, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.9));
  background-size: cover;
  background-position: center;
  text-decoration: none;
}

.home-conversion-primary h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.home-conversion-primary p {
  margin: 0;
  color: rgba(226, 232, 240, 0.86);
  font-size: 13px;
  line-height: 1.45;
}

.home-conversion-primary .btn {
  justify-self: start;
}

.home-conversion-cards {
  display: grid;
  gap: 10px;
}

.home-conversion-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.56);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.26);
  padding: 10px 12px;
  text-decoration: none;
  color: var(--ink);
}

.home-conversion-card.is-empty {
  grid-template-columns: 1fr;
}

.home-conversion-card.is-empty p {
  margin: 0;
  color: rgba(148, 163, 184, 0.92);
  font-size: 13px;
}

.home-conversion-card-thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.7);
  background-size: cover;
  background-position: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(148, 163, 184, 0.95);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-conversion-card-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.home-conversion-low-stock {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(185, 28, 28, 0.16);
  color: rgba(254, 202, 202, 0.95);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-conversion-card-meta strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
}

.home-conversion-card-meta span {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.92);
}

.home-conversion-card-cta {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  background: rgba(14, 116, 144, 0.16);
  color: rgba(103, 232, 249, 0.96);
  font-size: 12px;
  font-weight: 800;
}

.home-conversion-card:hover {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(8, 145, 178, 0.18);
  transform: translateY(-1px);
}

.search input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 12px;
  min-width: 220px;
}

.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  background: rgba(15, 23, 42, 0.7);
}

.tag-pill.active,
.tag-pill:hover {
  background: rgba(249, 115, 22, 0.2);
  color: var(--accent);
  border-color: rgba(249, 115, 22, 0.4);
}

.category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.admin-category-tabs {
  margin: 6px 0 4px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.admin-item-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 6px;
}

.admin-item-search-bar input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .admin-item-search-bar {
    flex-wrap: wrap;
  }

  .admin-item-search-bar .btn {
    width: 100%;
  }
}

.admin-category-tabs .category-tab {
  font-size: 13px;
  padding: 6px 14px;
}

.admin-category-tabs .category-tab.active {
  background: rgba(34, 211, 238, 0.18);
  color: var(--accent-2);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 10px 22px rgba(34, 211, 238, 0.12);
}

.admin-category-meta {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.category-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  background: rgba(15, 23, 42, 0.7);
}

.category-tab.active,
.category-tab:hover {
  background: rgba(249, 115, 22, 0.2);
  color: var(--accent);
  border-color: rgba(249, 115, 22, 0.4);
}





.category-pool {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.category-pool.is-hidden {
  display: none;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.category-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.category-draw-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-actions {
  display: flex;
  gap: 10px;
}







.sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.sort select {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 10px;
}

.card-grid {
  display: grid;
  gap: var(--card-gap);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.store-page {
  position: relative;
  z-index: 1;
}

.store-shell {
  display: block;
}

.store-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.store-category-pane {
  position: sticky;
  top: 84px;
  z-index: 2;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(10, 16, 30, 0.92), rgba(8, 12, 24, 0.86));
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.38);
}

.store-category-pane-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.store-category-sidebar {
  display: grid;
  gap: 9px;
}

.store-category-link {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(15, 23, 42, 0.52);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.store-category-link span {
  color: rgba(148, 163, 184, 0.92);
  font-weight: 700;
}

.store-category-link:hover {
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

.store-category-link.active {
  border-color: rgba(56, 189, 248, 0.78);
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.34), rgba(37, 99, 235, 0.22));
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.15);
}

.store-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.store-toolbar {
  position: sticky;
  top: 84px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(8, 12, 24, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.36);
}

.store-search .input-inline {
  width: 100%;
  min-height: 40px;
}

.store-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.store-category-select {
  display: none !important;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.store-category-tabs {
  display: none !important;
  gap: 8px;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.store-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, rgba(11, 17, 33, 0.86), rgba(9, 14, 28, 0.9));
  box-shadow: 0 14px 28px rgba(3, 7, 18, 0.34);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.store-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.44);
  box-shadow: 0 20px 36px rgba(2, 6, 23, 0.48);
}

.store-card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.store-card-thumb {
  position: relative;
  min-height: 0;
  aspect-ratio: 4 / 3;
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.76), rgba(30, 41, 59, 0.62));
  display: grid;
  place-items: center;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(226, 232, 240, 0.72);
  overflow: hidden;
}

.store-card-thumb.has-image {
  background-size: cover;
  background-position: center 42%;
}

.store-card-thumb.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.5));
}

.store-card-body {
  display: grid;
  gap: 11px;
  padding: 14px;
  position: relative;
  z-index: 2;
}

.store-card-category {
  font-size: 11px;
  color: rgba(125, 211, 252, 0.96);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.store-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.store-card h3 a:hover {
  color: #e2e8f0;
}

.store-card-subtitle {
  margin: -6px 0 0;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.84);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card-meta {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.store-card-meta strong {
  color: #f8fafc;
  font-size: 18px;
  font-weight: 800;
}

.store-card-meta-icons .store-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.1;
}

.store-card-meta-icons .store-stat-icon {
  width: 14px;
  height: 14px;
  color: rgba(148, 163, 184, 0.95);
}

.store-card-meta-icons .store-stat-icon svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
}

.store-card-meta-icons .store-stat-text {
  color: rgba(203, 213, 225, 0.92);
  font-size: 12px;
}

.store-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.store-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.store-card-actions .btn {
  position: relative;
  z-index: 2;
  min-height: 38px;
  font-weight: 700;
}

.store-card-skeleton {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(12, 18, 34, 0.62);
}

.store-card-skeleton .store-card-thumb {
  min-height: 180px;
  background: linear-gradient(120deg, rgba(30, 41, 59, 0.38), rgba(51, 65, 85, 0.22));
}

.store-skeleton-line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
}

.store-skeleton-line.short {
  width: 68%;
}

.store-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: rgba(2, 6, 23, 0.64);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.store-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.store-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 95vw);
  height: 100dvh;
  z-index: 35;
  border-left: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(8, 12, 24, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: -14px 0 34px rgba(2, 6, 23, 0.5);
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 14px;
  transform: translateX(100%);
  transition: transform 0.18s ease;
  overflow-y: auto;
}

.store-drawer.is-open {
  transform: translateX(0);
}

.store-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.store-drawer-head h3 {
  margin: 0;
  font-size: 20px;
}

.store-drawer-subtitle {
  margin: -6px 0 0;
  color: rgba(148, 163, 184, 0.94);
  font-size: 12px;
  line-height: 1.45;
}

.store-drawer-thumb {
  min-height: 220px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.58));
  color: rgba(203, 213, 225, 0.85);
  letter-spacing: 0.08em;
  font-size: 12px;
}

.store-drawer-thumb.has-image {
  background-size: cover;
  background-position: center;
}

.store-drawer-meta {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.52);
}

.store-drawer-desc {
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.store-drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1439px) and (min-width: 1080px) {
  .store-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1079px) and (min-width: 768px) {
  .store-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .store-category-pane {
    display: none;
  }

  .store-toolbar {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .store-category-select {
    display: inline-flex !important;
  }

  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .store-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .store-category-pane {
    display: none;
  }

  .store-toolbar {
    position: static;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .store-sort,
  .store-category-select {
    justify-content: space-between;
  }

  .store-category-select {
    display: inline-flex !important;
  }

  .store-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .store-drawer {
    width: 100%;
    max-width: 100%;
    border-left: 0;
    box-shadow: none;
  }
}

@media (min-width: 1080px) {
  .store-category-select {
    display: none !important;
  }
}

.store-card-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-qty-field,
.store-cart-qty-field {
  display: grid;
  gap: 6px;
}

.store-qty-field span,
.store-cart-qty-field span {
  font-size: 12px;
  color: var(--muted);
}

.store-drawer-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.store-cart-page,
.store-orders-page,
.store-detail-page,
.store-success-page,
.store-order-detail-page {
  position: relative;
  z-index: 1;
}

.store-cart-shell,
.store-checkout-shell,
.store-orders-shell,
.store-detail-shell,
.store-success-card,
.store-order-detail-shell {
  display: grid;
  gap: 14px;
}

.store-cart-rows {
  display: grid;
  gap: 10px;
}

.store-cart-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 10px;
  background: rgba(10, 15, 30, 0.7);
}

.store-cart-row-thumb {
  width: 86px;
  height: 86px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: grid;
  place-items: center;
  color: rgba(203, 213, 225, 0.8);
  text-decoration: none;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.store-cart-row-thumb.has-image {
  background-size: cover;
  background-position: center;
}

.store-cart-row-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.store-cart-row-main h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.store-cart-row-main h3 a {
  color: var(--ink);
  text-decoration: none;
}

.store-cart-row-main h3 a:hover {
  color: rgba(103, 232, 249, 0.95);
}

.store-cart-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.store-cart-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.store-cart-row-total {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
}

.store-checkout-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 14px;
  background: rgba(8, 12, 24, 0.75);
  display: grid;
  gap: 10px;
}

.store-checkout-card h3 {
  margin: 0;
}

.store-checkout-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.store-orders-list {
  display: grid;
  gap: 10px;
}

.store-order-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 12px;
  background: rgba(10, 15, 30, 0.7);
}

.store-order-main {
  display: grid;
  gap: 6px;
}

.store-order-main h3 {
  margin: 0;
}

.store-order-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.store-order-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.store-order-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: rgba(14, 116, 144, 0.22);
  color: rgba(186, 230, 253, 0.96);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
}

.store-order-status.status-shipping {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(146, 64, 14, 0.26);
  color: rgba(254, 240, 138, 0.95);
}

.store-order-status.status-completed {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(6, 78, 59, 0.28);
  color: rgba(187, 247, 208, 0.95);
}

.store-order-status.status-cancelled {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(127, 29, 29, 0.32);
  color: rgba(254, 202, 202, 0.95);
}

.store-detail-card {
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(0, 1fr);
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 14px;
  background: rgba(8, 12, 24, 0.75);
}

.store-detail-image {
  min-height: 360px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.7);
  color: rgba(203, 213, 225, 0.82);
  letter-spacing: 0.08em;
  font-size: 12px;
}

.store-detail-image.has-image {
  background-size: cover;
  background-position: center;
}

.store-detail-gallery {
  display: grid;
  gap: 10px;
}

.store-detail-main-image-wrap {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.7);
  overflow: hidden;
}

.store-detail-main-image {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.store-detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.store-detail-thumb {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 0;
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
  cursor: pointer;
}

.store-detail-thumb img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.store-detail-thumb.is-active {
  border-color: rgba(34, 211, 238, 0.9);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35);
}

.store-detail-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.store-detail-main h1 {
  margin: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.store-detail-category {
  color: rgba(103, 232, 249, 0.94);
  font-size: 13px;
  font-weight: 700;
}

.store-detail-meta {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.5);
}

.store-detail-desc {
  margin: 0;
  color: rgba(226, 232, 240, 0.95);
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.store-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.store-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.store-detail-empty,
.store-order-login-hint {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 18px;
  background: rgba(8, 12, 24, 0.72);
  display: grid;
  gap: 10px;
}

.store-detail-empty h2,
.store-order-login-hint h3 {
  margin: 0;
}

.store-detail-empty p,
.store-order-login-hint p {
  margin: 0;
  color: var(--muted);
}

.store-success-inner {
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 18px;
  padding: 18px;
  background: rgba(6, 78, 59, 0.2);
  display: grid;
  gap: 12px;
}

.store-success-badge {
  width: fit-content;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgba(187, 247, 208, 0.96);
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(6, 95, 70, 0.35);
  border-radius: 999px;
  padding: 5px 10px;
}

.store-success-inner h2 {
  margin: 0;
}

.store-success-inner p {
  margin: 0;
  color: rgba(216, 254, 229, 0.94);
}

.store-success-summary {
  border: 1px solid rgba(167, 243, 208, 0.24);
  border-radius: 12px;
  padding: 10px;
  background: rgba(4, 47, 46, 0.32);
  display: grid;
  gap: 8px;
}

.store-success-actions,
.store-order-detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.store-order-detail-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  padding: 14px;
  background: rgba(8, 12, 24, 0.75);
  display: grid;
  gap: 12px;
}

.store-order-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  flex-wrap: wrap;
}

.store-order-detail-head h2 {
  margin: 0;
}

.store-order-detail-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.store-order-detail-summary {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.5);
  display: grid;
  gap: 8px;
}

.store-order-detail-lines {
  display: grid;
  gap: 10px;
}

.store-order-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.42);
}

.store-order-line-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.66);
  display: grid;
  place-items: center;
  color: rgba(203, 213, 225, 0.8);
  text-decoration: none;
  font-size: 11px;
}

.store-order-line-thumb.has-image {
  background-size: cover;
  background-position: center;
}

.store-order-line-main {
  min-width: 0;
}

.store-order-line-main h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.store-order-line-main h4 a {
  color: var(--ink);
  text-decoration: none;
}

.store-order-line-main p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.store-order-line strong {
  white-space: nowrap;
}

@media (max-width: 1079px) {
  .store-detail-card {
    grid-template-columns: 1fr;
  }

  .store-detail-image {
    min-height: 300px;
  }

  .store-detail-main-image {
    height: 300px;
  }
}

@media (max-width: 767px) {
  .store-cart-row {
    grid-template-columns: 1fr;
  }

  .store-cart-row-thumb {
    width: 100%;
    height: 180px;
  }

  .store-order-card {
    grid-template-columns: 1fr;
  }

  .store-order-side {
    justify-items: start;
  }

  .store-order-line {
    grid-template-columns: 1fr;
  }

  .store-order-line-thumb {
    width: 100%;
    height: 170px;
  }
}

.store-shipping-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.5);
  color: var(--ink);
  cursor: pointer;
}

.store-radio input {
  margin: 0;
}

.store-shipping-form {
  display: grid;
  gap: 12px;
}

.store-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.store-form-grid label,
.store-shipping-form > label,
.store-shipping-group > label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.store-shipping-group {
  display: grid;
  gap: 10px;
}

.store-shipping-group.is-hidden {
  display: none;
}

.store-orders-toolbar {
  display: flex;
  justify-content: flex-end;
}

.store-order-detail-timeline {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.48);
  display: grid;
  gap: 8px;
}

.store-order-detail-timeline h3 {
  margin: 0;
  font-size: 14px;
}

.store-order-detail-timeline ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.store-order-detail-timeline li {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.store-order-detail-timeline li strong {
  color: var(--ink);
}

.admin-store-orders-filter .admin-store-orders-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.admin-store-orders-list {
  display: grid;
  gap: 10px;
}

.admin-store-order-detail {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 14px;
  background: rgba(8, 12, 24, 0.74);
  display: grid;
  gap: 12px;
}

.admin-store-order-detail.empty {
  color: var(--muted);
}

.admin-store-order-detail-head h3 {
  margin: 0;
}

.admin-store-order-detail-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-store-order-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-store-order-detail-grid > div {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.44);
  display: grid;
  gap: 4px;
}

.admin-store-order-detail-grid span {
  color: var(--muted);
  font-size: 12px;
}

.admin-store-order-contact {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.4);
}

.admin-store-order-contact h4 {
  margin: 0 0 6px;
  font-size: 13px;
}

.admin-store-order-contact p {
  margin: 0;
  color: var(--muted);
}

.admin-store-order-table-wrap {
  overflow-x: auto;
}

.admin-store-order-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-store-order-table th,
.admin-store-order-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  text-align: left;
  padding: 8px 6px;
  font-size: 13px;
}

.admin-store-order-table th {
  color: rgba(203, 213, 225, 0.95);
  font-weight: 700;
}

.admin-store-order-update .admin-store-orders-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-store-order-timeline {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.4);
}

.admin-store-order-timeline h4 {
  margin: 0 0 8px;
}

.admin-store-order-timeline ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.admin-store-order-timeline li {
  color: var(--muted);
  font-size: 13px;
}

.admin-store-order-timeline li strong {
  display: block;
  color: var(--ink);
}

@media (max-width: 1079px) {
  .store-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-store-orders-filter .admin-store-orders-grid,
  .admin-store-order-update .admin-store-orders-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-store-order-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .store-form-grid {
    grid-template-columns: 1fr;
  }

  .store-orders-toolbar {
    justify-content: stretch;
  }

  .store-orders-toolbar .store-sort {
    width: 100%;
    justify-content: space-between;
  }

  .admin-store-orders-filter .admin-store-orders-grid,
  .admin-store-order-update .admin-store-orders-grid,
  .admin-store-order-detail-grid {
    grid-template-columns: 1fr;
  }
}

.pool-list {
  grid-template-columns: 1fr;
}

.pool-card {
  background: rgba(15, 23, 42, 0.6);
}

.pool-card.is-selected {
  border-color: rgba(249, 115, 22, 0.6);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.2);
}

.pool-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pool-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  gap: 12px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.4);
}

.pool-card {
  grid-template-rows: auto minmax(160px, 1fr) auto;
  gap: 0;
}

.pool-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.6);
}

.pool-card-image {
  position: relative;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.55);
  min-height: 220px;
  overflow: hidden;
  cursor: pointer;
}

.pool-card-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--thumb-image);
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  transform: scale(1.1);
  opacity: 0;
}

.pool-card-image.has-image::before {
  opacity: 0.45;
}

.pool-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  position: relative;
  z-index: 1;
}

.pool-card-bottom {
  display: grid;
  gap: 8px;
  padding: 8px 10px 12px;
  background: rgba(15, 23, 42, 0.7);
}

.pool-card-bottom .progress {
  margin: 0;
}

.pool-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.draw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 18, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.draw-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.draw-handoff-flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 35;
  --flash-in-ms: 190ms;
  --flash-out-ms: 260ms;
}

.draw-handoff-flash.is-flash-in {
  opacity: 1;
  transition: opacity var(--flash-in-ms) ease-out;
}

.draw-handoff-flash.is-flash-out {
  opacity: 0;
  transition: opacity var(--flash-out-ms) ease-out;
}

.draw-overlay-card {
  width: min(820px, 92vw);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  position: relative;
  display: grid;
  gap: 16px;
  box-shadow: 0 20px 50px rgba(8, 12, 24, 0.5);
}

.draw-video {
  width: 100%;
  max-height: 60vh;
  border-radius: 16px;
  background: #000;
}

.draw-skip {
  position: absolute;
  top: 16px;
  right: 16px;
  display: none;
}

.draw-skip.is-visible {
  display: inline-flex;
}

.draw-result {
  display: none;
  gap: 12px;
}

.draw-result.is-visible {
  display: grid;
}

.result-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.result-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.result-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(8, 12, 24, 0.6);
}

.result-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-info strong {
  display: block;
  font-size: 14px;
}

.result-info span {
  font-size: 12px;
  color: var(--muted);
}

.result-count {
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
}

.inventory-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.inventory-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
  position: relative;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.inventory-card.is-selected {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 0 2px rgba(56, 189, 248, 0.16);
}

.inventory-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(8, 12, 24, 0.6);
  display: grid;
  place-items: center;
}

.inventory-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inventory-meta {
  display: grid;
  gap: 4px;
}

.inventory-meta strong {
  font-size: 14px;
}

.inventory-meta span {
  font-size: 12px;
  color: var(--muted);
}

.inventory-count {
  font-weight: 700;
  font-size: 12px;
  color: var(--accent);
}

.inventory-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inventory-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.inventory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.inventory-bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inventory-selected {
  font-size: 12px;
  color: var(--muted);
}

.inventory-select {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(8, 12, 24, 0.55);
  backdrop-filter: blur(6px);
}

.inventory-select-checkbox {
  width: 16px;
  height: 16px;
  accent-color: rgba(56, 189, 248, 1);
}

.text-ok {
  color: rgba(34, 197, 94, 0.92);
  font-weight: 650;
}

.text-bad {
  color: rgba(239, 68, 68, 0.9);
  font-weight: 650;
}

.market-list-form {
  display: grid;
  gap: 12px;
}

.market-list-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.market-list-field .input-inline {
  min-width: 0;
}

.market-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.market-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.market-filters .input-inline {
  width: auto;
}

.market-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
  color: var(--muted);
  font-size: 12px;
  user-select: none;
}

.market-checkbox input {
  width: 16px;
  height: 16px;
}

.market-search {
  flex: 1 1 260px;
  max-width: 420px;
}

.market-sort {
  flex: 0 0 auto;
}

.market-official {
  opacity: 0.92;
}

.market-ask {
  font-weight: 700;
  color: rgba(251, 191, 36, 0.95);
}

.market-bid {
  font-weight: 700;
  color: rgba(34, 197, 94, 0.92);
}

.market-price-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.12);
  color: var(--ink);
}

.market-price-badge.is-discount {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.16);
}

.market-price-badge.is-premium {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.16);
}

.market-price-badge.is-neutral {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.12);
}

.market-floor-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.16);
  color: var(--ink);
}

.market-group {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.62));
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.market-group-summary {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  padding: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.market-group-summary:hover {
  background: rgba(8, 12, 24, 0.18);
}

.market-group-summary::-webkit-details-marker {
  display: none;
}

.market-group[open] .market-group-summary {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.market-group-body {
  padding: 0 12px 12px;
}

.market-last-trade {
  font-weight: 600;
  color: rgba(148, 163, 184, 0.92);
}

.market-spread {
  font-weight: 600;
  color: rgba(148, 163, 184, 0.92);
}

.market-depth {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 12, 24, 0.14);
}

.market-depth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-depth-head strong {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.market-depth-last {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-depth-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.market-depth-col {
  display: grid;
  gap: 6px;
}

.market-depth-col-title {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.market-depth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 2px 0;
}

.market-depth-row.is-clickable {
  cursor: pointer;
  padding: 6px 8px;
  margin: -4px -6px;
  border-radius: 10px;
}

.market-depth-row.is-clickable:hover {
  background: rgba(8, 12, 24, 0.22);
}

.market-depth-qty {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.market-trades {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 12, 24, 0.14);
}

.market-trades-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-trades-head strong {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.market-trades-hint {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.market-tape {
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.market-tape-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(8, 12, 24, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 12px;
}

.market-tape-row.is-up .market-tape-price {
  color: rgba(34, 197, 94, 0.95);
}

.market-tape-row.is-down .market-tape-price {
  color: rgba(239, 68, 68, 0.95);
}

.market-tape-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.market-tape-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.market-tape-qty {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  justify-self: end;
}

.market-tape-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 6px 2px;
}

.market-offer-list {
  display: grid;
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.market-offer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(8, 12, 24, 0.14);
}

.market-offer + .market-offer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.market-offer:hover {
  background: rgba(8, 12, 24, 0.22);
}

.market-offer-meta {
  display: grid;
  gap: 4px;
}

.market-offer-meta strong {
  font-size: 13px;
}

.market-offer-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}

.market-offer-right {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.market-offer-price {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .market-group-summary {
    grid-template-columns: 84px 1fr;
  }
  .market-group-actions {
    grid-column: 2 / -1;
    justify-self: start;
  }
  .market-depth-grid {
    grid-template-columns: 1fr;
  }
  .market-offer {
    grid-template-columns: 1fr;
  }
  .market-offer-right {
    justify-items: start;
  }
  .market-offer-price {
    justify-content: flex-start;
  }
}

.market-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.market-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.market-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(8, 12, 24, 0.6);
  display: grid;
  place-items: center;
}

.market-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.market-meta {
  display: grid;
  gap: 8px;
}

.market-meta strong {
  font-size: 14px;
}

.market-sub,
.market-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  align-items: center;
}

.market-sub .dot,
.market-price-row .dot {
  opacity: 0.6;
}

.market-total {
  color: var(--ink);
  font-weight: 700;
}

.market-suggest-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.market-suggest-row .btn {
  margin-left: auto;
}

.market-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pool-draw-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card .thumb {
  height: clamp(170px, 20vw, 220px);
  background: linear-gradient(140deg, rgba(249, 115, 22, 0.2), rgba(34, 211, 238, 0.2));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--ink);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.card .thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--thumb-image);
  background-size: cover;
  background-position: center;
  filter: blur(18px);
  transform: scale(1.1);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card .thumb.has-image::before {
  opacity: 0.45;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  position: relative;
  z-index: 1;
}

.thumb-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 2;
}

.thumb-overlay.top {
  top: 12px;
}

.thumb-overlay.bottom {
  bottom: 12px;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0), rgba(8, 12, 24, 0.75));
  padding: 22px 10px 10px;
  border-radius: 12px;
}

.thumb-price {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  text-shadow: 0 2px 12px rgba(15, 23, 42, 0.6);
}

.card .card-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 10px;
}

.pagination {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pagination .page-label {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

.card-info {
  display: grid;
  gap: 6px;
}

.card .meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.card .status {
  font-weight: 700;
  color: var(--accent-2);
}

.draw-options {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
}

.draw-option {
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.draw-option.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #0b1220;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4);
}

.modal-message {
  margin: 8px 0 0;
  color: var(--ink);
  line-height: 1.5;
}

.draw-option:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.draw-option:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.card-tag {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  background: rgba(34, 211, 238, 0.18);
  color: var(--accent-2);
}

.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.empty {
  display: none;
  text-align: center;
  color: var(--muted);
}

.detail {
  display: grid;
  gap: 32px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr minmax(220px, 280px);
  gap: 32px;
  align-items: center;
}

.detail-main {
  display: grid;
  gap: 12px;
}

.detail-thumb {
  height: 320px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(249, 115, 22, 0.25), rgba(34, 211, 238, 0.25));
  display: grid;
  place-items: center;
  font-weight: 700;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-tags {
  color: var(--muted);
  margin: 6px 0 14px;
}

.detail-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.detail-meta div {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.detail-meta strong {
  color: var(--ink);
  font-size: 20px;
}

.detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-side {
  display: grid;
  gap: 16px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 18px;
}

.detail-side span {
  color: var(--muted);
  font-size: 13px;
}

.detail-side strong {
  font-size: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.detail-grid.is-tabbed {
  grid-template-columns: 1fr;
}

.detail-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 16px;
}

.detail-card ul {
  padding-left: 20px;
  color: var(--muted);
}

.tier-list {
  display: grid;
  gap: 16px;
}

.tier-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.7);
  display: grid;
  gap: 12px;
}

.tier-card .tier-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.pool-panel .tier-prizes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.pool-panel .tier-card {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  gap: 8px;
}

.pool-panel .tier-card + .tier-card {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.pool-panel .tier-card .tier-head {
  padding: 0 2px;
}

.pool-panel .tier-card .tier-head span {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.45);
}

.pool-panel .prize-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(12, 16, 30, 0.7);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  text-align: left;
  font-size: 12px;
  box-shadow: none;
}

.pool-panel .prize-card img {
  display: block;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  object-fit: contain;
  background: rgba(15, 23, 42, 0.65);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.pool-panel .prize-card img.prize-preview-trigger {
  cursor: zoom-in;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.pool-panel .prize-card img.prize-preview-trigger:hover {
  transform: scale(1.02);
  filter: brightness(1.08);
}

.pool-panel .prize-card-body {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.pool-panel .prize-card .prize-name {
  padding: 0;
  background: transparent;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.28;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pool-panel .prize-card .prize-price {
  padding: 0;
  background: transparent;
  color: rgba(251, 191, 36, 0.95);
  font-size: 12px;
}

.pool-panel .prize-card .prize-probability {
  padding: 0;
  color: rgba(56, 189, 248, 0.96);
  font-size: 11px;
}

.pool-panel .prize-card .prize-count {
  padding: 0;
  background: transparent;
  color: rgba(148, 163, 184, 0.95);
  font-size: 11px;
}

@media (max-width: 1024px) {
  .pool-panel .tier-prizes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pool-panel .tier-prizes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .pool-panel .prize-card {
    padding: 7px;
    gap: 8px;
  }

  .pool-panel .prize-card img {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }
}

.detail-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

body.inventory-mode #inventoryPrizesPanel {
  max-height: min(54vh, 460px);
  overflow: auto;
  padding-right: 4px;
}

.has-draw-bar .page {
  padding-bottom: 140px;
}

.draw-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(100% - 32px, 980px);
  background: rgba(8, 12, 24, 0.9);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  z-index: 40;
  backdrop-filter: blur(10px);
}

.draw-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.draw-summary strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.draw-bar #drawSubmit {
  display: none;
}

.draw-bar #autoDrawOpen {
  white-space: nowrap;
}

.draw-bar #drawMessage {
  grid-column: 1 / -1;
  min-height: 18px;
  font-size: 12px;
}

.draw-bar.inventory-auto-fallback-bar {
  width: min(100% - 32px, 360px);
  grid-template-columns: 1fr;
  justify-items: stretch;
}

.draw-bar.inventory-auto-fallback-bar #autoFlipOpen {
  width: 100%;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .draw-bar {
    grid-template-columns: 1fr;
  }
  .draw-summary {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-grid,
.prize-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-grid article,
.prize {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 16px;
}
.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--card);
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(120deg, rgba(249, 115, 22, 0.28), rgba(34, 211, 238, 0.28));
  padding: 32px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.footer {
  text-align: center;
  padding: 30px 16px 60px;
  color: rgba(226, 232, 240, 0.6);
}

.footer.footer-legal {
  text-align: left;
}
.footer-legal-shell {
  max-width: min(var(--layout-max-width), calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 28px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(14px);
}

.footer-legal-title {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.88);
}

.footer-legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 24px;
}

.footer-legal-item {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.footer-legal-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.82);
}

.footer-legal-value {
  color: #f8fafc;
  font-weight: 600;
  word-break: break-word;
}

.footer-legal-link {
  color: inherit;
  text-decoration: none;
}

.footer-legal-link:hover {
  text-decoration: underline;
}

.footer-legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.footer-legal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.18);
  background: rgba(248, 250, 252, 0.08);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
}

.footer-legal-copy {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: rgba(226, 232, 240, 0.66);
  font-size: 13px;
}

.btn {
  text-decoration: none;
  padding: 0 18px;
  border-radius: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--button-height);
  line-height: var(--button-height);
  font-size: var(--button-font-size);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #0b0f1a;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.35);
}

.btn.ghost {
  border: 1px solid rgba(248, 250, 252, 0.45);
  color: #f8fafc;
  background: rgba(248, 250, 252, 0.08);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-compact {
  padding: 8px 12px;
  font-size: 13px;
}

.admin-simple .btn-compact {
  padding: 0 16px;
  font-size: var(--button-font-size);
  border-radius: 10px;
  line-height: var(--button-height);
  height: var(--button-height);
}

.admin-form {
  display: grid;
  gap: 14px;
  max-width: 520px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 10px;
}

.admin-form textarea {
  resize: vertical;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
  line-height: 1.4;
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 12px;
  align-items: center;
}

.ui-form {
  max-width: 860px;
}

.ui-form__section {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.ui-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.ui-form__field-wide {
  grid-column: 1 / -1;
}

.ui-form__stack {
  display: grid;
  gap: 14px;
}

.ui-form__checkbox {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ui-form__checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.audio-upload-row {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(130% 140% at 100% 0%, rgba(34, 211, 238, 0.1), transparent 58%),
    rgba(15, 23, 42, 0.48);
}

.audio-upload-row__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.audio-upload-row__head strong {
  display: block;
  color: #f8fafc;
  font-size: 15px;
}

.audio-upload-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.audio-upload-row__actions .btn {
  justify-content: center;
  min-width: 92px;
}

@media (max-width: 720px) {
  .footer {
    padding: 24px 16px 48px;
  }

  .footer-legal-shell {
    padding: 20px;
    border-radius: 18px;
  }

  .footer-legal-grid,
  .ui-form__grid {
    grid-template-columns: 1fr;
  }

  .audio-upload-row__head {
    flex-direction: column;
  }

  .audio-upload-row__actions {
    justify-content: stretch;
  }

  .audio-upload-row__actions .btn {
    width: 100%;
  }

  .ui-form__field-wide {
    grid-column: auto;
  }
}

.is-hidden {
  display: none;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.form-message {
  margin: 0;
  color: var(--accent-2);
  font-weight: 600;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-list {
  display: grid;
  gap: var(--card-gap);
  position: relative;
  z-index: 1;
}

.admin-title-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.admin-id {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.admin-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-item {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 16px;
}

.admin-thumb {
  width: 96px;
  height: 96px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
}

.admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-info h3 {
  margin: 0;
  font-size: 18px;
}

.admin-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.status-pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-pill.active {
  color: #86efac;
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.4);
}

.status-pill.inactive {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.35);
}

.admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}

.admin-stats {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.admin-stat.admin-weight-inline {
  grid-column: 1 / -1;
}

.admin-weight {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.admin-weight-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
}

.admin-weight-summary::-webkit-details-marker {
  display: none;
}

.admin-weight-value {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
}

.admin-weight-body {
  display: none;
  margin-top: 10px;
  gap: 6px;
}

.admin-weight.is-open .admin-weight-body,
.admin-weight[open] .admin-weight-body {
  display: grid;
}

.admin-weight-row input {
  flex: 1;
  min-width: 0;
}

.admin-weight-inline .admin-weight-row input {
  padding: 8px 10px;
}

.admin-weight-inline .admin-weight-hint {
  display: none;
}

.admin-weight-hint,
.admin-weight-msg {
  display: block;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.admin-weight-msg.is-error {
  color: rgba(248, 113, 113, 0.95);
}

.admin-weight-msg.is-ok {
  color: rgba(52, 211, 153, 0.95);
}

.admin-stat {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
}

.admin-stat .label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assignment-list {
  display: grid;
  gap: 10px;
}

.assignment-item {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
}

.assignment-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.assignment-order {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  color: var(--ink);
}

.preview-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.admin-table thead th {
  background: rgba(15, 23, 42, 0.85);
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-table th,
.admin-table td {
  padding: var(--table-padding-y) var(--table-padding-x);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.admin-table.resizable {
  table-layout: fixed;
}

.admin-table.resizable th,
.admin-table.resizable td {
  position: relative;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table tbody tr {
  background: rgba(15, 23, 42, 0.38);
  transition: background 0.2s ease;
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.25);
}

.admin-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.12);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.input-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  color: var(--ink);
  font-size: 13px;
}

.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge.ok {
  background: rgba(34, 211, 238, 0.2);
  border-color: rgba(34, 211, 238, 0.4);
  color: var(--accent-2);
}

.badge.warn {
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.35);
  color: rgba(253, 186, 116, 0.95);
}

.badge.muted {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--muted);
}

.admin-table td.table-warn {
  color: rgba(253, 186, 116, 0.95);
  font-weight: 700;
}

.row-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-thumb span {
  font-size: 12px;
  color: var(--muted);
}

.row-text strong {
  display: block;
}

.row-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.code-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  color: var(--ink);
}

.input-inline {
  width: 100%;
  min-width: 140px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 10px;
}

.input-inline.compact {
  min-width: 90px;
  max-width: 120px;
}

.video-thumb {
  width: 160px;
  height: 90px;
  background: #000;
  border-radius: 10px;
}

.level-thumb-cell {
  vertical-align: middle;
}

.level-thumb-link {
  display: inline-flex;
  align-items: center;
}

.level-thumb {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(34, 211, 238, 0.2);
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, 0.4);
}

.status-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  width: 42px;
  height: 22px;
  background: rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
  border: 1px solid var(--border);
}

.switch .slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch input:checked + .slider {
  background: rgba(56, 189, 248, 0.55);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.switch input:disabled + .slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.switch-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.image-preview {
  width: 140px;
  height: 140px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(12, 16, 30, 0.6);
  padding: 8px;
  display: none;
  align-items: center;
  justify-content: center;
}

.image-preview.is-visible {
  display: flex;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.image-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 44px;
}

.image-upload-row .btn {
  white-space: nowrap;
}

.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.tag-option input {
  accent-color: var(--accent);
}

.tag-option.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tag-empty {
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-pool-manage"] .admin-form {
  max-width: 1240px;
  width: 100%;
  align-items: start;
}

/* Use a 2-column grid only when not in free-canvas layout mode. */
body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px 14px;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) > * {
  grid-column: 1 / -1;
  min-width: 0;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="name"] {
  grid-column: 1 / span 6;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="price"] {
  grid-column: 7 / span 3;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="category"] {
  grid-column: 10 / span 3;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="total"] {
  grid-column: 1 / span 3;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="status"] {
  grid-column: 4 / span 3;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="image"] {
  grid-column: 1 / span 6;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="video"] {
  grid-column: 7 / span 6;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #inventoryMetaSection {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #tierList {
  grid-column: 1 / span 8;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #tierCalculator {
  grid-column: 9 / -1;
  align-self: start;
  position: sticky;
  top: 20px;
}

body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) .form-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="name"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="tags"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="image"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="video"] {
    grid-column: 1 / -1;
  }

  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="price"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="category"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="total"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="status"] {
    grid-column: span 3;
  }

  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #tierList,
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #tierCalculator {
    grid-column: 1 / -1;
  }

  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) #tierCalculator {
    position: static;
  }
}

@media (max-width: 768px) {
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="price"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="category"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="total"],
  body[data-layout-page="admin-pool-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="status"] {
    grid-column: 1 / -1;
  }
}

body[data-layout-page="admin-manage"] .admin-form {
  max-width: 980px;
  width: 100%;
  align-items: start;
}

body[data-layout-page="admin-manage"] [data-layout-container="main"].layout-canvas[data-layout-free="true"] {
  overflow: auto;
  min-width: 100%;
}

body[data-layout-page="admin-manage"] .admin-form.layout-canvas[data-layout-free="true"] {
  max-width: none;
  overflow: auto;
  min-width: 100%;
}
/* Use a 2-column grid only when not in free-canvas layout mode. */
body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px 14px;
}

body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) > * {
  grid-column: 1 / -1;
  min-width: 0;
}

body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="category"],
body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="product-type"] {
  grid-column: span 6;
}

body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="cost-price"],
body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="sale-price"],
body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="draw-weight"],
body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="recycle-percent"],
body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="stock"],
body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="shipping-price"],
body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="sort-order"] {
  grid-column: span 6;
}

@media (max-width: 900px) {
  body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="category"],
  body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="product-type"],
  body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="cost-price"],
  body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="sale-price"],
  body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="draw-weight"],
  body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="recycle-percent"],
  body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="stock"],
  body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="shipping-price"],
  body[data-layout-page="admin-manage"] .admin-form:not(.layout-canvas) label[data-layout-block="sort-order"] {
    grid-column: 1 / -1;
  }
}

.tier-calculator {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.calc-head h3 {
  margin: 0;
  font-size: 16px;
}

.calc-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.calc-metrics {
  display: grid;
  gap: 10px;
}

.calc-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.35);
}

.calc-metric span {
  color: var(--muted);
  font-size: 13px;
}

.calc-metric strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.calc-metric strong.is-negative {
  color: rgba(248, 113, 113, 0.95);
}

.calc-metric strong.is-positive {
  color: rgba(52, 211, 153, 0.95);
}

.calc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: rgba(148, 163, 184, 0.9);
  font-size: 12px;
}

.calc-meta b {
  color: var(--ink);
}

.legacy-calc-block.is-hidden {
  display: none !important;
}

.calc-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.calc-options .calc-option {
  margin: 0;
}

.calc-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.25);
  color: rgba(148, 163, 184, 0.95);
  font-size: 12px;
}

.calc-field input {
  width: 84px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.85);
  color: var(--ink);
  font-size: 12px;
}

.calc-field input:disabled {
  opacity: 0.6;
}

.calc-field select {
  min-width: 110px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.85);
  color: var(--ink);
  font-size: 12px;
}

.calc-sim-section {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.28);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.calc-sim-head h4 {
  margin: 0;
  font-size: 14px;
}

.calc-sim-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.calc-sim-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inv-stop-tier-picker {
  display: grid;
  gap: 6px;
}

.inv-stop-tier-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inv-stop-tier-presets .check-pill {
  padding: 6px 10px;
}

.inv-stop-scan > summary,
.inv-stop-advanced > summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inv-stop-scan > summary::-webkit-details-marker,
.inv-stop-advanced > summary::-webkit-details-marker {
  display: none;
}

.inv-stop-scan > summary::after,
.inv-stop-advanced > summary::after {
  content: "展開";
  color: rgba(148, 163, 184, 0.95);
  font-size: 12px;
  font-weight: 700;
}

.inv-stop-scan[open] > summary::after,
.inv-stop-advanced[open] > summary::after {
  content: "收合";
}

.inv-stop-scan-controls {
  margin-top: 10px;
}

.inv-stop-tier-picker .calc-field-label {
  color: rgba(148, 163, 184, 0.95);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.inv-stop-tier-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inv-stop-tier-options .check-pill {
  margin: 0;
}

.inv-stop-tier-options .check-pill.is-muted {
  opacity: 0.6;
}

.calc-sim-summary .metric-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calc-sim-summary .metric-actions .btn {
  height: 32px;
  line-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 10px;
}

.calc-sim-summary .metric-actions .btn:disabled {
  opacity: 0.55;
  transform: none;
  cursor: not-allowed;
}

.inv-stop-histogram-block {
  display: grid;
  gap: 8px;
}

.inv-stop-histogram {
  position: relative;
  height: 64px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
  padding: 8px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  overflow: hidden;
}

.inv-stop-histogram.has-zero::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 2px;
  left: var(--zero-x, 50%);
  background: rgba(226, 232, 240, 0.7);
  border-radius: 999px;
  opacity: 0.85;
}

.inv-stop-histogram .bar {
  flex: 1 1 0;
  min-width: 3px;
  border-radius: 8px 8px 2px 2px;
  background: rgba(148, 163, 184, 0.45);
}

.inv-stop-histogram .bar.is-loss {
  background: rgba(248, 113, 113, 0.55);
}

.inv-stop-histogram .bar.is-win {
  background: rgba(52, 211, 153, 0.55);
}

.calc-sim-presets {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.2);
  color: rgba(148, 163, 184, 0.95);
  font-size: 12px;
}

.calc-sim-presets > span {
  margin-right: 2px;
}

.calc-sim-recycle-toggle {
  margin: 0;
}

.calc-sim-recycle-percent.is-disabled {
  opacity: 0.55;
}

.calc-sim-recycle-percent input:disabled {
  cursor: not-allowed;
}

.calc-sim-controls #calcSimTargetWrap select {
  min-width: 240px;
}

.calc-sim-preset-select select {
  min-width: 96px;
}

.calc-sim-config-hint {
  margin: 0;
  color: rgba(148, 163, 184, 0.95);
}

.calc-sim-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calc-sim-summary .calc-metric {
  min-height: 64px;
}

.calc-sim-summary .calc-metric.wide {
  grid-column: 1 / -1;
}

.calc-sim-summary .calc-metric.wide strong {
  white-space: pre-wrap;
}

.calc-sim-advanced {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calc-sim-hint {
  margin: 0;
}

.calc-sim-hint.is-warning {
  color: rgba(251, 191, 36, 0.95);
}

.calc-sim-hint.is-error {
  color: rgba(248, 113, 113, 0.95);
}

.calc-sim-detail {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.24);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.calc-sim-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calc-sim-detail-head h5 {
  margin: 0;
  font-size: 13px;
}

.calc-sim-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calc-sim-detail-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
}

.calc-sim-detail-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12px;
}

.calc-sim-detail-table th,
.calc-sim-detail-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.calc-sim-detail-table thead th {
  color: rgba(148, 163, 184, 0.95);
  font-weight: 700;
  background: rgba(15, 23, 42, 0.65);
}

.calc-sim-detail-table tbody tr:last-child td {
  border-bottom: none;
}

.calc-sim-detail-table tr.is-stop-row td {
  background: rgba(15, 23, 42, 0.55);
  font-weight: 700;
}

.calc-stop-reason {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.65);
}

.calc-stop-reason.is-hit {
  border-color: rgba(34, 197, 94, 0.55);
  color: #86efac;
}

.calc-stop-reason.is-insufficient-wallet {
  border-color: rgba(251, 191, 36, 0.55);
  color: #fcd34d;
}

.calc-stop-reason.is-pool-empty {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fda4af;
}

.calc-stop-reason.is-safety-cap {
  border-color: rgba(167, 139, 250, 0.55);
  color: #c4b5fd;
}

.calc-sim-detail-hint {
  margin: 0;
}

.calc-sim-item-summary {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.24);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.calc-sim-item-summary-wrap {
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
}

.calc-batch-modal-card {
  width: min(1400px, 98vw);
}

.calc-batch-summary {
  margin: 0;
}

.calc-batch-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.calc-batch-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  max-height: 60vh;
}

.calc-batch-table {
  min-width: 1260px;
}

.calc-batch-table tfoot th {
  position: sticky;
  bottom: 0;
  background: rgba(15, 23, 42, 0.92);
  z-index: 1;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}

@media (max-width: 900px) {
  .calc-sim-summary,
  .calc-sim-advanced,
  .calc-sim-detail-summary,
  .calc-batch-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .calc-sim-presets {
    border-radius: 12px;
  }

  .calc-sim-controls #calcSimTargetWrap select {
    min-width: 170px;
  }
}

.calc-metrics--recycle {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 12px;
}

.calc-loop {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 12px;
  display: grid;
  gap: 12px;
}

.calc-loop-head h4 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.calc-loop-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.calc-breakdown {
  display: grid;
  gap: 10px;
}

.calc-tier {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.25);
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.calc-tier-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.calc-tier-meta {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.tier-admin-section {
  display: grid;
  gap: 14px;
}

.tier-admin-list {
  display: grid;
  gap: 18px;
}

.tier-admin {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.65);
  display: grid;
  gap: 14px;
}

.tier-admin.is-active {
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.tier-admin .tier-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.tier-admin .tier-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.tier-admin .tier-prob-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.tier-admin .tier-prob {
  width: 100px;
}

.tier-admin .tier-prizes {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.prize-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto minmax(150px, auto);
  gap: 12px;
  align-items: start;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(12, 16, 30, 0.7);
}

.prize-row select {
  width: 100%;
}

.prize-item-wrap {
  display: grid;
  gap: 4px;
}

.prize-item-search {
  width: 100%;
}

.prize-item-meta {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.9);
  line-height: 1.2;
}

.prize-prob-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.prize-prob-meta {
  color: rgba(148, 163, 184, 0.95);
  font-size: 11px;
  font-weight: 700;
}

.prize-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.prize-count-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.prize-prob {
  width: 92px;
}

.prize-count {
  width: 78px;
}

.prize-preview {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.prize-preview.is-visible {
  display: flex;
}

.prize-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prize-upload.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 768px) {
  .prize-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .prize-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 1120px) {
  .prize-row {
    grid-template-columns: minmax(220px, 1fr) auto auto;
  }

  .prize-controls {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.draw-options-fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(12, 16, 30, 0.6);
}

.draw-options-fieldset legend {
  padding: 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.25);
  color: rgba(248, 250, 252, 0.92);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.check-pill:hover {
  background: rgba(2, 6, 23, 0.4);
  border-color: rgba(148, 163, 184, 0.35);
}

.check-pill input {
  accent-color: var(--accent);
}

.draw-options-fieldset .check-pill {
  margin-right: 12px;
}

body.pool-mode-inventory #tierCalculator {
  /* Inventory mode uses the calculator sidebar for stop-risk simulation. */
  display: block !important;
}

body.pool-mode-inventory .tier-prob-wrapper.is-derived,
body.pool-mode-inventory .prize-prob-wrapper.is-derived {
  opacity: 0.85;
}

.inventory-meta-quick-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-meta-quick-actions .btn {
  min-height: 38px;
}

.inventory-meta-section {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(12, 16, 30, 0.6);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.inventory-meta-section.is-collapsed {
  gap: 0;
  padding-bottom: 12px;
}

.inventory-meta-section.is-collapsed .inventory-meta-grid {
  display: none;
}

.inventory-meta-section .section-head {
  margin: 0;
}

.inventory-meta-grid {
  display: grid;
  gap: 12px 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.inventory-meta-grid label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  grid-column: span 4;
}

.inventory-meta-grid .inventory-meta-col-3 {
  grid-column: span 3;
}

.inventory-meta-grid .inventory-meta-col-6 {
  grid-column: span 6;
}

.inventory-meta-grid textarea {
  min-height: 110px;
}

.inventory-meta-grid .inventory-meta-wide {
  grid-column: 1 / -1;
}

.inventory-meta-grid .inventory-meta-check {
  align-self: end;
  min-height: 42px;
  margin: 0;
}

@media (max-width: 980px) {
  .inventory-meta-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .inventory-meta-grid .inventory-meta-col-3 {
    grid-column: span 3;
  }

  .inventory-meta-grid .inventory-meta-col-6 {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .inventory-meta-grid {
    grid-template-columns: 1fr;
  }

  .inventory-meta-grid label,
  .inventory-meta-grid .inventory-meta-col-3,
  .inventory-meta-grid .inventory-meta-col-6 {
    grid-column: 1 / -1;
  }
}

.input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.column-dragger {
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 10px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 6px;
  cursor: grab;
  user-select: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.admin-table.resizable th:hover .column-dragger,
.admin-table.resizable th:focus-within .column-dragger {
  opacity: 1;
  pointer-events: auto;
}

.column-dragger:active {
  cursor: grabbing;
}

.column-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
}

.admin-table.resizable th:hover .column-resizer {
  background: rgba(248, 250, 252, 0.2);
}

.table-row {
  cursor: pointer;
}

.table-row.active {
  background: rgba(249, 115, 22, 0.15);
}

.table-actions {
  display: flex;
  gap: 8px;
}

.integrity-job-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
  flex-wrap: wrap;
}

.integrity-job-metrics {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
}

.integrity-job-bar strong {
  font-weight: 700;
}

.toast-host {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.72));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toast-title {
  font-size: 13px;
  font-weight: 800;
}

.toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(148, 163, 184, 0.9);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}

.toast-close:hover {
  color: rgba(226, 232, 240, 0.9);
}

.toast-body {
  color: rgba(226, 232, 240, 0.9);
  font-size: 12px;
  line-height: 1.35;
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.3);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.3);
}

@media (max-width: 640px) {
  .toast-host {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
}

.modal.is-hidden {
  display: none;
}

.modal-card {
  width: min(560px, 100%);
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 20px;
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 48px);
  overflow: hidden auto;
  overscroll-behavior: contain;
}

.smooth-modal {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.smooth-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.smooth-modal.is-reveal-in {
  animation: modal-reveal-fade var(--reveal-fade-ms, 260ms) ease-out;
}

@keyframes modal-reveal-fade {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.draw-confirm-card {
  width: min(420px, 100%);
}

.auto-draw-config-card {
  width: min(560px, 100%);
}

.auto-draw-kv {
  display: grid;
  gap: 10px;
}

.auto-draw-kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.52);
  color: var(--muted);
  font-size: 13px;
}

.auto-draw-kv-row strong {
  color: var(--ink);
}

.auto-draw-field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.auto-draw-field select {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  color: var(--ink);
  padding: 10px 12px;
}

.auto-draw-field input {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  color: var(--ink);
  padding: 10px 12px;
}

.auto-flip-targets {
  display: grid;
  gap: 8px;
  max-height: min(32vh, 280px);
  overflow: auto;
}

.auto-flip-targets .check-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.auto-flip-config-card {
  --af-bg: #060b17;
  --af-panel: #0f172a;
  --af-panel-2: #111c36;
  --af-neon: #22d3ee;
  --af-neon-2: #a78bfa;
  --af-ok: #34d399;
  --af-warn: #f59e0b;
  --af-muted: rgba(148, 163, 184, 0.92);
  --af-border: rgba(34, 211, 238, 0.34);
  position: relative;
  width: min(740px, 96vw);
  border-radius: 20px;
  padding: 18px;
  gap: 14px;
  border: 1px solid var(--af-border);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(167, 139, 250, 0.2), transparent 55%),
    radial-gradient(110% 100% at 0% 100%, rgba(34, 211, 238, 0.17), transparent 52%),
    linear-gradient(180deg, var(--af-panel), var(--af-bg));
  box-shadow:
    0 22px 50px rgba(2, 6, 23, 0.5),
    inset 0 0 0 1px rgba(34, 211, 238, 0.12);
  overflow: hidden;
}

.auto-flip-config-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(167, 139, 250, 0.2);
  pointer-events: none;
}

.auto-flip-head h3 {
  margin: 0;
  font-size: 18px;
  color: rgba(240, 249, 255, 0.98);
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.2);
  letter-spacing: -0.01em;
}

.auto-flip-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auto-flip-kpi-grid .auto-draw-kv-row {
  position: relative;
  display: grid;
  justify-content: flex-start;
  align-content: center;
  gap: 6px;
  min-height: 82px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: linear-gradient(180deg, rgba(17, 28, 54, 0.86), rgba(10, 17, 33, 0.92));
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.08);
  overflow: hidden;
}

.auto-flip-kpi-grid .auto-draw-kv-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(34, 211, 238, 0.15) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
  pointer-events: none;
}

.auto-flip-kpi-grid .auto-draw-kv-row:hover::after {
  transform: translateX(120%);
}

.auto-flip-kpi-grid .auto-draw-kv-row span {
  font-size: 12px;
  color: var(--af-muted);
}

.auto-flip-kpi-grid .auto-draw-kv-row strong {
  font-size: 18px;
  line-height: 1.1;
  color: rgba(236, 254, 255, 0.96);
  text-shadow: 0 0 12px rgba(34, 211, 238, 0.18);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.auto-flip-mode-group,
.auto-flip-order-group {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(8, 14, 28, 0.72);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auto-flip-mode-group legend,
.auto-flip-order-group legend {
  color: var(--af-muted);
  padding: 0 4px;
  font-size: 12px;
}

.auto-flip-mode-group .check-pill,
.auto-flip-order-group .check-pill {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(9, 15, 29, 0.7));
  padding: 10px 12px;
  overflow-wrap: anywhere;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auto-flip-mode-group .check-pill input:checked + span,
.auto-flip-order-group .check-pill input:checked + span {
  color: rgba(236, 254, 255, 0.98);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.16);
}

.auto-flip-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auto-flip-settings-grid .auto-draw-field {
  margin: 0;
}

.auto-flip-settings-grid .auto-draw-field > span,
.auto-flip-settings-grid .auto-draw-field {
  color: var(--af-muted);
}

.auto-flip-settings-grid input {
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: linear-gradient(180deg, rgba(12, 21, 41, 0.9), rgba(7, 12, 23, 0.95));
}

.auto-flip-settings-grid .auto-draw-field.is-disabled {
  opacity: 0.58;
}

.auto-flip-settings-grid .auto-draw-field.is-disabled input {
  pointer-events: none;
}

.auto-flip-estimate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auto-flip-estimate-grid .auto-draw-kv-row {
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: linear-gradient(180deg, rgba(12, 21, 41, 0.8), rgba(7, 12, 23, 0.9));
}

.auto-flip-targets-wrap {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  background: rgba(8, 14, 28, 0.72);
}

.auto-flip-targets {
  max-height: min(34vh, 320px);
}

.auto-flip-targets .check-pill {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(9, 15, 29, 0.7));
  padding: 10px 12px;
  overflow-wrap: anywhere;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auto-flip-targets .check-pill input:checked + span {
  color: rgba(236, 254, 255, 0.98);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.16);
}

.auto-flip-targets .check-pill:focus-within {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.22);
}

.auto-flip-config-hint {
  margin: 0;
  color: var(--af-muted);
}

.auto-flip-progress {
  margin: 0;
  min-height: 20px;
  color: rgba(186, 230, 253, 0.92);
}

.auto-flip-footer-actions {
  margin: 0;
  position: sticky;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(6, 11, 23, 0), rgba(6, 11, 23, 0.95) 46%);
  padding-top: 10px;
}

.auto-flip-config-card.is-invalid .auto-flip-config-hint {
  color: rgba(248, 113, 113, 0.95);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(248, 113, 113, 0.2);
}

.auto-flip-result-card {
  width: min(880px, 96vw);
  border: 1px solid rgba(34, 211, 238, 0.28);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(167, 139, 250, 0.16), transparent 54%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(6, 11, 23, 0.96));
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.45);
}

.inventory-auto-dock {
  position: fixed;
  right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 45;
  width: min(380px, calc(100vw - 24px));
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background:
    radial-gradient(130% 120% at 100% 0%, rgba(167, 139, 250, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(6, 11, 23, 0.95));
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.42);
  padding: 12px;
  display: grid;
  gap: 10px;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.inventory-auto-dock::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(167, 139, 250, 0.16);
  pointer-events: none;
}

.inventory-auto-dock__status {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(236, 254, 255, 0.95);
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.14);
}

.inventory-auto-dock__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.inventory-auto-dock__actions .btn {
  min-width: 110px;
  border-color: rgba(34, 211, 238, 0.32);
}

.inventory-audio-toggle {
  min-width: 96px !important;
  border-color: rgba(250, 204, 21, 0.3) !important;
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(244, 114, 182, 0.08)),
    rgba(248, 250, 252, 0.06) !important;
  color: rgba(255, 248, 224, 0.96) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.inventory-audio-toggle[aria-pressed="true"] {
  border-color: rgba(250, 204, 21, 0.58) !important;
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.12),
    0 10px 20px rgba(234, 179, 8, 0.16);
}

.inventory-audio-toggle:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.inventory-auto-dock .btn.primary {
  background: linear-gradient(120deg, rgba(8, 145, 178, 0.95), rgba(37, 99, 235, 0.95));
  border-color: rgba(34, 211, 238, 0.7);
  color: #ecfeff;
  box-shadow: 0 0 0 rgba(34, 211, 238, 0);
}

.inventory-auto-dock[data-state="ready"] {
  border-color: rgba(34, 211, 238, 0.52);
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.2),
    0 18px 44px rgba(2, 6, 23, 0.45);
}

.inventory-auto-dock[data-state="ready"] .btn.primary {
  animation: afDockPulse 2.2s ease-in-out infinite;
}

.inventory-auto-dock[data-state="mine"] {
  border-color: rgba(245, 158, 11, 0.56);
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.2),
    0 18px 44px rgba(2, 6, 23, 0.45);
}

.inventory-auto-dock[data-state="mine"] .btn.primary {
  background: linear-gradient(120deg, rgba(217, 119, 6, 0.95), rgba(234, 179, 8, 0.9));
  border-color: rgba(251, 191, 36, 0.78);
  color: #fff7ed;
}

.inventory-auto-dock[data-state="blocked"] {
  border-color: rgba(148, 163, 184, 0.28);
  filter: saturate(0.8);
}

.inventory-auto-dock[data-state="blocked"] .btn.primary {
  background: rgba(71, 85, 105, 0.75);
  border-color: rgba(148, 163, 184, 0.45);
  color: rgba(226, 232, 240, 0.82);
}

#autoFlipConfigModal.is-visible .auto-flip-config-card {
  animation: afModalRise 0.24s ease-out;
}

@keyframes afModalRise {
  from {
    opacity: 0.65;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes afDockPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(34, 211, 238, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.18);
  }
}

@media (max-width: 768px) {
  #autoFlipConfigModal {
    align-items: flex-end;
    padding: 0;
  }

  #autoFlipConfigModal .auto-flip-config-card {
    width: 100%;
    max-width: none;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 14px 12px calc(12px + env(safe-area-inset-bottom));
    gap: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .auto-flip-kpi-grid {
    grid-template-columns: 1fr;
  }

  .auto-flip-kpi-grid .auto-draw-kv-row strong {
    font-size: 16px;
  }

  .auto-flip-settings-grid {
    grid-template-columns: 1fr;
  }

  .auto-flip-mode-group,
  .auto-flip-order-group,
  .auto-flip-estimate-grid {
    grid-template-columns: 1fr;
  }

  .inventory-auto-dock {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 10px;
  }
  .inventory-auto-dock__actions {
    justify-content: stretch;
  }
  .inventory-auto-dock__actions .btn {
    width: 100%;
  }

  .auto-flip-footer-actions {
    margin-inline: -12px;
    padding: 10px 12px 0;
  }
}

.auto-flip-targets .check-pill input:focus-visible,
.auto-flip-settings-grid input:focus-visible,
.auto-flip-mode-group .check-pill input:focus-visible,
.auto-flip-order-group .check-pill input:focus-visible,
.auto-flip-config-card .btn:focus-visible,
.inventory-auto-dock .btn:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.95);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .inventory-auto-dock[data-state="ready"] .btn.primary,
  #autoFlipConfigModal.is-visible .auto-flip-config-card,
  .inventory-result-modal .result-card::after,
  .inventory-reveal-card::after,
  .inventory-reveal-overlay.is-quick-reveal .inventory-reveal-card {
    animation: none !important;
  }

  .auto-flip-kpi-grid .auto-draw-kv-row::after {
    transition: none;
  }
}

.auto-draw-round-card {
  width: min(760px, 96vw);
}

.auto-draw-round-card .result-grid {
  max-height: min(48vh, 360px);
  overflow: auto;
}

.auto-draw-round-card .form-hint {
  margin: 0;
}

.auto-draw-result-card {
  width: min(980px, 96vw);
}

.auto-draw-result-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.auto-result-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.52);
}

.auto-result-item span {
  font-size: 12px;
  color: var(--muted);
}

.auto-result-item strong {
  font-size: 14px;
  color: var(--ink);
}

.auto-draw-table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.auto-draw-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.auto-draw-table th,
.auto-draw-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

.auto-draw-table th {
  color: var(--muted);
  background: rgba(15, 23, 42, 0.75);
}

.auto-draw-table tfoot th {
  color: var(--ink);
}

.auto-prize-preview-card {
  width: min(760px, 95vw);
}

.auto-prize-preview-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.52);
  min-height: 260px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auto-prize-preview-wrap img {
  width: 100%;
  max-width: min(680px, 90vw);
  max-height: min(72vh, 680px);
  object-fit: contain;
}

@media (max-width: 1080px) {
  .auto-draw-result-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .auto-draw-result-summary {
    grid-template-columns: 1fr;
  }
}

.draw-confirm-body {
  display: grid;
  gap: 12px;
}

.confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.confirm-row strong {
  color: var(--ink);
  font-size: 16px;
}

.draw-action-card {
  width: min(920px, 96vw);
  gap: 18px;
}

.inventory-result-modal .draw-action-card {
  position: relative;
  border: 1px solid rgba(250, 204, 21, 0.42);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(250, 204, 21, 0.26), transparent 48%),
    radial-gradient(90% 80% at 80% 10%, rgba(244, 114, 182, 0.24), transparent 54%),
    radial-gradient(80% 90% at 18% 0%, rgba(56, 189, 248, 0.14), transparent 52%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
  box-shadow:
    0 30px 80px rgba(2, 6, 23, 0.62),
    0 0 48px rgba(250, 204, 21, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform-origin: center top;
}

.inventory-result-modal .draw-action-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 22px;
  border: 1px solid rgba(250, 204, 21, 0.14);
  pointer-events: none;
}

.draw-action-card #drawResultList.result-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 220px));
  justify-content: center;
  align-content: start;
  gap: 12px;
  max-height: min(52vh, 430px);
  overflow: auto;
  padding-right: 4px;
}

.draw-action-card .result-card {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.88));
  width: 100%;
  max-width: 220px;
  justify-self: center;
  padding: 10px;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
}

.inventory-result-modal .result-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(250, 204, 21, 0.26);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(250, 204, 21, 0.22), transparent 46%),
    radial-gradient(80% 70% at 20% 10%, rgba(244, 114, 182, 0.12), transparent 56%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.94));
  box-shadow:
    0 18px 36px rgba(2, 6, 23, 0.46),
    0 0 22px rgba(250, 204, 21, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform-origin: center bottom;
}

.inventory-result-modal .result-card::after {
  content: "";
  position: absolute;
  inset: -18%;
  background: linear-gradient(120deg, transparent 34%, rgba(255, 255, 255, 0.22) 50%, transparent 64%);
  transform: translateX(-62%);
  animation: inventoryResultSweep 2.2s ease-in-out infinite;
  pointer-events: none;
}

.inventory-result-modal.is-prize-spotlight .draw-action-card {
  animation: inventoryPrizeCardSpotlight 1.2s ease-out;
}

.inventory-result-modal.is-prize-spotlight .result-card {
  animation: inventoryPrizeCardRise 0.82s cubic-bezier(0.18, 0.8, 0.22, 1);
}

.draw-action-card .result-image {
  aspect-ratio: auto;
  height: 148px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.45);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.draw-action-card .result-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.draw-action-card .result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.draw-action-card .result-market-btn {
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.1;
  border-radius: 999px;
}

.draw-action-card .result-market-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.draw-action-card .result-info strong {
  font-size: 14px;
  line-height: 1.3;
}

.draw-action-card .result-info span {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin-top: 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.6);
  font-size: 11px;
}

.draw-action-card .result-count {
  justify-self: end;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.4);
  font-size: 11px;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.action-buttons .btn {
  justify-content: center;
}

@media (max-width: 760px) {
  .draw-action-card {
    width: min(560px, 96vw);
  }

  .draw-action-card #drawResultList.result-grid {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    max-height: min(48vh, 360px);
  }

  .draw-action-card .result-image {
    height: 128px;
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-card.modal-wide {
  width: min(1100px, 96vw);
  padding: 24px;
  gap: 18px;
}

.draw-list-market-card {
  width: min(520px, 94vw);
  gap: 16px;
}

.marketplaces-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.marketplaces-grid .admin-form {
  max-width: none;
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.sites-span-2 {
  grid-column: 1 / -1;
}

.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kv-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
  font-size: 13px;
  color: var(--muted);
}

.kv-row strong {
  color: var(--ink);
  font-weight: 700;
}

.config-editor {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.config-editor summary {
  cursor: pointer;
  color: var(--accent-2);
  font-weight: 700;
}

.config-editor-body {
  margin-top: 12px;
  display: grid;
  gap: 14px;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

.job-card {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
}

.job-card.is-hidden {
  display: none;
}

.job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.job-logs {
  height: 240px;
  overflow: auto;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(2, 6, 23, 0.65);
  color: rgba(226, 232, 240, 0.92);
  font-size: 12px;
  line-height: 1.55;
}

.site-domain {
  font-weight: 800;
  color: var(--ink);
}

.site-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.site-sub a {
  color: var(--accent-2);
}

.cell-ok {
  color: #34d399;
}

.cell-bad {
  color: #fb7185;
}

.modal-card.modal-wide #platformForm {
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px 24px;
}

.modal-card.modal-wide #platformForm .platform-span-2 {
  grid-column: 1 / -1;
}

.modal-card.modal-wide #platformForm .platform-rule-grid {
  margin-top: 6px;
}

.modal-card.modal-wide #platformForm .platform-custom-fields {
  margin-top: 10px;
}

.browser-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.browser-shot-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.55);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.browser-shot {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: crosshair;
  user-select: none;
}

@media (max-width: 980px) {
  .marketplaces-grid {
    grid-template-columns: 1fr;
  }

  .sites-grid {
    grid-template-columns: 1fr;
  }

  .modal-card.modal-wide #platformForm {
    grid-template-columns: 1fr;
  }

  .platform-rule-grid {
    grid-template-columns: 1fr;
  }
}

.platform-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.platform-rule {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
}

.platform-rule h4 {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-inline input {
  flex: 1;
  min-width: 0;
}

.field-inline .btn {
  flex: none;
  white-space: nowrap;
}

.rule-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.rule-toggle-row .custom-remove {
  margin-left: auto;
}

.platform-custom-fields {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

#customFields {
  display: grid;
  gap: 12px;
}

.custom-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.25);
}

.custom-field-row label {
  margin: 0;
}

@media (max-width: 980px) {
  .custom-field-row {
    grid-template-columns: 1fr;
  }
}

.import-preview {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.45);
}

.import-preview-media {
  width: 140px;
  height: 140px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.4);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.import-preview-body {
  display: grid;
  gap: 10px;
}

.import-preview-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.import-preview-row strong {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-align: right;
}

.import-preview-row select {
  width: 60%;
  max-width: 440px;
}

.import-preview-extra {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
}

.import-preview-extra .extra-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.import-preview-extra .extra-row strong {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.import-debug {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.35);
  color: var(--muted);
}

.import-debug summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
}

.import-debug pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.5;
}

.import-debug-shot {
  margin-top: 12px;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.4);
}

.admin-simple .bg-orb {
  display: none;
}

.admin-simple .section {
  display: grid;
  gap: 6px;
}

.admin-simple .section-head {
  align-items: center;
  justify-content: flex-start;
}

.admin-simple .section-head h2 {
  margin: 0;
}

.admin-simple .form-actions {
  margin: 0;
}

.admin-simple .table-wrap {
  margin-top: 0;
}

.admin-simple .section-head {
  margin-bottom: 2px;
}

.admin-simple .form-actions {
  margin-bottom: 2px;
}

.admin-simple .section-head p {
  margin-top: 4px;
}

.admin-simple .admin-table th {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.admin-simple .admin-table td {
  color: var(--ink);
}

.admin-simple .admin-table th,
.admin-simple .admin-table td {
  padding: var(--table-padding-y) var(--table-padding-x);
}

.admin-simple .table-actions {
  gap: 4px;
}

.admin-simple .table-wrap {
  border-radius: 10px;
}

.admin-simple .assignment-item {
  background: transparent;
}

.admin-simple .preview-card {
  background: transparent;
}

@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .hero-stats {
    flex-direction: column;
    gap: 10px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }
.admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 5;
  }

  .admin-sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .topbar {
    flex-direction: column;
    gap: 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .topbar-user {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 980px) {
  body:not([data-layout-page]).has-mobile-tabbar .page,
  body:not([data-layout-page]).has-mobile-tabbar .auth-page {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  body:not([data-layout-page]) .topbar {
    padding: 14px 4vw;
  }
}

@media (max-width: 768px) {
  .mobile-tabbar {
    display: grid;
  }

  body.has-mobile-tabbar.has-draw-bar .draw-bar {
    bottom: calc(74px + env(safe-area-inset-bottom));
  }

  body.has-mobile-tabbar.has-draw-bar .page {
    padding-bottom: calc(210px + env(safe-area-inset-bottom));
  }

  body:not([data-layout-page]) .topbar-actions {
    gap: 8px;
  }

  body:not([data-layout-page]) .topbar-actions .btn {
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-tabbar,
  .mobile-install-fab {
    transition: none !important;
  }
}


.banner.carousel {
  position: relative;
  padding: 0;
  overflow: hidden;
  min-height: clamp(240px, 32vw, 420px);
  border-radius: 28px;
  border: 1px solid var(--border);
  background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.18), rgba(2, 6, 23, 0.88));
  box-shadow: 0 22px 56px rgba(2, 6, 23, 0.5);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s ease;
}

.carousel-slide {
  position: relative;
  min-width: 100%;
  padding: clamp(14px, 2.2vw, 24px);
  display: flex;
  align-items: stretch;
}

.carousel-slide::before {
  display: none;
}

.carousel-arc-link {
  position: relative;
  display: block;
  width: 100%;
  min-height: clamp(220px, 30vw, 380px);
  border-radius: 28px 28px 180px 180px / 28px 28px 98px 98px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.45);
  text-decoration: none;
  background: rgba(15, 23, 42, 0.5);
}

.carousel-arc-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.06) 0%, rgba(2, 6, 23, 0.62) 100%);
}

.carousel-arc-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.02);
  transition: transform 0.6s ease;
}

.carousel-arc-media.is-fallback {
  background-image: radial-gradient(circle at 35% 22%, rgba(34, 211, 238, 0.35), rgba(15, 23, 42, 0.96)),
    linear-gradient(135deg, rgba(249, 115, 22, 0.4), rgba(15, 23, 42, 0.95));
}

.carousel-arc-link:hover .carousel-arc-media {
  transform: scale(1.08);
}

.carousel-arc-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(2, 6, 23, 0.62);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.carousel-content {
  display: none;
}

.carousel-content h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
}

.carousel-control.prev {
  left: 16px;
}

.carousel-control.next {
  right: 16px;
}

.carousel-dots {
  position: absolute;
  bottom: 16px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.carousel-dot.active {
  background: #fff;
}

@media (max-width: 768px) {
  .banner.carousel {
    min-height: 220px;
    border-radius: 20px;
  }

  .carousel-slide {
    padding: 12px;
  }

  .carousel-arc-link {
    min-height: 210px;
    border-radius: 20px 20px 110px 110px / 20px 20px 60px 60px;
  }

  .carousel-control {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }
}

/* Inventory event detail page */
.inventory-experience {
  display: none;
  gap: 20px;
}

body.inventory-mode .inventory-experience {
  display: grid;
}

body.inventory-mode .page {
  max-width: min(1520px, 96vw);
  padding-left: 3vw;
  padding-right: 3vw;
}

.inventory-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 20px;
  align-items: start;
}

.inventory-overview-main,
.inventory-detail-stack {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.inventory-prizes-rail {
  min-width: 0;
}

.inventory-hero-card,
.inventory-live-section,
.inventory-events-section,
.pool-tabs,
.pool-panels,
.inventory-tabs,
.inventory-info-grid,
.inventory-prizes-card {
  background: linear-gradient(165deg, rgba(17, 24, 39, 0.88), rgba(15, 23, 42, 0.78));
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(6px);
}

.inventory-hero-card {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.inventory-hero-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.inventory-subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.inventory-price-wrap {
  text-align: right;
  display: grid;
  align-content: start;
  gap: 4px;
}

.inventory-price {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.4px;
  line-height: 1;
}

.inventory-price-original {
  color: var(--text-muted);
  font-size: 12px;
}

.inventory-hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.inventory-hero-meta > div {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 11px;
  display: grid;
  gap: 6px;
}

.inventory-hero-meta span {
  color: var(--text-muted);
  font-size: 12px;
}

.pool-tabs {
  display: flex;
  gap: 8px;
  padding: 8px;
  flex-wrap: wrap;
}

.pool-tab {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: var(--text-primary);
  padding: 8px 14px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.pool-tab:hover {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}

.pool-tab.is-active {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border-color: transparent;
}

.pool-tabs.is-single {
  display: none;
}

.pool-panels {
  padding: 14px 16px;
}

.pool-panel {
  display: none;
}

.pool-panel.is-active {
  display: block;
}

.pool-panel p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.8;
}

.inventory-info-grid {
  padding: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-info-card {
  background: rgba(30, 41, 59, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.inventory-info-card span {
  color: var(--text-muted);
  font-size: 12px;
}

.inventory-info-notice {
  grid-column: 1 / -1;
}

.inventory-prizes-card {
  padding: 18px;
  display: grid;
  gap: 14px;
  position: sticky;
  top: 24px;
}

.inventory-prizes-head {
  display: grid;
  gap: 6px;
}

.inventory-prizes-head .tag {
  justify-self: start;
}

.inventory-prizes-head h3 {
  margin: 0;
  font-size: 20px;
}

.inventory-prizes-head p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.inventory-prizes-empty {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.42);
  color: var(--text-muted);
}

.inventory-prizes-card .tier-prizes {
  grid-template-columns: 1fr;
  gap: 10px;
}

.inventory-prizes-card .tier-card + .tier-card {
  margin-top: 12px;
}

.inventory-prizes-card .prize-card {
  padding: 10px;
  gap: 10px;
}

.inventory-prizes-card .prize-card img {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
}

.inventory-live-section,
.inventory-events-section {
  padding: 20px;
}

.inventory-live-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.inventory-live-head h3,
.inventory-events-section h3 {
  margin: 0;
}

body.inventory-mode #inventoryPrizesPanel {
  max-height: min(calc(100vh - 180px), 720px);
  overflow: auto;
  padding-right: 6px;
}

.inventory-board-progress {
  width: min(240px, 100%);
  display: grid;
  gap: 6px;
  justify-items: end;
}

.inventory-board-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.inventory-slot {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(203, 213, 225, 0.32);
  background:
    radial-gradient(circle at top, rgba(250, 204, 21, 0.12), transparent 36%),
    radial-gradient(circle at 18% 0%, rgba(244, 114, 182, 0.08), transparent 34%),
    radial-gradient(circle at 80% 100%, rgba(56, 189, 248, 0.06), transparent 40%),
    radial-gradient(circle at top, rgba(30, 41, 59, 0.86), rgba(15, 23, 42, 0.9));
  color: var(--text-primary);
  min-height: 172px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  padding: 10px 10px 12px;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 8px 20px rgba(2, 6, 23, 0.35),
    0 0 0 1px rgba(250, 204, 21, 0.04);
}

.inventory-slot::before,
.inventory-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.inventory-slot::before {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.18), transparent 26%),
    linear-gradient(125deg, transparent 34%, rgba(255, 255, 255, 0.16) 50%, transparent 66%);
  opacity: 0.72;
  transform: translateX(-38%);
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.inventory-slot::after {
  inset: 1px;
  border-radius: 13px;
  border: 1px solid rgba(250, 204, 21, 0);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.inventory-slot:hover {
  transform: translateY(-4px) scale(1.012);
  border-color: rgba(250, 204, 21, 0.68);
  box-shadow:
    0 18px 34px rgba(2, 6, 23, 0.54),
    0 0 24px rgba(250, 204, 21, 0.12);
  filter: saturate(1.06);
}

.inventory-slot:hover::before {
  transform: translateX(18%);
  opacity: 0.92;
}

.inventory-slot:hover::after {
  border-color: rgba(250, 204, 21, 0.38);
  box-shadow: inset 0 0 24px rgba(250, 204, 21, 0.08);
}

.inventory-slot:active {
  transform: translateY(-1px) scale(0.978);
}

.inventory-slot:not(.is-opened):not(.is-pending) {
  box-shadow:
    0 18px 28px rgba(15, 23, 42, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.inventory-slot:not(.is-opened):not(.is-pending):hover {
  box-shadow:
    0 24px 40px rgba(15, 23, 42, 0.28),
    0 0 0 1px rgba(250, 204, 21, 0.16),
    0 0 26px rgba(250, 204, 21, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.inventory-slot:not(.is-opened):not(.is-pending):active::before {
  opacity: 0.92;
}

.inventory-slot-face {
  flex: 1;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: grid;
  place-items: center;
}

.inventory-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-slot-no {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f59e0b, #ea580c);
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: 0 5px 12px rgba(234, 88, 12, 0.42);
}

.inventory-slot-label {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.inventory-slot.is-opened {
  background: radial-gradient(circle at top, rgba(34, 197, 94, 0.2), rgba(15, 23, 42, 0.9));
  border-color: rgba(34, 197, 94, 0.64);
  cursor: default;
}

.inventory-slot.is-opened::before {
  background:
    radial-gradient(circle at 50% 18%, rgba(250, 204, 21, 0.22), transparent 28%),
    radial-gradient(circle at 50% 60%, rgba(34, 197, 94, 0.16), transparent 46%);
  opacity: 1;
  transform: none;
}

.inventory-slot-prize {
  font-size: 11px;
  color: rgba(226, 232, 240, 0.92);
  text-align: center;
  line-height: 1.3;
}

.inventory-slot-fallback {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.95);
  text-align: center;
  padding: 6px;
  line-height: 1.4;
}

.inventory-slot.is-pending {
  opacity: 0.58;
  transform: none;
}

.inventory-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(250, 204, 21, 0.26), transparent 30%),
    radial-gradient(circle at 22% 12%, rgba(244, 114, 182, 0.2), transparent 34%),
    radial-gradient(circle at 78% 16%, rgba(56, 189, 248, 0.16), transparent 30%),
    radial-gradient(circle at 50% 75%, rgba(148, 163, 184, 0.14), transparent 42%),
    rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.inventory-reveal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.inventory-reveal-stage {
  width: min(92vw, 360px);
  display: grid;
  gap: 16px;
  justify-items: center;
  user-select: none;
  perspective: 1200px;
}

.inventory-reveal-card {
  position: relative;
  width: min(92vw, 360px);
  aspect-ratio: 0.72;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.2), transparent 38%),
    radial-gradient(circle at 18% 8%, rgba(244, 114, 182, 0.12), transparent 34%),
    radial-gradient(circle at 84% 0%, rgba(56, 189, 248, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.99));
  border: 1px solid rgba(250, 204, 21, 0.34);
  box-shadow:
    0 30px 80px rgba(2, 6, 23, 0.62),
    0 0 48px rgba(250, 204, 21, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform-origin: center center;
  will-change: transform, opacity;
  isolation: isolate;
  transition: box-shadow 0.18s ease, transform 0.18s ease, filter 0.18s ease;
}

.inventory-reveal-card::before,
.inventory-reveal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.inventory-reveal-card::before {
  inset: 10px;
  border-radius: 22px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 4;
}

.inventory-reveal-card::after {
  inset: -12%;
  background:
    linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.28) 48%, transparent 64%),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.18), transparent 14%),
    radial-gradient(circle at 70% 14%, rgba(250, 204, 21, 0.22), transparent 12%);
  transform: translateX(-62%);
  opacity: 0.78;
  animation: inventoryRevealSweep 3s ease-in-out infinite;
  z-index: 3;
}

.inventory-reveal-prize,
.inventory-reveal-cover,
.inventory-reveal-scratch,
.inventory-reveal-success {
  position: absolute;
  inset: 0;
}

.inventory-reveal-prize,
.inventory-reveal-cover,
.inventory-reveal-success {
  pointer-events: none;
}

.inventory-reveal-prize {
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    radial-gradient(circle at top, rgba(250, 204, 21, 0.26), transparent 38%),
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
}

.inventory-reveal-prize-media {
  position: relative;
  padding: 18px 18px 6px;
  display: grid;
  place-items: center;
}

.inventory-reveal-prize-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.14);
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.38);
  filter: saturate(1.04) contrast(1.04);
}

.inventory-reveal-prize-fallback {
  width: 100%;
  height: 100%;
  min-height: 240px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  color: #f8fafc;
  background:
    radial-gradient(circle at top, rgba(250, 204, 21, 0.22), transparent 40%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.98));
}

.inventory-reveal-prize-meta {
  position: relative;
  z-index: 1;
  padding: 0 20px 22px;
  display: grid;
  gap: 6px;
  text-align: center;
}

.inventory-reveal-prize-name {
  font-size: 24px;
  line-height: 1.15;
  color: #fff;
}

.inventory-reveal-prize-level {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(250, 204, 21, 0.9);
  text-transform: uppercase;
}

.inventory-reveal-cover {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(250, 204, 21, 0.22), transparent 42%),
    radial-gradient(circle at 80% 18%, rgba(56, 189, 248, 0.18), transparent 32%),
    radial-gradient(circle at 18% 18%, rgba(244, 114, 182, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 1));
  transition: opacity 0.22s ease, transform 0.22s ease;
  isolation: isolate;
  z-index: 2;
}

.inventory-reveal-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.32), transparent 24%, transparent 60%, rgba(255, 255, 255, 0.16) 76%, transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 4px, rgba(15, 23, 42, 0.05) 4px 8px),
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.2), transparent 18%),
    radial-gradient(circle at 72% 64%, rgba(250, 204, 21, 0.12), transparent 22%);
  mix-blend-mode: screen;
  opacity: 0.82;
  pointer-events: none;
}

.inventory-reveal-cover.is-hidden {
  opacity: 0;
  transform: scale(1.02);
}

.inventory-reveal-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.08);
}

.inventory-reveal-cover-fallback {
  padding: 24px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #e2e8f0;
}

.inventory-reveal-scratch {
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  transition: none;
  cursor: default;
  z-index: 5;
}

.inventory-reveal-overlay.is-scratch-ready .inventory-reveal-scratch {
  opacity: 1;
  cursor: crosshair;
}

.inventory-reveal-overlay.has-coin-cursor .inventory-reveal-scratch {
  cursor: none;
}

.inventory-reveal-overlay.has-coin-ghost .inventory-reveal-scratch {
  cursor: default;
}

.inventory-reveal-overlay.is-scratch-ready .inventory-reveal-cover {
  pointer-events: none;
}

.inventory-reveal-overlay.is-scratch-ready .inventory-reveal-scratch {
  pointer-events: auto;
}

.inventory-reveal-overlay.is-scratching .inventory-reveal-scratch {
  cursor: grabbing;
}

.inventory-reveal-overlay.is-scratching .inventory-reveal-card {
  transform: rotate(-1.4deg) scale(1.012);
  box-shadow:
    0 36px 90px rgba(2, 6, 23, 0.66),
    0 0 60px rgba(250, 204, 21, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  filter: saturate(1.08);
}

.inventory-reveal-overlay.is-revealed .inventory-reveal-scratch {
  opacity: 0;
}

.inventory-reveal-success {
  background:
    radial-gradient(circle at 50% 20%, rgba(250, 204, 21, 0.4), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.14), transparent 64%);
  opacity: 0;
  transition: opacity 0.24s ease;
  z-index: 1;
}

.inventory-reveal-overlay.is-revealed .inventory-reveal-success {
  opacity: 1;
}

.inventory-reveal-hint {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: rgba(241, 245, 249, 0.92);
  letter-spacing: 0.02em;
  text-align: center;
  opacity: 0.98;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, 0.2);
  background: rgba(15, 23, 42, 0.56);
  box-shadow:
    0 14px 30px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.inventory-reveal-skip {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  min-width: 160px;
  border-color: rgba(250, 204, 21, 0.36) !important;
  background:
    linear-gradient(135deg, rgba(250, 204, 21, 0.18), rgba(244, 114, 182, 0.12)),
    rgba(15, 23, 42, 0.78) !important;
  color: #fff7ed !important;
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.3);
}

.inventory-reveal-skip.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.inventory-reveal-overlay.is-scratch-unlocked .inventory-reveal-card {
  border-color: rgba(250, 204, 21, 0.56);
  box-shadow:
    0 30px 84px rgba(2, 6, 23, 0.64),
    0 0 42px rgba(250, 204, 21, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.inventory-reveal-overlay.is-scratch-unlocked .inventory-reveal-hint {
  border-color: rgba(250, 204, 21, 0.38);
  color: rgba(255, 251, 235, 0.98);
}

.inventory-reveal-coin {
  position: fixed;
  top: 0;
  left: 0;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 8;
  transform: translate(-999px, -999px) rotate(0deg);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 250, 205, 0.98), rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at 68% 70%, rgba(180, 83, 9, 0.28), rgba(120, 53, 15, 0) 44%),
    linear-gradient(135deg, #fde68a, #f59e0b 54%, #b45309);
  border: 1px solid rgba(255, 251, 235, 0.56);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -3px 6px rgba(120, 53, 15, 0.28);
  filter: saturate(1.02);
  transition:
    opacity 0.14s ease,
    transform 0.075s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.14s ease,
    filter 0.14s ease,
    width 0.14s ease,
    height 0.14s ease;
  will-change: transform, opacity, box-shadow;
}

.inventory-reveal-overlay.has-coin-cursor .inventory-reveal-coin {
  opacity: 0;
}

.inventory-reveal-overlay.has-coin-ghost .inventory-reveal-coin {
  opacity: 0;
  filter: saturate(0.94) brightness(1.03);
}

.inventory-reveal-overlay.is-coin-active .inventory-reveal-coin {
  opacity: 1;
  box-shadow:
    0 16px 32px rgba(15, 23, 42, 0.4),
    0 0 18px rgba(250, 204, 21, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -4px 8px rgba(120, 53, 15, 0.32);
  filter: saturate(1.08) brightness(1.04);
  animation: inventoryCoinPulse 0.24s ease-out;
}

.inventory-reveal-coin::before,
.inventory-reveal-coin::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.inventory-reveal-coin::before {
  inset: 10px;
  border: 1px solid rgba(120, 53, 15, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 220, 0.32);
}

.inventory-reveal-coin::after {
  inset: 18px;
  background:
    linear-gradient(180deg, rgba(255, 248, 220, 0.84), rgba(234, 179, 8, 0.68)),
    linear-gradient(90deg, transparent 0 46%, rgba(120, 53, 15, 0.4) 46% 54%, transparent 54%);
  mask: radial-gradient(circle, transparent 0 40%, #000 42% 100%);
  opacity: 0.88;
}

.inventory-reveal-overlay.has-coin-cursor .inventory-reveal-card {
  filter: saturate(1.06);
}

.inventory-reveal-overlay.has-coin-ghost .inventory-reveal-card {
  filter: saturate(1.04);
}

.inventory-reveal-overlay.has-coin-cursor .inventory-reveal-hint {
  border-color: rgba(250, 204, 21, 0.32);
}

.inventory-reveal-overlay.has-coin-ghost .inventory-reveal-hint {
  border-color: rgba(244, 114, 182, 0.28);
}

.inventory-reveal-overlay.is-quick-reveal .inventory-reveal-card {
  animation: inventoryQuickRevealPulse 0.7s ease-out;
}

@keyframes inventoryRevealSweep {
  0% {
    transform: translateX(-62%);
  }
  55%,
  100% {
    transform: translateX(70%);
  }
}

@keyframes inventoryQuickRevealPulse {
  0% {
    transform: scale(0.98);
    filter: saturate(0.96);
  }
  55% {
    transform: scale(1.02);
    filter: saturate(1.08);
  }
  100% {
    transform: scale(1);
    filter: saturate(1);
  }
}

@keyframes inventoryResultSweep {
  0% {
    transform: translateX(-72%);
  }
  55%,
  100% {
    transform: translateX(72%);
  }
}

@keyframes inventoryPrizeCardSpotlight {
  0% {
    transform: scale(0.972);
    box-shadow:
      0 22px 50px rgba(2, 6, 23, 0.48),
      0 0 0 rgba(250, 204, 21, 0);
  }
  54% {
    transform: scale(1.01);
    box-shadow:
      0 34px 86px rgba(2, 6, 23, 0.64),
      0 0 56px rgba(250, 204, 21, 0.18);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes inventoryPrizeCardRise {
  0% {
    transform: translateY(16px) scale(0.95);
    opacity: 0.72;
  }
  60% {
    transform: translateY(-4px) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes inventoryCoinPulse {
  0% {
    transform: scale(0.94);
  }
  100% {
    transform: scale(1);
  }
}

.inventory-events-list {
  display: grid;
  gap: 8px;
}

.inventory-event-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr 1fr 140px;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.4);
  padding: 9px 11px;
  font-size: 12px;
}

.inventory-event-row small {
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .inventory-hero-head {
    flex-direction: column;
  }

  .inventory-price-wrap {
    text-align: left;
  }

  .inventory-hero-meta {
    grid-template-columns: 1fr;
  }

  .inventory-info-grid {
    grid-template-columns: 1fr;
  }

  .inventory-prizes-card {
    position: static;
  }

  .inventory-event-row {
    grid-template-columns: 1fr;
  }

  .inventory-reveal-overlay {
    padding: 18px;
  }

  .inventory-reveal-card {
    width: min(94vw, 340px);
    border-radius: 24px;
  }

  .inventory-reveal-prize-name {
    font-size: 20px;
  }
}

@media (max-width: 1180px) {
  .inventory-overview {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
    gap: 16px;
  }
}

@media (max-width: 860px) {
  body.inventory-mode .page {
    max-width: 100%;
    padding-left: 4vw;
    padding-right: 4vw;
  }

  .inventory-overview {
    grid-template-columns: 1fr;
  }

  body.inventory-mode #inventoryPrizesPanel {
    max-height: none;
  }

  .inventory-board-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .inventory-slot {
    min-height: 154px;
  }
}

@media (max-width: 640px) {
  .inventory-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .inventory-live-section,
  .inventory-events-section {
    padding: 14px;
  }

  .inventory-slot {
    min-height: 138px;
    padding: 8px;
  }

  .inventory-slot-no {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .inventory-reveal-stage,
  .inventory-reveal-card {
    width: min(94vw, 320px);
  }

  .inventory-reveal-prize-media {
    padding: 14px 14px 4px;
  }

  .inventory-reveal-prize-fallback {
    min-height: 208px;
    font-size: 15px;
  }
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

body[data-layout-page="admin-news"] .section-head p {
  max-width: 78ch;
  line-height: 1.55;
}

body[data-layout-page="admin-news"] .admin-news-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.55);
}

body[data-layout-page="admin-news"] .admin-news-toolbar .admin-news-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

body[data-layout-page="admin-news"] #newsPostStatus {
  min-width: 170px;
}

body[data-layout-page="admin-news"] .admin-news-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(280px, 0.95fr) minmax(460px, 1.2fr) minmax(260px, 0.9fr);
  grid-template-areas:
    "auto auto auto"
    "sources posts ops";
}

body[data-layout-page="admin-news"] .admin-news-card--auto {
  grid-area: auto;
}

body[data-layout-page="admin-news"] .admin-news-card--sources {
  grid-area: sources;
}

body[data-layout-page="admin-news"] .admin-news-card--posts {
  grid-area: posts;
}

body[data-layout-page="admin-news"] .admin-news-card--ops {
  grid-area: ops;
}

body[data-layout-page="admin-news"] .admin-news-card {
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
}

body[data-layout-page="admin-news"] .admin-news-card > h3 {
  margin: 0 0 12px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

body[data-layout-page="admin-news"] #newsAutoForm,
body[data-layout-page="admin-news"] #newsSourceForm {
  max-width: none;
}

body[data-layout-page="admin-news"] .admin-news-auto-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

body[data-layout-page="admin-news"] .admin-news-card .form-hint {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.9);
}

body[data-layout-page="admin-news"] .admin-news-rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-layout-page="admin-news"] .admin-news-merge-log {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

body[data-layout-page="admin-news"] .admin-news-ops-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

body[data-layout-page="admin-news"] .admin-news-ops-block {
  margin-top: 12px;
}

body[data-layout-page="admin-news"] .admin-news-ops-block h4 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(226, 232, 240, 0.92);
}

body[data-layout-page="admin-news"] .admin-news-automation-controls {
  display: grid;
  gap: 10px;
}

body[data-layout-page="admin-news"] .admin-news-automation-controls > label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.88);
}

body[data-layout-page="admin-news"] .admin-news-automation-controls .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-layout-page="admin-news"] .admin-news-automation-controls .checkbox-label input {
  margin: 0;
}

body[data-layout-page="admin-news"] .admin-news-automation-controls .admin-news-ops-actions {
  margin-top: 2px;
}

body[data-layout-page="admin-news"] .admin-news-automation-runs-wrap {
  margin-top: 10px;
}

body[data-layout-page="admin-news"] .admin-news-attr-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

body[data-layout-page="admin-news"] .admin-news-attr-controls label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.88);
}

body[data-layout-page="admin-news"] .admin-news-attr-controls .admin-news-ops-actions {
  margin-top: 0;
  grid-column: 1 / -1;
}

body[data-layout-page="admin-news"] .admin-news-attr-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-layout-page="admin-news"] .admin-news-attr-quality-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-layout-page="admin-news"] .admin-news-attr-alerts-wrap {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
}

body[data-layout-page="admin-news"] .admin-news-attr-alerts-wrap h5 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
}

body[data-layout-page="admin-news"] .admin-news-attr-alerts {
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-news"] .admin-news-alert {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 10px;
}

body[data-layout-page="admin-news"] .admin-news-alert strong {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

body[data-layout-page="admin-news"] .admin-news-alert span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.92);
}

body[data-layout-page="admin-news"] .admin-news-alert.is-warn {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(113, 63, 18, 0.28);
}

body[data-layout-page="admin-news"] .admin-news-alert.is-info {
  border-color: rgba(56, 189, 248, 0.36);
  background: rgba(12, 74, 110, 0.28);
}

body[data-layout-page="admin-news"] .admin-news-attr-funnel-wrap {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
}

body[data-layout-page="admin-news"] .admin-news-attr-funnel-wrap h5 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
}

body[data-layout-page="admin-news"] .admin-news-attr-funnel-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-layout-page="admin-news"] .admin-news-attr-funnel-rates {
  margin-top: 10px;
}

body[data-layout-page="admin-news"] .admin-news-attr-trend-wrap {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
}

body[data-layout-page="admin-news"] .admin-news-attr-trend-wrap h5 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
}

body[data-layout-page="admin-news"] .admin-news-attr-trend {
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-news"] .admin-news-attr-trend-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 8px;
  align-items: center;
}

body[data-layout-page="admin-news"] .admin-news-attr-trend-row .date {
  color: rgba(148, 163, 184, 0.92);
  font-size: 11px;
}

body[data-layout-page="admin-news"] .admin-news-attr-trend-row .bars {
  display: grid;
  gap: 4px;
}

body[data-layout-page="admin-news"] .admin-news-attr-trend-row .bar {
  display: block;
  height: 6px;
  min-width: 4px;
  border-radius: 999px;
}

body[data-layout-page="admin-news"] .admin-news-attr-trend-row .bar.clicks {
  background: rgba(96, 165, 250, 0.9);
}

body[data-layout-page="admin-news"] .admin-news-attr-trend-row .bar.purchases {
  background: rgba(34, 197, 94, 0.92);
}

body[data-layout-page="admin-news"] .admin-news-attr-trend-row .bar.revenue {
  background: rgba(250, 204, 21, 0.92);
}

body[data-layout-page="admin-news"] .admin-news-attr-trend-row .meta {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.92);
  text-align: right;
}

body[data-layout-page="admin-news"] .admin-news-attr-table-wrap {
  margin-top: 10px;
}

body[data-layout-page="admin-news"] .admin-news-attr-table-wrap .admin-table {
  min-width: 860px;
}

body[data-layout-page="admin-news"] .admin-news-attr-table-wrap .admin-table td:not(:first-child),
body[data-layout-page="admin-news"] .admin-news-attr-table-wrap .admin-table th:not(:first-child) {
  text-align: right;
}

body[data-layout-page="admin-news"] .admin-news-attr-table-wrap .admin-table td:last-child,
body[data-layout-page="admin-news"] .admin-news-attr-table-wrap .admin-table th:last-child {
  text-align: center;
}

body[data-layout-page="admin-news"] .admin-news-attr-table-wrap .admin-table td:first-child,
body[data-layout-page="admin-news"] .admin-news-attr-table-wrap .admin-table th:first-child {
  text-align: left;
}

body[data-layout-page="admin-news"] .admin-news-source-tuner-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

body[data-layout-page="admin-news"] .admin-news-source-tuner-auto {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

body[data-layout-page="admin-news"] .admin-news-source-tuner-auto .checkbox-label {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-news"] .admin-news-source-tuner-auto .admin-news-ops-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

body[data-layout-page="admin-news"] .admin-news-source-tuner-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-layout-page="admin-news"] .admin-news-source-tuner-table-wrap {
  margin-top: 10px;
}

body[data-layout-page="admin-news"] .admin-news-source-tuner-table-wrap .admin-table {
  min-width: 980px;
}

body[data-layout-page="admin-news"] .admin-news-source-tuner-table-wrap .admin-table td:not(:first-child),
body[data-layout-page="admin-news"] .admin-news-source-tuner-table-wrap .admin-table th:not(:first-child) {
  text-align: right;
}

body[data-layout-page="admin-news"] .admin-news-source-tuner-table-wrap .admin-table td:first-child,
body[data-layout-page="admin-news"] .admin-news-source-tuner-table-wrap .admin-table th:first-child {
  text-align: left;
}

body[data-layout-page="admin-news"] .admin-news-source-tuner-table-wrap .admin-table td:last-child,
body[data-layout-page="admin-news"] .admin-news-source-tuner-table-wrap .admin-table th:last-child {
  text-align: center;
}

body[data-layout-page="admin-news"] .admin-news-conv-priority-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

body[data-layout-page="admin-news"] .admin-news-conv-priority-controls label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.88);
}

body[data-layout-page="admin-news"] .admin-news-conv-priority-table-wrap {
  margin-top: 10px;
}

body[data-layout-page="admin-news"] .admin-news-conv-priority-table-wrap .admin-table {
  min-width: 900px;
}

body[data-layout-page="admin-news"] .admin-news-conv-priority-table-wrap .admin-table td:not(:first-child),
body[data-layout-page="admin-news"] .admin-news-conv-priority-table-wrap .admin-table th:not(:first-child) {
  text-align: right;
}

body[data-layout-page="admin-news"] .admin-news-conv-priority-table-wrap .admin-table td:first-child,
body[data-layout-page="admin-news"] .admin-news-conv-priority-table-wrap .admin-table th:first-child {
  text-align: left;
}

body[data-layout-page="admin-news"] .admin-news-conv-priority-table-wrap .admin-table td:last-child,
body[data-layout-page="admin-news"] .admin-news-conv-priority-table-wrap .admin-table th:last-child {
  text-align: center;
}

body[data-layout-page="admin-news"] .admin-news-backfill-controls,
body[data-layout-page="admin-news"] .admin-news-quality-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

body[data-layout-page="admin-news"] .admin-news-backfill-controls label,
body[data-layout-page="admin-news"] .admin-news-quality-controls label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.88);
}

body[data-layout-page="admin-news"] .admin-news-backfill-controls input,
body[data-layout-page="admin-news"] .admin-news-quality-controls input {
  width: min(160px, 100%);
}

body[data-layout-page="admin-news"] .admin-news-quality-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-layout-page="admin-news"] .admin-news-quality-reasons-wrap {
  margin-top: 10px;
}

body[data-layout-page="admin-news"] .admin-news-quality-reasons-wrap .admin-table {
  min-width: 520px;
}

body[data-layout-page="admin-news"] .admin-news-source-tuner-rollback-preview {
  margin-top: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.62);
  border-radius: 12px;
  padding: 12px;
}

body[data-layout-page="admin-news"] .admin-news-rollback-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

body[data-layout-page="admin-news"] .admin-news-rollback-preview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.88);
}

body[data-layout-page="admin-news"] .admin-news-rollback-preview-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-layout-page="admin-news"] .admin-news-rollback-preview-columns h6 {
  margin: 0 0 6px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.92);
}

body[data-layout-page="admin-news"] .admin-news-rollback-preview-columns ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.86);
}

body[data-layout-page="admin-news"] .admin-news-source-action-log-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

body[data-layout-page="admin-news"] .admin-news-source-action-log-wrap .table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

body[data-layout-page="admin-news"] .admin-news-source-action-log-wrap h5 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.9);
}

body[data-layout-page="admin-news"] .admin-news-source-action-log-wrap .admin-table {
  min-width: 760px;
}

body[data-layout-page="admin-news"] .admin-news-pending-list {
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-news"] .admin-news-pending-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
  border-radius: 10px;
  padding: 8px 10px;
}

body[data-layout-page="admin-news"] .admin-news-pending-item strong {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

body[data-layout-page="admin-news"] .admin-news-pending-item span {
  display: block;
  margin-top: 4px;
  color: rgba(148, 163, 184, 0.9);
  font-size: 11px;
}

body[data-layout-page="admin-news"] .admin-news-risk-list {
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-news"] .admin-news-risk-item {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
  border-radius: 10px;
  padding: 8px 10px;
}

body[data-layout-page="admin-news"] .admin-news-risk-item .row-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

body[data-layout-page="admin-news"] .admin-news-risk-item strong {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

body[data-layout-page="admin-news"] .admin-news-risk-item span {
  display: block;
  margin-top: 4px;
  color: rgba(148, 163, 184, 0.9);
  font-size: 11px;
}

body[data-layout-page="admin-news"] #newsSourcesBody .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-layout-page="admin-news"] .admin-news-ops-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1280px) {
  body[data-layout-page="admin-news"] .admin-news-grid {
    grid-template-columns: minmax(300px, 1fr) minmax(420px, 1.2fr);
    grid-template-areas:
      "auto auto"
      "sources posts"
      "ops ops";
  }
}

@media (max-width: 980px) {
  body[data-layout-page="admin-news"] .admin-news-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "auto"
      "sources"
      "posts"
      "ops";
  }
}

@media (max-width: 640px) {
  body[data-layout-page="admin-news"] .admin-news-auto-fields {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-news"] .admin-news-rule-grid {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-news"] .admin-news-ops-stats {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-news"] .admin-news-attr-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-layout-page="admin-news"] .admin-news-attr-quality-kpis {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-news"] .admin-news-source-tuner-kpis {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-news"] .admin-news-source-tuner-auto {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-news"] .admin-news-rollback-preview-columns {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-news"] .admin-news-attr-funnel-grid {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-news"] .admin-news-attr-controls {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-news"] .admin-news-automation-controls {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-news"] .admin-news-attr-trend-row {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-news"] .admin-news-attr-trend-row .meta {
    text-align: left;
  }
}
.news-section--fullbleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-inline: var(--news-inline-gutter);
}

.news-section-shell {
  width: min(var(--news-content-max), calc(100vw - var(--news-inline-gutter) * 2));
  max-width: none;
  margin-inline: auto;
}

.page.page--news {
  max-width: none;
  padding-inline: var(--news-inline-gutter);
}

.page.page--news > .section {
  width: min(var(--news-content-max), calc(100vw - var(--news-inline-gutter) * 2));
  max-width: none;
  margin-inline: auto;
}

.home-news-layout,
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(320px, 22vw, 420px);
  gap: clamp(14px, 1.8vw, 28px);
  align-items: start;
}

.home-news-main,
.news-layout-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.news-rail {
  display: grid;
  gap: 12px;
  align-self: start;
  justify-self: stretch;
}

.news-rail--sticky,
.home-news-rail {
  position: sticky;
  top: 88px;
}

.news-rail-card {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.3);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.news-rail-card h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.78);
}

.news-rail-featured {
  display: grid;
  gap: 8px;
}

.news-rail-featured a {
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-rail-featured a:hover {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
}

.news-rail-featured .meta,
.news-rail-list .meta {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
}

.news-rail-featured p {
  margin: 0;
  color: rgba(226, 232, 240, 0.8);
  font-size: 13px;
  line-height: 1.55;
}

.news-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.news-rail-list li {
  margin: 0;
  padding: 0;
}

.news-rail-list li + li {
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.2);
}

.news-rail-list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-rail-list a:hover {
  text-decoration: underline;
}

.news-rail-empty {
  color: rgba(148, 163, 184, 0.9);
  font-size: 12px;
  line-height: 1.5;
}

#insights .home-news-layout {
  grid-template-columns: minmax(0, 1fr);
}

#insights .home-news-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

#insights .home-news-secondary .news-rail-card {
  margin: 0;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.home-news-main .news-grid,
.news-layout-main .news-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.56);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

.news-card-link {
  display: block;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.news-title {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-excerpt {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.78);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.9);
}

.news-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.news-source-link,
.news-readmore {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.86);
  text-decoration: none;
}

.news-source-link:hover,
.news-readmore:hover {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
}

.news-article {
  max-width: 820px;
}

.news-layout-main .news-article {
  max-width: none;
}

.news-article-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.news-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
  color: rgba(148, 163, 184, 0.9);
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.5);
  font-size: 12px;
  color: rgba(226, 232, 240, 0.86);
  text-decoration: none;
}

.news-tag:hover {
  border-color: rgba(226, 232, 240, 0.3);
  color: rgba(255, 255, 255, 0.92);
}

.news-tag.is-active {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(22, 101, 52, 0.35);
  color: rgba(220, 252, 231, 0.95);
}

.news-article-content {
  margin-top: 18px;
}

.news-article-content p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(226, 232, 240, 0.9);
}

.news-article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.news-cta-block {
  margin: 8px 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.54);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.28);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.news-cta-block h3 {
  margin: 0;
  font-size: 14px;
  color: rgba(226, 232, 240, 0.92);
  letter-spacing: 0.02em;
}

.news-cta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.news-cta-item {
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  background: rgba(14, 116, 144, 0.16);
  color: rgba(226, 232, 240, 0.94);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  min-width: 0;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.news-cta-item strong {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-cta-item span {
  font-size: 12px;
  font-weight: 700;
  color: #67e8f9;
}

.news-cta-item:hover {
  border-color: rgba(34, 211, 238, 0.62);
  background: rgba(8, 145, 178, 0.22);
  transform: translateY(-1px);
}

@media (max-width: 960px) {
  .home-conversion-grid {
    grid-template-columns: 1fr;
  }

  .home-conversion-primary .btn {
    width: 100%;
    justify-content: center;
  }

  .home-conversion-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .home-conversion-card-cta {
    grid-column: 2;
    justify-self: start;
  }

  .news-section--fullbleed {
    margin-inline: 0;
    padding-inline: 0;
  }

  .news-section-shell {
    width: 100%;
  }

  #insights .home-news-secondary {
    grid-template-columns: 1fr;
  }

  .page.page--news {
    padding-inline: max(14px, 3.2vw);
  }

  .page.page--news > .section {
    width: 100%;
  }

  .home-news-layout,
  .news-layout {
    grid-template-columns: 1fr;
  }

  .home-news-main .news-grid,
  .news-layout-main .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .news-rail--sticky,
  .home-news-rail {
    position: static;
  }

  .news-cta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-article {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .home-conversion-card {
    padding: 10px;
  }

  .home-conversion-card-thumb {
    width: 52px;
    height: 52px;
  }

  .home-conversion-card-meta strong {
    font-size: 13px;
  }

  .page.page--news {
    padding-inline: 12px;
  }

  .home-news-main .news-grid,
  .news-layout-main .news-grid {
    grid-template-columns: 1fr;
  }

  .news-rail-card {
    padding: 12px;
  }

  .news-rail-list a {
    font-size: 12px;
  }

  .news-title {
    font-size: 15px;
  }

  .news-cta-grid {
    grid-template-columns: 1fr;
  }

  .news-cta-block {
    padding: 12px;
  }

  body[data-layout-page="admin-news"] .admin-news-conv-priority-controls,
  body[data-layout-page="admin-news"] .admin-news-backfill-controls,
  body[data-layout-page="admin-news"] .admin-news-quality-controls {
    align-items: stretch;
  }

  body[data-layout-page="admin-news"] .admin-news-quality-kpis {
    grid-template-columns: 1fr;
  }
}

body[data-layout-page="admin-ads"] .admin-main {
  display: grid;
  gap: 20px;
}

body[data-layout-page="admin-ads"] .admin-ads-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-layout-page="admin-ads"] .admin-ads-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-layout-page="admin-ads"] .admin-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

body[data-layout-page="admin-ads"] .admin-item__content h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

body[data-layout-page="admin-ads"] .admin-item__content p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

body[data-layout-page="admin-ads"] #homeFeaturedPreviewList .admin-item {
  padding: 12px;
  border-radius: 12px;
}

body[data-layout-page="admin-ads"] .admin-actions {
  align-items: flex-end;
}

@media (max-width: 980px) {
  body[data-layout-page="admin-ads"] .admin-ads-grid-2,
  body[data-layout-page="admin-ads"] .admin-ads-slot-grid {
    grid-template-columns: 1fr;
  }
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-status {
  min-height: 22px;
  font-size: 13px;
  color: var(--muted);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-status.is-error {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync .section-head {
  margin-bottom: 0;
}

body[data-layout-page="admin-crawler-tanbaya"] #crawlerDailySyncActive {
  font-size: 12px;
  color: #94a3b8;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 12px;
  align-items: start;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-detail {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.4);
  display: grid;
  gap: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-detail-head h3 {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-detail-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-section {
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-head h4 {
  margin: 0;
  font-size: 13px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-list {
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-empty {
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-item {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.35);
  padding: 10px;
  display: grid;
  gap: 6px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-id {
  color: #cbd5e1;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-price {
  color: #86efac;
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-title {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-link {
  font-size: 12px;
  word-break: break-all;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-diff-link a {
  color: #7dd3fc;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.35);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item.is-missing-price strong {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item.is-missing-title strong {
  color: #fb7185;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item.is-invalid-category strong {
  color: #fbbf24;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-item.is-missing-subcategory strong {
  color: #fdba74;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-extra {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-flag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.45);
}

body[data-layout-page="admin-crawler-tanbaya"] #crawlerDailySyncRunsBody tr[data-run-id] {
  cursor: pointer;
}

body[data-layout-page="admin-crawler-tanbaya"] #crawlerDailySyncRunsBody tr.is-selected {
  background: rgba(56, 189, 248, 0.14);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-end-cell {
  display: grid;
  gap: 6px;
  justify-items: start;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpis {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.35);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi.is-publishable strong {
  color: #86efac;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi.is-missing-price strong {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi.is-missing-title strong {
  color: #fb7185;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi.is-invalid-category strong {
  color: #fbbf24;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpi.is-missing-subcategory strong {
  color: #fdba74;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.45);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag.is-publishable {
  border-color: rgba(74, 222, 128, 0.45);
  color: #86efac;
  background: rgba(22, 101, 52, 0.22);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag.is-missing-price {
  border-color: rgba(248, 113, 113, 0.48);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.24);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag.is-missing-title {
  border-color: rgba(244, 63, 94, 0.48);
  color: #fecdd3;
  background: rgba(136, 19, 55, 0.28);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag.is-invalid-category {
  border-color: rgba(251, 191, 36, 0.48);
  color: #fde68a;
  background: rgba(120, 53, 15, 0.28);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-tag.is-missing-subcategory {
  border-color: rgba(251, 146, 60, 0.52);
  color: #fed7aa;
  background: rgba(124, 45, 18, 0.28);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-note {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 980px) {
  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-layout {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-quality-summary-grid {
    grid-template-columns: 1fr;
  }
}

body[data-layout-page="admin-crawlers"] .admin-crawler-status {
  min-height: 22px;
  font-size: 13px;
  color: var(--muted);
}

body[data-layout-page="admin-crawlers"] .admin-crawler-status.is-error {
  color: #fca5a5;
}

body[data-layout-page="admin-crawlers"] .admin-crawlers-actions,
body[data-layout-page="admin-crawler-tanbaya"] .admin-crawlers-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-layout-page="admin-crawlers"] .table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
}

body[data-layout-page="admin-crawlers"] .admin-table td,
body[data-layout-page="admin-crawlers"] .admin-table th {
  white-space: nowrap;
}

body[data-layout-page="admin-crawlers"] .admin-table td:first-child {
  max-width: 220px;
  white-space: normal;
  overflow-wrap: anywhere;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-schedule {
  margin-top: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-summary-item {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.46);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-summary-item strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-node {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-head {
  width: 100%;
  justify-content: space-between;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-children {
  display: none;
  width: 100%;
  margin-left: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-node.is-expanded .admin-crawler-category-children {
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-row-l2 {
  margin-left: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-hint {
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-selects {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  margin-bottom: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-selects select {
  min-width: 180px;
  height: var(--button-height);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.45);
  color: var(--ink);
  font-size: 12px;
  padding: 4px 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
  margin-bottom: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-level2-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: -4px;
  margin-bottom: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.45);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-btn.is-active {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.18);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-btn .tag {
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #86efac;
  padding: 1px 6px;
  font-size: 11px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-category-btn .tag-muted {
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--muted);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-check input[type="checkbox"] {
  width: auto;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-text-repair-tools label {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-text-repair-tools input[type="number"] {
  width: 180px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-text-repair-summary {
  margin-top: 10px;
  min-height: 24px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-tools input,
body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-tools select {
  min-width: 140px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-retention-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-retention-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.42);
  display: grid;
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-retention-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-retention-card .form-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-config-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-config-form .form-actions,
body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-config-form .form-message,
body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-config-form .admin-crawler-inline-check,
body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-config-form label:first-child {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-run-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 16px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-run-form > label {
  min-width: 220px;
  margin: 0;
}

body[data-layout-page="admin-crawler-tanbaya"] .table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-table td,
body[data-layout-page="admin-crawler-tanbaya"] .admin-table th {
  white-space: nowrap;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-table td:nth-child(2),
body[data-layout-page="admin-crawler-tanbaya"] .admin-table td:nth-child(3) {
  max-width: 300px;
  white-space: normal;
  overflow-wrap: anywhere;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-table td {
  vertical-align: top;
}

body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-json {
  margin-top: 12px;
  max-height: 320px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(8, 12, 24, 0.5);
  padding: 12px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.5;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-gallery {
  margin-top: 8px;
  display: grid;
  gap: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-actions {
  margin-top: 8px;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.35);
  padding: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-actions-meta {
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-actions-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-replay-message {
  min-height: 18px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-replay-message.is-success {
  color: #86efac;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-replay-message.is-warning {
  color: #fdba74;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-replay-message.is-error {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-main {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.45);
  padding: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-main-image {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.55);
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-main-empty {
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-image-meta {
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-message {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-message.is-error {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-thumb {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
  border-radius: 10px;
  width: 84px;
  height: 84px;
  padding: 0;
  flex: 0 0 auto;
  cursor: pointer;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-thumb.is-active {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-json-wrap {
  margin-top: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-json-wrap > summary {
  cursor: pointer;
  color: #e2e8f0;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-section {
  display: grid;
  gap: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-head-actions {
  justify-content: flex-end;
  gap: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-sync-table th:last-child,
body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-sync-table td:last-child {
  white-space: nowrap;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-summary-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(8, 12, 24, 0.4);
  padding: 10px 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat strong.is-success {
  color: #86efac;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat strong.is-warning {
  color: #fcd34d;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat strong.is-error {
  color: #fca5a5;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-stat-wide {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  list-style: none;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible > summary::-webkit-details-marker {
  display: none;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible-meta {
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible > :not(summary) {
  margin-top: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-collapsible .btn {
  margin-top: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-kpi-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -2px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-secondary-stat {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.35);
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-secondary-stat span {
  color: var(--muted);
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-secondary-stat strong {
  color: var(--ink);
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-toolbar {
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1 1 auto;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-field span {
  color: var(--muted);
  font-size: 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-field select {
  min-width: 180px;
  height: var(--button-height);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.45);
  color: var(--ink);
  font-size: 12px;
  padding: 4px 12px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-field-search {
  flex: 1 1 320px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-field-search input {
  width: 100%;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-toolbar-actions .admin-crawler-status {
  min-height: 0;
}

body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 12px;
  align-items: start;
}

body[data-layout-page="admin-crawler-tanbaya"] .crawler-detail-main-empty.is-error {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

@media (max-width: 900px) {
  body[data-layout-page="admin-crawlers"] .admin-crawlers-actions,
  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawlers-actions {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-summary-grid {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-config-form {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-retention-grid {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-daily-sync-layout {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-head-actions,
  body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-toolbar,
  body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-run-summary-grid,
  body[data-layout-page="admin-crawler-tanbaya"] .tanbaya-detail-layout {
    grid-template-columns: 1fr;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-tools {
    width: 100%;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-tools input,
  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-inline-tools select {
    min-width: 0;
    flex: 1 1 150px;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-selects {
    width: 100%;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-subcategory-selects select {
    min-width: 0;
    flex: 1 1 180px;
  }

  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-text-repair-tools label,
  body[data-layout-page="admin-crawler-tanbaya"] .admin-crawler-text-repair-tools input[type="number"] {
    width: 100%;
    min-width: 0;
  }
}



/* Admin Sites */
body[data-layout-page="admin-sites"] .admin-crawler-status {
  margin-top: 12px;
}

body[data-layout-page="admin-sites"] .admin-crawler-config-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

body[data-layout-page="admin-sites"] .admin-crawler-config-form .form-actions {
  grid-column: 1 / -1;
}

body[data-layout-page="admin-sites"] .admin-crawlers-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-layout-page="admin-sites"] .table-wrap {
  overflow: auto;
}

body[data-layout-page="admin-sites"] .admin-table td {
  vertical-align: top;
}

/* Store V4 (kujilab main) */
.store-hero-v4 {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(34, 211, 238, 0.16), transparent 52%),
    radial-gradient(120% 120% at 0% 0%, rgba(249, 115, 22, 0.2), transparent 60%),
    linear-gradient(180deg, rgba(12, 21, 42, 0.9), rgba(8, 14, 30, 0.88));
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.store-layout {
  gap: 24px;
}

.store-category-pane {
  width: 252px;
  min-width: 252px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 14px;
  background: rgba(8, 14, 30, 0.7);
}

.store-category-pane-title {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
}

.store-main {
  min-width: 0;
}

.store-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.store-search,
.store-sort,
.store-category-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.store-search input,
.store-sort select,
.store-category-select select {
  height: 42px;
}

.store-grid {
  gap: 18px;
}

.store-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(10, 18, 36, 0.78), rgba(8, 13, 28, 0.92));
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}

.store-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.52);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.48);
}

.store-card-thumb {
  aspect-ratio: 1 / 1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.store-card-body {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.store-card-category {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.92);
}

.store-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.store-card-subtitle {
  margin: 0;
  color: rgba(148, 163, 184, 0.95);
}

.store-card-meta-icons {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.22);
}

.store-stat {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(15, 23, 42, 0.55);
}

.store-stat-price {
  border-color: rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.12);
}

.store-stat-stock {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.1);
}

.store-order-status {
  font-weight: 700;
}

@media (max-width: 1079px) {
  .store-toolbar {
    grid-template-columns: 1fr;
  }
}

/* Store category group layout */
.store-category-group {
  display: grid;
  gap: 8px;
  position: relative;
}

.store-category-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.store-fashion-parent-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.store-fashion-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.55);
}

.store-fashion-parent-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.store-fashion-chevron {
  font-size: 11px;
  line-height: 1;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.store-category-parent.is-expanded .store-fashion-chevron {
  transform: rotate(180deg);
}

.store-category-children {
  display: none;
  gap: 8px;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 10px;
  background: rgba(8, 14, 30, 0.88);
}

.store-category-children.is-expanded {
  display: grid;
}

.store-category-child {
  font-size: 13px;
  justify-content: space-between;
}

.admin-fashion-group {
  display: grid;
  gap: 8px;
  flex: 1 1 100%;
}

.admin-fashion-subtabs {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  padding: 8px;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.62);
}

.admin-fashion-subtabs.is-expanded {
  display: flex;
}

.admin-category-tabs .category-tab-parent {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-fashion-parent-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-fashion-icon {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.55);
}

.admin-fashion-parent-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-fashion-chevron {
  font-size: 11px;
  line-height: 1;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.admin-category-tabs .category-tab-parent.is-expanded .admin-fashion-chevron {
  transform: rotate(180deg);
}

.admin-fashion-subtabs .category-tab {
  font-size: 12px;
  padding: 6px 12px;
}

/* =========================
   Frontend Theme Presets V2
   ========================= */
@keyframes theme-page-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cute-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes tech-glow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(51, 209, 255, 0);
  }
  50% {
    box-shadow: 0 0 26px rgba(51, 209, 255, 0.26);
  }
}

body.frontend-theme-cute,
body.frontend-theme-tech {
  position: relative;
  overflow-x: hidden;
}

body.frontend-theme-cute::before,
body.frontend-theme-cute::after,
body.frontend-theme-tech::before,
body.frontend-theme-tech::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.frontend-theme-cute {
  --font-body: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Fredoka", "Noto Sans TC", sans-serif;
  --bg: #fff1f7;
  --bg-2: #ffe7f2;
  --card: rgba(255, 255, 255, 0.9);
  --ink: #4f2e45;
  --muted: #8f6880;
  --accent: #ff4d9f;
  --accent-2: #ffb84d;
  --border: rgba(255, 134, 188, 0.3);
  --line: rgba(255, 134, 188, 0.36);
  --theme-motion-page-in: 460ms;
  --theme-motion-hover: 180ms;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 173, 216, 0.7), transparent 45%),
    radial-gradient(circle at 92% 0%, rgba(255, 223, 150, 0.62), transparent 38%),
    linear-gradient(155deg, #fff5fb 0%, #ffeaf5 48%, #fff1f8 100%);
}

body.frontend-theme-cute::before {
  background:
    radial-gradient(circle at 18% 25%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px) 0 0 / 38px 38px,
    radial-gradient(circle at 65% 70%, rgba(255, 211, 234, 0.7) 0 2px, transparent 3px) 0 0 / 44px 44px;
  opacity: 0.55;
}

body.frontend-theme-cute::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 40%);
}

body.frontend-theme-tech {
  --font-body: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Space Grotesk", "Noto Sans TC", sans-serif;
  --bg: #020813;
  --bg-2: #061428;
  --card: rgba(6, 15, 30, 0.88);
  --ink: #e0eeff;
  --muted: #86a0c8;
  --accent: #31d8ff;
  --accent-2: #7f7dff;
  --border: rgba(61, 177, 255, 0.32);
  --line: rgba(61, 177, 255, 0.35);
  --theme-motion-page-in: 340ms;
  --theme-motion-hover: 140ms;
  background:
    radial-gradient(circle at 100% 0, rgba(45, 76, 176, 0.32), transparent 35%),
    radial-gradient(circle at 0 100%, rgba(38, 205, 255, 0.2), transparent 40%),
    linear-gradient(140deg, #01050d 0%, #050f1f 45%, #01060f 100%);
}

body.frontend-theme-tech::before {
  background:
    linear-gradient(rgba(108, 188, 255, 0.1) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(108, 188, 255, 0.08) 1px, transparent 1px) 0 0 / 32px 100%;
  opacity: 0.26;
}

body.frontend-theme-tech::after {
  background: linear-gradient(180deg, rgba(0, 255, 255, 0.04), transparent 52%);
}

body.frontend-theme-cute .bg-orb,
body.frontend-theme-tech .bg-orb {
  display: none;
}

body.frontend-theme-cute .page,
body.frontend-theme-tech .page {
  position: relative;
  z-index: 1;
  animation: theme-page-enter var(--theme-motion-page-in) cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

body.frontend-theme-cute h1,
body.frontend-theme-cute h2,
body.frontend-theme-cute h3,
body.frontend-theme-cute .logo,
body.frontend-theme-tech h1,
body.frontend-theme-tech h2,
body.frontend-theme-tech h3,
body.frontend-theme-tech .logo {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

body.frontend-theme-cute .topbar,
body.frontend-theme-tech .topbar {
  backdrop-filter: blur(20px);
  border-width: 1px;
  border-style: solid;
  margin: 10px;
  border-radius: 18px;
  padding: 12px 20px;
}

body.frontend-theme-cute .topbar {
  background: rgba(255, 247, 252, 0.86);
  border-color: rgba(255, 134, 188, 0.35);
  box-shadow: 0 20px 32px rgba(219, 90, 159, 0.18);
}

body.frontend-theme-tech .topbar {
  background: rgba(2, 11, 24, 0.82);
  border-color: rgba(67, 174, 255, 0.4);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.48);
}

body.frontend-theme-cute .nav a,
body.frontend-theme-tech .nav a {
  border-radius: 999px;
  padding: 7px 12px;
  transition: transform var(--theme-motion-hover) ease, background var(--theme-motion-hover) ease, color var(--theme-motion-hover) ease;
}

body.frontend-theme-cute .nav a:hover,
body.frontend-theme-cute .nav a.is-active {
  color: #7a355f;
  background: rgba(255, 189, 221, 0.42);
  transform: translateY(-1px);
}

body.frontend-theme-tech .nav a:hover,
body.frontend-theme-tech .nav a.is-active {
  color: #dff6ff;
  background: rgba(48, 178, 255, 0.16);
  transform: translateY(-1px);
}

body.frontend-theme-cute .section,
body.frontend-theme-tech .section {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
}

body.frontend-theme-cute .section {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 252, 0.74));
  box-shadow: 0 18px 32px rgba(219, 90, 159, 0.14);
}

body.frontend-theme-tech .section {
  background: linear-gradient(160deg, rgba(8, 20, 40, 0.88), rgba(5, 15, 30, 0.78));
  box-shadow: 0 18px 40px rgba(1, 4, 12, 0.62);
}

body.frontend-theme-cute .section::before,
body.frontend-theme-tech .section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
}

body.frontend-theme-cute .section::before {
  background: radial-gradient(circle at 92% 8%, rgba(255, 193, 225, 0.42), transparent 36%);
}

body.frontend-theme-tech .section::before {
  background: linear-gradient(120deg, transparent 40%, rgba(58, 194, 255, 0.06) 70%, transparent 100%);
}

body.frontend-theme-cute .card,
body.frontend-theme-tech .card,
body.frontend-theme-cute .store-card,
body.frontend-theme-tech .store-card,
body.frontend-theme-cute .detail-card,
body.frontend-theme-tech .detail-card,
body.frontend-theme-cute .market-grid > *,
body.frontend-theme-tech .market-grid > *,
body.frontend-theme-cute .store-checkout-card,
body.frontend-theme-tech .store-checkout-card,
body.frontend-theme-cute .store-success-card,
body.frontend-theme-tech .store-success-card,
body.frontend-theme-cute .store-orders-list > *,
body.frontend-theme-tech .store-orders-list > * {
  border: 1px solid var(--line);
  transition: transform var(--theme-motion-hover) ease, box-shadow var(--theme-motion-hover) ease, border-color var(--theme-motion-hover) ease;
}

body.frontend-theme-cute .card,
body.frontend-theme-cute .store-card,
body.frontend-theme-cute .detail-card,
body.frontend-theme-cute .market-grid > *,
body.frontend-theme-cute .store-checkout-card,
body.frontend-theme-cute .store-success-card,
body.frontend-theme-cute .store-orders-list > * {
  border-radius: 24px;
  box-shadow: 0 12px 24px rgba(229, 105, 162, 0.16);
}

body.frontend-theme-tech .card,
body.frontend-theme-tech .store-card,
body.frontend-theme-tech .detail-card,
body.frontend-theme-tech .market-grid > *,
body.frontend-theme-tech .store-checkout-card,
body.frontend-theme-tech .store-success-card,
body.frontend-theme-tech .store-orders-list > * {
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
}

body.frontend-theme-cute .store-card:hover,
body.frontend-theme-cute .market-grid > *:hover,
body.frontend-theme-cute .store-orders-list > *:hover,
body.frontend-theme-tech .store-card:hover,
body.frontend-theme-tech .market-grid > *:hover,
body.frontend-theme-tech .store-orders-list > *:hover {
  transform: translateY(-3px);
}

body.frontend-theme-cute .store-card:hover,
body.frontend-theme-cute .market-grid > *:hover,
body.frontend-theme-cute .store-orders-list > *:hover {
  box-shadow: 0 18px 30px rgba(229, 105, 162, 0.24);
}

body.frontend-theme-tech .store-card:hover,
body.frontend-theme-tech .market-grid > *:hover,
body.frontend-theme-tech .store-orders-list > *:hover {
  border-color: rgba(61, 177, 255, 0.62);
  box-shadow: 0 0 22px rgba(49, 216, 255, 0.18);
}

body.frontend-theme-cute .btn,
body.frontend-theme-tech .btn {
  transition: transform var(--theme-motion-hover) ease, box-shadow var(--theme-motion-hover) ease, filter var(--theme-motion-hover) ease;
}

body.frontend-theme-cute .btn:hover,
body.frontend-theme-tech .btn:hover {
  transform: translateY(-1px);
}

body.frontend-theme-cute .btn.primary {
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(130deg, #ff58a8, #ff77bd 55%, #ffb070);
  box-shadow: 0 14px 28px rgba(255, 88, 168, 0.35);
}

body.frontend-theme-cute .btn.primary:hover {
  filter: brightness(1.04);
}

body.frontend-theme-tech .btn.primary {
  color: #031023;
  border: 1px solid rgba(152, 238, 255, 0.66);
  border-radius: 10px;
  background: linear-gradient(145deg, #39d7ff, #6ca5ff 65%, #9f8dff);
  box-shadow: 0 10px 24px rgba(55, 173, 255, 0.35);
}

body.frontend-theme-tech .btn.primary:hover {
  animation: tech-glow 720ms ease;
}

body.frontend-theme-cute .btn.ghost,
body.frontend-theme-tech .btn.ghost {
  border-width: 1px;
}

body.frontend-theme-cute .btn.ghost {
  border-color: rgba(255, 111, 171, 0.4);
  background: rgba(255, 255, 255, 0.82);
  color: #7a355f;
}

body.frontend-theme-tech .btn.ghost {
  border-color: rgba(61, 177, 255, 0.42);
  background: rgba(10, 26, 48, 0.76);
  color: #d4ecff;
}

body.frontend-theme-cute .input-inline,
body.frontend-theme-cute input[type="text"],
body.frontend-theme-cute input[type="search"],
body.frontend-theme-cute input[type="number"],
body.frontend-theme-cute input[type="email"],
body.frontend-theme-cute input[type="password"],
body.frontend-theme-cute select,
body.frontend-theme-tech .input-inline,
body.frontend-theme-tech input[type="text"],
body.frontend-theme-tech input[type="search"],
body.frontend-theme-tech input[type="number"],
body.frontend-theme-tech input[type="email"],
body.frontend-theme-tech input[type="password"],
body.frontend-theme-tech select {
  border-width: 1px;
  border-style: solid;
  outline: none;
  transition: border-color var(--theme-motion-hover) ease, box-shadow var(--theme-motion-hover) ease, background var(--theme-motion-hover) ease;
}

body.frontend-theme-cute .input-inline,
body.frontend-theme-cute input[type="text"],
body.frontend-theme-cute input[type="search"],
body.frontend-theme-cute input[type="number"],
body.frontend-theme-cute input[type="email"],
body.frontend-theme-cute input[type="password"],
body.frontend-theme-cute select {
  border-color: rgba(255, 134, 188, 0.36);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #4f2e45;
}

body.frontend-theme-tech .input-inline,
body.frontend-theme-tech input[type="text"],
body.frontend-theme-tech input[type="search"],
body.frontend-theme-tech input[type="number"],
body.frontend-theme-tech input[type="email"],
body.frontend-theme-tech input[type="password"],
body.frontend-theme-tech select {
  border-color: rgba(61, 177, 255, 0.34);
  border-radius: 8px;
  background: rgba(2, 13, 28, 0.84);
  color: #deedff;
}

body.frontend-theme-cute .input-inline:focus,
body.frontend-theme-cute input:focus,
body.frontend-theme-cute select:focus {
  border-color: rgba(255, 90, 161, 0.62);
  box-shadow: 0 0 0 3px rgba(255, 111, 171, 0.2);
}

body.frontend-theme-tech .input-inline:focus,
body.frontend-theme-tech input:focus,
body.frontend-theme-tech select:focus {
  border-color: rgba(89, 201, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(56, 191, 255, 0.2);
}

body.frontend-theme-cute .store-layout {
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 28px;
}

body.frontend-theme-tech .store-layout {
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
  gap: 24px;
}

body.frontend-theme-cute .store-category-pane,
body.frontend-theme-tech .store-category-pane {
  top: 96px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
}

body.frontend-theme-cute .store-category-pane {
  background: rgba(255, 255, 255, 0.84);
}

body.frontend-theme-tech .store-category-pane {
  background: rgba(7, 18, 37, 0.84);
}

body.frontend-theme-cute .store-category-link,
body.frontend-theme-tech .store-category-link {
  min-height: 40px;
}

body.frontend-theme-cute .store-category-link {
  border-radius: 14px;
}

body.frontend-theme-tech .store-category-link {
  border-radius: 8px;
}

body.frontend-theme-cute .store-card {
  animation: cute-float 5s ease-in-out infinite;
}

body.frontend-theme-cute .store-card:nth-child(2n) {
  animation-delay: 0.7s;
}

body.frontend-theme-tech .store-card-thumb,
body.frontend-theme-tech .detail-thumb {
  border: 1px solid rgba(61, 177, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(91, 210, 255, 0.2);
}

body.frontend-theme-cute .detail-hero,
body.frontend-theme-tech .detail-hero {
  gap: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  padding: 18px;
}

body.frontend-theme-cute .detail-hero {
  background: rgba(255, 255, 255, 0.84);
}

body.frontend-theme-tech .detail-hero {
  background: rgba(4, 16, 33, 0.8);
}

body.frontend-theme-cute .draw-bar,
body.frontend-theme-tech .draw-bar {
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

body.frontend-theme-cute .draw-bar {
  background: rgba(255, 240, 250, 0.94);
}

body.frontend-theme-tech .draw-bar {
  background: rgba(3, 12, 25, 0.9);
}

body.frontend-theme-cute .market-toolbar,
body.frontend-theme-tech .market-toolbar {
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 12px;
}

body.frontend-theme-cute .market-toolbar {
  background: rgba(255, 255, 255, 0.82);
}

body.frontend-theme-tech .market-toolbar {
  background: rgba(6, 18, 35, 0.84);
}

body.frontend-theme-tech .table-wrap,
body.frontend-theme-tech .admin-table {
  border-color: rgba(61, 177, 255, 0.4);
}

body.frontend-theme-cute .auth-page,
body.frontend-theme-tech .auth-page {
  position: relative;
  z-index: 1;
}

body.frontend-theme-cute .auth-card,
body.frontend-theme-tech .auth-card {
  border: 1px solid var(--line);
}

body.frontend-theme-cute .auth-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.94), rgba(255, 241, 249, 0.84));
  border-radius: 28px;
  box-shadow: 0 24px 40px rgba(229, 105, 162, 0.2);
}

body.frontend-theme-tech .auth-card {
  background: linear-gradient(165deg, rgba(6, 16, 31, 0.9), rgba(2, 11, 24, 0.82));
  border-radius: 14px;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.5);
}

body.frontend-theme-cute .store-checkout-card,
body.frontend-theme-cute .store-success-card {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(255, 242, 249, 0.84));
}

body.frontend-theme-tech .store-checkout-card,
body.frontend-theme-tech .store-success-card {
  background: linear-gradient(165deg, rgba(7, 19, 38, 0.9), rgba(3, 12, 25, 0.82));
}

body.frontend-theme-cute .empty,
body.frontend-theme-tech .empty {
  border-radius: 14px;
  border: 1px dashed var(--line);
}

body.frontend-theme-cute .modal-card,
body.frontend-theme-tech .modal-card {
  border: 1px solid var(--line);
}

body.frontend-theme-cute .modal-card {
  border-radius: 22px;
}

body.frontend-theme-tech .modal-card {
  border-radius: 12px;
}

body.frontend-theme-cute .pagination button,
body.frontend-theme-tech .pagination button {
  transition: transform var(--theme-motion-hover) ease, background var(--theme-motion-hover) ease;
}

body.frontend-theme-cute .pagination button:hover,
body.frontend-theme-tech .pagination button:hover {
  transform: translateY(-1px);
}

.frontend-theme-preview {
  min-height: 158px;
}

.frontend-theme-preview .ftp-shell {
  grid-template-rows: auto 1fr;
}

.frontend-theme-preview .ftp-body {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.frontend-theme-preview .ftp-card {
  grid-column: 1 / -1;
}

.frontend-theme-preview[data-theme="cute"] .ftp-card {
  border-radius: 16px;
  box-shadow: 0 12px 20px rgba(228, 103, 159, 0.24);
}

.frontend-theme-preview[data-theme="tech"] .ftp-card {
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(55, 178, 255, 0.28);
}

@media (max-width: 1079px) {
  body.frontend-theme-cute .store-layout,
  body.frontend-theme-tech .store-layout {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.frontend-theme-cute .page,
  body.frontend-theme-tech .page,
  body.frontend-theme-cute .store-card,
  body.frontend-theme-tech .btn.primary,
  body.frontend-theme-tech .store-card,
  body.frontend-theme-cute .btn,
  body.frontend-theme-tech .btn {
    animation: none !important;
    transition: none !important;
  }
}
/* === Theme V2.1 Bold Overrides (Cute / Tech) === */
@keyframes theme-v21-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes theme-v21-cute-glow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(255, 106, 177, 0);
  }
  50% {
    box-shadow: 0 14px 28px rgba(255, 106, 177, 0.28);
  }
}

@keyframes theme-v21-tech-scan {
  0% {
    transform: translateX(-110%);
    opacity: 0;
  }
  45% {
    opacity: 0.55;
  }
  100% {
    transform: translateX(115%);
    opacity: 0;
  }
}

/* Home page: structure-level differentiation */
body.frontend-theme-cute .home-page,
body.frontend-theme-tech .home-page {
  display: grid;
  gap: 28px;
}

body.frontend-theme-cute .home-page > .section,
body.frontend-theme-cute .home-page > .cta,
body.frontend-theme-tech .home-page > .section,
body.frontend-theme-tech .home-page > .cta {
  animation: theme-v21-rise 460ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

body.frontend-theme-cute .home-page > .section:nth-child(2),
body.frontend-theme-tech .home-page > .section:nth-child(2) {
  animation-delay: 80ms;
}

body.frontend-theme-cute .home-page > .section:nth-child(3),
body.frontend-theme-tech .home-page > .section:nth-child(3) {
  animation-delay: 140ms;
}

body.frontend-theme-cute .home-conversion {
  border-radius: 34px;
  padding: 26px;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 197, 227, 0.52), transparent 40%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(255, 236, 247, 0.78));
}

body.frontend-theme-tech .home-conversion {
  border-radius: 14px;
  padding: 24px;
  background:
    linear-gradient(140deg, rgba(7, 24, 49, 0.92), rgba(3, 14, 31, 0.86));
}

body.frontend-theme-tech #pool {
  position: relative;
  overflow: hidden;
}

body.frontend-theme-tech #pool::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(63, 196, 255, 0.24), transparent 70%);
  animation: theme-v21-tech-scan 4.6s linear infinite;
}

/* Store page: non-trivial visual and layout changes */
body.frontend-theme-cute .store-page .store-shell,
body.frontend-theme-tech .store-page .store-shell {
  padding: 18px;
}

body.frontend-theme-cute .store-page .store-layout {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 30px;
}

body.frontend-theme-tech .store-page .store-layout {
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 22px;
}

body.frontend-theme-cute .store-page .store-main {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 137, 191, 0.28);
  border-radius: 26px;
  padding: 18px;
}

body.frontend-theme-tech .store-page .store-main {
  background: rgba(4, 18, 36, 0.82);
  border: 1px solid rgba(54, 185, 255, 0.34);
  border-radius: 12px;
  padding: 14px;
}

body.frontend-theme-cute .store-page .store-grid,
body.frontend-theme-tech .store-page .store-grid {
  gap: 18px;
}

body.frontend-theme-cute .store-page .store-card {
  border-radius: 24px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(255, 242, 250, 0.86));
  border: 1px solid rgba(255, 140, 185, 0.32);
  overflow: hidden;
  animation: theme-v21-cute-glow 3.2s ease-in-out infinite;
}

body.frontend-theme-tech .store-page .store-card {
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(8, 24, 50, 0.92), rgba(3, 15, 31, 0.84));
  border: 1px solid rgba(64, 191, 255, 0.42);
  overflow: hidden;
}

body.frontend-theme-tech .store-page .store-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(123, 223, 255, 0.14);
}

body.frontend-theme-cute .store-page .store-card-subtitle {
  font-size: 13px;
  color: #905d7e;
}

body.frontend-theme-tech .store-page .store-card-subtitle {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8eb9dc;
}

/* Item page: hero hierarchy changes */
body.frontend-theme-cute .item-page .detail-hero,
body.frontend-theme-tech .item-page .detail-hero {
  align-items: stretch;
}

body.frontend-theme-cute .item-page .detail-hero {
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 1.2fr) minmax(220px, 0.8fr);
  border-radius: 30px;
  padding: 22px;
}

body.frontend-theme-tech .item-page .detail-hero {
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.3fr) minmax(240px, 0.9fr);
  border-radius: 12px;
  padding: 16px;
}

body.frontend-theme-cute .item-page .detail-main .tag {
  border-radius: 999px;
  background: rgba(255, 111, 171, 0.16);
  color: #7a2e58;
}

body.frontend-theme-tech .item-page .detail-main .tag {
  border-radius: 8px;
  background: rgba(68, 188, 255, 0.14);
  color: #bde9ff;
}

body.frontend-theme-cute .item-page .detail-grid,
body.frontend-theme-tech .item-page .detail-grid {
  margin-top: 20px;
}

/* Market page: stronger command-center style for tech */
body.frontend-theme-cute .market-page .market-toolbar {
  position: sticky;
  top: 90px;
  z-index: 8;
}

body.frontend-theme-tech .market-page .market-toolbar {
  position: sticky;
  top: 84px;
  z-index: 10;
  border-radius: 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

body.frontend-theme-cute .market-page .market-grid > * {
  border-radius: 20px;
}

body.frontend-theme-tech .market-page .market-grid > * {
  border-radius: 10px;
  position: relative;
}

body.frontend-theme-tech .market-page .market-grid > *::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(90, 208, 255, 0.22);
  pointer-events: none;
}

/* Login page */
body.frontend-theme-cute .customer-login-page,
body.frontend-theme-tech .customer-login-page {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  padding: 28px 16px 46px;
}

body.frontend-theme-cute .customer-login-page .auth-card {
  width: min(100%, 960px);
  border-radius: 30px;
  border: 1px solid rgba(255, 137, 191, 0.32);
  background:
    radial-gradient(circle at 95% 12%, rgba(255, 213, 234, 0.66), transparent 34%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.95), rgba(255, 243, 251, 0.86));
}

body.frontend-theme-tech .customer-login-page .auth-card {
  width: min(100%, 980px);
  border-radius: 12px;
  border: 1px solid rgba(64, 187, 255, 0.36);
  background:
    linear-gradient(160deg, rgba(4, 20, 42, 0.94), rgba(2, 11, 24, 0.86));
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.54);
}

body.frontend-theme-tech .customer-login-page .auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0 32%, rgba(59, 192, 255, 0.08) 50%, transparent 72%);
}

/* Cart / orders / success */
body.frontend-theme-cute .store-cart-page .store-checkout-card,
body.frontend-theme-cute .store-orders-page .store-orders-shell,
body.frontend-theme-cute .store-success-page .store-success-card {
  border-radius: 24px;
  border: 1px solid rgba(255, 140, 185, 0.34);
}

body.frontend-theme-tech .store-cart-page .store-checkout-card,
body.frontend-theme-tech .store-orders-page .store-orders-shell,
body.frontend-theme-tech .store-success-page .store-success-card {
  border-radius: 10px;
  border: 1px solid rgba(60, 184, 255, 0.38);
}

body.frontend-theme-tech .store-success-page .store-success-badge {
  border-radius: 6px;
  background: rgba(53, 181, 255, 0.16);
  color: #d9f3ff;
  border: 1px solid rgba(99, 211, 255, 0.38);
}

/* Admin preview upgraded to real mini-layout */
.frontend-theme-preview {
  min-height: 196px;
}

.frontend-theme-preview .ftp-shell {
  display: grid;
  gap: 10px;
}

.frontend-theme-preview .ftp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.frontend-theme-preview .ftp-topnav {
  display: inline-flex;
  gap: 8px;
  font-size: 10px;
  opacity: 0.9;
}

.frontend-theme-preview .ftp-topnav span {
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.frontend-theme-preview .ftp-body {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
}

.frontend-theme-preview .ftp-sidebar {
  display: grid;
  gap: 8px;
  align-content: start;
}

.frontend-theme-preview .ftp-chip {
  font-size: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid currentColor;
  text-align: center;
  font-weight: 700;
}

.frontend-theme-preview .ftp-content {
  display: grid;
  gap: 8px;
}

.frontend-theme-preview .ftp-form {
  display: grid;
  gap: 6px;
}

.frontend-theme-preview .ftp-field,
.frontend-theme-preview .ftp-cta {
  height: 8px;
  border-radius: 999px;
  display: block;
}

.frontend-theme-preview .ftp-field.short {
  width: 72%;
}

.frontend-theme-preview .ftp-cta {
  width: 46%;
}

.frontend-theme-preview[data-theme="cute"] .ftp-shell {
  color: #7a355f;
}

.frontend-theme-preview[data-theme="cute"] .ftp-chip,
.frontend-theme-preview[data-theme="cute"] .ftp-topnav span {
  background: rgba(255, 182, 220, 0.38);
}

.frontend-theme-preview[data-theme="cute"] .ftp-field,
.frontend-theme-preview[data-theme="cute"] .ftp-cta {
  background: linear-gradient(90deg, rgba(255, 130, 186, 0.4), rgba(255, 186, 118, 0.45));
}

.frontend-theme-preview[data-theme="tech"] .ftp-shell {
  color: #bde7ff;
}

.frontend-theme-preview[data-theme="tech"] .ftp-chip,
.frontend-theme-preview[data-theme="tech"] .ftp-topnav span {
  background: rgba(52, 172, 255, 0.2);
}

.frontend-theme-preview[data-theme="tech"] .ftp-field,
.frontend-theme-preview[data-theme="tech"] .ftp-cta {
  background: linear-gradient(90deg, rgba(49, 214, 255, 0.4), rgba(123, 145, 255, 0.45));
}

@media (max-width: 1180px) {
  body.frontend-theme-cute .item-page .detail-hero,
  body.frontend-theme-tech .item-page .detail-hero {
    grid-template-columns: 1fr;
  }

  body.frontend-theme-cute .store-page .store-layout,
  body.frontend-theme-tech .store-page .store-layout {
    grid-template-columns: 1fr;
  }

  .frontend-theme-preview .ftp-body {
    grid-template-columns: 1fr;
  }

  .frontend-theme-preview .ftp-sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  body.frontend-theme-cute .home-page > .section,
  body.frontend-theme-cute .home-page > .cta,
  body.frontend-theme-tech .home-page > .section,
  body.frontend-theme-tech .home-page > .cta,
  body.frontend-theme-cute .store-page .store-card,
  body.frontend-theme-tech #pool::after {
    animation: none !important;
  }
}
/* === End Theme V2.1 Bold Overrides === */

/* === Theme V2.1 Fine Tune Pack === */
body.frontend-theme-cute {
  --surface-soft: rgba(255, 247, 252, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --accent-danger: #ff5d88;
  --accent-success: #34b97f;
}

body.frontend-theme-tech {
  --surface-panel: rgba(6, 20, 40, 0.92);
  --surface-table: rgba(5, 17, 34, 0.9);
  --grid-overlay: rgba(114, 198, 255, 0.08);
  --glow-soft: rgba(49, 216, 255, 0.22);
  --glow-strong: rgba(49, 216, 255, 0.34);
}

body.frontend-theme-cute .topbar .btn.ghost,
body.frontend-theme-cute .nav a {
  border-radius: 999px;
  border: 1px solid rgba(255, 140, 185, 0.36);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 232, 245, 0.72));
}

body.frontend-theme-tech .topbar .btn.ghost,
body.frontend-theme-tech .nav a {
  border-radius: 8px;
  border: 1px solid rgba(78, 192, 255, 0.44);
  background: linear-gradient(180deg, rgba(9, 27, 53, 0.92), rgba(5, 17, 36, 0.84));
}

body.frontend-theme-tech .nav a.is-active,
body.frontend-theme-tech .topbar .btn.ghost.is-active {
  box-shadow: 0 0 0 1px rgba(133, 223, 255, 0.32), 0 0 18px rgba(54, 188, 255, 0.28);
}

body.frontend-theme-cute .btn.primary {
  letter-spacing: 0.02em;
  box-shadow: 0 12px 24px rgba(255, 92, 164, 0.26);
}

body.frontend-theme-cute .btn.primary:active {
  transform: translateY(1px) scale(0.99);
}

body.frontend-theme-tech .btn.primary {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 1px rgba(160, 232, 255, 0.35), 0 0 16px rgba(56, 199, 255, 0.32);
}

body.frontend-theme-tech .btn.primary:active {
  transform: translateY(2px);
}

body.frontend-theme-cute .input-inline:focus,
body.frontend-theme-cute input[type="text"]:focus,
body.frontend-theme-cute input[type="search"]:focus,
body.frontend-theme-cute input[type="number"]:focus,
body.frontend-theme-cute input[type="email"]:focus,
body.frontend-theme-cute input[type="password"]:focus,
body.frontend-theme-cute select:focus {
  box-shadow: 0 0 0 4px rgba(255, 125, 183, 0.18);
}

body.frontend-theme-tech .input-inline:focus,
body.frontend-theme-tech input[type="text"]:focus,
body.frontend-theme-tech input[type="search"]:focus,
body.frontend-theme-tech input[type="number"]:focus,
body.frontend-theme-tech input[type="email"]:focus,
body.frontend-theme-tech input[type="password"]:focus,
body.frontend-theme-tech select:focus {
  box-shadow: inset 0 0 0 1px rgba(137, 223, 255, 0.48), 0 0 0 3px rgba(56, 176, 255, 0.2);
}

body.frontend-theme-cute .empty {
  background: linear-gradient(180deg, rgba(255, 247, 252, 0.94), rgba(255, 235, 247, 0.78));
  color: #875676;
}

body.frontend-theme-tech .empty {
  background:
    linear-gradient(180deg, rgba(6, 18, 38, 0.9), rgba(3, 11, 24, 0.82)),
    repeating-linear-gradient(
      90deg,
      transparent 0 12px,
      rgba(93, 192, 255, 0.05) 12px 13px
    );
  color: #9dc2e0;
}

body.frontend-theme-cute .home-page .cta {
  border-radius: 30px;
  border: 1px solid rgba(255, 143, 189, 0.36);
  background: linear-gradient(140deg, rgba(255, 254, 255, 0.92), rgba(255, 236, 249, 0.82));
}

body.frontend-theme-tech .home-page .cta {
  border-radius: 12px;
  border: 1px solid rgba(66, 190, 255, 0.42);
  background: linear-gradient(140deg, rgba(7, 24, 50, 0.92), rgba(3, 12, 27, 0.84));
  box-shadow: 0 0 22px rgba(53, 185, 255, 0.2);
}

body.frontend-theme-cute .store-page .store-category-pane {
  border-radius: 24px;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface-soft));
  border: 1px solid rgba(255, 140, 185, 0.32);
}

body.frontend-theme-tech .store-page .store-category-pane {
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(8, 24, 50, 0.9), rgba(5, 16, 33, 0.84));
  border: 1px solid rgba(64, 187, 255, 0.38);
}

body.frontend-theme-cute .store-page .store-category-link {
  border-radius: 16px;
  margin-bottom: 8px;
}

body.frontend-theme-tech .store-page .store-category-link {
  border-radius: 8px;
  margin-bottom: 6px;
}

body.frontend-theme-cute .item-page .detail-side {
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.92), rgba(255, 240, 250, 0.84));
  border: 1px solid rgba(255, 140, 185, 0.28);
  border-radius: 20px;
}

body.frontend-theme-tech .item-page .detail-side {
  background: linear-gradient(170deg, rgba(7, 23, 48, 0.9), rgba(3, 14, 28, 0.84));
  border: 1px solid rgba(62, 183, 255, 0.36);
  border-radius: 10px;
}

body.frontend-theme-cute .market-page .table-wrap .admin-table,
body.frontend-theme-cute .market-page .market-grid > * {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 241, 250, 0.86));
}

body.frontend-theme-tech .market-page .table-wrap .admin-table,
body.frontend-theme-tech .market-page .market-grid > * {
  background: linear-gradient(180deg, rgba(6, 20, 42, 0.94), rgba(3, 13, 28, 0.86));
}

body.frontend-theme-tech .market-page .table-wrap .admin-table tbody tr:hover {
  background: rgba(60, 194, 255, 0.08);
}

body.frontend-theme-cute .store-cart-page .store-checkout-card,
body.frontend-theme-cute .store-orders-page .store-orders-shell,
body.frontend-theme-cute .store-success-page .store-success-card {
  box-shadow: 0 16px 34px rgba(233, 104, 162, 0.18);
}

body.frontend-theme-tech .store-cart-page .store-checkout-card,
body.frontend-theme-tech .store-orders-page .store-orders-shell,
body.frontend-theme-tech .store-success-page .store-success-card {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.52);
}

body.frontend-theme-cute .store-success-page .store-success-badge {
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255, 107, 171, 0.14);
  color: #8a2f61;
  border: 1px solid rgba(255, 130, 185, 0.36);
}

@media (max-width: 768px) {
  body.frontend-theme-cute .home-page,
  body.frontend-theme-tech .home-page {
    gap: 18px;
  }

  body.frontend-theme-cute .home-conversion,
  body.frontend-theme-tech .home-conversion,
  body.frontend-theme-cute .home-page .cta,
  body.frontend-theme-tech .home-page .cta {
    border-radius: 18px;
    padding: 16px;
  }

  body.frontend-theme-cute .store-page .store-main,
  body.frontend-theme-tech .store-page .store-main {
    padding: 12px;
  }
}
/* === End Theme V2.1 Fine Tune Pack === */
