:root {
  --bg: #0f111a;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-border: rgba(148, 163, 184, 0.16);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --success: #22c55e;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(99, 102, 241, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(236, 72, 153, 0.15), transparent 22%),
    linear-gradient(180deg, #0b1020, #0f111a);
  color: var(--text);
  font-family: "Outfit", "PingFang SC", sans-serif;
}
.tools-shell {
  width: min(1480px, calc(100vw - 24px));
  margin: 8px auto 16px;
}
body[data-page="dynamics"] .tools-shell,
body[data-page="admin"] .tools-shell,
.tools-shell.dynamics-wide {
  width: calc(100% - 32px) !important;
  max-width: none !important;
  margin: 8px 16px 16px !important;
}
.tools-hero, .tools-panel, .subpanel {
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.22);
}
.tools-hero {
  border-radius: 28px;
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.tools-kicker {
  margin: 0 0 4px;
  color: #93c5fd;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tools-hero h1, .section-head h2, .subpanel h3 {
  margin: 0;
}
.tools-hero h1 {
  font-size: 1.6rem;
  line-height: 1.1;
}
.tools-desc, .section-head p, .inline-status {
  color: var(--muted);
}
.tools-desc {
  margin: 6px 0 0;
  font-size: 0.92rem;
}
.tools-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tools-nav a, .toolbar button, .followed-add-form button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 13px;
  cursor: pointer;
  line-height: 1;
}
.tools-nav a:hover, .toolbar button:hover, .followed-add-form button:hover {
  border-color: rgba(139, 92, 246, 0.36);
}
.tools-panel {
  margin-top: 12px;
  border-radius: 24px;
  padding: 14px 16px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.section-head p {
  margin: 0;
  font-size: 0.88rem;
}
.dynamics-head-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.dynamics-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--muted);
  user-select: none;
  cursor: pointer;
}
.dynamics-checkbox input[type="checkbox"] {
  accent-color: #8b5cf6;
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.followed-add-form {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 120px 160px;
  gap: 10px;
}
.followed-add-form input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.68);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
.inline-status {
  margin-top: 8px;
  font-size: 0.88rem;
}
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.toolbar .secondary {
  color: #bfdbfe;
}
.tables-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}
.subpanel {
  border-radius: 20px;
  padding: 10px 12px;
}
.subpanel h3 {
  font-size: 0.98rem;
  margin-bottom: 8px;
}
.table-wrap {
  max-height: 74vh;
  overflow: auto;
}
.top100-table-wrap {
  max-height: none;
  overflow: visible;
}
.rank-badge-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}
.rank-badge-inline.is-followed {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(236, 72, 153, 0.35);
  color: #fbcfe8;
}
.subpanel.dropped-subpanel-wrap {
  margin-top: 14px;
}
.followed-add-inline {
  margin-top: 8px;
}
.followed-add-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.18);
  margin: 10px 0;
}
.followed-add-inline-head {
  font-size: 0.9rem;
  font-weight: 700;
  color: #bfdbfe;
  margin-bottom: 6px;
}
.followed-add-inline .source-note {
  margin-bottom: 8px;
}
.followed-add-inline .followed-add-form {
  grid-template-columns: minmax(0, 1fr) 84px 112px;
}
.followed-add-inline .followed-add-form input {
  padding: 8px 10px;
}
.followed-add-inline .followed-add-form button {
  padding: 8px 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  vertical-align: top;
  line-height: 1.25;
}
.publisher-mini-cell {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.publisher-mini-logo {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: cover;
  flex: 0 0 24px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.14);
}
.publisher-mini-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #bfdbfe;
}
.publisher-mini-copy {
  min-width: 0;
}
.publisher-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-bottom: 1px;
}
.publisher-mini-link,
.publisher-mini-link.is-static {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.publisher-mini-link:hover {
  color: #c4b5fd;
}
.top100-table-wrap .publisher-mini-logo {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
}
.top100-table-wrap .publisher-mini-fallback {
  font-size: 0.78rem;
}
.top100-table-wrap .publisher-mini-link,
.top100-table-wrap .publisher-mini-link.is-static {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.18;
}
.publisher-flag-mini {
  width: 20px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  flex: 0 0 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
}
th {
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.96);
  z-index: 1;
  font-size: 0.86rem;
}
td input[type="number"] {
  width: 50px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 6px 4px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}
td input[type="number"]::-webkit-outer-spin-button,
td input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.weight-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.weight-step-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.weight-step-btn:hover {
  border-color: rgba(139, 92, 246, 0.36);
}
.weight-step-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.latest-app-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 7px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.latest-app-btn.icon-only {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.latest-app-btn:hover {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.18);
}
.latest-app-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.source-note {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  word-break: break-all;
}
.timeline {
  display: grid;
  gap: 10px;
}
.dynamics-range-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}
.dynamics-range-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: 7px 12px;
  line-height: 1;
  cursor: pointer;
}
.dynamics-range-btn.active {
  border-color: rgba(139, 92, 246, 0.4);
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(236,72,153,0.18));
}
.dynamics-add-keyword-btn {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, rgba(56,189,248,0.28), rgba(34,197,94,0.22));
  color: #d1fae5;
}
.dynamics-add-keyword-btn:hover {
  border-color: rgba(56, 189, 248, 0.85);
  background: linear-gradient(135deg, rgba(56,189,248,0.38), rgba(34,197,94,0.30));
}


/* ---- 图标直链商店页 ---- */
.timeline-cover-wrap {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.timeline-cover-wrap:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}
.timeline-cover-wrap .timeline-cover {
  display: block;
  width: 78px;
  height: 78px;
}
.timeline-cover-wrap .timeline-cover.compact {
  width: 56px;
  height: 56px;
}

/* ---- 发行商名称 & 账户名链接 ---- */
.timeline-publisher-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.timeline-publisher-link,
.timeline-account-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  line-height: 1;
}
.timeline-publisher-link {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.22);
}
.timeline-publisher-link:hover {
  background: rgba(139, 92, 246, 0.24);
  border-color: rgba(139, 92, 246, 0.45);
  color: #ddd6fe;
}
.timeline-account-link {
  background: rgba(56, 189, 248, 0.10);
  color: #93c5fd;
  border: 1px solid rgba(56, 189, 248, 0.22);
}
.timeline-account-link:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.45);
  color: #bfdbfe;
}

/* 紧凑模式适配 */
.timeline-card-inline.is-compact .timeline-publisher-row {
  gap: 5px;
  margin-top: 5px;
}
.timeline-card-inline.is-compact .timeline-publisher-link,
.timeline-card-inline.is-compact .timeline-account-link {
  padding: 3px 7px;
  font-size: 0.73rem;
}

/* ---- 分类筛选按钮 ---- */
.dynamics-category-btn {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  padding: 5px 11px;
}
.dynamics-category-btn:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}
.dynamics-category-btn.active {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(34, 197, 94, 0.14));
  color: #d1fae5;
}
.dynamics-category-clear {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  font-size: 0.78rem;
}
.dynamics-category-clear:hover {
  border-color: rgba(248, 113, 113, 0.65);
  background: rgba(248, 113, 113, 0.1);
}
.dynamics-category-clear.active {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
}

/* ---- 网格卡片布局（AppBird 风格 - 水平紧凑型） ---- */
.dynamics-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.grid-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.68);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.grid-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
  background: rgba(15, 23, 42, 0.88);
}
.grid-card-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 90px;
}
.grid-card-icon-wrap {
  flex: 0 0 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.06);
  overflow: hidden;
  transition: background 0.2s ease;
}
.grid-card-icon-wrap:hover {
  background: rgba(139, 92, 246, 0.1);
}
.grid-card-icon {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.2s ease;
}
.grid-card-icon-wrap:hover .grid-card-icon {
  transform: scale(1.08);
}
.grid-card-icon-empty {
  width: 72px;
  height: 72px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 12px;
}
.grid-card-info {
  flex: 1;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.grid-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.grid-card-title {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 600;
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grid-card-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.grid-card-title a:hover {
  color: #c4b5fd;
}
.grid-card-subtitle {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.78rem;
  min-width: 0;
  flex-wrap: wrap;
}
.grid-card-pub-link,
.grid-card-acct-link {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.grid-card-pub-link:hover {
  color: #c4b5fd;
}
.grid-card-acct-link:hover {
  color: #93c5fd;
}
.grid-card-sep {
  color: rgba(148, 163, 184, 0.35);
  font-size: 0.7rem;
}
.grid-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}
.grid-card-footer .timeline-store-links {
  margin-left: 0;
}
.grid-card-footer .publisher-store-link {
  font-size: 0.7rem;
  color: #38bdf8;
  text-decoration: none;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.15);
}
.grid-card-footer .publisher-store-link:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.35);
}
.grid-card-footer .publisher-store-link.static {
  color: #64748b;
  background: rgba(148, 163, 184, 0.06);
  border-color: rgba(148, 163, 184, 0.1);
}
.grid-card-date {
  color: #64748b;
  font-size: 0.72rem;
  white-space: nowrap;
}

/* Store filter buttons */
.dynamics-store-btn {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  padding: 5px 11px;
}
.dynamics-store-btn:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}
.dynamics-store-btn.active {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(34, 197, 94, 0.14));
  color: #d1fae5;
}

/* Sort buttons */
.dynamics-sort-btn {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  padding: 5px 11px;
}
.dynamics-sort-btn:hover {
  border-color: rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.06);
}
.dynamics-sort-btn.active {
  border-color: rgba(250, 204, 21, 0.55);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.16), rgba(245, 158, 11, 0.12));
  color: #fde68a;
}

@media (max-width: 600px) {
  .dynamics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .grid-card-inner {
    min-height: 80px;
  }
  .grid-card-icon-wrap {
    flex: 0 0 72px;
  }
  .grid-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 10px;
  }
  .grid-card-info {
    padding: 8px 10px;
  }
  .grid-card-title {
    font-size: 0.85rem;
  }
  .grid-card-pub-link,
  .grid-card-acct-link {
    max-width: 100px;
  }
}

.timeline-day-group {
  display: grid;
  gap: 8px;
}
.timeline-day-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bfdbfe;
  font-weight: 800;
  font-size: 0.92rem;
  padding-left: 2px;
}
.timeline-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 0.76rem;
}
.timeline-day-list {
  display: grid;
  gap: 10px;
}
.timeline-day-list.is-compact {
  gap: 4px;
}
.timeline-item-inline {
  display: block;
}
.timeline-card-inline {
  width: 100%;
}
.timeline-card-inline.is-alt {
  background: rgba(255, 255, 255, 0.05);
}
.timeline-card-inline.is-compact {
  border-radius: 14px;
  padding: 8px 10px;
  grid-template-columns: 56px 1fr;
  gap: 10px;
}
.timeline-cover.compact {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}
.timeline-content {
  min-width: 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  align-items: start;
}
.timeline-date {
  color: #bfdbfe;
  font-weight: 700;
  padding-top: 8px;
  font-size: 0.88rem;
}
.timeline-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.72);
  border-radius: 18px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
}
.timeline-cover {
  width: 78px;
  height: 78px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.1);
}
.timeline-title {
  margin: 0 0 6px;
  font-size: 0.98rem;
}
.timeline-title a {
  color: var(--text);
  text-decoration: none;
}
.timeline-title a:hover { color: #c4b5fd; }
.timeline-title.compact {
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.timeline-store-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}
.timeline-title .publisher-store-link {
  vertical-align: middle;
}
.timeline-title .store-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-size: 0.78rem;
}
.meta-pill.weight {
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(236,72,153,0.18));
  color: #f8fafc;
}
.meta-link-pill {
  text-decoration: none;
  color: #bfdbfe;
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.meta-link-pill:hover {
  border-color: rgba(96, 165, 250, 0.45);
  color: #dbeafe;
}
.timeline-card-inline.is-compact .timeline-meta,
.timeline-card-inline.is-compact .timeline-links {
  gap: 5px;
  margin-bottom: 5px;
}
.timeline-card-inline.is-compact .meta-pill {
  padding: 3px 7px;
  font-size: 0.74rem;
}
.timeline-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.timeline-empty-card {
  padding: 16px 18px;
}
.publisher-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
}
.publisher-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.64);
  backdrop-filter: blur(8px);
}
.publisher-modal-dialog {
  position: relative;
  width: min(860px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  margin: 12px auto;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.4);
  padding: 16px;
  overflow: auto;
}
.publisher-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.publisher-modal-head {
  padding-right: 42px;
  margin-bottom: 12px;
}
.publisher-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
}
.publisher-modal-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}
.publisher-modal-list {
  display: grid;
  gap: 8px;
}
.publisher-modal-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 150px 150px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(255,255,255,0.03);
}
.publisher-modal-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.1);
}
.publisher-modal-namecell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.publisher-modal-name {
  min-width: 0;
}
.publisher-modal-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.publisher-modal-link:hover {
  color: #c4b5fd;
}
.publisher-modal-metric {
  color: var(--text);
  font-size: 0.9rem;
  white-space: nowrap;
}
.publisher-store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: 0 0 auto;
}
#followed-weights-body .store-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.publisher-modal-namecell .store-icon {
  flex: 0 0 auto;
}
.publisher-modal-dialog .store-icon {
  width: 28px;
  height: 28px;
}
.publisher-modal-empty {
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  color: var(--muted);
}
.inline-status.ok::before,
.inline-status.err::before {
  display: inline-block;
  margin-right: 6px;
}
.inline-status.ok::before { content: "●"; color: #22c55e; }
.inline-status.err::before { content: "●"; color: #fda4af; }
.hidden { display: none !important; }

/* ===== Date Segmentation ===== */
.date-segment {
  margin-bottom: 16px;
}
.date-segment:last-child {
  margin-bottom: 0;
}
.date-segment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 8px 0;
  margin-bottom: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 17, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.date-segment-line {
  width: 3px;
  height: 22px;
  border-radius: 2px;
  background: linear-gradient(180deg, #8b5cf6, #ec4899);
  flex-shrink: 0;
}
.date-segment-date {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}
.date-segment-count {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
  padding: 2px 8px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 999px;
}
.date-segment-cards {
  padding-left: 13px;
  border-left: 1px solid rgba(148, 163, 184, 0.1);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 12px;
}
/* ===== Upcoming / Pre-order Products ===== */
.upcoming-panel {
  margin: 18px 0 24px;
  padding: 18px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(120, 53, 15, 0.05) 45%, rgba(15, 23, 42, 0.68)),
    rgba(15, 23, 42, 0.64);
  box-shadow: inset 0 1px 0 rgba(254, 243, 199, 0.08), 0 16px 45px rgba(120, 53, 15, 0.12);
}
.upcoming-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.upcoming-panel-head h2 {
  margin: 2px 0 0;
  color: #fef3c7;
  font-size: 1.18rem;
}
.upcoming-eyebrow {
  display: inline-flex;
  color: #fbbf24;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.upcoming-summary {
  padding: 5px 10px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.22);
  font-size: 0.76rem;
  white-space: nowrap;
}
.upcoming-note {
  margin: 6px 0 14px;
  color: #a8a29e;
  font-size: 0.78rem;
}
.upcoming-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.upcoming-card {
  flex: 1 1 270px;
  max-width: 310px;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.76);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.upcoming-card:hover,
.upcoming-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 10px 28px rgba(120, 53, 15, 0.2);
  outline: none;
}
.upcoming-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.22), 0 10px 28px rgba(120, 53, 15, 0.2);
}
.upcoming-card-icon {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 13px;
  object-fit: cover;
  background: rgba(251, 191, 36, 0.08);
}
.upcoming-card-icon-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  font-size: 1.35rem;
}
.upcoming-card-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}
.upcoming-card-title,
.upcoming-card-publisher {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upcoming-card-title {
  color: #f8fafc;
  font-size: 0.84rem;
  line-height: 1.3;
}
.upcoming-card-publisher {
  color: #a8a29e;
  font-size: 0.72rem;
}
.upcoming-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: #d6d3d1;
  font-size: 0.68rem;
}
.upcoming-card-countdown {
  align-self: flex-start;
  margin-top: 1px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(217, 119, 6, 0.22);
  font-size: 0.68rem;
  font-weight: 700;
}

@media (max-width: 600px) {
  .upcoming-panel {
    padding: 14px;
  }
  .upcoming-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .upcoming-card {
    flex-basis: 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .date-segment-cards {
    grid-template-columns: 1fr;
    padding-left: 8px;
    gap: 6px;
  }
  .date-segment-header {
    padding: 6px 0;
    margin-bottom: 6px;
  }
  .date-segment-date {
    font-size: 0.9rem;
  }
}


@media (max-width: 900px) {
  .tools-hero, .section-head { flex-direction: column; }
  .followed-add-form, .tables-grid, .timeline-item, .timeline-card { grid-template-columns: 1fr; }
  .timeline-date { padding-top: 0; }
  .timeline-card-inline.is-compact,
  .timeline-card {
    grid-template-columns: 1fr;
  }
  .timeline-cover,
  .timeline-cover.compact {
    width: 64px;
    height: 64px;
  }
  .publisher-modal-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    margin: 6px auto;
    padding: 12px;
  }
  .publisher-modal-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }
}

/* Current dynamics: retain date groups and lay out products in multiple columns. */
body[data-page="dynamics"] .timeline-day-list,
body[data-page="dynamics"] .timeline-day-list.is-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 12px;
  align-items: stretch;
}
body[data-page="dynamics"] .timeline-item-inline { min-width: 0; }
body[data-page="dynamics"] .timeline-card-inline,
body[data-page="dynamics"] .timeline-card-inline.is-compact {
  height: 100%;
  box-sizing: border-box;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
}
body[data-page="dynamics"] .timeline-cover,
body[data-page="dynamics"] .timeline-cover.compact {
  width: 60px;
  height: 60px;
  border-radius: 12px;
}
body[data-page="dynamics"] .timeline-title { font-size: 15px; line-height: 1.45; overflow-wrap:anywhere; }
body[data-page="dynamics"] .timeline-meta { gap: 5px; }
body[data-page="dynamics"] .meta-pill { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
@media(max-width:640px) {
  body[data-page="dynamics"] .timeline-day-list { grid-template-columns:1fr; }
}
