:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f7f7;
  --ghost: #f2f2f2;
  --border: #e5e5e5;
  --border-strong: #e5e5e5;
  --text: #0a0a0a;
  --muted: #737373;
  --accent: #0a0a0a;
  --accent-soft: #f2f2f2;
  --success: #146c2e;
  --success-soft: #eef6f0;
  --success-mark: #10c22b;
  --warning: #8a5a12;
  --warning-soft: #f8f1e6;
  --danger: #c22b10;
  --danger-soft: #fdecea;
  --radius: 10px;
  --radius-control: 8px;
  --shadow: none;
}

* { box-sizing: border-box; }

/*
 * 必须显式覆盖：本页大量用 hidden 属性控制显隐（弹窗、视图切换、登录/主界面），
 * 而下面这些类自带 display: grid/flex —— 作者样式优先级高于浏览器默认的 [hidden]{display:none}，
 * 不写这一条就会出现「弹窗初始就显示、点关闭关不掉、所有视图叠在一起」。
 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

code, .mono { font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; }

/* ---------- 登录 ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 48px 24px; }
.login-card {
  width: 100%; max-width: 360px; background: transparent; border: 0;
  border-radius: 0; box-shadow: none; padding: 0; display: grid; gap: 22px;
}
.login-card .brand-name { font-size: 22px; letter-spacing: -0.03em; }
.login-brand, .sidebar-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  background: #000; color: #fff; border-radius: 10px;
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { font-size: 15px; font-weight: 500; letter-spacing: -0.02em; }
.brand-logo { width: 34px; height: 34px; flex: none; object-fit: contain; border-radius: 7px; }
.brand-sub { font-size: 12px; color: var(--muted); }
.login-hint { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.login-docs { display: block; margin-top: 14px; text-align: center; font-size: 13px; color: var(--text); }
.login-hint code { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 4px; padding: 1px 4px; }

/* ---------- 布局 ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 28px 16px 20px; display: flex; flex-direction: column; gap: 20px;
  /* grid 子项默认 min-width:auto，窄屏横向滚动条会顶破页面宽度 */
  min-width: 0;
}
.sidebar-brand { padding: 2px 6px 0; }

/* 导航：图标 + 文本 + 计数徽标，活动项带左侧指示条 */
.nav { display: grid; gap: 2px; align-content: start; }
.nav-group-label { font-size: 11px; color: var(--muted); padding: 10px 10px 4px; }
.nav-item {
  appearance: none; border: 0; background: transparent; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  font: inherit; font-size: 13.5px; color: var(--text);
  padding: 9px 12px; border-radius: 8px; position: relative;
  transition: background .12s ease, color .12s ease;
}
.nav-item .nav-icon { display: grid; place-items: center; color: var(--muted); transition: color .12s ease; }
.nav-item .nav-icon svg { width: 17px; height: 17px; }
.nav-item:hover { background: var(--surface-alt); }
.nav-item:hover .nav-icon { color: var(--text); }
.nav-item.is-active { background: var(--ghost); color: var(--text); font-weight: 500; }
.nav-item.is-active .nav-icon { color: var(--text); }
.nav-item.is-active::before { display: none; }
.nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-item--quiet { color: var(--muted); font-size: 13px; }
.nav-item--quiet:hover { color: var(--text); }

.nav-badge {
  font-size: 11px; line-height: 1.75; min-width: 20px; text-align: center; padding: 0 6px;
  border-radius: 999px; color: var(--muted); background: var(--ghost); border: 0;
}
.nav-item.is-active .nav-badge { background: #fff; border-color: var(--border); color: var(--text); }
.nav-badge.is-warning { background: var(--warning-soft); border-color: #f0dcb8; color: var(--warning); }

.sidebar-foot {
  margin-top: auto; display: grid; gap: 6px;
  padding-top: 16px; border-top: 0;
}
.sidebar-meta { font-size: 11.5px; line-height: 1.6; color: var(--muted); padding: 0 4px; }

.main { min-width: 0; padding: 40px 48px 88px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.topbar h1 { margin: 0; font-size: 32px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.15; }
.topbar-sub { margin: 8px 0 0; color: var(--muted); font-size: 14px; max-width: 42rem; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.base-url {
  font-size: 13px; color: var(--muted); background: transparent; border: 0;
  border-radius: 0; padding: 0; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.view { display: grid; gap: 36px; grid-template-columns: minmax(0, 1fr); }

/* ---------- 面板 / 表格 ---------- */
.panel { background: transparent; border: 0; border-radius: 0; min-width: 0; }
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 0 0 12px; border-bottom: 0;
}
.panel-head h2 { margin: 0; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 14px 20px 14px 0; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table th { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; background: transparent; }
.table tr:last-child td { border-bottom: 0; }
.table td.actions { text-align: right; white-space: nowrap; }
.empty-cell { color: var(--muted); text-align: center; padding: 48px 0; }

.stats { display: flex; flex-wrap: wrap; gap: 28px 48px; }
.stat { background: transparent; border: 0; border-radius: 0; padding: 0; min-width: 88px; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 36px; font-weight: 500; letter-spacing: -0.04em; margin-top: 4px; line-height: 1; }

.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: transparent; border: 0; padding: 0;
}
.filters #releases-count, .filters #apps-count { margin-left: auto; }

.picker { position: relative; }
.picker-trigger {
  display: inline-flex; align-items: center; gap: 8px; max-width: 280px; height: 40px;
  padding: 0 10px 0 14px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: var(--text); font: inherit; cursor: pointer;
}
.picker-trigger:hover, .picker-trigger[aria-expanded="true"] { border-color: #0a0a0a; }
.picker-k { color: var(--muted); font-size: 12px; flex: none; }
.picker-v { font-size: 13px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-chevron { width: 14px; height: 14px; flex: none; color: var(--muted); }
.picker-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.picker-menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 100%;
  max-width: 320px; max-height: 280px; overflow: auto; padding: 4px;
  background: #fff; border-radius: 10px;
  box-shadow: 0 12px 32px rgb(10 10 10 / 10%), 0 0 0 1px var(--border);
}
.picker-option {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  font: inherit; font-size: 13px; color: var(--text); padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.picker-option:hover, .picker-option.is-active { background: var(--ghost); }
.picker-option.is-active { font-weight: 500; }
.picker--field { display: block; width: 100%; }
.picker--field .picker-trigger {
  width: 100%; max-width: none; height: 40px; border-radius: var(--radius-control);
  justify-content: space-between; padding: 0 10px 0 12px;
}
.picker--field .picker-v { font-weight: 400; font-size: 14px; }
.picker--field .picker-trigger:disabled { background: var(--surface-alt); color: var(--muted); cursor: default; }
.picker--field .picker-trigger:disabled:hover { border-color: var(--border); }

.schedule-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--border);
  border-radius: var(--radius-control); background: #fff; color: var(--text); font: inherit; cursor: pointer;
}
.schedule-trigger:hover, .schedule-trigger[aria-expanded="true"] { border-color: #0a0a0a; }
.schedule.is-empty .schedule-trigger { color: var(--muted); }
.schedule-trigger svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.schedule-pop {
  position: fixed; z-index: 70; width: 280px; padding: 12px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 16px 40px rgb(10 10 10 / 12%), 0 0 0 1px var(--border);
}
.schedule-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.schedule-nav {
  width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); cursor: pointer; padding: 0;
}
.schedule-nav:hover { background: var(--ghost); }
.schedule-nav svg { width: 14px; height: 14px; }
.schedule-week, .schedule-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.schedule-week { margin-bottom: 4px; color: var(--muted); font-size: 11px; text-align: center; }
.schedule-day {
  height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text);
  font: inherit; font-size: 13px; cursor: pointer;
}
.schedule-day:hover { background: var(--ghost); }
.schedule-day.is-today { box-shadow: inset 0 0 0 1px var(--border); }
.schedule-day.is-selected, .schedule-day.is-selected:hover { background: #0a0a0a; color: #fff; box-shadow: none; }
.schedule-time { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.schedule-time input { width: 52px; height: 32px; padding: 0; text-align: center; }
.schedule-time span { color: var(--muted); }
.schedule-clear {
  margin-left: auto; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.schedule-clear:hover { background: var(--ghost); color: var(--text); }

.qr-popover {
  position: fixed; z-index: 40; width: min(360px, calc(100vw - 16px)); padding: 12px 12px 14px;
  background: #fff; border-radius: 14px;
  box-shadow: 0 16px 40px rgb(10 10 10 / 12%), 0 0 0 1px var(--border);
}
.qr-popover-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 500; }
.qr-mark { margin: 8px auto 0; width: 168px; height: 168px; }
.qr-mark svg { display: block; width: 168px; height: 168px; }
.qr-mark rect { fill: #0a0a0a; }
.qr-caption {
  margin: 10px 0 0; font-size: 11px; line-height: 1.45; color: var(--muted);
  word-break: break-all; white-space: normal;
}
.qr-foot { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ---------- 版本分组：应用 → 客户端平台/架构 → 版本 ---------- */
.release-groups { display: grid; gap: 28px; }
.app-group { background: transparent; border: 0; border-radius: 0; overflow: hidden; }
.app-group-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 0 0 8px; background: transparent;
}
.app-group-head .app-title { font-weight: 600; font-size: 14px; }
.app-group-head .app-meta { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.app-group-head .spacer { flex: 1 1 auto; }
.app-group-empty { padding: 18px 16px; color: var(--muted); font-size: 13px; }

.platform-group { border-top: 1px solid var(--border); }
.app-group-head + .platform-group { border-top: 0; }
.platform-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 0 8px;
}
.platform-head .platform-name { font-weight: 600; }
.platform-head .spacer { flex: 1 1 auto; }

.release-row {
  display: grid; grid-template-columns: 96px 84px 132px minmax(160px, 1fr) 104px auto;
  gap: 12px; align-items: center; padding: 12px 0;
  border-top: 1px solid var(--border); font-size: 13px;
}
.release-row:hover { background: var(--surface-alt); }
.release-row .rel-version { font-weight: 600; }
.release-row .rel-file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-row .rel-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.platform-empty { padding: 2px 16px 12px; color: var(--muted); font-size: 12.5px; }

.platform-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.platform-chip {
  font-size: 11.5px; line-height: 1.6; border: 1px solid var(--border);
  border-radius: 999px; padding: 0 7px; color: var(--muted);
}
.platform-chip.is-active { color: var(--success); border-color: #cbe8d6; background: var(--success-soft); }

/* ---------- 表单 ---------- */
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field-label { font-size: 13px; color: var(--text); font-weight: 500; }
.field--inline { display: flex; align-items: center; gap: 8px; }
.field--inline .field-label { font-size: 12.5px; }
.field--action { align-self: end; }
input, select, textarea {
  appearance: none; font: inherit; color: var(--text); background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-control); padding: 8px 12px; width: 100%;
}
input:not([type="checkbox"]):not([type="file"]):not([type="hidden"]) { height: 40px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #0a0a0a; outline-offset: 1px; border-color: #0a0a0a; }
textarea { height: auto; min-height: 120px; resize: vertical; font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; letter-spacing: 0; }
input:disabled, select:disabled, input[readonly]:not(.secret-input) { background: var(--surface-alt); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 20px; padding: 0; align-items: start; }
.form-grid .field--wide { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.form-actions .btn { height: 40px; }
.form-error { color: var(--danger); font-size: 12.5px; margin: 0; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.checkline input {
  appearance: none; width: 16px; height: 16px; margin: 0; flex: none; padding: 0;
  border: 1px solid #cfcfcf; border-radius: 4px; background: #fff; display: grid; place-items: center; cursor: pointer;
}
.checkline input:checked { background: #0a0a0a; border-color: #0a0a0a; }
.checkline input:checked::after {
  content: ''; width: 8px; height: 4px; border-left: 1.6px solid #fff; border-bottom: 1.6px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.checkline input:focus { outline-offset: 2px; }
.hint { font-size: 12px; color: var(--muted); }
.secret { position: relative; display: block; }
.secret-input { padding-right: 36px; -webkit-text-security: disc; }
.secret-input.is-revealed { -webkit-text-security: none; }
.secret-toggle {
  position: absolute; top: 1px; right: 1px; bottom: 1px; width: 32px;
  display: grid; place-items: center; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.secret-toggle:hover { background: var(--ghost); color: var(--text); }
.secret-toggle svg { width: 16px; height: 16px; }

.btn {
  appearance: none; font: inherit; cursor: pointer; border-radius: var(--radius-control); padding: 8px 16px; height: 40px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.btn:hover:not(:disabled) { background: var(--ghost); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: #000; border-color: #000; color: #fff; }
.btn--primary:hover:not(:disabled) { background: #262626; border-color: #262626; }
.btn--danger { color: var(--danger); border-color: #f0c9c2; background: var(--danger-soft); }
.btn--ghost { background: transparent; }
.btn--sm { height: auto; padding: 5px 10px; font-size: 12.5px; border-radius: 999px; }
.btn--block { width: 100%; justify-content: center; }
.icon-btn { appearance: none; border: 0; background: transparent; cursor: pointer; font-size: 14px; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-alt); color: var(--text); }

/* ---------- 徽章 ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid transparent; }
.badge--neutral { background: var(--ghost); color: var(--text); }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--success::before { content: ''; width: 6px; height: 6px; border-radius: 99px; background: var(--success-mark); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: #000; color: #fff; }
.tag { display: inline-block; font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.stack { display: grid; gap: 2px; }

/* ---------- 预览结果 ---------- */
.result { padding: 0; display: grid; gap: 16px; }
.result-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-all; }
.code-block {
  background: #0a0a0a; color: #f7f8f8; border-radius: 10px; padding: 14px 16px; font-size: 12.5px;
  overflow-x: auto; white-space: pre; letter-spacing: 0;
}
.notes { white-space: pre-wrap; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; font-size: 13px; }

/* ---------- 接口文档 ---------- */
.api-blocks { display: grid; gap: 20px; padding: 0; }
.api-block { display: grid; gap: 6px; }
.copy-row { display: flex; align-items: center; gap: 8px; }
.copy-row code {
  flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: 6px;
  padding: 7px 9px; font-size: 12.5px;
}
.api-output { display: grid; gap: 16px; padding: 0; }
.steps { margin: 0; padding: 4px 0 0 22px; display: grid; gap: 10px; font-size: 14px; }
.api-notes { padding: 0; display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.api-notes div::before { content: '· '; }

/* ---------- 弹窗 ---------- */
html:has(#modal-root:not([hidden])),
body:has(#modal-root:not([hidden])) { overflow: hidden; }
.modal-root { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal-backdrop { position: absolute; inset: 0; background: rgb(16 24 40 / 45%); }
.modal {
  position: relative; width: min(760px, 100%); max-height: 88vh; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: -0.02em; }
.modal-body { padding: 20px 24px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--border); background: transparent; }

.share-upload { padding: 0; display: grid; gap: 16px; }
.share-address { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex: none; min-width: 0; }
.share-address code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.modal:has(.share-preview) { height: min(88vh, 820px); }
.modal-body:has(.share-preview) {
  flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
}
.share-preview {
  position: relative; flex: 1; min-height: 0; height: auto;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.share-preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.share-preview--text {
  overflow: auto; margin: 0; padding: 16px 18px;
  white-space: pre-wrap; overflow-wrap: anywhere;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.6; color: var(--text);
}
#shares-table code { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-kind { display: inline-flex; gap: 6px; align-items: center; vertical-align: middle; white-space: nowrap; }
#shares-table td { vertical-align: middle; }
#shares-table td.actions { white-space: nowrap; }
.form-grid.share-limits {
  grid-template-columns: minmax(0, 440px);
  gap: 22px;
  max-width: 440px;
  padding: 4px 0 0;
}
.share-limit-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.progress { height: 4px; background: var(--ghost); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; width: 0; background: #000; transition: width .15s linear; }

.page-tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-tabs { display: flex; gap: 4px; }
.page-tab {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 10px; cursor: pointer;
}
.page-tab.is-active { background: var(--ghost); color: var(--text); }
.api-pane { display: grid; gap: 36px; }

.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--ghost); border-radius: 999px;
}
.segmented-btn {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; border-radius: 999px; padding: 7px 12px; cursor: pointer;
}
.segmented-btn.is-active { background: #fff; color: #0a0a0a; box-shadow: 0 0 0 1px var(--border); }

.dropzone {
  position: relative; display: grid; place-items: center; min-height: 148px;
  border: 1px dashed #cfcfcf; border-radius: var(--radius); background: #fff;
  text-align: center; cursor: pointer;
}
.dropzone input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.dropzone.has-file input[type="file"] { pointer-events: none; }
.dropzone.is-dragover { border-color: #0a0a0a; background: var(--ghost); }
.dropzone-empty, .dropzone-file { display: grid; justify-items: center; gap: 4px; pointer-events: none; }
.dropzone-empty svg { width: 22px; height: 22px; stroke: #0a0a0a; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dropzone-empty strong { font-weight: 500; }
.dropzone-empty span, .dropzone-file-name { color: var(--muted); font-size: 12.5px; }
.dropzone-file { pointer-events: auto; position: relative; z-index: 1; }
.dropzone-file-name { color: var(--text); font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.link-panel { display: grid; gap: 8px; }
.link-panel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 80; }
.toast {
  background: #0a0a0a; color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 13px;
  max-width: 360px;
}
.toast--error { background: #8f2c20; }
.toast--success { background: #1c6b3e; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px;
    overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border);
  }
  .sidebar-brand { flex: none; }
  .sidebar-brand > div { min-width: max-content; }
  .brand-name { white-space: nowrap; }
  .nav { grid-auto-flow: column; align-items: center; gap: 4px; }
  .nav-group-label { display: none; }
  .nav-item { grid-template-columns: 18px auto auto; }
  .nav-text { white-space: nowrap; }
  .nav-item.is-active::before { display: none; }
  .sidebar-foot {
    margin: 0 0 0 auto; display: flex; align-items: center; gap: 4px;
    border-top: 0; padding-top: 0;
  }
  .sidebar-meta { display: none; }
  .main { padding: 24px 16px 48px; }
  .topbar h1 { font-size: 26px; }
  .form-grid.share-limits { max-width: none; grid-template-columns: minmax(0, 1fr); }
  .topbar { flex-direction: column; }
  .release-row { grid-template-columns: 1fr; gap: 4px; }
  .release-row .rel-actions { justify-content: flex-start; }
}
