:root {
  --bg: #efece4;
  --gutter: #c5bfb3;
  --panel: #f7f5ef;
  --ink: #1c1917;
  --muted: #6f685e;
  --line: #d8d2c6;
  --pain: #9f1239;
  --pain-soft: #fde8ee;
  --need: #1d4ed8;
  --need-soft: #e8eefc;
  --praise: #b45309;
  --praise-soft: #fff7ed;
  --info: #6d28d9;
  --info-soft: #ede9fe;
  --ok: #166534;
  --warn: #9a3412;
  --card: #ffffff;
  --shadow: 0 0 0 1px var(--line);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--gutter); }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 14px/1.5 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  max-width: 1280px;
  width: calc(100% - 48px);
  margin-inline: auto;
  box-shadow: 0 0 0 1px var(--line);
}
body.home {
  isolation: isolate;
}
body.home::before,
body.home::after {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}
body.home::before {
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0 47px,
      rgb(28 25 23 / 0.055) 47px 48px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 47px,
      rgb(28 25 23 / 0.055) 47px 48px
    );
  background-size: 48px 48px;
  opacity: 0.55;
  animation: home-grid-drift 56s ease-in-out infinite alternate;
}
body.home::after {
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0 95px,
      rgb(28 25 23 / 0.035) 95px 96px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 95px,
      rgb(28 25 23 / 0.035) 95px 96px
    );
  background-size: 96px 96px;
  opacity: 0.7;
  animation: home-grid-float 72s ease-in-out infinite alternate-reverse;
}
body.home > * {
  position: relative;
  z-index: 1;
}
body.home > .site-header {
  z-index: 40;
}
@keyframes home-grid-drift {
  0% { transform: translate3d(-2.5%, -1.5%, 0); }
  50% { transform: translate3d(2%, 1.8%, 0); }
  100% { transform: translate3d(1.2%, -2.2%, 0); }
}
@keyframes home-grid-float {
  0% { transform: translate3d(1.8%, 2%, 0); }
  50% { transform: translate3d(-2.2%, -1.2%, 0); }
  100% { transform: translate3d(-1%, 1.6%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  body.home::before,
  body.home::after {
    animation: none;
  }
}
body.workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
body.workspace.sidebar-collapsed {
  grid-template-columns: 72px 1fr;
}

.site-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 8;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}
.header-brand small { display: block; color: var(--muted); font-size: 11px; }
.header-brand strong { display: block; font-size: 15px; line-height: 1.2; }
.header-nav { display: flex; gap: 6px; flex: 1; min-width: 0; }
.header-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
}
.header-nav a:hover { color: var(--ink); background: var(--card); }
.header-nav a.current { color: var(--ink); background: var(--card); box-shadow: var(--shadow); font-weight: 650; }
.header-user { display: flex; align-items: center; gap: 10px; margin-left: auto; position: relative; z-index: 9; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active {
  color: var(--ink);
  background: var(--panel);
  font-weight: 650;
  box-shadow: var(--shadow);
}
.workspace-pill {
  font-size: 11px;
  color: var(--need);
  background: var(--need-soft);
  border-radius: 999px;
  padding: 4px 8px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #faf7f0;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 650;
}
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.user-meta b { font-size: 12px; }
.user-menu { position: relative; flex-shrink: 0; }
.user-caret {
  display: grid;
  place-items: center;
  color: var(--muted);
  margin-left: 2px;
}
.user-caret svg { display: block; transition: transform 0.15s ease; }
.user-menu.is-open .user-caret svg { transform: rotate(180deg); }
.user-chip.is-signed-in { padding-right: 8px; }
.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(280px, calc(100vw - 40px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgb(28 25 23 / 0.12), var(--shadow);
  padding: 12px;
  z-index: 30;
  text-align: left;
}
.user-dropdown-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.user-dropdown-dl {
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-dropdown-dl div {
  display: grid;
  gap: 2px;
}
.user-dropdown-dl dt {
  font-size: 11px;
  color: var(--muted);
}
.user-dropdown-dl dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  word-break: break-all;
}
.user-dropdown-ledger,
.user-dropdown-workspace,
.user-dropdown-logout {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  margin: 0 0 8px;
}
.user-dropdown-logout { margin-bottom: 0; }
#studio-dialog.studio-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-shadow: 0 24px 64px rgb(28 25 23 / 0.18);
}
#studio-dialog::backdrop { background: rgb(28 25 23 / 0.45); }
.studio-dialog-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 22px 20px;
}
.studio-profile-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 12px;
}
.studio-profile-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.studio-profile-grid input,
.studio-profile-grid textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
}
.studio-span-2 { grid-column: 1 / -1; }
.studio-icon-field {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.studio-icon-picker {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}
.studio-icon-preview-wrap {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}
.studio-icon-preview-wrap:hover { border-color: var(--ink); }
.studio-icon-edit-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.studio-icon-edit-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}
.studio-icon-edit-panel input {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
}
.studio-icon-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.studio-icon-placeholder {
  color: var(--muted);
  font-size: 28px;
  font-weight: 650;
  line-height: 1;
}
.studio-section { display: flex; flex-direction: column; gap: 8px; }
.studio-section-head { align-items: center; margin: 0; }
.studio-section h3 { margin: 0; font-size: 14px; }
.studio-product-add { display: flex; gap: 6px; min-width: 0; }
.studio-product-add input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
}
.studio-product-list,
.studio-series-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.studio-empty {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
}
.studio-product-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
.studio-product-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: #e7e5e4;
  flex-shrink: 0;
}
.studio-product-icon.placeholder {
  display: grid;
  place-items: center;
  font-weight: 650;
  color: #57534e;
}
.studio-product-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.studio-product-meta b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.studio-product-meta small { color: var(--muted); font-size: 12px; }
.studio-product-type {
  display: inline-block;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
.studio-product-type.competitor {
  border-color: #f0c4cf;
  color: var(--pain);
  background: #fff7f9;
}
.studio-series-item {
  display: grid;
  grid-template-columns: auto 1fr 1.2fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}
.studio-series-hide {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.studio-series-name,
.studio-series-appids {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  font: inherit;
  min-width: 0;
}
.workspace-studio {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 10px 36px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.workspace-studio-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.workspace-studio-body:hover .workspace-studio-icon-wrap {
  border-color: var(--ink);
}
.sidebar-studio-divider {
  display: block;
  width: 100%;
  height: 0;
  margin: 2px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.sidebar-studio-divider[hidden] {
  display: none !important;
}
.workspace-studio.studio-drop-ready {
  outline: 1px dashed var(--line);
  outline-offset: 2px;
}
.workspace-studio.drop-target {
  outline-color: var(--ink);
  background: #faf7f0;
}
.product-item[draggable="true"] { cursor: grab; }
.product-item.is-dragging { opacity: 0.55; }
.product-item[draggable="true"] .item-acts { cursor: default; }
.workspace-studio-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.workspace-studio-meta {
  flex: 1;
  min-width: 0;
}
.workspace-studio-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #e7e5e4;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}
.workspace-studio-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.workspace-studio-icon-ph {
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
}
.studio-config-icon-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  font: inherit;
}
.studio-config-icon-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.studio-scope-empty {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.studio-scope-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: #e7e5e4;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.studio-scope-empty-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.studio-scope-empty-icon span {
  color: var(--muted);
  font-size: 28px;
  font-weight: 650;
}
.studio-scope-bio { margin: 0; }
.studio-scope-steam { margin: 0; font-size: 14px; }
.studio-catalog-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.studio-catalog-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
}
.studio-catalog-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e7e5e4;
}
.studio-catalog-icon.placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}
.studio-catalog-item b { display: block; font-size: 14px; }
.studio-catalog-item small { color: var(--muted); font-size: 12px; }
.product-item .item-pick small {
  display: block;
}
.workspace-studio-head strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
}
.workspace-studio-bio {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.workspace-scope {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.workspace-scope .chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.workspace-scope .chip:hover:not(.active) {
  border-color: #a8a29e;
  color: var(--ink);
}
.workspace-scope .chip.active {
  border-color: var(--ink);
  color: #faf7f0;
  background: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 4px rgb(28 25 23 / 0.2);
}
body.workspace-guest .workspace-studio,
body.workspace-guest .sidebar-studio-divider,
body.workspace-guest .workspace-scope {
  display: none;
}
body.workspace.workspace-guest {
  grid-template-columns: 1fr;
}
body.workspace.workspace-guest .sidebar {
  display: none;
}
body.workspace.workspace-guest .main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
body.workspace.workspace-guest .empty {
  margin: 0 auto;
  max-width: 28rem;
}
body.workspace.workspace-guest #charts-empty {
  margin: 0 auto;
  max-width: 28rem;
  text-align: center;
}
#credit-ledger-dialog.credit-ledger-dialog {
  width: min(640px, calc(100% - 32px));
  box-shadow: 0 24px 64px rgb(28 25 23 / 0.18);
}
#credit-ledger-dialog::backdrop { background: rgb(28 25 23 / 0.45); }
#credit-ledger-dialog .dialog-body { padding: 22px 22px 20px; gap: 12px; }
.credit-rules {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
}
.credit-rules-toggle {
  list-style: none;
  cursor: pointer;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--muted);
  user-select: none;
}
.credit-rules-toggle::-webkit-details-marker { display: none; }
.credit-rules-toggle::marker { content: ""; }
.credit-rules-toggle:hover { color: var(--ink); }
.credit-rules-caret {
  display: flex;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.credit-rules[open] .credit-rules-caret { transform: rotate(180deg); }
.credit-rules-list {
  margin: 0;
  padding: 0 12px 12px 30px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  border-top: 1px solid var(--line);
}
.credit-rules-list li { padding-left: 2px; }
.credit-ledger-head,
.credit-ledger li {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: start;
}
.credit-ledger-head {
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.credit-ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 0;
}
.credit-ledger li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.credit-ledger li:last-child { border-bottom: 0; }
.credit-ledger-empty {
  display: block;
  padding: 16px 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.credit-ledger-time { color: var(--muted); font-weight: 500; word-break: break-word; }
.credit-ledger-head > :nth-child(2),
.credit-ledger-action {
  justify-self: stretch;
  text-align: left;
}
.credit-ledger-action {
  min-width: 0;
  word-break: break-word;
  line-height: 1.45;
}
.credit-ledger-head > :last-child,
.credit-ledger-delta {
  justify-self: stretch;
  text-align: right;
}
.credit-ledger-delta { font-variant-numeric: tabular-nums; white-space: nowrap; }
.credit-ledger-delta.is-plus { color: var(--ok); }
.credit-ledger-delta.is-minus { color: #b91c1c; }
.credit-ledger-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.credit-ledger-pager .btn {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 12px;
}
.credit-ledger-pager .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.credit-ledger-page {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.sidebar {
  position: relative;
  z-index: 3;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  height: 100%;
  overflow: visible;
}
.sidebar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}
.sidebar-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 6;
  transform: translate(50%, -50%);
  width: 18px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  box-shadow: 0 1px 4px rgb(28 25 23 / 0.08);
}
.sidebar-toggle:hover {
  color: var(--ink);
  border-color: var(--ink);
  background: #fff;
}
.sidebar-toggle:focus-visible {
  outline: 2px solid var(--need);
  outline-offset: 2px;
}
.sidebar-toggle-icon {
  display: grid;
  place-items: center;
  line-height: 1;
}
.sidebar-toggle-expand { display: none; }
body.workspace.sidebar-collapsed .sidebar-toggle-collapse { display: none; }
body.workspace.sidebar-collapsed .sidebar-toggle-expand { display: grid; }
body.workspace.sidebar-collapsed .sidebar {
  padding: 12px 8px;
  align-items: center;
  gap: 10px;
  overflow: visible;
}
body.workspace.sidebar-collapsed .sidebar-expand-only {
  display: none !important;
}
/* Rail: studio icon | unpublished | published */
body.workspace.sidebar-collapsed #products-section.sidebar-expand-only,
body.workspace.sidebar-collapsed #published-section.sidebar-expand-only:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  min-height: 0;
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
}
body.workspace.sidebar-collapsed #published-section.sidebar-expand-only:not(.hidden)::before {
  content: "";
  display: block;
  width: 28px;
  height: 0;
  margin: 2px auto 4px;
  border-top: 1px solid var(--line);
  flex: 0 0 auto;
}
body.workspace.sidebar-collapsed #search-section,
body.workspace.sidebar-collapsed #products-fold > .section-row,
body.workspace.sidebar-collapsed #product-filter,
body.workspace.sidebar-collapsed #published-section > .section-row,
body.workspace.sidebar-collapsed .published-issue-select,
body.workspace.sidebar-collapsed #published-section label[for="published-issue"],
body.workspace.sidebar-collapsed #shared-packages-section > .section-row,
body.workspace.sidebar-collapsed #shared-packages-section .published-issue-select,
body.workspace.sidebar-collapsed #shared-packages-section label[for="shared-packages-issue"] {
  display: none !important;
}
body.workspace.sidebar-collapsed #products-fold,
body.workspace.sidebar-collapsed #products-body,
body.workspace.sidebar-collapsed #published-body,
body.workspace.sidebar-collapsed #shared-packages-body {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  overflow: visible;
}
body.workspace.sidebar-collapsed .workspace-studio {
  width: 48px;
  padding: 4px;
  border: 0;
  background: transparent;
  align-items: center;
  flex: 0 0 auto;
}
body.workspace.sidebar-collapsed .studio-config-icon-btn {
  display: none !important;
}
body.workspace.sidebar-collapsed .workspace-studio-body {
  align-items: center;
}
body.workspace.sidebar-collapsed .workspace-studio-head {
  justify-content: center;
}
body.workspace.sidebar-collapsed .workspace-studio-icon-wrap {
  width: 36px;
  height: 36px;
}
body.workspace.sidebar-collapsed .sidebar-studio-divider {
  width: 28px;
  margin: 4px auto;
  flex: 0 0 auto;
}
body.workspace.sidebar-collapsed .product-list,
body.workspace.sidebar-collapsed .published-list,
body.workspace.sidebar-collapsed .shared-packages-list {
  flex: 0 0 auto;
  max-height: none;
  width: 100%;
  align-items: center;
  overflow: visible;
}
body.workspace.sidebar-collapsed .product-item {
  width: 48px;
  padding: 4px;
  justify-content: center;
}
body.workspace.sidebar-collapsed .product-item .item-pick {
  justify-content: center;
  padding: 2px;
}
body.workspace.sidebar-collapsed .product-item .item-pick span,
body.workspace.sidebar-collapsed .product-item .item-acts {
  display: none;
}
body.workspace.sidebar-collapsed .product-item .product-icon {
  width: 36px;
  height: 36px;
}
body.workspace.sidebar-collapsed .product-list .caption,
body.workspace.sidebar-collapsed .product-list .section-label,
body.workspace.sidebar-collapsed .product-hidden-label {
  display: none !important;
}
.sidebar > .sidebar-expand-only {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sidebar-products {
  flex: 0 1 auto;
  min-height: 0;
}
#search-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
}
#products-fold {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  flex: 0 1 auto;
}
.sidebar-tracks {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.sidebar .section-row:has(#product-label) {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.sidebar-published {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.sidebar-published.hidden { display: none; }
.sidebar-shared-packages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.sidebar-shared-packages.hidden { display: none; }
.shared-packages-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.shared-pack-item.is-pending {
  opacity: 0.48;
}
.shared-pack-item.is-pending:hover {
  opacity: 0.72;
}
.shared-pack-item.is-pending .item-pick {
  cursor: copy;
}
.section-fold-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}
.section-fold-btn:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.section-fold-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.is-collapsed > .section-fold-row .section-fold-caret {
  transform: rotate(-90deg);
}
.section-fold-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
#products-body.section-fold-body {
  flex: 0 1 auto;
}
#tracks-body.section-fold-body {
  gap: 14px;
}
.section-fold-body[hidden] {
  display: none;
}
.published-body {
  gap: 8px;
}
.published-issue-select {
  width: 100%;
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
}
.published-issue-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.published-issue-row .published-issue-select {
  flex: 1 1 auto;
  min-width: 0;
}
.published-issue-new {
  flex: 0 0 auto;
  padding: 7px 10px;
  font-size: 13px;
  white-space: nowrap;
}
body.workspace.sidebar-collapsed .published-issue-row {
  display: none !important;
}
.published-list {
  flex: 0 1 auto;
  max-height: 28vh;
  min-height: 0;
  overflow-y: auto;
}
.workspace-kicker {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.workspace-lead {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.section-fold-row:hover .workspace-lead {
  color: var(--ink);
}
body.workspace-guest .workspace-lead,
body.workspace-guest .search-form,
body.workspace-guest .search-form-error,
body.workspace-guest .section-row,
body.workspace-guest #product-filter,
body.workspace-guest .sidebar-tracks,
body.workspace-guest .product-list,
body.workspace-guest .sidebar-published,
body.workspace-guest .sidebar-shared-packages {
  display: none;
}
.brand { display: flex; gap: 10px; align-items: center; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--ink);
  display: block;
}
.brand strong { display: block; font-size: 15px; }
.brand p { margin: 0; color: var(--muted); font-size: 12px; }

.search-form { display: flex; gap: 6px; }
.search-form-error {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #b91c1c;
}
.search-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  font: inherit;
  background: var(--card);
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
a.btn { text-decoration: none; display: inline-block; }
.btn.primary { background: var(--ink); color: #faf7f0; border-color: var(--ink); }
.btn.search { background: var(--need); color: #f8fafc; border-color: var(--need); }
.btn:hover { filter: brightness(1.05); }
.btn:disabled,
a.btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn:disabled:hover,
a.btn[aria-disabled="true"]:hover { filter: none; }

.section-label { margin: 4px 0 0; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-row .section-label { margin: 0; }
.section-fold-row {
  cursor: pointer;
  user-select: none;
}
.section-fold-row:hover .section-label {
  color: var(--ink);
}
.section-actions { display: flex; align-items: center; gap: 4px; }
.new-track-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.new-track-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--muted);
  line-height: 0;
}
.new-track-btn.needs-studio .new-track-hint {
  color: var(--need);
}
.new-track-hint.hidden { display: none; }
.filter-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 2px 8px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.filter-toggle[aria-pressed="true"] {
  background: var(--need);
  border-color: var(--need);
  color: #f8fafc;
}

.filter-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  background: var(--card);
}
.filter-input.hidden { display: none; }

.track-list { display: flex; flex-direction: column; gap: 6px; overflow: auto; }
.product-list { flex: 0 1 auto; min-height: 0; max-height: 36vh; overflow-y: auto; }
.sidebar-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 52px;
  padding: 6px 4px 6px 0px;
  border-radius: 6px;
  border: 1px solid transparent;
  overflow: hidden;
  box-sizing: border-box;
}
.sidebar-card.track-shared .item-pick small {
  color: #3d5c34;
}
.sidebar-card.running {
  color: var(--warn);
  background: rgb(154 52 18 / 0.08);
}
.sidebar-card.active {
  background: var(--need-soft);
  /* box-shadow: inset 3px 0 0 var(--need), var(--shadow); */
  border-color: color-mix(in srgb, var(--need) 35%, var(--line));
}
.sidebar-card.active .item-pick b {
  color: var(--need);
}
.sidebar-card.running.active {
  background: color-mix(in srgb, var(--warn) 14%, var(--need-soft));
  box-shadow: inset 3px 0 0 var(--warn), var(--shadow);
}
.sidebar-card.running .item-pick small { color: inherit; }
.sidebar-card.failed small { color: var(--pain); }
.sidebar-card.running::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 38%;
  background: var(--warn);
  animation: busy-slide 1.15s ease-in-out infinite;
}
.sidebar-card.just-done {
  animation: product-done-flash 0.7s ease 3;
  border-color: #86efac;
  background: #ecfdf5;
}
@keyframes product-done-flash {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 0 3px rgb(22 101 52 / 0.35); }
}
.item-act:disabled,
.item-act[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.sidebar-card.is-hidden { opacity: 0.72; }
.item-pick {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 2px 4px 2px 2px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.item-pick small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-pick span { min-width: 0; overflow: hidden; }
.item-pick b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-acts { display: flex; flex-shrink: 0; align-items: center; }
.item-act {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}
.item-act:hover { color: var(--ink); background: rgba(28, 25, 23, 0.06); }
.item-act.on { color: var(--need); }
.item-act.danger:hover { color: var(--pain); background: var(--pain-soft); }
.item-act.warn:hover { color: var(--warn); background: rgb(154 52 18 / 0.1); }
.product-hidden-label { margin: 8px 0 0; }
.board-error {
  margin: 6px 0 0;
  color: var(--pain);
  font-size: 13px;
}
.btn.danger { color: var(--pain); border-color: #f0c4cf; }
.product-item .item-pick span { min-width: 0; }
.product-icon, .hit-icon, .board-icon, .empty-icon {
  display: block;
  object-fit: cover;
  background: #e7e2d8;
  flex-shrink: 0;
}
.product-icon { width: 40px; height: 40px; border-radius: 8px; }
.track-product-icon { width: 40px; height: 40px; border-radius: 8px; }
.product-icon.placeholder, .hit-icon.placeholder, .empty-icon.placeholder {
  box-shadow: inset 0 0 0 1px var(--line);
}
.board-icon { width: 64px; height: 64px; border-radius: 10px; box-shadow: var(--shadow); }
.empty-icon { width: 72px; height: 72px; border-radius: 12px; }
.hit { display: flex; align-items: flex-start; gap: 10px; }
.hit span { min-width: 0; }
.hit-icon { width: 56px; height: 36px; border-radius: 5px; margin-top: 2px; }

.main { position: relative; z-index: 1; min-height: 0; padding: 28px 36px 48px; overflow: auto; }
.empty { max-width: 42rem; color: var(--muted); }
.empty h1 { color: var(--ink); font-size: 28px; margin: 0 0 8px; }
.empty-product-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.empty-product-copy {
  flex: 1;
  min-width: 0;
}
.empty-product-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.empty-product-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 14px;
  width: 100%;
}
.empty-product-meta .board-recommend-score {
  flex: 0 1 auto;
  min-width: 0;
}
.empty-product-meta .empty-product-source {
  flex: 0 0 auto;
}
.empty-product-lead {
  margin: 0;
  line-height: 1.55;
}
.hidden { display: none !important; }

.charts-page .main {
  min-height: 0;
}
.board-actions-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  max-width: min(360px, 42vw);
}
.board-actions-status {
  margin: 0;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.board-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.board { display: flex; flex-direction: column; gap: 22px; width: 100%; }
.board.is-loading > :not(.board-head),
#charts-panel.is-loading > :not(.board-head) {
  opacity: 0.55;
  pointer-events: none;
}
.board.is-loading .board-head,
#charts-panel.is-loading .board-head {
  position: relative;
}
.board.is-loading .board-head::after,
#charts-panel.is-loading .board-head::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, #2563eb), transparent);
  animation: busy-slide 1.1s ease-in-out infinite;
}
.shared-pack-item.is-not-ready { opacity: 0.72; }
.shared-pack-backend-hint { color: var(--warn); margin-top: 8px; }
.board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}
.board.is-busy .kicker,
.board.is-busy .board-actions-status { color: var(--warn); }
/* Published-product cards: sliding bar only, no card tint. */
#published-list .sidebar-card.is-collecting::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 38%;
  background: var(--warn);
  animation: busy-slide 1.15s ease-in-out infinite;
}
.board-progress {
  margin: 6px 0 0;
  height: 4px;
  width: min(280px, 100%);
  background: #e7e5e4;
  border-radius: 999px;
  overflow: hidden;
}
.board-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--warn);
  border-radius: 999px;
  transition: width 0.25s ease;
}
@keyframes busy-slide {
  0% { left: -38%; }
  100% { left: 100%; }
}
.board-head > div:first-of-type { flex: 1; min-width: 0; }
.kicker { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.board-story-link,
.track-story-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.board-story-link:hover,
.track-story-link:hover {
  color: var(--need);
  border-bottom-color: currentColor;
}
a.product-source-badge {
  text-decoration: none;
  cursor: pointer;
}
a.product-source-badge:hover {
  filter: brightness(0.97);
}
.board-head h1 { margin: 2px 0 0; font-size: 28px; font-weight: 650; }
.ids { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.ids.hidden { display: none; }
.ids a { color: inherit; }

.board-product-source {
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 14px;
  width: 100%;
}
.board-product-source-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  order: -1;
}
.board-product-source .board-recommend-score {
  flex: 0 1 auto;
  min-width: 0;
}
.board-product-source-hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.product-source-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}
.product-source-badge.product-source-curated {
  border-color: #b8d4f0;
  color: #1a5a8a;
  background: #f0f7ff;
}
.product-source-badge.product-source-user {
  border-color: #d8d2c8;
  color: #5c5348;
  background: #faf8f5;
}
.product-source-badge.product-source-studio_catalog {
  border-color: #c9d8c3;
  color: #3d5c34;
  background: #f4faf2;
}
.product-source-badge.product-source-own {
  border-color: var(--line);
  color: var(--ink);
  background: var(--bg);
}
.product-source-badge.product-source-competitor {
  border-color: #f0c4cf;
  color: var(--pain);
  background: #fff7f9;
}
.product-source-badge.product-source-pending {
  border-color: #e8d4a8;
  color: #7a5a1a;
  background: #fffbf0;
}
.product-source-badge.product-source-approved {
  border-color: #c9d8c3;
  color: #3d5c34;
  background: #f4faf2;
}
.product-source-badge.product-source-rejected {
  border-color: #e8b8b8;
  color: #8a2a2a;
  background: #fff5f5;
}
.product-source-badge.product-source-none {
  border-color: var(--line);
  color: var(--muted);
  background: var(--bg);
}
.studio-name-field {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.studio-approved-hint {
  margin: 0 0 4px auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #2f5d28;
  background: linear-gradient(180deg, #f3faf0 0%, #e5f3df 100%);
  border: 1px solid #b7d4ae;
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 1px 2px rgba(47, 93, 40, 0.06);
  flex-shrink: 0;
}
.studio-approved-hint:not(.hidden)::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3d8f45;
  box-shadow: 0 0 0 3px rgba(61, 143, 69, 0.18);
  flex-shrink: 0;
}
.studio-apply-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px;
  text-align: center;
}
.studio-application-banner {
  margin: 0;
  padding: 10px 16px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  text-align: center;
}
.studio-apply-row {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0;
}
.studio-apply-row .btn {
  min-width: 140px;
}
.studio-application-banner.studio-application-none {
  border-color: #d8e4f0;
  background: #f5f9ff;
  color: #2a4a6a;
}
.studio-application-banner.studio-application-pending {
  border-color: #e8d4a8;
  background: #fffbf0;
  color: #7a5a1a;
}
.studio-application-banner.studio-application-approved {
  border-color: #c9d8c3;
  background: #f4faf2;
  color: #3d5c34;
}
.studio-application-banner.studio-application-rejected {
  border-color: #e8b8b8;
  background: #fff5f5;
  color: #8a2a2a;
}
.user-dropdown-admin {
  margin-top: 0;
}
#admin-dialog.admin-dialog {
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
}
#admin-dialog::backdrop { background: rgb(28 25 23 / 0.45); }
#admin-dialog .dialog-body.admin-dialog-body {
  padding: 18px 18px 16px;
  gap: 14px;
  max-height: calc(100vh - 32px);
  overflow: hidden;
}
.admin-dialog-main {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 380px;
  max-height: calc(100vh - 120px);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card, #fff);
}
.admin-side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 168px;
  width: 168px;
  padding: 10px 8px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}
.admin-nav-btn {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.admin-nav-btn:hover {
  color: var(--ink);
  background: rgba(28, 25, 23, 0.04);
}
.admin-nav-btn.active {
  color: var(--need);
  background: var(--need-soft);
  font-weight: 650;
}
.admin-dialog-content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 16px 16px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-dialog-lead {
  margin: 0;
}
#admin-dialog .admin-packages-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  box-sizing: border-box;
}
#admin-dialog .admin-packages-toolbar .admin-packages-issue,
#admin-dialog .admin-packages-toolbar .published-issue-select {
  min-width: 120px;
  max-width: 220px;
  flex: 0 1 auto;
}
#admin-dialog .admin-packages-toolbar-end {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}
#admin-dialog .admin-packages-toolbar-end[hidden] {
  display: none !important;
}
#admin-dialog .admin-packages-toolbar-end.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
#admin-dialog .admin-issue-visible-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
#admin-dialog .admin-issue-visible-label {
  display: inline-block;
  line-height: 20px;
  white-space: nowrap;
}
#admin-dialog .admin-issue-visible-toggle .toggle-switch {
  flex: 0 0 auto;
}
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#admin-dialog .admin-plan-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#admin-dialog .admin-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
#admin-dialog .admin-plan-field-span {
  grid-column: 1 / -1;
}
#admin-dialog .admin-plan-months-weeks-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
#admin-dialog .admin-plan-field-months input[type="number"] {
  width: 100%;
  box-sizing: border-box;
}
#admin-dialog .admin-plan-field-weeks {
  min-width: 0;
}
#admin-dialog .admin-plan-field-weeks .admin-plan-week-chips {
  margin-top: 2px;
}
#admin-dialog .admin-plan-month-row {
  display: flex;
  gap: 8px;
}
#admin-dialog .admin-plan-select {
  flex: 1 1 0;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--card, #fff);
}
#admin-dialog .admin-plan-hint {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
#admin-dialog .admin-plan-range {
  margin: 0;
  color: var(--muted);
}
#admin-dialog .admin-plan-week-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}
#admin-dialog .admin-plan-week-chip {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  column-gap: 2px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card, #fff);
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}
#admin-dialog .admin-plan-week-chip:has(input:checked) {
  border-color: var(--need);
  background: var(--need-soft);
  color: var(--need);
  font-weight: 650;
}
#admin-dialog .admin-plan-week-chip input {
  margin: 0;
  width: 13px;
  height: 13px;
  min-width: 13px;
  flex-shrink: 0;
}
#admin-dialog .admin-plan-week-label {
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
}
#admin-dialog .admin-plan-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
#admin-dialog .admin-plan-field input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--card, #fff);
}
#admin-dialog .admin-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#admin-dialog .admin-plan-status {
  margin: 0;
  color: var(--muted);
}
#admin-dialog .admin-plan-summary {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink);
}
#admin-dialog .admin-plan-slot {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--panel);
}
#admin-dialog .admin-plan-slot.is-busy {
  border-color: var(--need);
  background: var(--need-soft);
}
#admin-dialog .admin-plan-slot-busy {
  color: var(--need);
}
#admin-dialog .admin-plan-slot-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 650;
}
#admin-dialog .admin-plan-game-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#admin-dialog .admin-plan-game {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 13px;
}
#admin-dialog .admin-plan-game-name {
  font-weight: 600;
  color: var(--ink);
}
#admin-dialog .admin-plan-game-meta {
  color: var(--muted);
  font-size: 12px;
}
#admin-dialog .admin-plan-open {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 12px;
}
#admin-dialog .admin-filters .chip.active {
  background: var(--need-soft);
  color: var(--need);
  border-color: var(--need);
}
.admin-package-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.admin-package-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-weight: 650;
  color: var(--muted);
}
.admin-package-item .admin-package-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.admin-package-item .admin-package-foot .admin-time-line {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.admin-package-item .admin-application-actions {
  margin-top: 0;
  flex: 0 0 auto;
  margin-left: auto;
}
.admin-package-item .admin-package-hint {
  margin: 0;
  margin-left: auto;
  text-align: right;
}
.admin-empty {
  margin-top: 6px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}
.admin-application-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.admin-application-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--card, #fff);
}
.admin-application-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.admin-application-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.admin-application-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.admin-reject-reason {
  margin-top: 8px;
}
.admin-time-line {
  margin: 6px 0 0;
  color: var(--muted);
}
.empty-product-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.product-intro {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(260px, 0.85fr);
  gap: 20px;
  align-items: start;
  margin: 0 0 16px;
}
.product-media { min-width: 0; }
.product-video, .product-video-fallback {
  display: block;
  width: 100%;
  background: #111;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.product-copy { min-width: 0; }
.product-copy h2 { margin: 2px 0 8px; font-size: 20px; font-weight: 650; }
.product-meta { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.product-about { margin: 0; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
@media (max-width: 900px) {
  .product-intro { grid-template-columns: 1fr; }
}

.insights { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.insights.insights-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.insight {
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 12px 14px;
  border-left: 3px solid var(--line);
}
.insight h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.insight-icon { flex-shrink: 0; display: block; }
.insight p { margin: 0; }
.insight-ev { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.insight.pain { border-left-color: var(--pain); }
.insight.pain .insight-icon { color: var(--pain); }
.insight.need { border-left-color: var(--need); }
.insight.need .insight-icon { color: var(--need); }
.insight.praise { border-left-color: var(--praise); }
.insight.praise .insight-icon { color: var(--praise); }
.insight.actions { border-left-color: var(--info); }
.insight.actions .insight-icon { color: var(--info); }
.insight.is-link { cursor: pointer; }
.insight-actions {
  margin: 0;
}
.insight-actions-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.insight-actions-head h2 { margin: 0; font-size: 16px; font-weight: 650; }
.seg-bar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.seg-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; cursor: pointer; color: var(--ink);
}
.seg-chip small { color: var(--muted); margin-left: 4px; }
.seg-chip:hover { border-color: var(--ink); }
.seg-chip.active { background: #1c1917; color: #fff; border-color: #1c1917; }
.seg-chip.active small { color: #d6d3d1; }
.seg-chip.weak { opacity: 0.65; }
.prio-tools { display: flex; gap: 6px; margin-bottom: 10px; }
.patch-callout {
  margin: 0 0 10px; padding: 10px 12px; background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 8px; font-size: 13px;
}
.patch-callout.is-worse {
  background: #fff1f2;
  border-color: #f0c4cf;
}
.patch-callout.is-better {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.patch-callout.is-flat {
  background: #fafaf9;
  border-color: #e7e5e4;
}
.patch-callout-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.patch-callout strong { margin: 0; }
.patch-callout p { margin: 4px 0 0; }
.patch-nav { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.patch-nav-meta { font-size: 12px; color: #9a3412; font-weight: 650; min-width: 3.2em; text-align: center; }
.patch-callout.is-worse .patch-nav-meta { color: var(--pain); }
.patch-callout.is-better .patch-nav-meta { color: var(--ok); }
.patch-callout.is-flat .patch-nav-meta { color: #57534e; }
.patch-nav-btn {
  width: 28px; height: 28px; border: 1px solid #fdba74; border-radius: 6px;
  background: #fff; color: #9a3412; font-size: 18px; line-height: 1; cursor: pointer;
}
.patch-callout.is-worse .patch-nav-btn { border-color: #f0c4cf; color: var(--pain); }
.patch-callout.is-worse .patch-nav-btn:hover:not(:disabled) { border-color: var(--pain); background: #fff1f2; }
.patch-callout.is-better .patch-nav-btn { border-color: #bbf7d0; color: var(--ok); }
.patch-callout.is-better .patch-nav-btn:hover:not(:disabled) { border-color: var(--ok); background: #f0fdf4; }
.patch-callout.is-flat .patch-nav-btn { border-color: #e7e5e4; color: #57534e; }
.patch-callout.is-flat .patch-nav-btn:hover:not(:disabled) { border-color: #a8a29e; background: #f5f5f4; }
.patch-nav-btn:hover:not(:disabled) { border-color: #9a3412; background: #ffedd5; }
.patch-nav-btn:disabled { opacity: 0.35; cursor: default; }
.patch-disclaimer { color: #9a3412; }
.patch-callout.is-worse .patch-disclaimer { color: var(--pain); }
.patch-callout.is-better .patch-disclaimer { color: var(--ok); }
.patch-callout.is-flat .patch-disclaimer { color: #78716c; }
a.patch-news, a.quote-steam {
  color: #1d4ed8; text-decoration: none; font-weight: 600; margin-left: 6px;
}
a.patch-news:hover, a.quote-steam:hover { text-decoration: underline; }
.tline-pins {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 11px; /* chart padT (16px) minus 5px gap */
  z-index: 3;
  pointer-events: none;
}
.tline-pin {
  position: absolute;
  bottom: 0;
  top: auto;
  /* left% is the dashed mark line; center the glyph on that line */
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  line-height: 0;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0.55;
  filter: drop-shadow(0 1px 1px rgba(28, 25, 23, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
}
.tline-pin.is-active {
  opacity: 1;
  z-index: 1;
}
.tline-pin:hover { opacity: 1; }
.tline-pin svg {
  display: block;
  flex: 0 0 auto;
}

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
#view-tabs { justify-content: flex-end; }
.tab, .chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab-icon {
  flex-shrink: 0;
  display: block;
}
.tab[data-view="pain"] .tab-icon { color: var(--pain); }
.tab[data-view="need"] .tab-icon { color: var(--need); }
.tab[data-view="praise"] .tab-icon { color: var(--praise); }
.tab[data-view="actions"] .tab-icon { color: var(--info); }
.tab[data-view="charts"] .tab-icon { color: #78716c; }
.tab.active .tab-icon { color: currentColor; }
.tab.active, .chip.active { background: var(--ink); color: #faf7f0; border-color: var(--ink); }
.hint { margin: -12px 0 0; color: var(--muted); font-size: 12px; }

.icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.icon-card {
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 10px;
  padding: 14px 12px 12px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.icon-card:hover { border-color: var(--line); }
.icon-card.selected { border-color: var(--ink); background: #f3f1ea; }
.icon-card.selected.pain { border-color: var(--pain); background: var(--pain-soft); }
.icon-card.selected.need { border-color: var(--need); background: var(--need-soft); }
.icon-card.selected.praise { border-color: var(--praise); background: var(--praise-soft); }
.icon-card svg { display: block; }
.icon-card .label { font-weight: 650; font-size: 13px; }
.icon-card .id { font-size: 11px; color: var(--muted); }
.icon-card .count { font-size: 18px; font-weight: 650; }
.icon-card.pain svg { color: var(--pain); }
.icon-card.need svg { color: var(--need); }
.icon-card.praise svg { color: var(--praise); }
.icon-card.all svg { color: var(--muted); }
.icon-card.muted { opacity: 0.55; }

.quotes { margin-top: 16px; }
.quotes-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.quotes-head h2 { margin: 0; font-size: 16px; }
.quotes-head-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.quotes-head-sep { color: var(--muted); font-size: 14px; line-height: 1; user-select: none; }
.filters { display: flex; gap: 6px; }
.quote-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.quote-list.quotes-loading { opacity: 0.55; pointer-events: none; }
.quotes-more { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.quotes-more .caption { margin: 0; }
.quote {
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 12px 14px;
}
.quote .meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.quote .tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 7px;
}
.quote .tag.down { color: var(--pain); border-color: #f0c4cf; }
.quote .tag.up { color: var(--ok); border-color: #bbd6c2; }
.quote .tag.date { border-color: transparent; padding-left: 0; color: var(--ink); font-weight: 650; }
.quote-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.quote-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #e7e5e4;
  flex-shrink: 0;
}
.quote-avatar.placeholder {
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 650;
  color: #57534e;
}
.quote-author-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.quote-author-line { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.quote-playtime { color: var(--muted); font-size: 12px; font-weight: 500; }
.quote-name {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.quote-name:hover { text-decoration: underline; }
.quote-replies {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}
.quote.nested {
  box-shadow: none;
  background: #faf7f2;
  margin: 0;
}
.quote.expandable { cursor: pointer; }
.quote.expandable:hover { outline: 1px solid var(--line); }
.quote .action-evidence-body.quote-body {
  margin: 0 0 6px;
  padding: 8px 10px;
}
.quote .action-evidence-body.quote-body .body {
  margin: 0;
}
.quote .action-evidence-translation {
  margin: 0 0 6px;
}
.quote-footer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 8px;
}
.quote-footer .more {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.quote.expanded .quote-footer .more { color: var(--ink); }
.quote-footer .quote-translate {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0 auto;
  flex: 0 0 auto;
}
.quote.expandable > .action-evidence-body .body,
.quote.expandable > .body {
  margin: 0;
  white-space: pre-wrap;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.quote.expanded > .body,
.quote.expanded > .action-evidence-body .body { display: block; -webkit-line-clamp: unset; }
.quote.expandable:not(.expanded) > .action-evidence-translation p {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.quote-media { margin-top: 10px; display: grid; gap: 8px; }
.quote-video {
  display: block;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
  background: #111;
}
.quote-image {
  display: block;
  max-width: min(100%, 480px);
  height: auto;
  border-radius: 8px;
  background: #111;
}

.charts-panel { display: flex; flex-direction: column; gap: 18px; }
.chart-h { margin: 4px 0 0; font-size: 16px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chart-grid .donut-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: nowrap;
  width: 100%;
}
.chart-grid .donut-wrap svg {
  flex-shrink: 0;
}
.chart-grid .donut-legend {
  flex-shrink: 0;
}
.chart-grid .donut-legend > div {
  white-space: nowrap;
}
.charts-panel figure, .chart-wide {
  margin: 0;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 14px;
}
.charts-panel figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.charts-panel figcaption span, .caption { color: var(--muted); font-size: 12px; }
.donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.donut-legend i {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 2px; margin-right: 6px;
}
.hbar { display: flex; flex-direction: column; gap: 7px; }
.hbar-row { display: grid; grid-template-columns: 92px 1fr 36px; gap: 8px; align-items: center; font-size: 12px; }
.hbar-row span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-row b { text-align: right; font-weight: 650; }
.hbar-track { height: 10px; background: #efece4; border-radius: 99px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 99px; }
.gbar { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding-top: 28px; overflow: visible; }
.gbar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.gbar-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.gbar-bar { width: 18px; border-radius: 3px 3px 0 0; min-height: 2px; position: relative; cursor: help; }
.gbar-bar:hover { filter: brightness(1.12); outline: 1px solid rgb(28 25 23 / 0.25); outline-offset: 1px; }
.gbar-col small { color: var(--muted); font-size: 11px; }
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: #1c1917;
  color: #faf7f0;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}
[data-tip]:hover::after { opacity: 1; }
.hbar-row[data-tip]::after {
  left: auto;
  right: 0;
  transform: none;
  bottom: calc(100% + 4px);
}
.tline-tools { display: flex; gap: 8px; margin: -4px 0 10px; }
.tline-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.tline-chip.active { border-color: var(--ink); color: var(--ink); font-weight: 650; }
.tline-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tline-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
}
.tline-leg {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  border: 0;
  background: none;
  padding: 4px 0;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  color: var(--ink);
}
.tline-leg:hover { color: var(--need); }
.tline-leg.off { color: var(--muted); opacity: 0.42; text-decoration: line-through; }
.tline-plot {
  display: flex;
  align-items: stretch;
  width: 100%;
}
.tline-yaxis {
  flex-shrink: 0;
  position: relative;
  height: 220px;
  font-size: 10px;
  line-height: 1;
  color: #78716c;
}
.tline-ytick {
  position: absolute;
  right: 4px;
  transform: translateY(-50%);
  white-space: nowrap;
}
.tline-chart {
  flex: 1;
  min-width: 0;
}
.tline-scroll { width: 100%; overflow: visible; position: relative; }
.tline-svg { display: block; width: 100%; height: 220px; }
.tline-patch-band { opacity: 0.42; }
.tline-patch-band.is-worse { fill: #fecdd3; }
.tline-patch-band.is-better { fill: #bbf7d0; }
.tline-patch-band.is-flat { fill: #e7e5e4; }
.tline-svg polyline { pointer-events: none; }
.tline-ml { pointer-events: none; }
.tline-ml.is-worse { stroke: var(--pain); }
.tline-ml.is-better { stroke: var(--ok); }
.tline-ml.is-flat { stroke: #a8a29e; }
.tline-marks {
  position: relative;
  height: 26px;
  margin-top: 6px;
}
.tline-mark {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  border: 1px solid #e7d5c8;
  background: #faf4ee;
  border-radius: 4px;
  padding: 1px 6px;
  margin: 0;
  font: inherit;
  font-size: 11px;
  line-height: 1.35;
  color: var(--warn);
  cursor: pointer;
  white-space: nowrap;
}
.tline-mark:hover { color: var(--ink); border-color: var(--ink); }
.tline-mark.is-release { font-weight: 650; color: var(--ink); background: #f5f5f4; border-color: var(--ink); }
.tline-mark.is-demo { color: #0f766e; font-weight: 650; background: #ecfdf8; border-color: #99f6e4; }
.tline-mark.is-update { font-weight: 650; }
.tline-mark.is-worse {
  color: var(--pain);
  border-color: #f0c4cf;
  background: #fff1f2;
}
.tline-mark.is-better {
  color: var(--ok);
  border-color: #bbf7d0;
  background: #ecfdf5;
}
.tline-mark.is-flat {
  color: #78716c;
  border-color: #d6d3d1;
  background: #f5f5f4;
}
.tline-mark.is-worse:hover { color: var(--pain); border-color: var(--pain); }
.tline-mark.is-better:hover { color: var(--ok); border-color: var(--ok); }
.tline-mark.is-flat:hover { color: #57534e; border-color: #a8a29e; }
.tline-mark.is-focus.is-better {
  border-color: var(--ok);
  font-weight: 650;
}
.tline-mark.is-focus.is-worse {
  border-color: var(--pain);
  font-weight: 650;
}
.tline-mark.is-focus.is-flat {
  font-weight: 650;
}
.tline-mark-note { margin: 0 0 8px; display: flex; flex-direction: column; gap: 2px; }
.tline-mark-note span { display: block; }
.tline-brush-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: #c2410c;
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
}
.tline-brush-tick.is-worse { background: var(--pain); width: 3px; }
.tline-brush-tick.is-better { background: var(--ok); width: 3px; }
.tline-brush-tick.is-flat { background: #a8a29e; width: 3px; }
.tline-brush-tick.is-release { width: 3px; background: var(--ink); }
.tline-brush-tick.is-demo { background: #0f766e; }
.tline-brush-tick.is-update { background: #9a3412; width: 3px; }
.tline-hit { fill: transparent; cursor: pointer; }
.tline-hit:hover { fill: rgb(28 25 23 / 0.05); }
.tline-dot { cursor: pointer; }
.tline-peak { margin: 0 0 8px; }
.tline-trunc {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px dashed #c4b5a5;
  border-radius: 8px;
  background: #faf7f2;
  color: #78716c;
  font-size: 12px;
  line-height: 1.4;
}
.tline-trunc-mark {
  flex: 0 0 auto;
  color: #9a3412;
  font-weight: 700;
}
.tline-trunc strong { color: #9a3412; }
.tline-brush-track.has-older { padding-left: 0; }
.tline-older-cue {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  border: 1px solid #e7d5c8;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 999px;
  padding: 2px 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgb(28 25 23 / 0.08);
}
.tline-older-cue:hover { border-color: #9a3412; background: #ffedd5; }
.tline-brush { margin-top: 14px; }
.tline-brush-track {
  position: relative;
  height: 28px;
  background: #efece4;
  border-radius: 6px;
  user-select: none;
  touch-action: none;
  overflow: hidden;
}
.tline-brush-win {
  position: absolute;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
  background: rgb(28 25 23 / 0.12);
  border: 1px solid var(--ink);
  border-radius: 6px;
  cursor: grab;
  min-width: 16px;
  z-index: 2;
}
.tline-brush-win:active { cursor: grabbing; }
.tline-brush-h {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
  background: var(--ink);
  opacity: 0.28;
}
.tline-brush-h[data-tline-edge="start"] { left: 0; border-radius: 5px 0 0 5px; }
.tline-brush-h[data-tline-edge="end"] { right: 0; border-radius: 0 5px 5px 0; }
.tline-brush-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.tline-brush-meta span:nth-child(2) { text-align: center; }
.tline-reset {
  border: 0;
  background: none;
  color: var(--need);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 0;
  margin-left: 6px;
  text-decoration: underline;
}
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.priority { width: 100%; border-collapse: collapse; background: var(--card); box-shadow: var(--shadow); border-radius: 8px; overflow: hidden; }
.priority th, .priority td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.priority th { font-size: 12px; color: var(--muted); font-weight: 600; }
.priority tr:last-child td { border-bottom: 0; }
.actions-toolbar { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
.actions-summary { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.action-cards { display: grid; gap: 10px; }
.action-card {
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 12px 14px;
  border-left: 3px solid var(--info);
}
.action-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}
.action-section-label {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.action-section-resolved .action-section-label { color: var(--ok); }
.action-section-resolved {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #c8e6d0;
}
.action-cards-open > .action-section-label { margin: 0 0 8px; }
.action-show-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.action-show-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.toggle-switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #d6d3d1;
  position: relative;
  transition: background 0.15s ease;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
  transition: transform 0.15s ease;
}
.action-show-toggle-input:checked + .toggle-switch { background: var(--ok); }
.action-show-toggle-input:checked + .toggle-switch::after { transform: translateX(16px); }
.action-show-toggle-input:focus-visible + .toggle-switch { outline: 2px solid var(--need); outline-offset: 2px; }
.action-card.is-resolved {
  background: #f4faf6;
  border-left-color: var(--ok);
  box-shadow: 0 0 0 1px #c8e6d0;
}
.action-card.is-resolved .action-cat { color: var(--ok); }
.action-card.is-resolved h3 {
  color: var(--muted);
  font-weight: 600;
}
.action-card.is-resolved p,
.action-card.is-resolved .action-next {
  color: #78716c;
}
.action-card.is-resolved .action-ev {
  opacity: 0.85;
}
.action-resolved-tag {
  margin-left: auto;
  flex-shrink: 0;
  max-width: 52%;
  text-align: right;
  line-height: 1.35;
  font-size: 11px;
  font-weight: 650;
  color: var(--ok);
  background: #e8f5ec;
  border: 1px solid #a7d4b5;
  border-radius: 8px;
  padding: 3px 9px;
}
.action-resolved-tag::before {
  content: "✓ ";
  font-weight: 700;
}
.action-card header { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.action-stale-hint { margin: 0 0 8px; color: #9a3412; }
.action-card h3 { margin: 0; font-size: 15px; font-weight: 650; }
.action-cat {
  font-size: 11px;
  font-weight: 650;
  color: var(--warn);
  letter-spacing: 0.02em;
}
.action-card p { margin: 0 0 6px; font-size: 13px; line-height: 1.45; color: var(--ink); }
.action-next { color: var(--muted) !important; }
.action-evs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.action-evs .btn.resolve {
  margin-left: auto;
  background: var(--ok);
  color: #f0fdf4;
  border-color: #14532d;
  font-weight: 650;
}
.action-evs .btn.resolve:hover { filter: brightness(1.08); }
.action-ev {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
  color: var(--muted);
}
.action-card.has-evidence {
  border-left-color: #c2410c;
  box-shadow: 0 0 0 1px #e7d5c8, var(--shadow);
}
.action-ev:hover { color: var(--ink); border-color: var(--ink); }
.action-ev.is-active {
  color: #9a3412;
  border-color: #c2410c;
  background: #fff7ed;
  font-weight: 650;
}
.action-evidence-inline {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #e7d5c8;
  border-radius: 6px;
  background: #fffaf5;
}
.action-evidence-inline.is-collapsible:not(.is-expanded) .action-evidence-body p,
.action-evidence-inline.is-collapsible:not(.is-expanded) .action-evidence-translation p {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.evidence-more {
  display: block;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.evidence-more:hover { color: var(--ink); }
.action-evidence-inline .quote-author { margin-bottom: 6px; }
.action-evidence-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
  align-items: center;
}
.action-evidence-meta .tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--muted);
}
.action-evidence-meta .tag.date {
  border-color: transparent;
  padding-left: 0;
  color: var(--ink);
  font-weight: 650;
}
.action-evidence-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.action-evidence-head strong { font-size: 13px; }
.action-evidence-body.has-lang,
.action-evidence-translation {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-left: 3px solid #c2410c;
  background: #fff;
  border-radius: 0 4px 4px 0;
}
.action-evidence-body.has-lang:first-of-type { margin-top: 0; }
.action-evidence-lang {
  display: block;
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
}
.action-evidence-body.has-lang p,
.action-evidence-translation p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.action-evidence-translation.is-partial p {
  color: var(--muted);
}
.translation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1e8df;
}
.translation-meta-item {
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
}
.action-evidence-error { color: #9f1239; margin: 8px 0 0; }
.action-evidence-body {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #c2410c;
  background: #fff;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--ink);
}
.action-evidence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.quote.is-evidence-hit {
  outline: 2px solid #c2410c;
  outline-offset: 2px;
  background: #fff7ed;
  transition: background 0.3s ease, outline-color 0.3s ease;
}
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; }

dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  width: min(420px, 92vw);
  background: var(--card);
}
dialog.wide { width: min(760px, 94vw); }
dialog::backdrop { background: rgb(28 25 23 / 0.35); }
dialog form, dialog .dialog-body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
dialog h2 { margin: 0; font-size: 18px; }
dialog p { margin: 0; color: var(--muted); }
dialog label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
dialog input[type="text"],
dialog input[type="email"],
dialog input[type="password"] {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}
dialog fieldset { border: 1px solid var(--line); border-radius: 8px; }
.check { flex-direction: row !important; align-items: center; gap: 8px; }
#rerun-direction .check {
  align-items: flex-start;
  flex-wrap: wrap;
}
#rerun-direction .opt-desc,
#analyze-range .opt-desc {
  flex: 1 1 100%;
  margin: 2px 0 4px 1.6em;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
}
#analyze-range .check {
  align-items: flex-start;
  flex-wrap: wrap;
}
.analyze-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 1.6em;
}
.analyze-range-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 8px 1.6em;
}
.analyze-range-row label span { color: var(--muted); font-size: 12px; }
#analyze-years-label { font-size: 14px; font-weight: 600; min-width: 4.5em; text-align: center; }
#analyze-recent-opts .btn { min-width: 36px; padding: 4px 10px; }
dialog select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: var(--card);
}
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.analyze-dialog-actions { justify-content: space-between; align-items: center; }
.analyze-dialog-actions .dialog-actions-buttons { display: flex; gap: 8px; margin-left: auto; }
#analyze-delete-wrap {
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.auth-tabs { display: flex; gap: 8px; }
.auth-tab {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.auth-tab.active { border-color: var(--ink); color: var(--ink); }
#auth-dialog.auth-dialog {
  width: min(400px, calc(100% - 32px));
  overflow: visible;
  box-shadow: 0 24px 64px rgb(28 25 23 / 0.18);
}
#auth-dialog::backdrop { background: rgb(28 25 23 / 0.45); }
#auth-dialog .auth-dialog-form { padding: 22px 22px 20px; gap: 14px; }
.auth-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-dialog-header h2 { font-size: 18px; font-weight: 700; }
.auth-dialog-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.auth-dialog-close:hover { color: var(--ink); background: var(--bg); }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field > label { font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
  width: 100%;
  box-sizing: border-box;
}
.auth-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.auth-field-label-row label { font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-password-action {
  padding: 0;
  border: none;
  background: none;
  color: var(--need);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-password-row { display: flex; width: 100%; align-items: stretch; gap: 6px; }
.auth-password-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}
.auth-password-field input {
  width: 100%;
  padding-right: 40px;
  box-sizing: border-box;
}
.auth-password-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.auth-password-eye:hover {
  color: var(--ink);
  background: rgb(28 25 23 / 0.05);
}
.auth-password-eye svg {
  display: block;
  pointer-events: none;
}
.auth-password-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.auth-password-icon:hover { color: var(--ink); border-color: var(--ink); }
.auth-password-hint { margin: 0; font-size: 12px; line-height: 1.45; color: var(--warn); }
.auth-dialog-status { min-height: 1.2em; margin: 0; font-size: 13px; color: var(--muted); }
.auth-dialog-status.is-error { color: #b91c1c; }
.auth-dialog-status.is-success { color: var(--ok); }
.auth-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px -22px 0;
  padding: 14px 22px 0;
  border-top: 1px solid var(--line);
}
.auth-dialog-actions .btn {
  width: 100%;
  min-height: 40px;
  text-align: center;
}
.auth-email-wrap { position: relative; width: 100%; }
.auth-email-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 8;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 8px 24px rgb(28 25 23 / 0.12);
}
.auth-email-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
}
.auth-email-suggest button:hover,
.auth-email-suggest button.is-active { background: var(--bg); }
.auth-email-suggest b { display: block; font-size: 13px; color: var(--ink); }
.auth-email-suggest span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-error { color: #b91c1c; font-size: 13px; }
#confirm-ok.danger {
  background: var(--pain);
  border-color: var(--pain);
  color: #fff;
}

.hit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hit-col h3 { margin: 0 0 8px; font-size: 13px; }
.hit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  font: inherit;
}
.hit small { display: block; color: var(--muted); font-size: 11px; word-break: break-all; }
.hit.selected { border-color: var(--ink); background: #f3f1ea; }

.site-footer {
  grid-column: 1 / -1;
  background: var(--panel);
  color: var(--muted);
  padding: 36px 36px 20px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: grid;
  grid-template-columns: 30fr 15fr 15fr 15fr 15fr 15fr;
  gap: 28px 24px;
  max-width: none;
  align-items: start;
}
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.footer-brand p, .footer-col li { margin: 0; font-size: 13px; line-height: 1.55; }
.footer-brand .footer-for { color: var(--ink); margin-bottom: 4px; }
.footer-col h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 650;
}
.footer-col ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.footer-col a, .footer-bar a { color: var(--ink); }
.footer-col a:hover, .footer-bar a:hover { color: var(--need); }
.footer-bar {
  display: flex;
  justify-content: center;
  text-align: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.footer-bar p { margin: 0; }

@media (max-width: 900px) {
  body { width: calc(100% - 24px); }
  body.workspace {
    height: auto;
    max-height: none;
    overflow: visible;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  body.workspace.sidebar-collapsed { grid-template-columns: 1fr; }
  body.workspace.sidebar-collapsed .sidebar-expand-only { display: revert !important; }
  body.workspace.sidebar-collapsed #products-section.sidebar-expand-only,
  body.workspace.sidebar-collapsed #published-section.sidebar-expand-only:not(.hidden) {
    display: flex !important;
    align-items: stretch;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
  }
  body.workspace.sidebar-collapsed #published-section.sidebar-expand-only:not(.hidden) {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  body.workspace.sidebar-collapsed #published-section.sidebar-expand-only:not(.hidden)::before {
    display: none;
  }
  body.workspace.sidebar-collapsed #search-section {
    display: flex !important;
  }
  body.workspace.sidebar-collapsed #products-fold > .section-row,
  body.workspace.sidebar-collapsed #published-section > .section-row {
    display: flex !important;
  }
  body.workspace.sidebar-collapsed #product-filter.hidden {
    display: none !important;
  }
  body.workspace.sidebar-collapsed #product-filter:not(.hidden) {
    display: block !important;
  }
  body.workspace.sidebar-collapsed .published-issue-row {
    display: flex !important;
  }
  body.workspace.sidebar-collapsed .published-issue-select,
  body.workspace.sidebar-collapsed #published-section label[for="published-issue"] {
    display: revert !important;
  }
  body.workspace.sidebar-collapsed .product-list .caption,
  body.workspace.sidebar-collapsed .product-list .section-label,
  body.workspace.sidebar-collapsed .product-hidden-label {
    display: revert !important;
  }
  body.workspace.sidebar-collapsed #products-body[hidden],
  body.workspace.sidebar-collapsed #published-body[hidden],
  body.workspace.sidebar-collapsed #shared-packages-body[hidden] {
    display: none !important;
  }
  body.workspace.sidebar-collapsed #products-fold,
  body.workspace.sidebar-collapsed #products-body:not([hidden]),
  body.workspace.sidebar-collapsed #published-body:not([hidden]),
  body.workspace.sidebar-collapsed #shared-packages-body:not([hidden]) {
    align-items: stretch;
    overflow: visible;
  }
  body.workspace.sidebar-collapsed .product-item { width: auto; padding: 6px 4px 6px 8px; }
  body.workspace.sidebar-collapsed .product-item .item-pick span,
  body.workspace.sidebar-collapsed .product-item .item-acts { display: revert; }
  body.workspace.sidebar-collapsed .product-item .product-icon { width: 40px; height: 40px; }
  .sidebar-toggle { display: none; }
  .sidebar { min-height: auto; height: auto; }
  .product-list { max-height: 42vh; }
  .main { overflow: visible; }
  .site-header { flex-wrap: wrap; gap: 10px; }
  .header-nav { order: 3; width: 100%; }
  .workspace-pill { display: none; }
  .insights:not(.insights-4), .chart-grid, .hit-grid, .footer-inner, .home-grid, .step-grid { grid-template-columns: 1fr; }
}

.home-hero, .home-section {
  padding: 64px 36px;
}
.home-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  background:
    radial-gradient(ellipse at 10% 0%, rgb(232 238 252 / 0.55) 0%, transparent 42%),
    transparent;
}
.home-section {
  scroll-margin-top: 64px;
  background: transparent;
}
.home-hero-copy {
  text-align: center;
}
.home-hero h1 {
  margin: 0 auto 12px;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 650;
  line-height: 1.4;
  max-width: none;
  text-wrap: pretty;
}
.home-hero p.lead { margin: 0 auto 22px; color: var(--muted); font-size: 16px; max-width: 48rem; }
.home-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.home-hero-stories { text-align: left; scroll-margin-top: 64px; }
.home-hero-stories h2 { margin: 0 0 8px; font-size: 26px; }
.home-hero-stories .sub { margin: 0 0 22px; color: var(--muted); line-height: 1.65; }
.story-theme-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.4;
}
.story-theme-link {
  background: none;
  border: 0;
  padding: 2px 0;
  margin: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
}
.story-theme-link:hover { color: var(--ink); }
.story-theme-link.is-on { color: var(--ink); }
.story-theme-sep {
  margin: 0 10px;
  color: var(--line);
  font-weight: 400;
}
.story-theme-more { color: var(--muted); font-weight: 650; }
.story-theme-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  grid-column: 1 / -1;
}
.home-card {
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 20px;
}
.home-card h3 { margin: 0 0 8px; font-size: 16px; }
.home-card p { margin: 0; color: var(--muted); font-size: 13px; }
.home-grid, .step-grid { display: grid; gap: 14px; }
.home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step-num { display: inline-block; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #faf7f0; text-align: center; line-height: 28px; font-size: 13px; font-weight: 650; margin-bottom: 10px; }
.home-section h2 { margin: 0 0 8px; font-size: 26px; }
.home-section .sub { margin: 0 0 22px; color: var(--muted); line-height: 1.65; }
.quote-grid + .quote-grid { margin-top: 14px; }
.story-carousel {
  position: relative;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 0;
  overflow: hidden;
}
.story-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: 280px;
}
.story-slide-cover {
  margin: 0;
  min-height: 240px;
  background: var(--bg);
}
.story-slide-cover-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.story-slide-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 240px;
  transition: opacity 0.15s ease;
}
.story-slide-cover-link:hover img {
  opacity: 0.92;
}
.story-slide-copy {
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
}
.story-beat {
  margin: 0;
  color: var(--need);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
}
.story-beat.story-issue {
  text-transform: none;
  letter-spacing: 0.04em;
}
.story-issue-back {
  color: inherit;
  text-decoration: none;
}
.story-issue-back:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.story-slide-copy h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 650;
}
.story-slide-title-link {
  color: inherit;
  text-decoration: none;
}
.story-slide-title-link:hover {
  color: var(--need);
}
.story-slide-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.story-slide-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 2px 0 0;
}
.story-slide-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 8px 12px;
  background: var(--need-soft);
  border: 1px solid var(--line);
}
.story-slide-stat-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 650;
}
.story-slide-stat-value {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink);
}
.story-slide-copy .story-score-row,
.story-slide-copy .story-studio-line {
  margin: 0;
}
.story-slide-score {
  gap: 8px 12px;
}
.story-slide-score .story-score-label {
  font-size: 14px;
}
.story-slide-score .recommend-star {
  font-size: 20px;
}
.story-score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.story-score-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.story-studio-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  font-size: 14px;
  color: var(--ink);
}
.story-studio-link {
  color: var(--need);
  text-underline-offset: 2px;
}
.story-studio-link:hover {
  text-decoration: underline;
}
.story-studio-name {
  color: var(--ink);
}
.story-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
}
.story-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  flex: 1;
}
.story-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--line);
  cursor: pointer;
}
.story-dot.is-on { background: var(--need); }
.story-carousel-nav .btn { padding: 6px 12px; font-size: 12px; }
.story-issue-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: 0 0 14px;
}
.story-issue-tabs[hidden] {
  display: none !important;
}
.story-issue-tab {
  appearance: none;
  margin: 0;
  padding: 4px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
  line-height: 1.3;
}
.story-issue-tab:hover {
  color: var(--need);
}
.story-issue-tab.is-on {
  color: var(--need);
  border-bottom-color: var(--need);
}
.story-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.story-issue-title {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 650;
  color: var(--need);
  text-align: center;
  letter-spacing: normal;
  text-transform: none;
}
.story-issue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.story-list a.story-list-card,
.story-list-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 0;
  overflow: hidden;
  min-height: 112px;
}
.story-list a.story-list-card:hover,
.story-list-card:hover { filter: brightness(0.99); }
.story-list-media {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  width: 168px;
  padding: 10px 0 0;
  box-sizing: border-box;
  background: var(--card);
  align-self: stretch;
}
.story-list-cover,
.story-list img.story-list-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  object-position: center;
  background: color-mix(in srgb, var(--line) 55%, var(--bg));
  display: block;
  border-radius: 0;
  flex: 0 0 auto;
}
.story-list-cover.placeholder {
  background: color-mix(in srgb, var(--line) 70%, var(--bg));
}
.story-list span { display: block; }
.story-list .recommend-score {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.story-list .recommend-star {
  display: inline-flex;
}
.story-list .story-list-copy {
  padding: 16px 18px;
  min-width: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border-left: 1px solid var(--line);
  align-self: stretch;
  box-sizing: border-box;
}
.story-list b { font-size: 17px; line-height: 1.35; }
.story-list-store {
  display: block;
  margin: 0;
  color: var(--need);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.story-list-store .story-list-pct,
.story-list-store .story-list-price,
.story-list-store .story-list-release {
  display: inline;
}
.story-list small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.story-list-score,
.story-list .story-score-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0 8px 2px;
  border: 0;
  background: transparent;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
}
.story-list-score .story-score-label,
.story-list .story-score-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.story-list-score .recommend-score,
.story-list .story-score-row .recommend-score {
  gap: 3px;
}
.story-list-score .recommend-star,
.story-list .story-score-row .recommend-star {
  font-size: 15px;
}
.recommend-score {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
  color: color-mix(in srgb, var(--muted) 40%, transparent);
  overflow: visible;
}
.recommend-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  font-size: 16px;
  color: inherit;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  line-height: 1;
  overflow: visible;
  flex: 0 0 auto;
}
.recommend-star-icon {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  overflow: visible;
}
.recommend-star.is-on {
  color: #d4a017;
}
.recommend-score.is-editable .recommend-star {
  cursor: pointer;
  font-size: 18px;
  padding: 2px;
  width: auto;
  height: auto;
}
/* Preview fill is continuous: hovering the Nth star lights stars 1..N */
.recommend-score.is-editable:hover .recommend-star,
.recommend-score.is-editable:focus-within .recommend-star {
  color: color-mix(in srgb, var(--muted) 40%, transparent);
}
.recommend-score.is-editable:has(.recommend-star:nth-child(1):hover) .recommend-star:nth-child(-n + 1),
.recommend-score.is-editable:has(.recommend-star:nth-child(2):hover) .recommend-star:nth-child(-n + 2),
.recommend-score.is-editable:has(.recommend-star:nth-child(3):hover) .recommend-star:nth-child(-n + 3),
.recommend-score.is-editable:has(.recommend-star:nth-child(4):hover) .recommend-star:nth-child(-n + 4),
.recommend-score.is-editable:has(.recommend-star:nth-child(5):hover) .recommend-star:nth-child(-n + 5),
.recommend-score.is-editable:has(.recommend-star:nth-child(1):focus-visible) .recommend-star:nth-child(-n + 1),
.recommend-score.is-editable:has(.recommend-star:nth-child(2):focus-visible) .recommend-star:nth-child(-n + 2),
.recommend-score.is-editable:has(.recommend-star:nth-child(3):focus-visible) .recommend-star:nth-child(-n + 3),
.recommend-score.is-editable:has(.recommend-star:nth-child(4):focus-visible) .recommend-star:nth-child(-n + 4),
.recommend-score.is-editable:has(.recommend-star:nth-child(5):focus-visible) .recommend-star:nth-child(-n + 5) {
  color: #c4920f;
}
.recommend-score.is-editable .recommend-star:hover,
.recommend-score.is-editable .recommend-star:focus-visible {
  outline: none;
  transform: scale(1.08);
}
.board-recommend-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 0;
  position: relative;
}
.board-recommend-score.is-readonly {
  margin-top: 0;
}
.board-recommend-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.board-recommend-hint {
  margin: 0;
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  width: max-content;
  max-width: 240px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, max-height 0.15s ease;
}
.board-recommend-score:hover .board-recommend-hint,
.board-recommend-score:focus-within .board-recommend-hint {
  max-height: 2em;
  opacity: 1;
}
.story-score-row,
.story-recommend-score {
  align-items: center;
}
.story-score-label,
.story-recommend-label {
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 720px) {
  .story-issue-grid {
    grid-template-columns: 1fr;
  }
  .story-list a.story-list-card,
  .story-list-card {
    grid-template-columns: 128px minmax(0, 1fr);
    min-height: 96px;
  }
  .story-list-media {
    width: 128px;
    padding: 8px 0 0;
    gap: 6px;
  }
  .story-list .story-list-copy {
    padding: 12px 14px;
  }
  .story-list b { font-size: 15px; }
  .story-list-score,
  .story-list .story-score-row {
    gap: 3px;
  }
  .story-list-score .story-score-label,
  .story-list .story-score-label {
    font-size: 11px;
  }
  .story-list-score .recommend-star,
  .story-list .story-score-row .recommend-star {
    font-size: 13px;
  }
}
.story-article {
  flex: 1;
  width: 100%;
  margin: 0;
  padding: 48px max(48px, calc((100% - 1080px) / 2)) 64px;
}
.story-article .story-cover {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 0 0 22px;
  background: #1c1917;
}
.story-article .story-cover a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.story-article .story-cover img { display: block; width: 100%; height: auto; }
.story-article h1 { margin: 8px 0 12px; font-size: clamp(28px, 4vw, 40px); line-height: 1.2; font-weight: 650; }
.story-title-row {
  display: flex;
  align-items: center;
  gap: 16px 28px;
  /* margin: 8px 0 12px; */
}
.story-title-row h1 {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.story-title-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.story-title-row .story-recommend-score {
  flex-shrink: 0;
  margin-left: 0;
}
.story-steam-id {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  text-decoration: none;
  text-underline-offset: 2px;
}
a.story-steam-id:hover {
  color: var(--need);
  text-decoration: underline;
}
.story-lead {
  display: flex;
  align-items: flex-end;
  gap: 16px 28px;
  margin: 0 0 22px;
}
.story-lead-meta {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.story-recommend-score {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.story-recommend-label {
  font-size: inherit;
  color: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.story-recommend-score .recommend-star {
  font-size: 16px;
}
.story-article .lead {
  margin: 0;
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.story-article .story-body p { margin: 0 0 16px; font-size: 16px; line-height: 1.8; color: var(--ink); }
.story-body-tail { margin-top: 0; padding-top: 0; }
.story-experience {
  margin: 28px 0 32px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.story-experience-head {
  margin: 0 0 8px;
}
.story-experience-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 650;
}
.story-experience-lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.story-experience-chart {
  margin: 8px auto 0;
  max-width: 820px;
  padding: 16px 14px 14px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, #57534e);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 72%, var(--panel));
  overflow: visible;
}
.story-experience-svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.story-revenue-estimate {
  margin: 28px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.story-revenue-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.story-revenue-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
}
.story-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.story-metric-card {
  margin: 0;
  padding: 16px 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.story-metric-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 650;
}
.story-metric-value {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.story-metric-hint {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.story-revenue-note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}
.story-revenue-body {
  margin: 16px 0 0;
}
.story-revenue-body p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
}
.story-revenue-body p:last-child {
  margin-bottom: 0;
}
.story-steam-quotes {
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.story-steam-quotes h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 650;
}
.story-quote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}
.story-quote-card {
  margin: 0;
  padding: 14px 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.story-quote-body {
  margin: 0;
}
.story-quote-body .body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.story-quote-card.expandable:not(.expanded) .story-quote-body .body {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.story-quote-card.expanded .story-quote-body .body {
  display: block;
  -webkit-line-clamp: unset;
}
.story-quote-card.expandable:not(.expanded) .action-evidence-translation p {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.story-quote-footer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 0;
}
.story-quote-more {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
}
.story-quote-card.expanded .story-quote-more { color: var(--ink); }
.story-quote-translate {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0 auto;
  flex: 0 0 auto;
}
.story-quote-who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.story-quote-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.story-quote-head-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.story-quote-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.story-quote-meta b.is-up { color: var(--need); }
.story-quote-meta b.is-down { color: var(--pain); }
.story-quote-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #e7e5e4;
  flex-shrink: 0;
}
.story-quote-avatar.placeholder {
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 650;
  color: #57534e;
}
.story-quote-name {
  color: var(--ink);
  font-weight: 650;
  font-size: 13px;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.story-quote-date {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
a.story-quote-name:hover { text-decoration: underline; }
.story-quote-card blockquote {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}
.story-quotes-more {
  margin: 16px 0 0;
  display: flex;
  justify-content: flex-end;
}
.story-body-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 28px 0 0;
}
.story-article-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  align-items: center;
  margin: 0;
}
.story-author {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 0;
  line-height: 1.2;
}
.story-author-like { display: inline-flex; }
.story-body-end .story-heart-btn {
  font-size: 16px;
  gap: 8px;
}
.story-body-end .story-heart-icon {
  width: 22px;
  height: 22px;
}
.story-heart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
}
.story-heart-btn:hover { color: #e11d48; }
.story-heart-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.story-heart-btn.is-on,
.story-heart-btn[aria-pressed="true"] { color: #e11d48; }
.story-heart-btn.is-on .story-heart-icon,
.story-heart-btn[aria-pressed="true"] .story-heart-icon { fill: currentColor; }
.story-people {
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.story-person {
  margin: 0;
  padding: 22px 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.story-person span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 650;
}
.story-person-names {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
  line-height: 1.45;
}
.story-social {
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.story-like-btn b { font-weight: 650; }
.story-like-btn[aria-pressed="true"],
.story-like-btn.is-on {
  background: var(--need);
  color: #f8fafc;
  border-color: var(--need);
}
.story-post-like { margin-top: 10px; }
.story-post-like .btn { padding: 6px 12px; font-size: 12px; }
.story-social h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 650;
}
.story-social-hint,
.story-social-empty {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.story-post-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.story-post-list li {
  padding: 12px 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 12px;
}
.story-post-list header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}
.story-post-list time { color: var(--muted); font-size: 12px; }
.story-post-list p { margin: 0; font-size: 14px; line-height: 1.7; }
.story-comment-edit { margin-left: auto; padding: 4px 10px; font-size: 12px; }
.story-comment-edited { color: var(--muted); font-size: 12px; }
.story-comment-edit-form textarea {
  width: 100%;
  margin-top: 8px;
  font: inherit;
  line-height: 1.6;
}
.story-comment-edit-actions { display: flex; gap: 8px; margin-top: 8px; }
.story-social-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.story-social-form textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--bg);
  line-height: 1.65;
}
.story-social-error { margin: 0; color: var(--pain); font-size: 13px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.rankings-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 18px;
}
.rankings-head .lead {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rankings-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 10px;
  margin: 0;
  flex: 0 0 auto;
}
.rankings-modes {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}
.rankings-modes .chip.active {
  background: var(--card);
  color: var(--ink);
  border-color: var(--ink);
  font-weight: 650;
}
.rankings-issue-label {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}
.rankings-issue-label.hidden { display: none; }
.rankings-issue-label .published-issue-select {
  min-width: 120px;
  max-width: 180px;
}
@media (max-width: 720px) {
  .rankings-head {
    flex-wrap: wrap;
  }
  .rankings-head .lead {
    flex-basis: 100%;
    white-space: normal;
  }
  .rankings-toolbar {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
.rankings-revenue {
  color: var(--need);
  font-weight: 650;
}
.rankings-revenue.is-unknown {
  color: var(--muted);
  font-weight: 500;
}
.rankings-list li.is-revenue-unknown {
  opacity: 0.78;
}
.rankings-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 160px;
}
.rankings-media .recommend-score {
  margin: 0;
  justify-content: center;
}
.rankings-list .recommend-score {
  margin-left: 0;
}
.rankings-updated {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.rankings-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rankings-list li {
  position: relative;
  display: grid;
  grid-template-columns: 40px 160px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 12px 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 12px;
}
.rankings-list li:has(.rankings-read) .rankings-copy {
  padding-right: 72px;
}
.rankings-n {
  font-size: 20px;
  font-weight: 650;
  color: var(--need);
  text-align: center;
}
.rankings-list img {
  display: block;
  width: 160px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
  background: #1c1917;
}
.rankings-cover {
  display: block;
  width: 160px;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}
.rankings-cover:hover {
  opacity: 0.92;
  box-shadow: 0 0 0 2px var(--need);
}
.rankings-cover img {
  width: 100%;
}
.rankings-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rankings-copy strong {
  font-size: 16px;
  line-height: 1.35;
}
.rankings-copy small { color: var(--muted); font-size: 12px; }
.rankings-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  font-size: 12px;
  color: var(--muted);
}
.rankings-price { color: inherit; font-weight: 650; }
.rankings-price s { color: var(--muted); font-weight: 400; margin-left: 6px; }
.rankings-off { color: #b45309; font-weight: 650; }
.rankings-review { color: var(--need); }
.rankings-about {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rankings-acts {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  pointer-events: none;
}
.rankings-acts .rankings-read {
  pointer-events: auto;
}
.rankings-read { margin: 0; }

.studios-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 18px;
}
.studios-head .lead {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.studios-issue-label {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.studios-issue-label.hidden { display: none; }
.studios-issue-label .published-issue-select {
  min-width: 120px;
  max-width: 180px;
}
@media (max-width: 720px) {
  .studios-head {
    flex-wrap: wrap;
  }
  .studios-head .lead {
    flex-basis: 100%;
  }
  .studios-issue-label {
    margin-left: auto;
  }
}
.studio-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.studio-card {
  display: flex;
  flex-direction: column;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  overflow: hidden;
  scroll-margin-top: 72px;
}
.studio-card.is-target {
  outline: 2px solid color-mix(in srgb, var(--need) 55%, transparent);
  outline-offset: 2px;
}
.studio-card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 460 / 215;
  object-fit: cover;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.studio-card-cover.placeholder {
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 650;
  color: var(--muted);
}
.studio-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 18px;
}
.studio-card-body h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.3;
}
.studio-card-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.studio-card-bio {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.studio-card-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.studio-card-games ul,
.studio-card-links ul,
.studio-card-contacts ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.studio-card-games a,
.studio-card-links a,
.studio-card-contacts a {
  color: var(--ink);
  text-underline-offset: 2px;
}
.studio-card-games a:hover,
.studio-card-links a:hover,
.studio-card-contacts a:hover {
  color: var(--need);
}

@media (max-width: 800px) {
  .rankings-list li {
    grid-template-columns: 32px 1fr;
    grid-template-areas:
      "n img"
      "n copy";
  }
  .rankings-n { grid-area: n; }
  .rankings-media,
  .rankings-cover,
  .rankings-list img { grid-area: img; width: 100%; height: auto; }
  .rankings-media .rankings-cover,
  .rankings-cover img { width: 100%; height: auto; }
  .rankings-copy { grid-area: copy; }
  .rankings-list li:has(.rankings-read) .rankings-copy {
    padding-right: 64px;
  }
  .story-slide { grid-template-columns: 1fr; }
  .story-slide-cover img { min-height: 180px; max-height: 220px; }
  .story-issue-grid { grid-template-columns: 1fr; }
  .story-quote-grid { grid-template-columns: 1fr; }
  .story-people { grid-template-columns: 1fr; }
  .story-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-title-row { flex-direction: column; align-items: stretch; }
  .story-title-meta { margin-left: 0; width: 100%; align-items: flex-end; }
  .story-lead { flex-direction: column; align-items: stretch; }
  .story-author { align-self: flex-end; }
  .story-article { padding: 36px 20px 48px; }
}
.quote-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}
.quote-card blockquote {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
}
.quote-card figcaption {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.5;
}
.quote-card figcaption b,
.quote-card figcaption span {
  display: block;
  line-height: 1.5;
}
.quote-card figcaption b { font-size: 13px; }
.quote-card figcaption span { color: var(--muted); font-size: 12px; }
.review-edit-btn { align-self: flex-start; }
.review-form {
  max-width: 560px;
  margin: 24px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.review-form h3 { margin: 0; }
.review-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5; }
.review-form .caption { margin: 0; line-height: 1.55; }
.review-form input,
.review-form textarea {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--bg);
  line-height: 1.65;
}
.review-form-actions { display: flex; justify-content: center; gap: 8px; }
.review-ok { color: var(--ok); font-size: 13px; margin: 0; }
.home-band { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#testimonials,
#faq {
  text-align: center;
}
#testimonials h2,
#faq h2 {
  margin-bottom: 22px;
}
#testimonials .quote-grid,
#testimonials .review-form {
  text-align: left;
}
#faq .faq-list {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.faq-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 12px;
  overflow: hidden;
  scroll-margin-top: 72px;
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }
.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.15s ease;
  margin-top: -4px;
}
.faq-item[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
  border-color: var(--need);
}
.faq-item summary:hover { color: var(--need); }
.faq-answer {
  padding: 0 20px 18px;
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.faq-item[open] .faq-answer { padding-top: 14px; }
.faq-answer p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.faq-answer p + p {
  margin-top: 12px;
}
.faq-list-plain {
  margin: 12px 0 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.faq-credit-free {
  color: var(--ok);
  font-weight: 700;
}
.faq-answer .faq-after {
  margin-top: 12px;
}
.faq-steps {
  gap: 10px;
}
.faq-steps b {
  color: var(--ink);
  font-weight: 650;
}
body.home .site-header {
  position: sticky;
  padding-left: 20px;
  padding-right: 20px;
}
body.home .site-footer {
  margin-top: auto;
  padding-left: 36px;
  padding-right: 36px;
}
@media (max-width: 900px) {
  .home-hero { padding: 36px 20px; }
  .home-section { padding: 40px 20px; }
  body.home .site-header, body.home .site-footer { padding-left: 20px; padding-right: 20px; }
}
