:root {
  color-scheme: light;
  --bg: #edf4f8;
  --bg-grad-1: rgba(10, 132, 255, 0.08);
  --bg-grad-2: rgba(15, 157, 125, 0.08);
  --grid-line: rgba(17, 53, 82, 0.06);
  --sidebar-bg-1: #eef5f9;
  --sidebar-bg-2: #e7f0f6;
  --sidebar-glow: rgba(50, 215, 255, 0.08);
  --sidebar-border: rgba(17, 53, 82, 0.08);
  --panel-bg: rgba(255, 255, 255, 0.88);
  --panel-bg-strong: rgba(247, 251, 253, 0.98);
  --card-strong-bg: rgba(246, 250, 252, 0.98);
  --panel-border: #d5e2eb;
  --panel-shadow: rgba(18, 38, 55, 0.08);
  --text: #0d1b27;
  --text-strong: #071018;
  --text-muted: #5d7284;
  --text-soft: #72889b;
  --accent: #0f9d7d;
  --accent-strong: #0a84ff;
  --accent-dim: rgba(15, 157, 125, 0.08);
  --chip-bg: rgba(10, 132, 255, 0.08);
  --chip-text: #0d6d99;
  --button-bg: linear-gradient(90deg, rgba(10, 132, 255, 0.12), rgba(15, 157, 125, 0.12));
  --button-border: rgba(10, 132, 255, 0.16);
  --button-secondary-bg: rgba(10, 132, 255, 0.08);
  --button-danger-bg: rgba(255, 107, 122, 0.12);
  --danger-border: rgba(255, 107, 122, 0.2);
  --danger: #ff6b7a;
  --input-bg: rgba(255, 255, 255, 0.95);
  --input-border: #c2d5e3;
  --table-border: rgba(17, 53, 82, 0.1);
  --lang-bg: rgba(255, 255, 255, 0.85);
  --lang-border: rgba(17, 53, 82, 0.12);
  --lang-active-bg: linear-gradient(90deg, rgba(10, 132, 255, 0.12), rgba(15, 157, 125, 0.12));
  --link: #0a84ff;
  --title: #071018;
  --nav-text: #173042;
  --nav-group-text: rgba(93, 114, 132, 0.92);
  --nav-active-bg: linear-gradient(90deg, rgba(10, 132, 255, 0.1), rgba(15, 157, 125, 0.06));
  --nav-active-border: rgba(10, 132, 255, 0.16);
  --json-color: #153247;
  --hero-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 251, 0.98));
  --hero-glow-1: rgba(10, 132, 255, 0.1);
  --hero-glow-2: rgba(15, 157, 125, 0.08);
  --hero-chip-border: rgba(10, 132, 255, 0.12);
  --description-lead: #0e7b8f;
  --description-body: #233848;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071018;
  --bg-grad-1: rgba(37, 181, 213, 0.12);
  --bg-grad-2: rgba(94, 242, 194, 0.1);
  --grid-line: rgba(126, 170, 201, 0.08);
  --sidebar-bg-1: #08131d;
  --sidebar-bg-2: #0d1f2b;
  --sidebar-glow: rgba(50, 215, 255, 0.14);
  --sidebar-border: rgba(94, 242, 194, 0.12);
  --panel-bg: rgba(13, 24, 36, 0.94);
  --panel-bg-strong: rgba(9, 19, 30, 0.98);
  --card-strong-bg: rgba(10, 18, 28, 0.92);
  --panel-border: #1b3142;
  --panel-shadow: rgba(0, 0, 0, 0.34);
  --text: #e7f2fb;
  --text-strong: #f3fbff;
  --text-muted: #88a1b5;
  --text-soft: #6f8798;
  --accent: #5ef2c2;
  --accent-strong: #32d7ff;
  --accent-dim: rgba(94, 242, 194, 0.12);
  --chip-bg: rgba(50, 215, 255, 0.1);
  --chip-text: #b8fff0;
  --button-bg: linear-gradient(90deg, rgba(50, 215, 255, 0.18), rgba(94, 242, 194, 0.18));
  --button-border: rgba(50, 215, 255, 0.22);
  --button-secondary-bg: rgba(50, 215, 255, 0.12);
  --button-danger-bg: rgba(255, 107, 122, 0.16);
  --danger-border: rgba(255, 107, 122, 0.24);
  --input-bg: #0d1722;
  --input-border: #224055;
  --table-border: rgba(126, 170, 201, 0.15);
  --lang-bg: rgba(13, 24, 36, 0.9);
  --lang-border: rgba(50, 215, 255, 0.16);
  --lang-active-bg: linear-gradient(90deg, rgba(50, 215, 255, 0.18), rgba(94, 242, 194, 0.18));
  --link: #32d7ff;
  --title: #f3fbff;
  --nav-text: #dbeaf6;
  --nav-group-text: rgba(136, 161, 181, 0.92);
  --nav-active-bg: linear-gradient(90deg, rgba(50, 215, 255, 0.12), rgba(94, 242, 194, 0.08));
  --nav-active-border: rgba(50, 215, 255, 0.18);
  --json-color: #dbeaf6;
  --hero-bg: linear-gradient(135deg, rgba(13, 24, 36, 0.98), rgba(9, 19, 30, 0.98));
  --hero-glow-1: rgba(50, 215, 255, 0.14);
  --hero-glow-2: rgba(94, 242, 194, 0.12);
  --hero-chip-border: rgba(94, 242, 194, 0.12);
  --description-lead: #bfffee;
  --description-body: #dbeaf6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #071018;
    --bg-grad-1: rgba(37, 181, 213, 0.12);
    --bg-grad-2: rgba(94, 242, 194, 0.1);
    --grid-line: rgba(126, 170, 201, 0.08);
    --sidebar-bg-1: #08131d;
    --sidebar-bg-2: #0d1f2b;
    --sidebar-glow: rgba(50, 215, 255, 0.14);
    --sidebar-border: rgba(94, 242, 194, 0.12);
    --panel-bg: rgba(13, 24, 36, 0.94);
    --panel-bg-strong: rgba(9, 19, 30, 0.98);
    --card-strong-bg: rgba(10, 18, 28, 0.92);
    --panel-border: #1b3142;
    --panel-shadow: rgba(0, 0, 0, 0.34);
    --text: #e7f2fb;
    --text-strong: #f3fbff;
    --text-muted: #88a1b5;
    --text-soft: #6f8798;
    --accent: #5ef2c2;
    --accent-strong: #32d7ff;
    --accent-dim: rgba(94, 242, 194, 0.12);
    --chip-bg: rgba(50, 215, 255, 0.1);
    --chip-text: #b8fff0;
    --button-bg: linear-gradient(90deg, rgba(50, 215, 255, 0.18), rgba(94, 242, 194, 0.18));
    --button-border: rgba(50, 215, 255, 0.22);
    --button-secondary-bg: rgba(50, 215, 255, 0.12);
    --button-danger-bg: rgba(255, 107, 122, 0.16);
    --danger-border: rgba(255, 107, 122, 0.24);
    --input-bg: #0d1722;
    --input-border: #224055;
    --table-border: rgba(126, 170, 201, 0.15);
    --lang-bg: rgba(13, 24, 36, 0.9);
    --lang-border: rgba(50, 215, 255, 0.16);
    --lang-active-bg: linear-gradient(90deg, rgba(50, 215, 255, 0.18), rgba(94, 242, 194, 0.18));
    --link: #32d7ff;
    --title: #f3fbff;
    --nav-text: #dbeaf6;
    --nav-group-text: rgba(136, 161, 181, 0.92);
    --nav-active-bg: linear-gradient(90deg, rgba(50, 215, 255, 0.12), rgba(94, 242, 194, 0.08));
    --nav-active-border: rgba(50, 215, 255, 0.18);
    --json-color: #dbeaf6;
    --hero-bg: linear-gradient(135deg, rgba(13, 24, 36, 0.98), rgba(9, 19, 30, 0.98));
    --hero-glow-1: rgba(50, 215, 255, 0.14);
    --hero-glow-2: rgba(94, 242, 194, 0.12);
    --hero-chip-border: rgba(94, 242, 194, 0.12);
    --description-lead: #bfffee;
    --description-body: #dbeaf6;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  background:
    linear-gradient(0deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    radial-gradient(circle at top right, var(--bg-grad-1), transparent 28%),
    radial-gradient(circle at 12% 18%, var(--bg-grad-2), transparent 24%),
    var(--bg);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

.layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
  align-items: start;
}

.sidebar {
  background:
    linear-gradient(180deg, var(--sidebar-bg-1), var(--sidebar-bg-2)),
    radial-gradient(circle at top, var(--sidebar-glow), transparent 30%);
  color: var(--text);
  padding: 24px 20px;
  border-right: 1px solid var(--sidebar-border);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--button-border) transparent;
  z-index: 20;
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    padding 160ms ease,
    border-color 160ms ease;
}

.sidebar-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-block {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px 18px 18px;
  border-radius: 22px;
  border: 1px solid var(--panel-border);
  background:
    radial-gradient(circle at top right, var(--hero-glow-1), transparent 42%),
    linear-gradient(180deg, var(--panel-bg-strong), var(--card-strong-bg));
  box-shadow:
    0 18px 38px rgba(10, 132, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand {
  font-size: clamp(28px, 2.2vw, 34px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 22px rgba(94, 242, 194, 0.22);
  text-wrap: balance;
}

.brand-caption {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nav-group-text);
}

.sidebar-inline-toggle {
  flex: 0 0 auto;
  margin-top: 6px;
}

.sidebar-float-toggle {
  position: fixed;
  top: 28px;
  left: 20px;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.sidebar-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: rgba(7, 16, 24, 0.38);
  backdrop-filter: blur(6px);
}

.surface-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.95fr);
  gap: 20px;
  align-items: start;
  background:
    radial-gradient(circle at top right, var(--hero-glow-1), transparent 26%),
    radial-gradient(circle at left center, var(--hero-glow-2), transparent 24%),
    var(--hero-bg);
  overflow: hidden;
}

.surface-banner-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.surface-banner-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--hero-chip-border);
  background: linear-gradient(90deg, rgba(10, 132, 255, 0.08), rgba(15, 157, 125, 0.08));
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.surface-banner-summary {
  margin: 0;
  font-size: 15px;
  line-height: 1.72;
  color: var(--text);
  max-width: 68ch;
  text-wrap: balance;
}

.surface-banner-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
}

.surface-stat {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--hero-chip-border);
  background: var(--panel-bg);
}

.surface-stat-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.surface-stat-value {
  font-size: 20px;
  line-height: 1.2;
  color: var(--title);
  overflow-wrap: anywhere;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header-copy {
  min-width: 0;
}

.panel-header h2 {
  margin: 0;
}

.panel-summary,
.panel-meta {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.metric-grid {
  margin-top: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.95fr);
  gap: 20px;
  align-items: start;
}

.dashboard-main,
.dashboard-side {
  display: grid;
  gap: 20px;
}

html[data-sidebar="collapsed"] .layout {
  grid-template-columns: 0 minmax(0, 1fr);
}

html[data-sidebar="collapsed"] .sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-20px);
  padding-left: 0;
  padding-right: 0;
  border-right-color: transparent;
}

html[data-sidebar="collapsed"] .sidebar-float-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

html[data-sidebar="collapsed"] .content {
  padding-left: 92px;
}

.nav {
  display: grid;
  gap: 10px;
}

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

.nav-group + .nav-group {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(94, 242, 194, 0.1);
}

.nav-group-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nav-group-text);
  padding: 0 12px;
}

.nav a {
  color: var(--nav-text);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease;
}

.nav a:hover,
.nav a.active {
  background: var(--nav-active-bg);
  border-color: var(--nav-active-border);
  box-shadow: inset 0 0 0 1px rgba(94, 242, 194, 0.06);
}

.nav a:hover {
  transform: translateX(3px);
  box-shadow:
    inset 0 0 0 1px rgba(94, 242, 194, 0.06),
    0 10px 22px rgba(10, 132, 255, 0.08);
}

.content {
  padding: 28px;
  min-width: 0;
  width: 100%;
  overflow: visible;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 28px;
  gap: 18px;
}

.page-header-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 0.94;
  letter-spacing: -0.06em;
  color: var(--title);
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.meta,
.subtle {
  color: var(--text-muted);
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  min-width: 0;
  padding-bottom: 2px;
}

.header-actions::-webkit-scrollbar {
  display: none;
}

.header-actions > * {
  flex: 0 0 auto;
}

.header-control,
.topbar-button {
  min-height: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--button-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(10, 132, 255, 0.06)),
    var(--button-secondary-bg);
  box-shadow:
    0 14px 28px rgba(10, 132, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.icon-control,
.topbar-button {
  width: 46px;
  min-width: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.topbar-icon-svg {
  display: block;
  width: 18px;
  height: 18px;
}

.theme-toggle-icon,
.lang-toggle-icon,
.refresh-button-icon,
.sidebar-toggle-icon,
.button-back-icon {
  width: 18px;
  height: 18px;
}

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

.card,
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 16px 38px var(--panel-shadow);
  backdrop-filter: blur(10px);
}

.panel {
  margin-bottom: 20px;
}

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

.card-title,
.panel h2 {
  margin: 0 0 10px 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.metric {
  font-size: 42px;
  font-weight: 700;
  color: var(--title);
}

.metric.small {
  font-size: 20px;
}

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

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table th,
.table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--table-border);
  vertical-align: top;
  text-align: left;
}

.table th {
  font-size: 13px;
  color: var(--text-soft);
}

.table a {
  color: var(--link);
  text-decoration: none;
}

.table form {
  margin: 0;
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.timeline-filters {
  display: grid;
  gap: 16px;
  align-items: start;
}

.timeline-picker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.95fr);
  gap: 16px;
  align-items: start;
}

.panel-subtle {
  background: var(--panel-bg-strong);
  border-style: dashed;
}

.timeline-picker-form {
  position: relative;
}

.timeline-picker-main {
  position: relative;
  display: grid;
  gap: 8px;
}

.timeline-picker-helper {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.timeline-picker-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel-bg);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 10px;
}

.timeline-picker-results-label,
.timeline-picker-target-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-picker-results-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.timeline-suggestion-item {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--button-secondary-bg);
  color: var(--text);
  text-align: left;
  display: grid;
  gap: 4px;
  cursor: pointer;
}

.timeline-suggestion-item:hover,
.timeline-suggestion-item:focus-visible {
  border-color: var(--button-border);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 12%, transparent);
  outline: none;
}

.timeline-suggestion-name,
.timeline-target-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.timeline-suggestion-meta,
.timeline-target-meta,
.timeline-suggestion-empty {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.timeline-picker-target {
  min-height: 100%;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
}

.timeline-picker-target-card {
  min-height: 74px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  display: grid;
  align-content: center;
  gap: 4px;
}

.timeline-clear-button {
  width: 100%;
}

.timeline-picker-actions {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.timeline-picker-actions > label {
  width: 160px;
}

.timeline-filter-actions {
  display: flex;
  align-items: end;
}

.timeline-submit-button {
  min-width: 132px;
  min-height: 46px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

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

.pagination-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.timeline-app-summary {
  display: grid;
  gap: 14px;
}

.timeline-app-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.timeline-app-summary-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.app-jump-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.comment-content-cell {
  min-width: 320px;
  max-width: 420px;
}

.comments-table {
  min-width: 1320px;
}

.comments-table th {
  white-space: nowrap;
}

.comments-table .comments-col-platform {
  width: 92px;
}

.comments-table .comments-col-app {
  width: 320px;
}

.comments-table .comments-col-studio {
  width: 190px;
}

.comments-table .comments-col-package {
  width: 240px;
}

.comments-table .comments-col-user {
  width: 140px;
}

.comments-table .comments-col-rating {
  width: 72px;
}

.comments-table .comments-col-version {
  width: 96px;
}

.comments-table .comments-col-time {
  width: 170px;
}

.comments-table .comments-col-content {
  width: 380px;
}

.comments-nowrap {
  white-space: nowrap;
}

.comments-break {
  word-break: break-word;
}

.comment-content-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--text);
}

.desktop-table-only {
  display: block;
}

.mobile-kv-list {
  display: none;
}

.mobile-kv-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel-bg-strong);
}

.mobile-kv-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.mobile-kv-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.mobile-kv-subtitle {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.mobile-kv-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-kv-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 20%, transparent);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.mobile-kv-item {
  display: grid;
  gap: 4px;
}

.mobile-kv-label {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mobile-kv-value {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

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

.app-cell-copy {
  min-width: 0;
}

.button-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.filters label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 0;
}

.filters input,
.filters select,
.studio-form textarea,
.filters button,
.studio-form input,
.studio-form select,
.studio-form button {
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.studio-form textarea {
  resize: vertical;
  min-height: 120px;
  font: inherit;
}

.filters button,
.studio-form button,
.button-secondary,
.button-danger {
  cursor: pointer;
  background: var(--button-bg);
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--button-border);
}

.json-block {
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--panel-bg-strong);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  font-size: 13px;
  color: var(--json-color);
}

.details-block {
  margin-bottom: 12px;
}

.details-block summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}

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

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

.checkbox-field {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding-top: 28px;
}

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

.button-secondary {
  background: var(--button-secondary-bg);
  color: var(--text);
  border-radius: 12px;
  padding: 9px 12px;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.button-secondary:hover,
.button-danger:hover,
.inline-preview-details summary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(10, 132, 255, 0.12);
}

.button-danger {
  background: var(--button-danger-bg);
  border-color: var(--danger-border);
}

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

.app-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(94, 242, 194, 0.08);
}

.app-icon-large {
  width: 78px;
  height: 78px;
  border-radius: 18px;
}

.image-thumb-button {
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-icon-button {
  border-radius: 20px;
}

.item-title {
  font-weight: 700;
  color: var(--title);
}

.app-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 20px;
  align-items: start;
  background:
    radial-gradient(circle at top right, var(--hero-glow-1), transparent 38%),
    var(--hero-bg);
  padding: 16px 18px;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, var(--hero-glow-2), transparent 22%),
    radial-gradient(circle at 88% 18%, var(--hero-glow-1), transparent 20%);
  pointer-events: none;
}

.app-hero-main {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.app-hero-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.app-hero-title {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.app-id {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.hero-actions {
  position: relative;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: center;
}

.hero-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--hero-chip-border);
}

.hero-action-button {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.app-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.app-stat-card {
  padding: 14px 16px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, var(--panel-bg-strong), rgba(255, 255, 255, 0.03));
}

.app-stat-link {
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 6px;
  align-content: start;
}

.app-stat-link-hint {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.app-stat-card .card-title {
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.app-stat-card .metric.small {
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.25;
}

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

.detail-section-head {
  margin-bottom: 14px;
}

.detail-section-head h2 {
  margin-bottom: 0;
}

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

.section-action-button {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
}

.detail-info-grid {
  gap: 10px 12px;
}

.compact-grid {
  margin-top: 10px;
}

.info-grid > div {
  background: var(--card-strong-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px;
  min-width: 0;
}

.detail-info-grid > div {
  padding: 10px 12px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, var(--panel-bg-strong), rgba(255, 255, 255, 0.03));
}

.info-label {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.info-value {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.description-block {
  margin-bottom: 16px;
}

.description-lead {
  font-size: 16px;
  line-height: 1.62;
  color: var(--description-lead);
  margin-bottom: 14px;
}

.description-body {
  white-space: pre-wrap;
  color: var(--description-body);
  line-height: 1.66;
  font-size: 14px;
}

.description-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}

.description-body-expanded {
  margin-top: 12px;
}

.inline-preview-details {
  margin-top: 14px;
}

.screenshots-expand summary {
  margin-bottom: 0;
}

.inline-preview-details summary {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--nav-active-border);
  background: var(--nav-active-bg);
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.inline-preview-details summary::-webkit-details-marker {
  display: none;
}

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

.screenshot-actions {
  margin-top: 14px;
}

.screenshot-card.is-hidden {
  display: none;
}

.screenshot-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 0;
  border: 0;
  background: transparent;
  width: 100%;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

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

.screenshot {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: var(--card-strong-bg);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.screenshot-meta {
  display: grid;
  gap: 4px;
  padding: 8px 4px 0;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 12px;
  background: var(--card-strong-bg);
  border: 1px solid var(--panel-border);
}

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

.change-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  background: var(--chip-bg);
  color: var(--chip-text);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--hero-chip-border);
}

.change-table td {
  word-break: break-word;
}

.change-media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.change-media-stack {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.change-media-button {
  width: fit-content;
  max-width: 100%;
  border-radius: 10px;
}

.change-media-button.is-hidden {
  display: none;
}

.change-media-thumb {
  display: block;
  width: auto;
  height: auto;
  max-width: 132px;
  max-height: 112px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg-strong);
}

.change-media-actions {
  display: flex;
  justify-content: flex-start;
}

.detail-change-table th,
.detail-change-table td,
.detail-comments-table th,
.detail-comments-table td {
  padding: 9px 8px;
  font-size: 13px;
}

.detail-change-table th,
.detail-comments-table th {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.detail-comments-table {
  min-width: 720px;
}

.detail-comments-table th:nth-child(1),
.detail-comments-table td:nth-child(1) {
  width: 120px;
}

.detail-comments-table th:nth-child(2),
.detail-comments-table td:nth-child(2) {
  width: 72px;
}

.detail-comments-table th:nth-child(3),
.detail-comments-table td:nth-child(3) {
  width: 96px;
}

.detail-comments-table th:nth-child(4),
.detail-comments-table td:nth-child(4) {
  width: 170px;
}

.comment-body-cell {
  min-width: 280px;
  max-width: 560px;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  line-height: 1.58;
}

.nested-details {
  margin-top: 10px;
}

.snapshot-timeline-item {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.snapshot-timeline-rail {
  display: grid;
  justify-items: center;
  align-content: start;
}

.iteration-timeline-rail {
  justify-items: center;
}

.iteration-time-marker {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: 100%;
}

.snapshot-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  box-shadow: 0 0 0 4px var(--chip-bg);
}

.iteration-time-label {
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--accent-strong);
  text-align: center;
  max-width: 118px;
}

.snapshot-timeline-line {
  width: 2px;
  min-height: 100%;
  margin-top: 6px;
  background: linear-gradient(180deg, var(--accent-strong), transparent);
  opacity: 0.45;
}

.snapshot-timeline-card {
  background: var(--card-strong-bg);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px;
}

.iteration-card {
  display: grid;
  gap: 14px;
}

.snapshot-timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.iteration-header {
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}

.iteration-header-main {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.iteration-version-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--hero-chip-border);
  background: var(--chip-bg);
  color: var(--chip-text);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 13px;
}

.iteration-summary-inline {
  flex: 1;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.iteration-summary-title {
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.snapshot-change-list {
  display: grid;
  gap: 12px;
}

.snapshot-change-card {
  border: 1px solid var(--table-border);
  background: var(--panel-bg);
  border-radius: 12px;
  padding: 12px;
}

.snapshot-change-title {
  font-weight: 700;
  color: var(--title);
  margin-bottom: 10px;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.iteration-section-card {
  height: 100%;
}

.iteration-test-card {
  display: grid;
  gap: 10px;
}

.iteration-test-preview-label {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.iteration-test-details {
  margin-top: 2px;
}

.iteration-test-details summary {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--nav-active-border);
  background: var(--nav-active-bg);
  color: var(--accent-strong);
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(10, 132, 255, 0.08);
}

.iteration-test-details .plain-list {
  margin-top: 12px;
}

.iteration-card .snapshot-change-title {
  font-size: 15px;
  color: var(--title);
  font-weight: 800;
  margin-bottom: 8px;
}

.iteration-card .description-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
}

.iteration-card .subtle {
  font-size: 12px;
  color: var(--text-soft);
}

.iteration-card .snapshot-change-card {
  padding: 11px 12px;
}

.milestone-card .iteration-header-main {
  min-width: 0;
}

.milestone-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.milestone-metric {
  padding: 12px 14px;
}

.milestone-notes {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.snapshot-value-compare,
.snapshot-media-compare {
  display: grid;
  gap: 12px;
  align-items: start;
}

.snapshot-value-compare {
  grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr);
}

.snapshot-media-compare {
  grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr);
}

.snapshot-value-column {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 6px;
  min-width: 0;
}

.snapshot-value-before {
  justify-items: end;
}

.snapshot-value-after {
  justify-items: start;
}

.snapshot-value-before .info-label {
  text-align: right;
}

.snapshot-media-before > .subtle {
  text-align: right;
  justify-self: end;
}

.snapshot-media-after > .subtle {
  justify-self: start;
}

.snapshot-compare-arrow {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding-top: 22px;
}

.snapshot-compare-arrow-line {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--accent-2) 30%, transparent) 12%, color-mix(in srgb, var(--accent-2) 64%, transparent) 50%, color-mix(in srgb, var(--accent-2) 30%, transparent) 88%, transparent 100%);
}

.snapshot-compare-arrow-glyph {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 28%, transparent);
  color: var(--accent-strong);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(10, 132, 255, 0.08);
}

.snapshot-value-box {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 0;
  max-width: min(100%, 36ch);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--table-border);
  background: var(--panel-bg-strong);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.snapshot-value-box.is-before {
  background: color-mix(in srgb, var(--panel-bg-strong) 86%, transparent);
}

.snapshot-value-box.is-after {
  border-color: color-mix(in srgb, var(--accent-2) 34%, var(--table-border));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 10%, var(--panel-bg-strong)), var(--panel-bg));
  color: var(--text-strong);
  box-shadow: 0 12px 28px rgba(10, 132, 255, 0.08);
}

.snapshot-value-box.compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  max-width: min(100%, 28ch);
  padding: 8px 14px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, var(--panel-bg-strong), rgba(255, 255, 255, 0.04));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: clamp(16px, 1.4vw, 22px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-strong);
  white-space: normal;
}

.snapshot-value-box.is-url {
  max-width: min(100%, 42ch);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.snapshot-value-box.compact.is-url {
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.snapshot-text-preview {
  white-space: pre-wrap;
  color: var(--text);
  line-height: 1.68;
}

.snapshot-inline-details {
  margin-top: 12px;
}

.snapshot-inline-details summary {
  margin-bottom: 0;
}

.snapshot-media-group {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  justify-items: stretch;
}

.snapshot-media-group > .subtle {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
}

.snapshot-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 112px));
  gap: 8px;
  justify-content: start;
  align-items: start;
  width: 100%;
}

.snapshot-media-grid.compact-media-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.snapshot-media-after .snapshot-media-grid,
.snapshot-media-after .snapshot-media-grid.compact-media-grid {
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 32%, var(--table-border));
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-2) 10%, var(--panel-bg-strong)), var(--panel-bg));
  box-shadow: 0 12px 28px rgba(10, 132, 255, 0.08);
}

.snapshot-media-thumb {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 112px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg-strong);
  display: block;
}

.snapshot-media-thumb.compact-media-thumb {
  max-width: min(180px, 100%);
  max-height: 132px;
}

.snapshot-media-button {
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  border-radius: 10px;
  background: transparent;
}

.snapshot-media-button.is-hidden {
  display: none;
}

.snapshot-media-button.compact-media-button {
  align-self: start;
}

.snapshot-media-actions {
  margin-top: 4px;
  width: 100%;
}

.snapshot-media-before .snapshot-media-actions {
  display: flex;
  justify-content: flex-end;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 16, 24, 0.84);
  backdrop-filter: blur(8px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 1280px);
  height: min(88vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  background: rgba(255, 255, 255, 0.03);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid var(--button-border);
  border-radius: 14px;
  background: var(--button-secondary-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(180px, 196px) minmax(0, 1fr) minmax(260px, 296px);
  gap: 16px;
  margin-bottom: 20px;
  align-items: start;
}

.detail-rail,
.detail-main,
.detail-side {
  display: grid;
  gap: 20px;
  align-content: start;
  min-width: 0;
}

.detail-rail {
  position: sticky;
  top: 110px;
  align-self: start;
  height: max-content;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--button-border) transparent;
}

.detail-side {
  position: sticky;
  top: 110px;
  align-self: start;
  width: 100%;
  max-width: 296px;
  justify-self: end;
}

.detail-nav-panel {
  background:
    linear-gradient(180deg, var(--panel-bg-strong), var(--card-strong-bg));
  width: 100%;
  min-width: 0;
}

.detail-anchor-nav {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.detail-anchor-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.detail-anchor-link::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.08);
  flex: 0 0 auto;
}

.detail-anchor-link:hover,
.detail-anchor-link:focus-visible,
.detail-anchor-link.is-active,
.detail-anchor-link[aria-current="true"] {
  transform: translateX(2px);
  background: var(--nav-active-bg);
  border-color: var(--nav-active-border);
  box-shadow: 0 14px 26px rgba(10, 132, 255, 0.1);
}

.detail-anchor-link.is-active::before,
.detail-anchor-link[aria-current="true"]::before {
  box-shadow:
    0 0 0 4px rgba(10, 132, 255, 0.08),
    0 0 18px rgba(10, 132, 255, 0.28);
}

.detail-anchor-link.is-active {
  color: var(--title);
}

.detail-anchor-link.is-active::after,
.detail-anchor-link[aria-current="true"]::after {
  content: "";
  margin-left: auto;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
}

.detail-module {
  scroll-margin-top: 104px;
}

.panel-emphasis {
  background:
    linear-gradient(180deg, var(--panel-bg-strong), var(--card-strong-bg));
  border-color: var(--button-border);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.detail-main > .panel:first-child {
  box-shadow:
    0 18px 40px rgba(10, 132, 255, 0.12),
    0 0 0 1px rgba(10, 132, 255, 0.05);
}

@media (max-width: 1680px) {
  .detail-layout {
    grid-template-columns: minmax(180px, 196px) minmax(0, 1fr);
  }

  .detail-side {
    grid-column: 2;
    position: static;
    top: auto;
    max-width: none;
    justify-self: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 1180px) {
  .surface-banner,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .detail-rail,
  .detail-side {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .detail-nav-panel {
    position: static;
  }

  .detail-rail,
  .detail-main,
  .detail-side {
    width: 100%;
    min-width: 0;
  }

  .detail-side {
    grid-column: auto;
    justify-self: stretch;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

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

  html[data-sidebar="collapsed"] .layout,
  html[data-sidebar="expanded"] .layout {
    grid-template-columns: 1fr;
  }

  .sidebar-float-toggle {
    top: 18px;
    left: 16px;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(84vw, 320px);
    max-height: 100vh;
    padding: 22px 18px 20px;
    transform: translateX(-104%);
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 35;
  }

  .sidebar-inline-toggle {
    display: none;
  }

  .content {
    padding: 16px;
  }

  html[data-sidebar="collapsed"] .content,
  html[data-sidebar="expanded"] .content {
    padding-left: 16px;
    width: 100%;
    min-width: 0;
    grid-column: 1;
  }

  html[data-sidebar="collapsed"] .sidebar {
    transform: translateX(-104%);
    opacity: 0;
    pointer-events: none;
    border-right-color: transparent;
  }

  html[data-sidebar="expanded"] .sidebar {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .page-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding-bottom: 60px;
    margin-bottom: 20px;
  }

  .page-header-main {
    flex-wrap: nowrap;
    align-items: flex-start;
    padding-left: 56px;
    min-height: 48px;
  }

  .header-actions {
    position: relative;
    width: auto;
    display: flex;
    justify-content: end;
    justify-items: end;
    align-items: center;
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  body.sidebar-mobile-open .button-back {
    opacity: 0;
    pointer-events: none;
  }

  .surface-banner-stats,
  .milestone-metrics-grid,
  .card-grid,
  .app-summary-grid,
  .info-grid,
  .studio-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .timeline-filters {
    grid-template-columns: 1fr;
  }

  .timeline-picker-layout {
    grid-template-columns: 1fr;
  }

  .timeline-picker-actions {
    justify-content: stretch;
  }

  .timeline-picker-actions > label {
    width: 100%;
  }

  .timeline-filter-actions {
    align-items: stretch;
  }

  .timeline-submit-button {
    width: 100%;
  }

  .timeline-app-summary-row {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline-app-summary-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .timeline-app-summary-actions .button-secondary,
  .app-jump-actions .button-secondary {
    flex: 1 1 160px;
  }

  .filters > *:last-child,
  .filters > button:last-child {
    grid-column: 1 / -1;
  }

  .pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-actions {
    justify-content: space-between;
  }

  .app-hero {
    flex-direction: column;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .app-hero-main {
    align-items: start;
  }

  .hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-actions .button-secondary,
  .hero-actions .hero-action-button {
    flex: 1 1 180px;
  }

  .snapshot-value-compare,
  .iteration-section-grid {
    grid-template-columns: 1fr;
  }

  .snapshot-media-compare {
    grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
  }

  .snapshot-timeline-item {
    grid-template-columns: 1fr;
  }

  .iteration-timeline-rail {
    justify-items: center;
  }

  .iteration-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 14px;
  }

  .page-header h1 {
    font-size: clamp(22px, 9vw, 34px);
    letter-spacing: -0.04em;
  }

  .surface-banner-stats,
  .milestone-metrics-grid,
  .card-grid,
  .app-summary-grid,
  .info-grid,
  .studio-form,
  .iteration-section-grid {
    grid-template-columns: 1fr;
  }

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

  .filters > *:last-child,
  .filters > button:last-child {
    grid-column: auto;
  }

  .surface-banner {
    gap: 14px;
  }

  .surface-banner-copy {
    gap: 8px;
  }

  .surface-banner-summary {
    font-size: 14px;
    line-height: 1.58;
  }

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

  .surface-stat {
    padding: 12px;
    border-radius: 16px;
  }

  .surface-stat-label {
    font-size: 11px;
  }

  .surface-stat-value {
    font-size: 18px;
  }

  .metric-grid {
    display: none;
  }

  .header-actions {
    gap: 10px;
  }

  .button-secondary,
  .button-danger,
  .hero-action-button {
    width: 100%;
  }

  .header-actions .topbar-button {
    width: 46px;
    min-width: 46px;
  }

  .panel-header {
    margin-bottom: 14px;
  }

  .panel-summary {
    display: none;
  }

  .app-hero-main {
    flex-direction: column;
  }

  .app-cell {
    align-items: flex-start;
  }

  .timeline-app-summary-row,
  .timeline-app-summary-actions {
    align-items: stretch;
  }

  .timeline-app-summary-actions,
  .app-jump-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .actions-cell {
    flex-wrap: wrap;
  }

  .detail-side {
    order: 4;
  }

  .detail-comments-table,
  .comments-table {
    min-width: 0;
  }

  .comment-content-cell,
  .comment-body-cell {
    min-width: 0;
    max-width: none;
    width: auto;
  }

  .table-stack-mobile {
    min-width: 0 !important;
  }

  .app-jump-actions .button-secondary,
  .timeline-app-summary-actions .button-secondary {
    width: 100%;
  }

  .table-stack-mobile thead {
    display: none;
  }

  .table-stack-mobile,
  .table-stack-mobile tbody,
  .table-stack-mobile tr,
  .table-stack-mobile td {
    display: block;
    width: 100%;
  }

  .table-stack-mobile tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--table-border);
  }

  .table-stack-mobile td {
    padding: 6px 0;
    border-bottom: 0;
  }

  .table-stack-mobile td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .desktop-table-only {
    display: none;
  }

  .mobile-kv-list {
    display: grid;
    gap: 12px;
  }

  .timeline-picker-results {
    position: static;
    margin-top: 8px;
  }

  .timeline-picker-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .timeline-picker-target,
  .timeline-filter-actions {
    width: 100%;
  }

  .mobile-kv-actions .button-secondary,
  .mobile-kv-actions .button-danger,
  .mobile-kv-actions form,
  .mobile-kv-actions button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .page-header {
    margin-bottom: 18px;
    gap: 12px;
  }

  .page-header-main {
    gap: 12px;
    padding-left: 52px;
    min-height: 44px;
  }

  .icon-control {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .surface-banner,
  .panel,
  .card {
    padding: 14px;
    border-radius: 14px;
  }

  .surface-banner-label {
    min-height: 24px;
    padding: 0 8px;
    font-size: 10px;
  }

  .app-hero {
    gap: 14px;
    padding: 14px;
  }

  .app-icon-large {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .app-hero-title {
    font-size: clamp(20px, 7vw, 28px);
  }

  .app-id,
  .subtle,
  .panel-summary,
  .panel-meta {
    font-size: 12px;
  }

  .hero-meta {
    gap: 8px;
  }

  .hero-chip {
    padding: 4px 9px;
    font-size: 10px;
  }

  .app-summary-grid {
    gap: 10px;
  }

  .app-stat-card {
    padding: 12px 13px;
  }

  .app-stat-card .metric.small {
    font-size: 18px;
  }

  .header-actions {
    gap: 8px;
  }

  .topbar-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 12px;
  }

  .detail-anchor-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
    width: 100%;
  }

  .detail-anchor-nav::-webkit-scrollbar {
    display: none;
  }

  .detail-anchor-link {
    min-height: 38px;
    padding: 9px 11px;
    border-radius: 14px;
    white-space: normal;
    line-height: 1.35;
  }

  .detail-anchor-link::after,
  .detail-anchor-link.is-active::after,
  .detail-anchor-link[aria-current="true"]::after {
    display: none;
  }

  .detail-anchor-link.is-active,
  .detail-anchor-link[aria-current="true"] {
    transform: none;
  }

  .detail-module {
    scroll-margin-top: 92px;
  }

  .section-head,
  .panel-header,
  .snapshot-timeline-header,
  .change-card-header {
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-info-grid > div,
  .info-grid > div {
    padding: 10px 11px;
  }

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

  .screenshot {
    max-height: 220px;
    border-radius: 12px;
  }

  .snapshot-timeline-item {
    gap: 10px;
  }

  .snapshot-timeline-rail {
    justify-items: flex-start;
  }

  .snapshot-timeline-card {
    padding: 12px;
  }

  .snapshot-change-card {
    padding: 10px;
  }

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

  .snapshot-media-thumb,
  .snapshot-media-thumb.compact-media-thumb {
    max-width: 100%;
    width: 100%;
    max-height: 120px;
  }

  .change-media-thumb {
    max-width: 100px;
    max-height: 84px;
  }

  .detail-comments-table.table-stack-mobile tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(3, max-content);
    gap: 8px 10px;
    align-items: center;
  }

  .detail-comments-table.table-stack-mobile td {
    display: inline-flex;
    width: auto;
    padding: 0;
    align-items: center;
    gap: 6px;
    border-bottom: 0;
  }

  .detail-comments-table.table-stack-mobile td::before {
    display: inline;
    margin-bottom: 0;
  }

  .detail-comments-table.table-stack-mobile td:nth-child(-n + 4) {
    white-space: nowrap;
  }

  .detail-comments-table.table-stack-mobile td:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .detail-comments-table.table-stack-mobile td:last-child {
    display: block;
    width: 100%;
    grid-column: 1 / -1;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--table-border);
  }

  .detail-comments-table.table-stack-mobile td:last-child::before {
    display: block;
    margin-bottom: 4px;
  }

  .mobile-kv-grid {
    grid-template-columns: 1fr;
  }

  .timeline-picker-target-card {
    min-height: 0;
  }

  .lightbox-dialog {
    width: 100vw;
    height: 100vh;
    padding: 18px 12px 12px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 24px;
  }
}

@media (max-width: 420px) {
  .content {
    padding: 82px 12px 12px;
  }

  .page-header-main {
    gap: 10px;
    padding-left: 48px;
  }

  .page-header h1 {
    font-size: clamp(24px, 9vw, 34px);
  }

  .header-actions {
    gap: 8px;
  }

  .theme-toggle,
  .hero-action-button,
  .button-secondary,
  .button-danger {
    font-size: 12px;
  }

  .detail-anchor-nav {
    grid-template-columns: 1fr;
  }

  .app-hero {
    padding: 12px;
  }

  .app-hero-main {
    gap: 12px;
  }

  .app-icon-large {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

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

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

  .screenshot {
    max-height: 200px;
  }

  .snapshot-value-box.compact {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    white-space: normal;
  }

  .snapshot-value-compare.compact-compare {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .snapshot-value-compare {
    grid-template-columns: 1fr;
  }

  .snapshot-media-compare {
    grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
    gap: 8px;
  }

  .snapshot-compare-arrow {
    padding-top: 0;
    grid-row: auto;
  }

  .snapshot-value-compare.compact-compare .snapshot-compare-arrow {
    justify-self: start;
  }

  .snapshot-media-compare .snapshot-compare-arrow {
    justify-self: center;
    min-height: 100%;
  }
}
