:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-strong: #f9fbff;
  --ink: #162033;
  --muted: #697386;
  --line: #dce3ee;
  --line-strong: #c7d1df;
  --blue: #1f6feb;
  --teal: #0f9f8f;
  --green: #238636;
  --red: #c7372f;
  --amber: #b87800;
  --violet: #6750a4;
  --shadow: 0 12px 32px rgba(31, 49, 82, 0.08);
  --radius: 8px;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(31, 111, 235, 0.07), transparent 340px),
    var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.25;
}

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

.primary-button,
.ghost-button,
.icon-button,
.chip,
.tab,
.add-account button {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.primary-button {
  padding: 0 16px;
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 720;
}

.ghost-button {
  padding: 0 12px;
  color: var(--muted);
}

.icon-button {
  width: 42px;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0;
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.chip:hover,
.tab:hover,
.add-account button:hover {
  transform: translateY(-1px);
}

.workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  gap: 18px;
  padding: 18px;
}

.side-panel,
.content-panel,
.intel-panel {
  min-width: 0;
}

.side-panel,
.intel-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-panel section,
.intel-panel section,
.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.search-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  padding: 14px;
}

.search-wrap label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

input,
select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 11px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.12);
}

.filter-block,
.add-account,
.intel-panel section {
  padding: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.chip.active {
  border-color: rgba(31, 111, 235, 0.38);
  background: rgba(31, 111, 235, 0.1);
  color: var(--blue);
}

.add-account form {
  display: grid;
  gap: 9px;
}

.add-account button {
  background: var(--ink);
  color: #fff;
  font-weight: 720;
}

.content-panel {
  padding: 16px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  padding: 13px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.metric small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.tab {
  min-width: 96px;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 720;
}

.tab.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.section-heading h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.section-heading select {
  max-width: 190px;
}

.release-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.search-results {
  display: grid;
  gap: 16px;
}

.result-group {
  display: grid;
  gap: 8px;
}

.result-group h3 {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

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

.release-card,
.account-row,
.signal-item,
.watch-item,
.queue-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.release-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 13px;
  padding: 13px;
}

.app-icon {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  width: 66px;
  height: 66px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, var(--icon-a), var(--icon-b)),
    #dde5f0;
  color: #fff;
  font-weight: 860;
  font-size: 22px;
  box-shadow: inset 0 -18px 42px rgba(0, 0, 0, 0.14);
}

.app-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-icon.has-image span {
  display: none;
}

.app-icon span {
  position: relative;
  z-index: 1;
}

.release-main,
.account-main,
.signal-main {
  min-width: 0;
}

.row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.name {
  display: block;
  overflow-wrap: anywhere;
  font-weight: 790;
  line-height: 1.25;
}

.title-link {
  color: var(--ink);
  text-decoration: none;
}

.title-button {
  width: auto;
  height: auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.title-link:hover,
.title-button:hover {
  color: var(--blue);
  text-decoration: underline;
}

.subline,
.meta-line,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.subline {
  margin-top: 3px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.market-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
}

.source-badge.direct {
  border-color: rgba(35, 134, 54, 0.24);
  background: rgba(35, 134, 54, 0.08);
  color: var(--green);
}

.source-badge.search {
  border-color: rgba(184, 120, 0, 0.24);
  background: rgba(184, 120, 0, 0.1);
  color: var(--amber);
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  padding: 14px;
  margin-bottom: 12px;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.detail-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.account-game-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(4, minmax(112px, 0.42fr)) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.account-game-tools input,
.account-game-tools select {
  min-width: 0;
}

.result-count {
  white-space: nowrap;
}

.detail-list {
  display: grid;
  gap: 8px;
}

.detail-game {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px;
}

.detail-game .app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 15px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.game-detail {
  display: grid;
  gap: 14px;
}

.game-detail-head {
  margin-bottom: 0;
}

.game-title-wrap {
  display: flex;
  min-width: 0;
  gap: 13px;
  align-items: center;
}

.game-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

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

.game-facts div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

.game-facts span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 740;
}

.game-facts strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.25;
}

.screenshot-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.screenshot-strip img {
  flex: 0 0 auto;
  width: 180px;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef3f8;
  object-fit: cover;
}

.game-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 12px;
}

.game-copy section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.game-copy h4,
.related-release-strip h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.game-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-line;
}

.related-release-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: #edf2f7;
  color: #455164;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 670;
}

.tag.signal-high {
  background: rgba(199, 55, 47, 0.1);
  color: var(--red);
}

.tag.signal-mid {
  background: rgba(184, 120, 0, 0.12);
  color: var(--amber);
}

.tag.signal-low {
  background: rgba(35, 134, 54, 0.1);
  color: var(--green);
}

.score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 30px;
  border-radius: var(--radius);
  background: rgba(15, 159, 143, 0.1);
  color: var(--teal);
  font-weight: 820;
}

.account-table,
.signal-list {
  display: grid;
  gap: 8px;
}

.account-row,
.signal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  align-items: center;
}

.account-row.is-clickable,
.signal-item.is-clickable {
  cursor: pointer;
}

.account-row.is-clickable:hover,
.signal-item.is-clickable:hover {
  border-color: rgba(31, 111, 235, 0.4);
  background: #f9fbff;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
  max-width: 220px;
}

.link-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
  padding: 0 9px;
}

.danger-button {
  color: var(--red);
}

.watch-item,
.queue-item {
  padding: 11px;
  margin-bottom: 8px;
}

.watch-item strong,
.queue-item strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.connector-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.map-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(220, 227, 238, 0.5) 1px, transparent 1px),
    linear-gradient(0deg, rgba(220, 227, 238, 0.5) 1px, transparent 1px),
    #fff;
  background-size: 46px 46px;
}

#relationshipMap {
  display: block;
  width: 100%;
  height: min(58vh, 560px);
}

.map-edge {
  stroke: #b6c3d3;
  stroke-width: 2;
}

.map-node circle {
  stroke: #fff;
  stroke-width: 3;
  filter: drop-shadow(0 8px 16px rgba(31, 49, 82, 0.12));
}

.map-node[data-account-id] {
  cursor: pointer;
}

.map-node text {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.empty-state.compact {
  min-height: 110px;
}

@media (max-width: 1160px) {
  .workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .intel-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .metric-strip,
  .release-grid,
  .game-facts,
  .game-copy,
  .intel-panel {
    grid-template-columns: 1fr;
  }

  .account-game-tools {
    grid-template-columns: 1fr 1fr;
  }

  .tabs {
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .tab {
    flex: 0 0 auto;
  }
}

@media (max-width: 520px) {
  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 42px 42px 1fr;
  }

  .primary-button {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading select,
  .ghost-button {
    width: 100%;
  }

  .account-game-tools {
    grid-template-columns: 1fr;
  }

  .game-detail-head,
  .game-title-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .screenshot-strip img {
    width: 150px;
  }

  .release-card,
  .account-row,
  .signal-item {
    grid-template-columns: 1fr;
  }
}

/* Redesign system: intelligence cockpit */
:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-strong: #f8fafc;
  --ink: #111827;
  --muted: #647083;
  --soft: #8a96a8;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --blue: #0f62fe;
  --blue-dark: #0b4fd7;
  --green: #15803d;
  --red: #dc2626;
  --amber: #d97706;
  --teal: #0f766e;
  --violet: #6d28d9;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-strong: 0 14px 32px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

body {
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(280px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.brand-lockup {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.14);
}

.eyebrow {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

h1 {
  font-size: 18px;
  letter-spacing: 0;
}

.command-search {
  position: relative;
}

.command-search label {
  position: absolute;
  left: 14px;
  top: 50%;
  color: var(--soft);
  font-size: 0;
  transform: translateY(-50%);
}

.command-search label::before {
  content: "⌕";
  font-size: 16px;
}

.command-search input {
  height: 42px;
  border-color: var(--line);
  background: #f8fafc;
  padding-left: 40px;
  font-size: 14px;
}

.topbar-actions {
  gap: 8px;
}

.primary-button,
.utility-button,
.ghost-button,
.icon-button,
.chip,
.tab,
.add-account button,
.link-button,
.danger-button {
  min-height: 34px;
  border-radius: var(--radius);
  letter-spacing: 0;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.primary-button {
  min-height: 40px;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(15, 98, 254, 0.22);
  font-size: 13px;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.utility-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 720;
}

.utility-button:hover,
.ghost-button:hover {
  border-color: var(--line-strong);
  background: #f8fafc;
}

.primary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.chip:hover,
.tab:hover,
.add-account button:hover {
  transform: none;
}

.workspace {
  grid-template-columns: 238px minmax(0, 1fr) 282px;
  gap: 12px;
  padding: 12px;
}

.side-panel,
.intel-panel {
  gap: 12px;
}

.side-panel {
  position: sticky;
  top: 68px;
  align-self: start;
  max-height: calc(100vh - 84px);
  overflow: auto;
}

.content-panel,
.side-panel section,
.intel-panel section {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.content-panel {
  padding: 14px;
}

.tabs {
  display: grid;
  gap: 4px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 6px;
  box-shadow: var(--shadow);
}

.tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: #475569;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 760;
}

.tab span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 13px;
}

.tab.active {
  border-color: #dbeafe;
  background: #eff6ff;
  color: var(--blue);
}

.tab.active span {
  background: var(--blue);
  color: #fff;
}

.filter-block,
.add-account,
.intel-panel section {
  padding: 12px;
}

.block-head,
.intel-panel h2,
.add-account h2 {
  margin-bottom: 10px;
}

h2 {
  color: #0f172a;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chip-row {
  gap: 6px;
}

.chip {
  min-height: 30px;
  border-color: #e5e7eb;
  background: #f8fafc;
  color: #475569;
  padding: 0 9px;
  font-size: 12px;
}

.chip.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}

input,
select {
  border-color: var(--line);
  background: #fff;
  color: #1f2937;
  font-size: 13px;
}

.add-account form {
  gap: 8px;
}

.add-account button {
  border-color: #111827;
  background: #111827;
  color: #fff;
  font-size: 13px;
}

.metric-strip {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.metric {
  position: relative;
  min-height: 92px;
  overflow: hidden;
  border-color: var(--line);
  background: #fff;
  padding: 13px 14px;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue);
}

.metric:nth-child(2)::before {
  background: var(--teal);
}

.metric:nth-child(3)::before {
  background: var(--amber);
}

.metric:nth-child(4)::before {
  background: var(--red);
}

.metric:nth-child(5)::before {
  background: var(--green);
}

.metric span {
  color: #64748b;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.metric strong {
  margin-top: 7px;
  color: #0f172a;
  font-size: 30px;
}

.metric small {
  color: #7c8798;
  font-size: 12px;
}

.section-heading {
  min-height: 44px;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

.section-heading select {
  height: 36px;
  max-width: 210px;
}

.list-header {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(160px, 0.9fr) minmax(140px, 0.7fr) 72px;
  gap: 12px;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  background: #f8fafc;
  color: #64748b;
  padding: 0 12px 0 76px;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.catalog-list-header {
  grid-template-columns: minmax(260px, 1.4fr) minmax(160px, 0.9fr) minmax(140px, 0.7fr) 72px;
}

.release-grid,
.result-grid,
.account-table,
.signal-list,
.detail-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.release-card,
.account-row,
.signal-item,
.detail-game,
.watch-item,
.queue-item {
  border-color: var(--line);
  background: #fff;
  box-shadow: none;
}

.release-card {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  padding: 11px;
  transition:
    border-color 0.16s ease,
    background 0.16s ease;
}

.release-grid .release-card {
  border-radius: 0;
}

.release-grid .release-card:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

.release-card:hover,
.detail-game:hover,
.account-row.is-clickable:hover,
.signal-item.is-clickable:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  font-size: 17px;
}

.detail-game .app-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.row-top {
  align-items: center;
}

.name,
.title-button {
  color: #111827;
  font-size: 14px;
  font-weight: 790;
}

.title-button:hover {
  color: var(--blue);
}

.subline,
.meta-line,
.muted {
  color: #64748b;
  font-size: 12px;
}

.tag-row,
.market-row {
  gap: 5px;
  margin-top: 8px;
}

.tag,
.source-badge {
  min-height: 22px;
  border-radius: 6px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 760;
}

.tag {
  background: #f1f5f9;
  color: #475569;
}

.tag.signal-high {
  background: #fef2f2;
  color: var(--red);
}

.tag.signal-mid {
  background: #fff7ed;
  color: var(--amber);
}

.tag.signal-low {
  background: #ecfdf5;
  color: var(--green);
}

.tag.direct-tag {
  background: #ecfdf5;
  color: var(--green);
}

.score {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid #bbf7d0;
  border-radius: 50%;
  background: #f0fdf4;
  color: var(--green);
  font-size: 13px;
}

.link-button {
  min-width: 34px;
  height: 30px;
  border-color: var(--line);
  background: #fff;
  color: #334155;
  font-size: 12px;
}

.store-link {
  gap: 6px;
  min-width: 42px;
  font-weight: 820;
}

.store-link::after {
  content: "↗";
  font-size: 11px;
}

.store-ios {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.store-gp {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.store-other {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.source-badge.direct {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.source-badge.search {
  border-color: #fed7aa;
  background: #fff7ed;
  color: var(--amber);
}

.detail-panel {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 14px;
}

.detail-head h3 {
  color: #0f172a;
  font-size: 20px;
}

.game-detail {
  gap: 12px;
}

.game-facts {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.game-facts div,
.game-copy section {
  border-color: var(--line);
  background: #f8fafc;
}

.screenshot-strip img {
  width: 154px;
  border-color: var(--line);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.account-game-tools {
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(104px, 0.42fr)) auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 8px;
}

.result-count {
  justify-self: end;
  font-weight: 760;
}

.account-row,
.signal-item {
  padding: 11px;
}

.account-actions {
  max-width: 260px;
}

.danger-button {
  border-color: #fecaca;
  background: #fff;
  color: var(--red);
}

.danger-button:hover {
  background: #fef2f2;
}

.intel-panel {
  position: sticky;
  top: 68px;
  align-self: start;
  max-height: calc(100vh - 84px);
  overflow: auto;
}

.watch-item,
.queue-item {
  border-color: var(--line);
  background: #f8fafc;
  margin-bottom: 7px;
}

.connector-list {
  line-height: 1.65;
}

.map-frame {
  background:
    linear-gradient(90deg, rgba(203, 213, 225, 0.36) 1px, transparent 1px),
    linear-gradient(0deg, rgba(203, 213, 225, 0.36) 1px, transparent 1px),
    #f8fafc;
}

.empty-state {
  border-color: var(--line-strong);
  background: #f8fafc;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr);
  }

  .topbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .intel-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions > * {
    flex: 1;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .side-panel {
    position: static;
    max-height: none;
  }

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

  .tab {
    justify-content: center;
  }

  .list-header {
    display: none;
  }

  .release-grid .release-card {
    border-radius: var(--radius);
  }
}

@media (max-width: 620px) {
  .metric-strip,
  .game-facts,
  .game-copy,
  .account-game-tools {
    grid-template-columns: 1fr;
  }

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

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .topbar-actions .primary-button {
    grid-column: 1 / -1;
  }

  .release-card,
  .account-row,
  .signal-item,
  .detail-game {
    grid-template-columns: 1fr;
  }
}

/* Motion and style polish */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-press: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 140ms;
  --duration-base: 220ms;
  --duration-slow: 420ms;
  --focus-ring: 0 0 0 3px rgba(15, 98, 254, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, rgba(15, 98, 254, 0.055), rgba(244, 246, 250, 0) 280px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 72px 72px, auto;
}

.topbar {
  transition:
    border-color var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    background var(--duration-base) var(--ease-out);
}

.brand-mark,
.tab span,
.app-icon,
.score {
  transition:
    transform var(--duration-base) var(--ease-press),
    box-shadow var(--duration-base) var(--ease-out);
}

.brand-lockup:hover .brand-mark {
  transform: rotate(-4deg) scale(1.04);
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.18),
    0 10px 22px rgba(15, 23, 42, 0.18);
}

.command-search {
  transition: transform var(--duration-base) var(--ease-out);
}

.command-search:focus-within {
  transform: translateY(-1px);
}

.command-search input,
input,
select {
  transition:
    border-color var(--duration-fast) ease,
    background var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-out);
}

.command-search:focus-within input,
input:focus,
select:focus {
  border-color: rgba(15, 98, 254, 0.44);
  box-shadow: var(--focus-ring);
}

.primary-button,
.utility-button,
.ghost-button,
.icon-button,
.chip,
.tab,
.add-account button,
.link-button,
.danger-button {
  position: relative;
  overflow: hidden;
  transition:
    background var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    color var(--duration-fast) ease,
    box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.primary-button:hover,
.utility-button:hover,
.ghost-button:hover,
.icon-button:hover,
.chip:hover,
.tab:hover,
.add-account button:hover,
.link-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.utility-button:active,
.ghost-button:active,
.icon-button:active,
.chip:active,
.tab:active,
.add-account button:active,
.link-button:active,
.danger-button:active {
  transform: translateY(0) scale(0.985);
}

.primary-button:focus-visible,
.utility-button:focus-visible,
.ghost-button:focus-visible,
.icon-button:focus-visible,
.chip:focus-visible,
.tab:focus-visible,
.add-account button:focus-visible,
.link-button:focus-visible,
.danger-button:focus-visible,
.title-button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.primary-button {
  box-shadow:
    0 8px 18px rgba(15, 98, 254, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.primary-button:hover {
  box-shadow:
    0 12px 26px rgba(15, 98, 254, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.tab {
  isolation: isolate;
}

.tab::before {
  content: "";
  position: absolute;
  inset: 5px auto 5px 5px;
  width: 3px;
  border-radius: 999px;
  background: var(--blue);
  opacity: 0;
  transform: scaleY(0.4);
  transition:
    opacity var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.tab.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.tab.active span {
  transform: translateX(1px) scale(1.04);
}

.chip.active {
  box-shadow: inset 0 0 0 1px rgba(15, 98, 254, 0.08);
}

.view.active {
  animation: view-enter var(--duration-slow) var(--ease-out) both;
}

.metric {
  transition:
    border-color var(--duration-base) ease,
    box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out),
    background var(--duration-base) ease;
}

.metric:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.metric::before {
  transition: width var(--duration-base) var(--ease-out);
}

.metric:hover::before {
  width: 6px;
}

.metric strong {
  animation: number-rise 520ms var(--ease-out) both;
}

.metric:nth-child(2) strong {
  animation-delay: 40ms;
}

.metric:nth-child(3) strong {
  animation-delay: 80ms;
}

.metric:nth-child(4) strong {
  animation-delay: 120ms;
}

.metric:nth-child(5) strong {
  animation-delay: 160ms;
}

.release-card,
.account-row,
.signal-item,
.detail-game,
.watch-item,
.queue-item,
.detail-panel,
.game-facts div,
.game-copy section {
  transition:
    border-color var(--duration-base) ease,
    background var(--duration-base) ease,
    box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.release-card:hover,
.detail-game:hover,
.account-row.is-clickable:hover,
.signal-item.is-clickable:hover,
.watch-item:hover,
.queue-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.release-card:hover .app-icon,
.detail-game:hover .app-icon,
.account-row:hover .app-icon {
  transform: scale(1.035);
}

.release-card:hover .score {
  transform: scale(1.035);
}

.release-grid .release-card:nth-child(-n + 16),
.account-table .account-row:nth-child(-n + 16),
.signal-list .signal-item:nth-child(-n + 16),
.detail-list .detail-game:nth-child(-n + 16),
.watch-item:nth-child(-n + 8),
.queue-item:nth-child(-n + 8) {
  animation: row-enter 360ms var(--ease-out) backwards;
}

.release-grid .release-card:nth-child(2),
.account-table .account-row:nth-child(2),
.signal-list .signal-item:nth-child(2),
.detail-list .detail-game:nth-child(2) {
  animation-delay: 22ms;
}

.release-grid .release-card:nth-child(3),
.account-table .account-row:nth-child(3),
.signal-list .signal-item:nth-child(3),
.detail-list .detail-game:nth-child(3) {
  animation-delay: 44ms;
}

.release-grid .release-card:nth-child(4),
.account-table .account-row:nth-child(4),
.signal-list .signal-item:nth-child(4),
.detail-list .detail-game:nth-child(4) {
  animation-delay: 66ms;
}

.release-grid .release-card:nth-child(5),
.account-table .account-row:nth-child(5),
.signal-list .signal-item:nth-child(5),
.detail-list .detail-game:nth-child(5) {
  animation-delay: 88ms;
}

.release-grid .release-card:nth-child(n + 6):nth-child(-n + 16),
.account-table .account-row:nth-child(n + 6):nth-child(-n + 16),
.signal-list .signal-item:nth-child(n + 6):nth-child(-n + 16),
.detail-list .detail-game:nth-child(n + 6):nth-child(-n + 16) {
  animation-delay: 110ms;
}

.source-badge.direct,
.tag.direct-tag,
.store-gp {
  box-shadow: inset 0 0 0 1px rgba(21, 128, 61, 0.04);
}

.store-link:hover {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  text-decoration: none;
}

.store-ios:hover {
  box-shadow: 0 8px 18px rgba(55, 48, 163, 0.12);
}

.store-gp:hover {
  box-shadow: 0 8px 18px rgba(21, 128, 61, 0.12);
}

.detail-panel {
  animation: panel-enter 360ms var(--ease-out) both;
}

.game-facts div:hover,
.game-copy section:hover {
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.screenshot-strip {
  scroll-snap-type: x proximity;
}

.screenshot-strip img {
  scroll-snap-align: start;
  transition:
    transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out),
    border-color var(--duration-base) ease;
}

.screenshot-strip img:hover {
  transform: translateY(-2px) scale(1.018);
  border-color: #bfdbfe;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.13);
}

.map-edge {
  stroke-dasharray: 7 8;
  animation: map-flow 18s linear infinite;
}

.map-node:hover circle {
  transform: scale(1.06);
  transform-origin: center;
}

.map-node circle {
  transition:
    transform var(--duration-base) var(--ease-press),
    filter var(--duration-base) var(--ease-out);
}

.map-node:hover circle {
  filter: drop-shadow(0 10px 18px rgba(15, 98, 254, 0.2));
}

.empty-state {
  animation: panel-enter 320ms var(--ease-out) both;
}

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

  .side-panel,
  .intel-panel {
    position: static;
    max-height: none;
  }

  .side-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .tabs,
  .add-account {
    grid-column: 1 / -1;
  }

  .intel-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@keyframes view-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes row-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes number-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes map-flow {
  to {
    stroke-dashoffset: -120;
  }
}

@media (max-width: 720px) {
  .side-panel,
  .intel-panel {
    display: flex;
  }
}

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