:root {
  color-scheme: light;
  --background: #f8fafc;
  --foreground: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --panel: #ffffff;
  --primary: #111827;
  --primary-foreground: #ffffff;
  --accent: #f1f5f9;
  --ring: #94a3b8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.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;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
}

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

.brand.large {
  justify-content: center;
}

.brand-mark,
.brand-icon {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.brand-mark {
  place-items: center;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 700;
}

.brand-icon {
  display: block;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav-stack {
  flex: 1;
  overflow: auto;
}

.product-nav {
  margin-bottom: 8px;
}

.product-nav summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.product-nav summary::-webkit-details-marker {
  display: none;
}

.product-links {
  display: grid;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #334155;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--accent);
  color: var(--foreground);
}

.sidebar-footer {
  display: grid;
  gap: 8px;
}

.sidebar-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 14px;
}

.content {
  padding: 28px;
}

.auth-content {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 28px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.2;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel,
.empty-state,
.asset-card,
.task-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.panel {
  padding: 18px;
  margin-bottom: 20px;
}

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

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

.upload-strip,
.inline-actions,
.member-form,
.product-form,
.status-form,
.revision-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.revision-form {
  align-items: stretch;
  flex-direction: column;
  margin-top: 12px;
}

.primary-button,
.ghost-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.primary-button {
  background: var(--primary);
  color: var(--primary-foreground);
}

.ghost-button {
  border-color: var(--border);
  background: var(--panel);
  color: var(--foreground);
}

.compact-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.pixel-level-sequence-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: calc(100vh - 78px);
  height: calc(100dvh - 78px);
  min-height: 0;
}

.pixel-level-sequence-head {
  margin-bottom: 0;
}

.pixel-level-sequence-head h1 {
  margin-top: 2px;
}

.pixel-level-sequence-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.pixel-level-action-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pixel-level-sort-group {
  padding-left: 10px;
  border-left: 1px solid #d8dfec;
}

.pixel-level-sort-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pixel-level-sort-actions[hidden] {
  display: none;
}

.pixel-level-sequence-page.is-sort-mode [data-sort-enter] {
  display: none;
}

.pixel-level-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 0;
  min-height: 0;
  overflow-x: auto;
  border-bottom: 1px solid #d8dfec;
  padding: 0 2px;
}

.pixel-stage-track-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #d8dfec;
  border-radius: 8px;
  background: #fff;
}

.pixel-stage-track-summary,
.pixel-stage-track-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pixel-stage-track-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.tiny-track-change-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tiny-track-change-select {
  width: 104px;
}

.pixel-stage-track-summary .eyebrow {
  margin: 0 4px 0 0;
}

.pixel-stage-track-summary strong {
  font-size: 15px;
}

.pixel-stage-track-summary span,
.pixel-stage-track-summary small {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #536279;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.pixel-stage-track-search {
  flex: 0 1 260px;
  min-width: 220px;
  max-width: 280px;
  display: inline-flex;
  align-items: center;
}

.pixel-stage-track-search-field {
  width: 100%;
  height: 36px;
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #d8dfec;
  border-radius: 8px;
  background: #fff;
}

.pixel-stage-track-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 0 10px 0 12px;
  background: transparent;
  color: #111827;
  font-size: 14px;
  font-weight: 750;
}

.pixel-stage-track-search input:focus {
  outline: none;
}

.pixel-stage-track-search input::placeholder {
  color: #94a3b8;
}

.pixel-stage-track-search-field:focus-within {
  border-color: #9fb4d5;
  box-shadow: 0 0 0 3px rgba(15, 71, 138, 0.08);
}

.pixel-stage-track-search-submit {
  flex: 0 0 auto;
  min-width: 52px;
  border: 0;
  border-left: 1px solid #d8dfec;
  padding: 0 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.pixel-stage-track-search-submit:hover {
  background: #eef2f7;
  color: #111827;
}

.pixel-stage-track-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pixel-stage-track-select-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.pixel-stage-track-select {
  width: min(340px, 42vw);
}

.pixel-stage-active-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.pixel-stage-active-button {
  min-width: 142px;
}

.pixel-stage-archive-button {
  min-width: 104px;
  border-color: #fecaca;
  color: #b42318;
}

.pixel-stage-archive-button:hover {
  border-color: #fca5a5;
  background: #fff1f2;
}

.pixel-stage-track-actions form {
  display: inline-flex;
}

.pixel-level-download-menu {
  position: relative;
  display: inline-flex;
}

.pixel-level-download-menu-panel[hidden] {
  display: none;
}

.pixel-level-download-menu-panel {
  position: absolute;
  z-index: 25;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 164px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 24, 38, 0.14);
}

.pixel-stage-track-actions .pixel-level-download-menu-panel form {
  display: block;
}

.pixel-level-download-menu-panel button {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.pixel-level-download-menu-panel button:hover,
.pixel-level-download-menu-panel button:focus-visible {
  outline: none;
  background: var(--surface-soft);
}

.notice-bar {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
}

.pixel-level-tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 4px 20px 0;
}

.pixel-level-switch {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 3px;
  border: 1px solid #d8dfec;
  border-radius: 8px;
  background: #f8fafc;
}

.pixel-level-switch a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 6px;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.pixel-level-switch a.is-active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.pixel-level-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 2px -1px 0;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-bottom-color: #d8dfec;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #64748b;
  white-space: nowrap;
}

.pixel-level-tab.is-active {
  border-color: #d8dfec;
  border-bottom-color: #fff;
  background: #fff;
  color: #111827;
  box-shadow: none;
}

.pixel-level-tab span,
.pixel-level-tab small,
.pixel-level-tab em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.pixel-level-tab small {
  font-weight: 750;
}

.pixel-level-tab em {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
}

.pixel-level-version-meta,
.pixel-level-stage,
.pixel-level-manager-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.pixel-level-manager-summary {
  display: grid;
  gap: 4px;
}

.pixel-level-manager-row span {
  color: var(--muted);
  font-size: 13px;
}

.pixel-level-stage-list {
  display: grid;
  gap: 12px;
}

.pixel-level-stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0 20px;
}

.pixel-level-stage-pagination {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

.pixel-level-stage-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.pixel-level-page-arrow,
.pixel-level-page-number,
.pixel-level-page-ellipsis {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--foreground);
  font-size: 18px;
  font-weight: 750;
}

.pixel-level-page-arrow {
  color: var(--muted);
  font-size: 30px;
  line-height: 1;
}

.pixel-level-page-number.is-current {
  background: #f1f3f7;
  color: #05070d;
}

.pixel-level-page-arrow.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.pixel-level-stage-page-size {
  display: inline-flex;
  align-items: center;
}

.pixel-level-stage-page-size select,
.pixel-level-stage-go-form input {
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f3f7;
  color: #05070d;
  font: inherit;
  font-weight: 750;
}

.pixel-level-stage-page-size select {
  min-width: 128px;
  padding: 0 36px 0 16px;
}

.pixel-level-stage-go-form label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #05070d;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.pixel-level-stage-go-form input {
  width: 80px;
  padding: 0 10px;
  text-align: center;
}

.pixel-level-stage {
  padding: 10px;
}

.pixel-level-stage.is-stable-id-search-match {
  border-color: #99f6e4;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.14);
}

.pixel-level-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.pixel-level-stage-head h2 {
  margin: 0;
  font-size: 18px;
}

.pixel-level-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 10px;
}

.pixel-level-candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  max-height: min(56vh, 520px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.pixel-level-daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

.pixel-level-day-slot {
  display: grid;
  gap: 6px;
  min-height: 132px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.pixel-level-day-slot > strong {
  color: #475569;
  font-size: 12px;
}

.pixel-level-day-card {
  min-height: 96px;
}

.pixel-level-day-add {
  min-height: 88px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1f5a9d;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
}

.pixel-level-day-add[hidden] {
  display: none !important;
}

.pixel-level-add-event {
  gap: 8px;
}

.pixel-level-add-event input {
  width: min(260px, 100%);
}

.pixel-level-dialog {
  width: min(420px, calc(100vw - 32px));
  gap: 14px;
}

.pixel-level-copy-modal {
  width: min(460px, calc(100vw - 32px));
  gap: 14px;
}

.pixel-level-import-details-modal {
  width: min(820px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  gap: 14px;
}

.pixel-level-copy-modal form,
.pixel-level-copy-field {
  display: grid;
  gap: 10px;
}

.pixel-level-copy-source {
  margin: 0;
  color: #475569;
  font-size: 14px;
}

.pixel-level-copy-field span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.pixel-level-copy-field select,
.pixel-level-copy-field input {
  min-height: 38px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.pixel-level-reward-list {
  display: grid;
  gap: 8px;
}

.pixel-level-reward-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px auto;
  gap: 8px;
  align-items: center;
}

.pixel-stage-release-grid {
  display: grid;
  gap: 16px;
}

.pixel-event-page,
.pixel-event-detail-page {
  display: grid;
  gap: 16px;
}

.pixel-event-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pixel-event-status-switch {
  flex: 0 0 auto;
}

.pixel-event-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pixel-event-toolbar-actions [hidden] {
  display: none;
}

.pixel-event-toolbar-actions .pixel-level-sort-group {
  padding-left: 0;
  border-left: 0;
}

.pixel-event-create-action {
  padding-left: 12px;
  border-left: 1px solid #d8dfec;
}

.pixel-event-create-form {
  display: grid;
  gap: 16px;
}

.pixel-event-detail-form label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.pixel-upload-panel.pixel-event-create-modal {
  width: min(760px, 100%);
}

.pixel-upload-panel.pixel-event-detail-modal {
  width: min(920px, 100%);
}

.pixel-event-create-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pixel-event-create-upload-grid > div {
  display: grid;
  gap: 7px;
}

.pixel-event-upload-label {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.pixel-event-create-modal .pixel-upload-dropzone {
  min-height: 170px;
}

.pixel-event-feed {
  display: grid;
  gap: 10px;
}

.pixel-event-row {
  display: grid;
  grid-template-columns: 22px 116px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 128px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.pixel-event-row:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.pixel-event-row:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.pixel-event-drag-handle {
  display: grid;
  gap: 4px;
  opacity: 0;
  cursor: grab;
}

.pixel-event-drag-handle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #94a3b8;
}

.is-sort-mode .pixel-event-drag-handle {
  opacity: 1;
}

.is-sort-mode .pixel-event-row {
  cursor: grab;
}

.is-sort-mode .pixel-event-row-actions {
  visibility: hidden;
}

.pixel-event-row.is-dragging {
  opacity: 0.5;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.pixel-event-drag-placeholder {
  min-height: 146px;
  border: 1px dashed #64748b;
  border-radius: 8px;
  background: #f8fafc;
}

.pixel-event-thumb {
  width: 116px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #f1f5f9;
}

.pixel-event-thumb img,
.pixel-event-detail-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.pixel-event-copy-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.pixel-event-copy-body > div {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.pixel-event-copy-body strong {
  font-size: 17px;
}

.pixel-event-copy-body span,
.pixel-event-copy-body small {
  color: #64748b;
  font-size: 12px;
}

.pixel-event-copy-body code,
.pixel-event-meta-list code {
  overflow-wrap: anywhere;
  color: #475569;
  font-size: 12px;
}

.pixel-event-row-actions form {
  margin: 0;
}

.pixel-event-detail-modal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(360px, 1.15fr);
  gap: 18px;
  align-items: start;
}

.pixel-event-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.2fr);
  gap: 18px;
  align-items: start;
}

.pixel-event-detail-preview {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.pixel-event-detail-form {
  display: grid;
  gap: 14px;
}

.pixel-event-detail-modal .pixel-upload-dropzone {
  min-height: 140px;
}

.pixel-event-meta-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.pixel-event-meta-list div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px;
}

.pixel-event-meta-list dt {
  color: #64748b;
}

.pixel-event-meta-list dd {
  min-width: 0;
  margin: 0;
}

@media (max-width: 900px) {
  .pixel-event-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pixel-event-toolbar-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .pixel-event-create-action {
    padding-left: 10px;
  }

  .pixel-event-detail-layout {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .pixel-event-detail-modal-layout {
    grid-template-columns: 1fr;
  }

  .pixel-event-row {
    grid-template-columns: 18px 96px minmax(0, 1fr);
  }

  .pixel-event-thumb {
    width: 96px;
  }

  .pixel-event-row-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .pixel-event-create-upload-grid {
    grid-template-columns: 1fr;
  }
}

.pixel-stage-release-panel {
  display: grid;
  gap: 12px;
}

.pixel-stage-release-list {
  display: grid;
  gap: 10px;
}

.pixel-stage-release-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.pixel-stage-release-snapshot-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.pixel-stage-release-row > div:first-child {
  display: grid;
  gap: 4px;
}

.pixel-stage-release-row span {
  color: #64748b;
  font-size: 13px;
}

.stage-release-track-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stage-release-track-select span {
  flex: 0 0 auto;
  font-weight: 750;
}

.stage-release-track-select select {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.stage-release-track-empty {
  margin: 0;
}

.pixel-stage-release-row code {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: 12px;
}

.stage-release-config-code {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.5;
}

.stage-release-copy-button {
  white-space: nowrap;
}

.stage-release-confirm-dialog {
  width: min(560px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 20px;
}

.stage-release-confirm-dialog .section-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.stage-release-confirm-dialog .modal-actions {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.stage-release-confirm-message {
  min-height: 0;
  overflow: auto;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.stage-release-rollback-dialog {
  max-width: 680px;
}

.stage-release-test-history-dialog {
  width: min(720px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 48px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.stage-release-test-history-dialog .section-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.stage-release-rollback-list {
  display: grid;
  gap: 10px;
}

.stage-release-history-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.stage-release-rollback-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.stage-release-rollback-option > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stage-release-rollback-option span {
  color: #64748b;
  font-size: 13px;
}

.stage-release-history-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}

.stage-release-history-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stage-release-history-body span {
  color: #64748b;
  font-size: 13px;
}

.stage-release-history-actions {
  justify-content: flex-end;
}

.stage-release-test-history-dialog .modal-actions {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.pixel-stage-release-result {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .pixel-stage-release-row,
  .stage-release-rollback-option,
  .stage-release-history-option {
    grid-template-columns: 1fr;
  }
}

.pixel-level-dialog .section-head {
  margin: 0;
}

.pixel-level-dialog-message {
  margin: 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.6;
}

.pixel-level-preview-meta {
  margin-bottom: 14px;
}

.pixel-level-meta-form {
  display: grid;
  gap: 10px;
}

.pixel-level-meta-form > div {
  display: grid;
  gap: 6px;
}

.pixel-level-meta-form span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.pixel-level-meta-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pixel-level-meta-options label {
  cursor: pointer;
}

.pixel-level-meta-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pixel-level-meta-options b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d8dfec;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.pixel-level-meta-options input:checked + b {
  border-color: #1f5a9d;
  background: #e8f1ff;
  color: #1f5a9d;
}

.pixel-level-meta-form small {
  min-height: 16px;
  color: #0f766e;
  font-size: 12px;
}

.pixel-level-card,
.pixel-level-candidate {
  position: relative;
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--foreground);
}

.pixel-level-card {
  min-height: 164px;
  cursor: pointer;
}

.pixel-level-card.is-stable-id-match {
  border-color: #14b8a6;
  background: #f0fdfa;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.18), 0 8px 18px rgba(15, 23, 42, 0.08);
}

.pixel-level-card.is-stable-id-match .pixel-level-card-id-pill {
  background: #0f766e;
  color: #fff;
}

.pixel-level-candidate {
  min-height: 126px;
}

.is-sort-mode .pixel-level-card[data-sequence-item] {
  cursor: grab;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.pixel-level-card.is-dragging {
  opacity: 0.42;
  transform: scale(0.98);
}

.pixel-level-drag-placeholder {
  min-height: 164px;
  border: 1px dashed #64748b;
  border-radius: 8px;
  background: #f8fafc;
}

.pixel-level-thumb,
.pixel-level-candidate-thumb {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: #f8fafc;
}

.pixel-level-thumb img,
.pixel-level-candidate-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.pixel-level-card span,
.pixel-level-candidate strong,
.pixel-level-candidate small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pixel-level-card span,
.pixel-level-candidate strong {
  font-size: 12px;
  font-weight: 700;
}

.pixel-level-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pixel-level-card-pills b {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.pixel-level-card-pills .pixel-level-card-id-pill {
  background: #ccfbf1;
  color: #0f766e;
}

.pixel-level-card-pills .tiny-track-change-status.is-added {
  background: #e0f2fe;
  color: #075985;
}

.pixel-level-card-pills .tiny-track-change-status.is-level_modified {
  background: #fef3c7;
  color: #92400e;
}

.pixel-level-card-pills .tiny-track-change-status.is-reordered {
  background: #ede9fe;
  color: #6d28d9;
}

.pixel-level-card-pills .tiny-track-change-status.is-removed {
  background: #fee2e2;
  color: #b91c1c;
}

.tiny-gameplay-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tiny-gameplay-pill,
.pixel-level-card-pills .tiny-gameplay-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  border-color: var(--tiny-gameplay-border, transparent);
  background: var(--tiny-gameplay-bg, #e7ebf0);
  color: var(--tiny-gameplay-text, #3e4a59);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
}

.pixel-level-card-pills .tiny-gameplay-pill {
  min-height: 18px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
}

.tiny-gameplay-pill--1 { --tiny-gameplay-bg: #d7f4ec; --tiny-gameplay-text: #126b57; --tiny-gameplay-border: #afe5d7; }
.tiny-gameplay-pill--2 { --tiny-gameplay-bg: #ddebff; --tiny-gameplay-text: #245ea8; --tiny-gameplay-border: #bdd5f7; }
.tiny-gameplay-pill--3 { --tiny-gameplay-bg: #f1ddd5; --tiny-gameplay-text: #7a3e2f; --tiny-gameplay-border: #dfbcae; }
.tiny-gameplay-pill--4 { --tiny-gameplay-bg: #fff0b8; --tiny-gameplay-text: #725800; --tiny-gameplay-border: #e8d277; }
.tiny-gameplay-pill--5 { --tiny-gameplay-bg: #eadfff; --tiny-gameplay-text: #5f3ba3; --tiny-gameplay-border: #d0bdf5; }
.tiny-gameplay-pill--6 { --tiny-gameplay-bg: #ffe1cc; --tiny-gameplay-text: #95450d; --tiny-gameplay-border: #f2bf98; }
.tiny-gameplay-pill--7 { --tiny-gameplay-bg: #ffe0e3; --tiny-gameplay-text: #9b2c3d; --tiny-gameplay-border: #f2b7bf; }
.tiny-gameplay-pill--8 { --tiny-gameplay-bg: #e2e7ec; --tiny-gameplay-text: #364352; --tiny-gameplay-border: #c3ccd5; }
.tiny-gameplay-pill--9 { --tiny-gameplay-bg: #dcf3d8; --tiny-gameplay-text: #34712d; --tiny-gameplay-border: #b9ddaf; }
.tiny-gameplay-pill--10 { --tiny-gameplay-bg: #fce0d3; --tiny-gameplay-text: #93442d; --tiny-gameplay-border: #edbba9; }
.tiny-gameplay-pill--11 { --tiny-gameplay-bg: #f8ddf0; --tiny-gameplay-text: #8d2f70; --tiny-gameplay-border: #e9b8d9; }
.tiny-gameplay-pill--12 { --tiny-gameplay-bg: #e1e4ff; --tiny-gameplay-text: #3d4c9e; --tiny-gameplay-border: #c2c8f2; }
.tiny-gameplay-pill--13 { --tiny-gameplay-bg: #ecf5bf; --tiny-gameplay-text: #5b6c13; --tiny-gameplay-border: #d1df86; }
.tiny-gameplay-pill--14 { --tiny-gameplay-bg: #d9f3f7; --tiny-gameplay-text: #166876; --tiny-gameplay-border: #afe0e7; }

.tiny-track-removed-card {
  border-style: dashed;
  background: #fffafa;
}

.tiny-track-removed-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fef2f2;
  color: #b91c1c;
}

.tiny-track-removed-thumb strong {
  font-size: 12px;
}

.tiny-track-level-editor {
  width: 100%;
  min-height: 28px;
  justify-content: center;
  margin-top: 2px;
}

.pixel-level-card small,
.pixel-level-candidate small {
  color: var(--muted);
  font-size: 11px;
}

.pixel-level-card form {
  position: absolute;
  top: 4px;
  right: 4px;
  transform: translate(48%, -48%);
  width: 22px;
  height: 22px;
  display: block;
  margin: 0;
  background: transparent;
  cursor: default;
  z-index: 3;
}

.pixel-level-remove-trigger {
  all: unset;
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid #d8dfec;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: #64748b;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  cursor: pointer;
}

.pixel-level-remove-trigger:hover {
  border-color: #c7d2e4;
  background: #fff;
  color: #334155;
}

.pixel-level-remove-trigger:focus-visible {
  outline: 2px solid rgba(31, 90, 157, 0.28);
  outline-offset: 2px;
}

.is-sort-mode .pixel-level-card form,
.is-sort-mode .pixel-level-add-card {
  display: none;
}

.pixel-level-add-card {
  min-height: 164px;
  align-content: center;
  justify-items: center;
  border-style: dashed;
  cursor: pointer;
  text-align: center;
}

.pixel-level-add-card strong {
  font-size: 34px;
  line-height: 1;
}

.pixel-level-add-stage {
  display: flex;
  justify-content: center;
  padding: 8px 0 20px;
}

.pixel-level-manager,
.pixel-level-add-modal {
  width: min(960px, calc(100vw - 32px));
}

.pixel-level-version-form {
  display: grid;
  grid-template-columns: minmax(100px, 0.8fr) minmax(140px, 1fr) minmax(140px, 1.2fr) auto;
  gap: 8px;
  align-items: center;
}

.pixel-level-version-form input,
.pixel-level-version-form select,
.pixel-level-candidate-filter input,
.pixel-level-candidate-filter select {
  min-height: 36px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.pixel-level-manager-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.pixel-level-manager-row {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.pixel-level-history {
  color: var(--muted);
  font-size: 13px;
}

.pixel-level-history p {
  margin: 6px 0;
}

.pixel-level-candidate-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.pixel-level-candidate {
  cursor: pointer;
}

.pixel-level-candidate input {
  position: absolute;
  top: 8px;
  left: 8px;
}

.pixel-level-candidate:has(input:checked) {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827 inset;
}

.pixel-level-candidate-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 760px) {
  .pixel-level-sequence-page {
    height: calc(100vh - 44px);
    height: calc(100dvh - 44px);
  }

  .pixel-stage-track-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pixel-stage-track-actions {
    align-items: stretch;
  }

  .pixel-stage-track-switch,
  .pixel-stage-track-search,
  .pixel-stage-track-actions form,
  .pixel-stage-track-select,
  .pixel-stage-active-button,
  .pixel-stage-archive-button,
  .pixel-stage-track-actions .primary-button {
    width: 100%;
  }

  .tiny-track-change-select {
    width: 100%;
  }

  .pixel-stage-track-select-label {
    flex: 0 0 auto;
  }

  .pixel-level-sequence-head,
  .pixel-level-version-meta,
  .pixel-level-stage-head {
    align-items: stretch;
    flex-direction: column;
  }

  .pixel-level-version-form,
  .pixel-level-candidate-filter {
    grid-template-columns: 1fr;
  }

  .pixel-stage-release-row {
    grid-template-columns: 1fr;
  }

  .stage-release-track-select {
    width: 100%;
  }

}

.pixel-use-panel.pixel-level-manager,
.pixel-use-panel.pixel-level-add-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
}

.pixel-use-panel.pixel-level-manager {
  gap: 14px;
  padding: 22px;
}

.pixel-use-panel.pixel-level-manager .pixel-level-version-form {
  grid-template-columns: minmax(120px, 0.8fr) minmax(180px, 1fr);
}

.pixel-use-panel.pixel-level-manager .pixel-level-create-form {
  grid-template-columns: minmax(120px, 0.8fr) minmax(180px, 1fr) max-content;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.pixel-use-panel.pixel-level-manager .pixel-level-version-form .primary-button,
.pixel-use-panel.pixel-level-manager .pixel-level-version-form .ghost-button {
  min-width: max-content;
  white-space: nowrap;
}

.pixel-use-panel.pixel-level-manager .section-head {
  margin-bottom: 2px;
}

.pixel-use-panel.pixel-level-manager .section-head h2 {
  font-size: 20px;
}

.pixel-use-panel.pixel-level-manager input,
.pixel-use-panel.pixel-level-manager select {
  min-height: 34px;
  border-radius: 6px;
  font-size: 14px;
}

.pixel-level-manager-list {
  gap: 6px;
  margin-top: 2px;
}

.pixel-level-manager-row {
  grid-template-columns: minmax(180px, 0.52fr) minmax(520px, 1.48fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.pixel-level-manager-row .pixel-level-version-form {
  grid-template-columns: minmax(120px, 0.8fr) minmax(170px, 1fr);
}

.pixel-level-manager-actions {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.pixel-level-manager-actions form {
  margin: 0;
}

.pixel-level-history {
  grid-column: 1 / -1;
  padding-top: 2px;
}

.pixel-level-autosave-form.is-saving input,
.pixel-level-autosave-form.is-saving select {
  border-color: #bfdbfe;
  background: #eff6ff;
}

@media (max-width: 860px) {
  .pixel-use-panel.pixel-level-manager .pixel-level-version-form {
    grid-template-columns: 1fr 1fr;
  }

  .pixel-level-manager-row {
    grid-template-columns: 1fr;
  }

  .pixel-use-panel.pixel-level-manager .pixel-level-version-form .primary-button,
  .pixel-use-panel.pixel-level-manager .pixel-level-version-form .ghost-button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .pixel-use-panel.pixel-level-manager .pixel-level-version-form {
    grid-template-columns: 1fr;
  }
}

.full {
  width: 100%;
}

input,
select,
textarea,
.input {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--foreground);
}

textarea {
  resize: vertical;
}

.form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
}

.compact-field {
  width: 110px;
}

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

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: #334155;
  font-size: 14px;
  white-space: nowrap;
}

.check-row input {
  min-height: auto;
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--primary);
}

.product-form {
  align-items: end;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.4fr) 110px auto auto;
}

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

.product-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.product-main,
.product-side {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.product-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-title-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-grid,
.task-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.asset-card,
.task-card {
  overflow: hidden;
}

.asset-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--accent);
}

.asset-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.asset-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.asset-title h2 {
  margin: 0;
  font-size: 16px;
}

.asset-body p,
.member-row p,
.review-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent);
  color: #334155;
  font-size: 12px;
  white-space: nowrap;
}

.review-list,
.member-list {
  display: grid;
  gap: 10px;
}

.review-row,
.member-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.member-row {
  grid-template-columns: 1fr auto auto;
}

.review-row img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--accent);
}

.review-row h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--foreground);
  font-size: 18px;
}

.empty-state p {
  margin: 0;
}

.toast-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.toast {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.toast.error {
  border-color: #fecaca;
  color: #991b1b;
  background: #fef2f2;
}

.toast.success {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.card-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .page-head,
  .upload-strip,
  .inline-actions,
  .member-form,
  .product-form {
    align-items: stretch;
    flex-direction: column;
  }

  .product-form,
  .product-row {
    grid-template-columns: 1fr;
  }

  .compact-field {
    width: auto;
  }

  .review-row,
  .member-row {
    grid-template-columns: 1fr;
  }
}

/* kPilot-inspired application skin */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --ink-panel: #111827;
  --line: #e1e6ee;
  --line-strong: #cfd7e4;
  --text: #121826;
  --muted: #667085;
  --faint: #98a2b3;
  --primary: #1f4f8f;
  --primary-dark: #173b6b;
  --primary-soft: #edf3fa;
  --accent: #dfe7ef;
  --ok: #168a53;
  --ok-soft: #e9f7ef;
  --warn: #b76a00;
  --warn-soft: #fff4df;
  --danger: #c93434;
  --danger-soft: #fff0f0;
  --teal: #087f7a;
  --background: var(--bg);
  --foreground: var(--text);
  --border: var(--line);
  --panel: var(--surface);
  --ring: #9db6d8;
  --primary-foreground: #ffffff;
  --shadow-sm: 0 1px 2px rgba(18, 24, 38, 0.06);
  --shadow-md: 0 18px 44px rgba(18, 24, 38, 0.10);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Inter, sans-serif;
}

html {
  background: var(--bg);
}

body {
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
}

html.is-modal-scroll-locked,
body.is-modal-scroll-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  gap: 0;
  width: 248px;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  margin-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
}

.brand.large {
  justify-content: center;
}

.brand-icon {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.brand-text {
  color: var(--text);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-nav {
  display: grid;
  gap: 22px;
  align-content: start;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.sidebar-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: none;
}

.sidebar-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 140ms ease;
}

.sidebar-section {
  display: grid;
  gap: 6px;
}

.sidebar-section h2 {
  margin: 0 0 3px;
  padding: 0 10px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 800;
}

.sidebar-subgroup {
  display: grid;
  gap: 5px;
  margin: 0;
}

.sidebar-subgroup > summary {
  list-style: none;
  cursor: pointer;
}

.sidebar-subgroup > summary::-webkit-details-marker {
  display: none;
}

.sidebar-nav-group {
  display: grid;
  gap: 3px;
  margin: 0;
}

.sidebar-nav-group > summary {
  list-style: none;
  cursor: pointer;
}

.sidebar-nav-group > summary::-webkit-details-marker {
  display: none;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
}

.sidebar-link:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.sidebar-link.is-active {
  color: var(--text);
  border-color: #cfd8f4;
  background: #e9eefb;
  font-weight: 750;
}

.sidebar-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}

.sidebar-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.product-initial {
  border: 1px solid #d1e0f4;
  background: #f5f9ff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 850;
}

.sidebar-subgroup-arrow {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--faint);
  transition: transform 0.16s ease;
}

.sidebar-subgroup-arrow svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sidebar-subgroup[open] .sidebar-subgroup-arrow {
  transform: rotate(90deg);
}

.sidebar-nav-group-arrow {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--faint);
  transition: transform 0.16s ease;
}

.sidebar-nav-group-arrow svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sidebar-nav-group[open] .sidebar-nav-group-arrow {
  transform: rotate(90deg);
}

.sidebar-subgroup-list {
  display: grid;
  gap: 4px;
  padding-left: 12px;
}

.sidebar-nav-children {
  display: grid;
  gap: 3px;
  padding-left: 34px;
}

.sidebar-child-link {
  min-height: 30px;
  padding: 5px 8px;
  gap: 8px;
  border-radius: 7px;
}

.sidebar-platform-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: #8b9ab0;
}

.sidebar-platform-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sidebar-platform-icon[data-sidebar-platform-icon="ios"] svg {
  fill: currentColor;
  stroke: none;
}

.sidebar-child-link.is-active .sidebar-platform-icon {
  color: var(--primary);
}

.sidebar-subgroup-list .sidebar-link {
  min-height: 34px;
  padding-block: 6px;
}

.sidebar-subgroup-list .sidebar-icon {
  flex-basis: 22px;
  width: 22px;
  height: 22px;
}

.sidebar-subgroup-list .sidebar-icon svg {
  width: 14px;
  height: 14px;
}

.sidebar-empty {
  margin: 0;
  padding: 12px 10px;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-footer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.account-menu {
  position: relative;
  min-width: 0;
}

.account-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.account-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}

.account-menu[open] summary {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 79, 143, 0.10);
}

.account-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: grid;
  gap: 4px;
  width: 160px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.account-panel a,
.account-panel button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 36px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-panel a:hover,
.account-panel button:hover {
  background: var(--surface-soft);
}

.account-panel form {
  margin: 0;
}

.sidebar-account-menu {
  max-width: calc(100% - 44px);
}

.sidebar-account-menu summary {
  max-width: 158px;
}

.sidebar-collapsed .app-shell {
  grid-template-columns: 72px minmax(0, 1fr);
}

.sidebar-collapsed .sidebar {
  width: 72px;
  padding: 18px 12px;
}

.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  margin-bottom: 22px;
}

.sidebar-collapsed .sidebar .brand {
  min-width: 0;
}

.sidebar-collapsed .brand-text,
.sidebar-collapsed .sidebar-section h2,
.sidebar-collapsed .sidebar-label,
.sidebar-collapsed .sidebar-subgroup-arrow,
.sidebar-collapsed .sidebar-nav-group-arrow {
  display: none;
}

.sidebar-collapsed .sidebar-toggle {
  background: #ffffff;
}

.sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.sidebar-collapsed .sidebar-footer {
  flex-direction: column;
  justify-content: center;
}

.sidebar-collapsed .sidebar-account-menu {
  max-width: none;
}

.sidebar-collapsed .sidebar-account-menu summary {
  justify-content: center;
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.sidebar-collapsed .sidebar-account-menu .account-name,
.sidebar-collapsed .sidebar-account-menu summary::after {
  display: none;
}

.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 8px;
}

.sidebar-collapsed .sidebar-unread-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  min-width: 8px;
  height: 8px;
  margin-left: 0;
  padding: 0;
  font-size: 0;
}

.sidebar-collapsed .sidebar-subgroup-list {
  padding-left: 0;
}

.sidebar-collapsed .sidebar-nav-children {
  padding-left: 0;
}

.sidebar-collapsed .sidebar-child-link {
  justify-content: center;
}

.sidebar-collapsed .sidebar-platform-icon {
  flex-basis: 18px;
  width: 18px;
  height: 18px;
}

.app-main {
  min-width: 0;
}

.page {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 30px 32px 48px;
}

.content {
  padding: 0;
}

.auth-content {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.login-panel {
  width: min(430px, 100%);
  display: grid;
  gap: 28px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.page-head {
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 18px;
}

.page-head h1 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: 0;
}

.page-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.eyebrow {
  display: block;
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.panel,
.content-panel,
.empty-state,
.asset-card,
.task-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.content-panel {
  margin-bottom: 18px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.section-head {
  align-items: center;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.primary-button,
.ghost-button,
.button,
button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-weight: 760;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.primary-button,
.button.primary,
button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover,
.button.primary:hover,
button.primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
}

.ghost-button:hover,
.button:hover,
button:hover {
  border-color: #b8c2d3;
  background: var(--surface-soft);
}

.button.subtle {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.primary-button:active,
.ghost-button:active,
.button:active,
button:active {
  transform: translateY(1px);
}

.primary-button.is-loading,
.ghost-button.is-loading {
  gap: 7px;
  cursor: wait;
}

.primary-button.is-loading:disabled,
.ghost-button.is-loading:disabled {
  opacity: 0.78;
}

.stage-release-button-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: stage-release-spin 720ms linear infinite;
}

@keyframes stage-release-spin {
  to {
    transform: rotate(360deg);
  }
}

.full {
  width: 100%;
}

input,
select,
textarea,
.input {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 79, 143, 0.12);
}

.kstage-select {
  position: relative;
  min-width: 0;
}

.kstage-select-trigger {
  width: 100%;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
  text-align: left;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.kstage-select-trigger:hover,
.kstage-select.is-open .kstage-select-trigger {
  border-color: #b8c2d3;
  background: var(--surface);
}

.kstage-select-trigger:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 79, 143, 0.12);
}

.kstage-select-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kstage-select-trigger i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 1.7px solid var(--muted);
  border-bottom: 1.7px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 120ms ease;
}

.kstage-select.is-open .kstage-select-trigger i {
  transform: translateY(2px) rotate(225deg);
}

.kstage-select-content[hidden] {
  display: none;
}

.kstage-select-content {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  min-width: 160px;
  max-height: 240px;
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 24, 38, 0.14);
}

.kstage-select-item {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 680;
  text-align: left;
}

.kstage-select-item::before {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 2px solid transparent;
  border-bottom: 2px solid transparent;
  transform: translateY(-1px) rotate(-45deg);
}

.kstage-select-item[aria-selected="true"]::before {
  border-color: var(--primary);
}

.kstage-select-item:hover,
.kstage-select-item:focus-visible {
  outline: none;
  background: var(--surface-soft);
}

.kstage-select-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

input[type="file"] {
  min-height: 38px;
  max-width: 320px;
  padding: 7px 10px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
}

input[type="checkbox"] {
  box-shadow: none;
}

textarea {
  resize: vertical;
}

.upload-strip,
.inline-actions,
.member-form,
.status-form {
  gap: 10px;
}

.upload-strip {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.form-field {
  gap: 7px;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.compact-field {
  width: 108px;
}

.check-row {
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.check-row input {
  accent-color: var(--primary);
}

.product-form {
  align-items: end;
  grid-template-columns: minmax(220px, 1fr) 220px 108px auto auto;
  gap: 12px;
  margin: 0;
}

.product-list {
  gap: 12px;
}

.product-row {
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.product-title-line {
  padding-bottom: 2px;
}

.product-title-line strong {
  color: var(--text);
  font-size: 16px;
}

.asset-grid,
.task-board {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.asset-card,
.task-card {
  overflow: hidden;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.asset-card:hover,
.task-card:hover {
  border-color: #c7d2e5;
  box-shadow: 0 10px 28px rgba(18, 24, 38, 0.08);
  transform: translateY(-1px);
}

.asset-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef2f8;
}

.asset-body {
  gap: 10px;
  padding: 14px;
}

.asset-title {
  align-items: flex-start;
}

.asset-title h2 {
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.asset-body p,
.member-row p,
.review-row p {
  color: var(--muted);
  font-size: 13px;
}

.status-pill,
.badge {
  min-height: 25px;
  padding: 3px 9px;
  border: 1px solid #cfd8f4;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.status-revision_required {
  border-color: #fed7aa;
  background: #fff4e6;
  color: #b45309;
  box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.14);
}

.status-pill.status-approved {
  border-color: #b7e2c8;
  background: #ecf9f0;
  color: #17643a;
}

.status-pill.status-unassigned {
  border-color: #d8dfec;
  background: #f8fafc;
  color: var(--muted);
}

.status-pill.status-assigned {
  border-color: #c3ddff;
  background: #eef6ff;
  color: #1f4f8f;
}

.status-pill.status-used {
  border-color: #b8e3dd;
  background: #ecfbf8;
  color: #0f766e;
}

.status-pill.status-completed {
  border-color: #b7e2c8;
  background: #ecf9f0;
  color: #17643a;
}

.status-pill.status-changes_requested {
  border-color: #ffd3ba;
  background: #fff3ec;
  color: #9a3f13;
}

.status-pill.status-archived {
  border-color: #d8dfec;
  background: #f1f5f9;
  color: #475569;
}

.status-pill.muted-pill {
  border-color: var(--border);
  background: #f8fafc;
  color: var(--muted);
}

.pixel-version-pill {
  border-color: #d8dfec;
  background: #f8fafc;
  color: var(--text-soft);
}

.pixel-type-pill {
  border-color: #b8e3dd;
  background: #ecfbf8;
  color: #0f766e;
}

.pixel-difficulty-pill {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.pixel-complete-button {
  border-color: #15803d;
  background: #16a34a;
  color: #fff;
}

.pixel-complete-button:hover {
  border-color: #166534;
  background: #15803d;
  color: #fff;
}

.attention-button {
  border-color: #fdba74;
  background: #fff7ed;
  color: #b45309;
}

.attention-button:hover,
.attention-button:focus-visible {
  border-color: #fb923c;
  background: #ffedd5;
  color: #9a3412;
}

.danger-button {
  border-color: #f3b4b4;
  background: var(--danger-soft);
  color: var(--danger);
}

.danger-button:hover,
.danger-button:focus-visible {
  border-color: var(--danger);
  background: #ffe4e4;
  color: var(--danger);
}

.review-list,
.member-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel .review-list,
.panel .member-list {
  border: 0;
  border-radius: 0;
}

.review-row,
.member-row {
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.review-row:last-child,
.member-row:last-child {
  border-bottom: 0;
}

.member-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.compose-shell {
  display: grid;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}

.compact-shell {
  max-width: 980px;
}

.compose-hero {
  display: grid;
  gap: 4px;
}

.compose-hero h1 {
  margin: 0;
  font-size: 28px;
}

.management-table-panel {
  display: grid;
  padding: 0;
  overflow: hidden;
}

.team-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 1.2fr) 80px 96px;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.team-row:last-child {
  border-bottom: 0;
}

.team-head {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.management-person {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.management-person strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-person span,
.management-product-list {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.management-actions {
  display: flex;
  justify-content: flex-end;
}

.member-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.team-table-panel .team-head span:last-child {
  justify-self: end;
}

.product-management-panel > .section-head {
  margin-bottom: 0;
  padding: 16px 20px 0;
}

.management-product-list {
  display: grid;
  gap: 0;
}

.management-product-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(140px, 0.65fr) 92px 132px minmax(280px, 1.25fr) 86px;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.management-product-list .management-product-row:last-child {
  border-bottom: 0;
}

.management-product-head {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-person {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.product-icon {
  display: block;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
}

.product-icon.placeholder {
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: #334155;
  font-size: 15px;
  font-weight: 850;
}

.management-product-team {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-compact-field {
  width: 92px;
}

.management-compact-field input {
  width: 100%;
}

.management-active-toggle {
  display: grid;
  align-items: center;
  gap: 6px;
}

.management-active-toggle .check-row {
  min-height: auto;
}

.management-inline-fields {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(160px, 1fr);
  gap: 10px;
  min-width: 0;
}

.management-inline-fields .form-field,
.management-inline-fields .kstage-select {
  min-width: 0;
}

.management-inline-fields input,
.management-inline-fields .kstage-select {
  width: 100%;
}

.product-management-panel .empty-state {
  margin: 16px 20px;
}

.product-table-panel {
  padding: 0;
}

.product-table-panel .product-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 0.65fr) 150px 80px 96px 150px 96px;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.product-table-panel .product-row:last-child {
  border-bottom: 0;
}

.product-table-panel .product-head {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-table-panel .product-person {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.product-table-panel .product-person > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-table-panel .product-person strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-table-panel .product-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-table-panel .product-status-pill {
  justify-self: start;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  box-shadow: none;
}

.product-table-panel .product-status-active {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.product-table-panel .product-status-inactive {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.product-table-panel .member-actions {
  display: flex;
  justify-content: flex-end;
}

.product-table-panel .empty {
  margin: 0;
  padding: 20px;
  color: var(--muted);
}

.product-edit-form {
  padding: 18px;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.product-edit-form .form-stack {
  gap: 10px;
}

.product-edit-form .form-field {
  gap: 5px;
}

.product-edit-form input,
.product-edit-form select,
.product-edit-form .kstage-select-trigger,
.product-edit-form .readonly-field {
  min-height: 34px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.product-edit-form .compact-field {
  width: 126px;
}

.product-edit-form small {
  margin-top: 0;
  font-size: 12px;
  line-height: 1.35;
}

.product-form-active {
  width: fit-content;
  margin-top: 2px;
}

.product-form-actions {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.readonly-field {
  min-height: 38px;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text);
  font-weight: 720;
}

.management-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

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

.form-actions.is-right {
  justify-content: flex-end;
}

.team-choice-list,
.participant-field > div[id^="id_"],
.participant-field ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  list-style: none;
}

.participant-field > div[id^="id_"] > div,
.participant-field li {
  min-width: 0;
  padding: 0;
}

.participant-choice,
.participant-field > div[id^="id_"] label,
.participant-field li label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.participant-choice:hover,
.participant-field > div[id^="id_"] label:hover,
.participant-field li label:hover {
  border-color: var(--line-strong);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.participant-choice:has(input:checked),
.participant-field > div[id^="id_"] label:has(input:checked),
.participant-field li label:has(input:checked) {
  border-color: #bad4ff;
  background: #eef5ff;
  color: var(--primary-dark);
}

.participant-choice-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-field input[type="checkbox"] {
  position: relative;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: none;
  cursor: pointer;
}

.participant-field input[type="checkbox"]:checked {
  border-color: var(--primary);
  background-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 9.2 7.7 12 13.4 6' fill='none' stroke='white' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
}

.participant-field input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(31, 79, 143, 0.10);
}

.choice-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.member-table {
  display: grid;
  padding: 0;
  overflow: hidden;
}

.member-table .member-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 110px minmax(160px, 0.8fr) 96px 100px 150px;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}

.member-table .member-row.is-filter-hidden {
  display: none !important;
}

.member-table .member-row:last-child {
  border-bottom: 0;
}

.member-table .member-head {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.member-table .member-head span:last-child {
  justify-self: end;
}

.member-person {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.member-person strong,
.member-person span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-person span {
  color: var(--muted);
  font-size: 13px;
}

.member-role-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.role-pill {
  justify-self: start;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef5ff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.member-table .status-pill {
  justify-self: start;
}

.member-profile-form {
  padding: 22px;
}

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

.product-role-section-list {
  display: grid;
  gap: 18px;
}

.empty-inline {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.user-filter-panel {
  padding: 14px 16px;
}

.user-filter-form {
  display: grid;
  grid-template-columns: 220px 180px minmax(260px, 1fr);
  align-items: end;
  gap: 12px;
}

.user-search-field input {
  width: 100%;
}

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

.user-row {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.35fr) 150px;
  grid-template-areas:
    "identity edit actions"
    "identity roles actions";
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.user-identity {
  display: grid;
  grid-area: identity;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
}

.user-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}

.user-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.user-title-line strong {
  min-width: 0;
  color: var(--text);
  font-size: 16px;
}

.user-identity p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.user-role-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.user-role-summary span {
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.user-edit-grid {
  display: grid;
  grid-area: edit;
  grid-template-columns: minmax(160px, 1fr) 150px 150px;
  gap: 12px;
}

.user-product-role-field {
  display: grid;
  grid-area: roles;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.role-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.role-check input {
  flex: 0 0 auto;
}

.role-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-actions {
  display: grid;
  grid-area: actions;
  justify-items: end;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.status-pill.user-status-active {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.status-pill.user-status-blocked {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.review-row img {
  width: 84px;
  height: 64px;
  border-radius: 8px;
  background: #eef2f8;
}

.review-row h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.inline-actions input[type="text"] {
  width: 220px;
}

.revision-form {
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.status-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

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

.empty-state {
  padding: 28px;
  color: var(--muted);
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 18px;
}

.empty-state p {
  margin: 0;
}

.toast-stack {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 120;
  display: grid;
  width: min(420px, calc(100vw - 24px));
  gap: 8px;
  margin: 0;
  transform: translateX(-50%);
}

.auth-toast {
  top: 24px;
}

.toast {
  padding: 10px 12px;
  border: 1px solid #c7d8ff;
  border-radius: 8px;
  background: #eef4ff;
  color: #12367d;
  box-shadow: var(--shadow-md);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-dismissing {
  opacity: 0;
  transform: translateY(-6px);
}

.toast.error {
  border-color: #f2c6cd;
  background: #fff2f4;
  color: #8f1d33;
}

.toast.success {
  border-color: #b9e5cf;
  background: #edf9f2;
  color: #155d3b;
}

.toast.warning {
  border-color: #f2dfb2;
  background: #fff8e9;
  color: #7a4c00;
}

.pixelated {
  image-rendering: pixelated;
}

.pixel-upload-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(160px, 1fr) 140px 150px 130px minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.pixel-files {
  min-width: 0;
}

.pixel-note {
  grid-column: 1 / -2;
}

.pixel-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(160px, 200px));
  gap: 10px;
  align-items: center;
}

.pixel-library-head {
  align-items: flex-end;
}

.pixel-library-filter {
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 150px) minmax(140px, 170px) minmax(160px, 190px) minmax(200px, 230px);
}

.pixel-library-filter input[type="search"] {
  min-height: 38px;
}

.pixel-filter-panel {
  padding: 14px;
}

.pixel-filter-with-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.pixel-filter-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: max-content;
}

.pixel-current-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.pixel-filter-reset-button {
  min-height: 38px;
  padding-inline: 14px;
  white-space: nowrap;
}

.date-range-picker {
  position: relative;
  z-index: 8;
}

.date-range-trigger {
  width: 100%;
  min-width: 168px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 10px;
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.date-range-trigger:hover,
.date-range-picker.is-open .date-range-trigger {
  border-color: #9db4d8;
  background: #fbfdff;
}

.date-range-trigger svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.date-range-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.date-range-trigger .date-range-caret {
  width: 13px;
  height: 13px;
  margin-left: auto;
}

.date-range-popover {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  grid-template-columns: 125px minmax(0, 548px);
  gap: 0;
  width: min(672px, calc(100vw - 42px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: visible;
}

.date-range-popover[hidden] {
  display: none;
}

.date-range-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 24px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  background: var(--surface);
  transform: rotate(45deg);
}

.date-range-presets {
  display: grid;
  align-content: start;
  gap: 1px;
  padding: 14px 0;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
  border-radius: 8px 0 0 8px;
  overflow: hidden;
}

.date-range-presets button {
  justify-content: flex-start;
  min-height: 31px;
  width: 100%;
  padding: 6px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  font-size: 12px;
  font-weight: 750;
}

.date-range-presets button:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.date-range-presets button.is-active {
  background: var(--primary);
  color: #fff;
}

.date-range-calendars {
  display: grid;
  grid-template-columns: repeat(2, minmax(231px, 1fr));
  gap: 20px;
  padding: 15px 20px 14px;
  overflow-x: auto;
}

.date-range-picker .air-datepicker.-inline- {
  --adp-width: 231px;
  --adp-nav-height: 30px;
  --adp-day-cell-height: 31px;
  width: 100%;
  min-width: 231px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  font-family: inherit;
}

.date-range-picker .air-datepicker--pointer,
.date-range-picker .air-datepicker--pointer::after {
  display: none;
}

.date-range-picker .air-datepicker--navigation {
  padding: 0 0 11px;
  border-bottom: 0;
}

.date-range-picker .air-datepicker-nav {
  min-height: 30px;
  border-bottom: 0;
  padding: 0;
}

.date-range-picker .air-datepicker-nav--title {
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
}

.date-range-picker .air-datepicker-nav--title:hover {
  background: var(--surface-soft);
}

.date-range-picker .air-datepicker-nav--action {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  color: var(--muted);
}

.date-range-picker .air-datepicker-nav--action:hover {
  background: var(--primary-soft);
}

.date-range-picker [data-date-calendar="start"] .air-datepicker-nav--action[data-action="next"],
.date-range-picker [data-date-calendar="end"] .air-datepicker-nav--action[data-action="prev"] {
  visibility: hidden;
  pointer-events: none;
}

.date-range-picker .air-datepicker-nav--action svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.date-range-picker .air-datepicker-body--day-name {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.date-range-picker .air-datepicker-cell {
  border-radius: 5px;
  color: #273142;
  font-size: 12px;
  font-weight: 650;
}

.date-range-picker .air-datepicker-cell.-day-.-other-month- {
  color: #9aa6b8;
}

.date-range-picker .air-datepicker-cell.-current- {
  color: var(--primary);
}

.date-range-picker .air-datepicker-cell.-selected-,
.date-range-picker .air-datepicker-cell.-selected-.-current- {
  background: var(--primary);
  color: #fff;
}

.date-range-picker .air-datepicker-cell.-in-range-,
.date-range-picker .air-datepicker-cell.-preview-range- {
  background: #eaf2fb;
  color: #273142;
}

.date-range-picker .air-datepicker-cell.-in-range- {
  border-radius: 0;
}

.date-range-picker .air-datepicker-cell.-range-from-,
.date-range-picker .air-datepicker-cell.-range-to- {
  border-radius: 5px;
  background: var(--primary);
  color: #fff;
}

.date-range-picker .air-datepicker-cell.-focus- {
  background: var(--primary-soft);
}

.date-range-picker .air-datepicker-cell.-in-range-.-focus-,
.date-range-picker .air-datepicker-cell.-preview-range-.-focus- {
  background: #dceaf8;
}

.date-range-picker .air-datepicker-cell.-selected-.-focus-,
.date-range-picker .air-datepicker-cell.-range-from-.-focus-,
.date-range-picker .air-datepicker-cell.-range-to-.-focus- {
  background: var(--primary);
  color: #fff;
}

.pixel-view-only-panel {
  display: flex;
  justify-content: flex-end;
}

.pixel-view-switch {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-width: max-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.pixel-view-switch input[type="hidden"] {
  display: none;
}

.pixel-view-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.pixel-view-option:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.pixel-view-option.is-active {
  color: #fff;
  background: #1f4f8f;
  box-shadow: 0 1px 4px rgba(31, 79, 143, 0.24);
}

.pixel-prelevel-filter {
  display: flex;
  flex-wrap: nowrap;
  justify-content: start;
}

.pixel-prelevel-filter > .kstage-select {
  flex: 1 1 clamp(180px, 12vw, 240px);
}

.pixel-prelevel-filter > .kstage-select:nth-of-type(2),
.pixel-prelevel-filter > .kstage-select:nth-of-type(5) {
  flex-grow: 1.2;
  flex-basis: clamp(210px, 14vw, 280px);
}

.pixel-prelevel-filter > .date-range-picker {
  flex: 1.2 1 clamp(220px, 14vw, 300px);
}

.pixel-prelevel-filter > .pixel-filter-reset-button {
  flex: 0 0 auto;
}

.tiny-prelevel-filter {
  flex-wrap: nowrap;
}

.pixel-prelevel-filter.tiny-prelevel-filter > input[type="search"] {
  flex: 1 1 190px;
  min-width: 160px;
}

.pixel-prelevel-filter.tiny-prelevel-filter > .kstage-select {
  flex: 1 1 180px;
  min-width: 0;
}

.pixel-prelevel-filter.tiny-prelevel-filter > .tiny-gameplay-filter-select {
  flex: 1.1 1 200px;
}

.pixel-prelevel-filter.tiny-prelevel-filter > .date-range-picker {
  flex: 0.9 1 190px;
  min-width: 168px;
}

.pixel-art-filter {
  grid-template-columns: minmax(160px, 190px) minmax(140px, 170px) minmax(160px, 190px) minmax(220px, 250px) auto;
  justify-content: start;
}

.pixel-internal-review-filter {
  display: flex;
  flex-wrap: nowrap;
  justify-content: start;
}

.pixel-internal-review-filter > .kstage-select {
  flex: 0 0 158px;
}

.pixel-internal-review-filter > .kstage-select:nth-of-type(2),
.pixel-internal-review-filter > .kstage-select:nth-of-type(3) {
  flex-basis: 142px;
}

.pixel-internal-review-filter > .date-range-picker {
  flex: 0 0 198px;
}

.pixel-internal-review-filter > .pixel-filter-reset-button {
  flex: 0 0 auto;
}

.pixel-bulk-review-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
}

.pixel-bulk-review-toolbar[hidden] {
  display: none;
}

.pixel-bulk-review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pixel-bulk-review-actions[hidden] {
  display: none;
}

.pixel-bulk-review-count {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.pixel-bulk-copy-toolbar-progress {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.pixel-bulk-copy-toolbar-progress[hidden] {
  display: none;
}

.pixel-bulk-review-check {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  cursor: pointer;
}

.pixel-bulk-review-check input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.pixel-internal-review-page.is-bulk-review-mode .pixel-bulk-review-check,
.pixel-art-review-page.is-bulk-review-mode .pixel-bulk-review-check {
  display: inline-flex;
}

.pixel-prelevel-page.is-bulk-assign-mode [data-pixel-bulk-assign-check-wrap],
.pixel-prelevel-page.is-bulk-complete-mode [data-pixel-bulk-complete-check-wrap] {
  display: inline-flex;
}

.pixel-gallery-overview-page.is-bulk-download-mode .pixel-bulk-review-check {
  display: inline-flex;
}

.pixel-internal-review-page.is-bulk-review-mode [data-pixel-bulk-enter],
.pixel-art-review-page.is-bulk-review-mode [data-pixel-bulk-enter] {
  display: none;
}

.pixel-prelevel-page.is-bulk-assign-mode [data-pixel-bulk-assign-enter],
.pixel-prelevel-page.is-bulk-assign-mode [data-pixel-bulk-complete-enter],
.pixel-prelevel-page.is-bulk-complete-mode [data-pixel-bulk-assign-enter],
.pixel-prelevel-page.is-bulk-complete-mode [data-pixel-bulk-complete-enter] {
  display: none;
}

.pixel-gallery-overview-page.is-bulk-download-mode [data-pixel-gallery-bulk-enter] {
  display: none;
}

.pixel-internal-review-page.is-bulk-review-mode .pixel-internal-review-row,
.pixel-art-review-page.is-bulk-review-mode .pixel-art-review-row {
  grid-template-columns: 30px 96px minmax(0, 1fr);
  cursor: pointer;
}

.pixel-gallery-overview-page.is-bulk-download-mode .pixel-list-row {
  cursor: pointer;
}

.pixel-internal-review-page.is-bulk-review-mode .pixel-list.is-card-view .pixel-internal-review-row,
.pixel-art-review-page.is-bulk-review-mode .pixel-list.is-card-view .pixel-art-review-row {
  grid-template-columns: 1fr;
}

.pixel-internal-review-page.is-bulk-review-mode .pixel-row-actions,
.pixel-art-review-page.is-bulk-review-mode .pixel-row-actions {
  display: none;
}

.pixel-bulk-confirm-panel {
  width: min(560px, 100%);
}

.pixel-bulk-confirm-message {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

.pixel-bulk-copy-field {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.pixel-bulk-copy-select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  padding: 0 12px;
}

.pixel-bulk-copy-select:disabled {
  background: var(--surface-soft);
  color: var(--muted);
}

.pixel-bulk-copy-hint {
  margin: 0 0 12px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.pixel-bulk-copy-hint[hidden] {
  display: none;
}

.pixel-bulk-copy-progress {
  position: relative;
  display: grid;
  min-height: 38px;
  margin: 8px 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.pixel-bulk-copy-progress[hidden] {
  display: none;
}

.pixel-bulk-copy-progress > span {
  grid-area: 1 / 1;
  width: 0;
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  transition: width 180ms ease;
}

.pixel-bulk-copy-progress > strong {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 12px;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.pixel-library-list-shell {
  display: grid;
  gap: 14px;
  transition: opacity 140ms ease;
}

.pixel-library-list-shell.is-loading {
  opacity: 0.56;
  pointer-events: none;
}

.pixel-list {
  display: grid;
  gap: 10px;
}

.pixel-list.is-card-view {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr));
  gap: 14px;
}

.pixel-date-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.pixel-list.is-card-view .pixel-date-divider {
  grid-column: 1 / -1;
  margin: 4px 0 0;
}

.pixel-date-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.pixel-list-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(142px, auto);
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.pixel-list.is-card-view .pixel-list-row {
  grid-template-columns: 1fr;
  gap: 11px;
  align-content: start;
  min-width: 0;
  padding: 12px;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.pixel-list.is-card-view .pixel-list-row:hover,
.pixel-list.is-card-view .pixel-list-row:focus-within {
  border-color: #c5d5ea;
  box-shadow: var(--shadow-md);
}

.pixel-list-thumb-wrap {
  width: 96px;
}

.pixel-list-thumb-button {
  display: block;
  width: 96px;
  height: 96px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  cursor: zoom-in;
}

.pixel-list.is-card-view .pixel-list-thumb-wrap,
.pixel-list.is-card-view .pixel-list-thumb-button,
.pixel-list.is-card-view .empty-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.pixel-list.is-card-view .pixel-list-thumb-button {
  display: grid;
  position: relative;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(-45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f4f7 75%),
    linear-gradient(-45deg, transparent 75%, #f2f4f7 75%);
  background-color: #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.pixel-list.is-card-view .pixel-list-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.pixel-list-thumb-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 79, 143, 0.16);
}

.pixel-list-thumb {
  width: 96px;
  height: 96px;
  display: block;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(-45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f4f7 75%),
    linear-gradient(-45deg, transparent 75%, #f2f4f7 75%);
  background-color: #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.empty-thumb {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.pixel-list-main {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.pixel-list-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pixel-list-title h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pixel-list.is-card-view .pixel-list-title {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 7px;
}

.pixel-list.is-card-view .pixel-list-title h2 {
  white-space: normal;
}

.pixel-list.is-card-view .pixel-meta-code,
.pixel-list.is-card-view .pixel-meta-version {
  display: none;
}

.pixel-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--text-soft);
  font-size: 12px;
}

.pixel-list-meta.muted {
  color: var(--muted);
}

.pixel-color-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pixel-color-chip,
.pixel-upload-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 8px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 12px;
}

.pixel-color-chip i,
.pixel-upload-color i,
.pixel-report-colors i {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(18, 24, 38, 0.16);
  border-radius: 5px;
}

.pixel-color-chip b,
.pixel-upload-color b {
  font-weight: 760;
}

.compact-palette {
  gap: 5px;
}

.pixel-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pixel-list.is-card-view .pixel-row-actions {
  justify-content: flex-start;
  padding-top: 2px;
}

.pixel-row-actions form {
  margin: 0;
}

.pixel-row-details {
  position: relative;
}

.pixel-row-details > summary {
  list-style: none;
  cursor: pointer;
}

.pixel-row-details > summary::-webkit-details-marker {
  display: none;
}

.pixel-report-popover,
.upload-revision-details .revision-form {
  position: absolute;
  z-index: 5;
  right: 0;
  top: calc(100% + 8px);
  width: min(420px, 82vw);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.pixel-report-popover p {
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.pixel-report-colors {
  display: grid;
  max-height: 260px;
  overflow: auto;
  gap: 7px;
}

.pixel-report-colors span {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--text-soft);
  font-size: 12px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.pixel-preview-modal[hidden] {
  display: none;
}

.pixel-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: grid;
  overflow: hidden;
  overscroll-behavior: contain;
  place-items: center;
  padding: 24px;
}

.pixel-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.40);
  touch-action: none;
}

.pixel-preview-panel {
  position: relative;
  z-index: 1;
  width: min(1320px, 100%);
  max-height: min(900px, calc(100vh - 48px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-xl);
}

.pixel-asset-notes-modal[hidden] {
  display: none;
}

.pixel-asset-notes-modal {
  position: fixed;
  inset: 0;
  z-index: 43;
  display: grid;
  overflow: hidden;
  overscroll-behavior: contain;
  place-items: center;
  padding: 24px;
}

.pixel-asset-notes-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.40);
  touch-action: none;
}

.pixel-asset-notes-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(1500px, 100%);
  max-height: min(920px, calc(100vh - 48px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-xl);
}

.pixel-asset-notes-body {
  min-height: 0;
}

.pixel-asset-notes-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

.pixel-asset-notes-media {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.pixel-asset-notes-image-frame {
  display: grid;
  height: min(560px, calc(100vh - 260px));
  min-height: 320px;
  overflow: hidden;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(-45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f4f7 75%),
    linear-gradient(-45deg, transparent 75%, #f2f4f7 75%);
  background-color: #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.pixel-asset-notes-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pixel-asset-notes-editor-pane {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.pixel-asset-notes-editor-shell {
  min-height: min(620px, calc(100vh - 300px));
}

.pixel-asset-notes-editor-shell .tiptap-toolbar {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.pixel-asset-notes-editor-shell,
.pixel-asset-notes-editor-shell .tiptap-editor,
.pixel-asset-notes-editor-shell .tiptap-editor .ProseMirror,
.pixel-asset-notes-editor-shell .tiptap-editor.is-fallback {
  overscroll-behavior: contain;
}

.pixel-asset-notes-editor-shell .tiptap-editor,
.pixel-asset-notes-editor-shell .tiptap-editor .ProseMirror,
.pixel-asset-notes-editor-shell .tiptap-editor.is-fallback {
  min-height: min(560px, calc(100vh - 420px));
  overflow: auto;
}

.pixel-asset-notes-editor-actions {
  margin-top: -2px;
  justify-content: flex-end;
}

.pixel-review-notes-modal[hidden] {
  display: none;
}

.pixel-review-notes-modal {
  position: fixed;
  inset: 0;
  z-index: 43;
  display: grid;
  overflow: hidden;
  overscroll-behavior: contain;
  place-items: center;
  padding: 24px;
}

.pixel-review-notes-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.40);
  touch-action: none;
}

.pixel-review-notes-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-xl);
}

.pixel-review-notes-body {
  display: grid;
  gap: 14px;
}

.pixel-review-notes-summary {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.pixel-review-notes-thumb {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(-45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f4f7 75%),
    linear-gradient(-45deg, transparent 75%, #f2f4f7 75%);
  background-color: #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.pixel-review-notes-summary h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pixel-review-notes-summary p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.pixel-review-note-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pixel-review-note-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pixel-review-note-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.pixel-review-note-card header div {
  display: grid;
  gap: 2px;
}

.pixel-review-note-card strong {
  color: var(--text);
  font-size: 13px;
}

.pixel-review-note-card span,
.pixel-review-note-card time {
  color: var(--muted);
  font-size: 12px;
}

.pixel-review-note-content {
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.pixel-review-note-content p,
.pixel-review-note-content ul,
.pixel-review-note-content ol,
.pixel-review-note-content blockquote {
  margin: 0 0 10px;
}

.pixel-review-note-content p:last-child,
.pixel-review-note-content ul:last-child,
.pixel-review-note-content ol:last-child,
.pixel-review-note-content blockquote:last-child {
  margin-bottom: 0;
}

.pixel-review-note-content img,
.pixel-review-note-content video {
  display: block;
  max-width: min(100%, 520px);
  height: auto;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pixel-review-note-content blockquote {
  padding-left: 12px;
  border-left: 3px solid var(--primary);
  color: var(--muted);
}

.pixel-review-notes-loading,
.pixel-review-notes-error {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pixel-review-notes-error {
  border-color: rgba(220, 38, 38, 0.28);
  background: #fff1f2;
  color: var(--danger);
}

.pixel-preview-shell {
  display: grid;
  gap: 18px;
}

.pixel-preview-tabs {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.pixel-preview-tab {
  min-width: 88px;
  padding: 8px 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 820;
  cursor: pointer;
}

.pixel-preview-tab.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.pixel-preview-panel-section[hidden] {
  display: none;
}

.pixel-preview-layout.pixel-preview-notes-layout {
  grid-template-columns: minmax(280px, 0.62fr) minmax(520px, 1.38fr);
}

.pixel-preview-notes-head {
  grid-column: 1 / -1;
}

.pixel-preview-notes-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.25;
}

.pixel-preview-notes-media .pixel-preview-image-frame {
  height: min(560px, calc(100vh - 260px));
  min-height: 320px;
}

.pixel-preview-notes-info {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 12px;
}

.pixel-preview-version-view[hidden] {
  display: none;
}

.pixel-preview-image-frame.pixel-preview-detail-image-frame {
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  justify-items: stretch;
  gap: 12px;
  place-items: stretch;
}

.pixel-preview-image-stage {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  place-items: center;
}

.pixel-preview-version-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0 4px 2px;
  scrollbar-width: thin;
}

.pixel-preview-version-pill {
  min-height: 26px;
  padding: 3px 10px;
  border-color: #d8dfec;
  background: #f8fafc;
  color: var(--text-soft);
  cursor: pointer;
}

.pixel-preview-version-pill.is-current {
  border-color: #b7c9ec;
  background: #eef4ff;
  color: var(--primary);
}

.pixel-rich-text-display {
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.pixel-rich-text-display p,
.pixel-rich-text-display ul,
.pixel-rich-text-display ol,
.pixel-rich-text-display blockquote,
.pixel-rich-text-display h1,
.pixel-rich-text-display h2,
.pixel-rich-text-display h3 {
  margin: 0 0 10px;
}

.pixel-rich-text-display p:last-child,
.pixel-rich-text-display ul:last-child,
.pixel-rich-text-display ol:last-child,
.pixel-rich-text-display blockquote:last-child,
.pixel-rich-text-display h1:last-child,
.pixel-rich-text-display h2:last-child,
.pixel-rich-text-display h3:last-child {
  margin-bottom: 0;
}

.pixel-rich-text-display img,
.pixel-rich-text-display video {
  display: block;
  max-width: min(100%, 560px);
  height: auto;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pixel-rich-text-display blockquote {
  padding-left: 12px;
  border-left: 3px solid var(--primary);
  color: var(--muted);
}

.pixel-preview-note-content,
.pixel-preview-note-empty {
  min-height: min(360px, calc(100vh - 420px));
  max-height: min(620px, calc(100vh - 300px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.pixel-preview-note-content img,
.pixel-preview-note-content video {
  max-width: 100%;
}

.pixel-preview-note-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
}

.pixel-preview-body {
  min-height: 280px;
}

.pixel-preview-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.75fr) minmax(300px, 0.85fr);
  gap: 24px;
  padding-right: 44px;
}

.pixel-preview-media {
  display: grid;
  align-content: start;
  gap: 14px;
}

.pixel-preview-image-frame {
  display: grid;
  height: min(720px, calc(100vh - 220px));
  min-height: min(720px, calc(100vh - 220px));
  overflow: hidden;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(-45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f4f7 75%),
    linear-gradient(-45deg, transparent 75%, #f2f4f7 75%);
  background-color: #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.pixel-preview-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pixel-preview-media-note {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.pixel-preview-media-note strong {
  color: var(--text);
  font-size: 15px;
}

.pixel-preview-info {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 14px;
}

.pixel-preview-title-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.pixel-preview-title-line h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
}

.pixel-preview-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.pixel-preview-meta div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.pixel-preview-meta dt,
.pixel-preview-meta dd {
  margin: 0;
}

.pixel-preview-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.pixel-preview-meta dd {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pixel-preview-section {
  display: grid;
  gap: 10px;
}

.pixel-preview-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.pixel-preview-colors {
  display: grid;
  max-height: min(500px, calc(100vh - 390px));
  overflow: auto;
  border-top: 1px solid var(--line);
}

.pixel-preview-color-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 86px 72px;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 13px;
}

.pixel-preview-color-row i {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(18, 24, 38, 0.16);
  border-radius: 5px;
}

.pixel-preview-color-row strong {
  overflow: hidden;
  color: var(--text);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pixel-preview-color-row b {
  color: var(--text);
  text-align: right;
}

.pixel-upload-modal[hidden] {
  display: none;
}

.pixel-use-modal[hidden] {
  display: none;
}

.pixel-upload-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pixel-use-modal {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pixel-upload-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
}

.pixel-use-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.44);
}

[data-pixel-prelevel-assign-form] {
  display: grid;
  gap: 12px;
}

[data-pixel-bulk-assign-form] {
  display: grid;
  gap: 16px;
}

[data-pixel-bulk-assign-form] .modal-actions {
  margin-top: 8px;
}

.pixel-upload-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-xl);
}

.pixel-use-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(440px, 100%);
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-xl);
}

.pixel-use-message {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
}

.pixel-modal-field {
  display: grid;
  gap: 7px;
}

.pixel-modal-field > span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.pixel-upload-head {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding-right: 52px;
  margin-bottom: 0;
}

.pixel-upload-head .badge {
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.pixel-upload-dropzone {
  position: relative;
  display: grid;
  min-height: 150px;
  place-items: center;
  padding: 18px;
  border: 1.5px dashed #98adc3;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
}

.pixel-upload-dropzone.is-dragover {
  border-color: var(--accent);
  background: #eef7f2;
}

.pixel-upload-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.pixel-upload-dropzone-body {
  display: grid;
  gap: 6px;
}

.pixel-upload-dropzone-body strong {
  color: var(--text);
  font-size: 16px;
}

.pixel-upload-dropzone-body span {
  color: var(--muted);
  font-size: 13px;
}

.pixel-upload-progress {
  position: relative;
  height: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.pixel-upload-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #4fb282;
  transition: width 160ms ease;
}

.pixel-upload-progress strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 12px;
}

.pixel-upload-error {
  padding: 10px 12px;
  border: 1px solid #f2c6cd;
  border-radius: 8px;
  background: #fff2f4;
  color: #8f1d33;
  font-size: 13px;
}

.pixel-upload-results {
  display: grid;
  gap: 10px;
}

.pixel-upload-result {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.pixel-upload-result.is-failed {
  border-color: #f2c6cd;
  background: #fff8f9;
}

.pixel-upload-preview {
  width: 92px;
  height: 92px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.pixel-upload-result-main {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.pixel-upload-result-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pixel-upload-result-title h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pixel-upload-result-main p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.pixel-upload-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.link-button {
  width: max-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f5a9d;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.pixel-level-import-preview {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.pixel-level-import-preview[hidden] {
  display: none !important;
}

.pixel-level-import-preview ul,
.pixel-level-import-detail-list ul {
  margin: 0;
  padding-left: 20px;
}

.pixel-level-import-preview li,
.pixel-level-import-detail-list li {
  margin: 6px 0;
}

.pixel-level-import-detail-summary {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.pixel-level-import-detail-list {
  max-height: min(560px, calc(100vh - 220px));
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.pixel-prelevel-edit-actions {
  margin-top: 24px;
}

.pixel-check {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.pixel-check strong {
  color: var(--text);
  font-size: 13px;
}

.pixel-check.failed {
  border-color: #f2c6cd;
  background: #fff2f4;
}

.pixel-check.warning {
  border-color: #f2dfb2;
  background: #fff8e9;
}

.pixel-check.passed {
  border-color: #b9e5cf;
  background: #edf9f2;
}

.pixel-check.compact {
  margin-top: 8px;
}

.pixel-check-line {
  color: var(--muted);
  font-size: 12px;
}

.pixel-check-line.error {
  color: var(--danger);
}

.pixel-check-line.warning {
  color: var(--warn);
}

.pixel-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 2px;
}

.pixel-palette span {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(18, 24, 38, 0.16);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.pixel-review-row {
  grid-template-columns: 96px minmax(260px, 1fr) minmax(320px, 0.95fr);
  align-items: start;
}

.pixel-review-row img {
  width: 96px;
  height: 96px;
}

.pixel-review-main {
  min-width: 0;
}

.pixel-review-actions {
  display: grid;
  gap: 10px;
}

.pixel-internal-review-row,
.pixel-art-review-row {
  grid-template-columns: 96px minmax(0, 1fr) minmax(132px, auto);
}

.pixel-review-menu-wrap {
  position: relative;
}

.pixel-review-menu[hidden] {
  display: none;
}

.pixel-review-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 35;
  display: grid;
  min-width: 154px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.pixel-review-menu form {
  margin: 0;
}

.pixel-review-menu a,
.pixel-review-menu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.pixel-review-menu button:disabled,
.pixel-review-menu .is-disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.62;
}

.pixel-review-menu a:hover,
.pixel-review-menu a:focus-visible,
.pixel-review-menu button:hover,
.pixel-review-menu button:focus-visible {
  outline: none;
  background: var(--surface-soft);
}

.pixel-review-menu button:disabled:hover,
.pixel-review-menu button:disabled:focus-visible {
  background: transparent;
}

.pixel-review-decision-modal[hidden] {
  display: none;
}

.pixel-review-decision-modal {
  position: fixed;
  inset: 0;
  z-index: 44;
  display: grid;
  overflow: hidden;
  overscroll-behavior: contain;
  place-items: center;
  padding: 24px;
}

.pixel-review-decision-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.44);
  touch-action: none;
}

.pixel-review-decision-panel {
  position: relative;
  z-index: 1;
  width: min(1500px, 100%);
  max-height: min(920px, calc(100vh - 48px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-xl);
}

.pixel-review-decision-panel.pixel-bulk-confirm-panel {
  width: min(480px, calc(100vw - 48px));
  padding: 22px 24px;
}

.pixel-bulk-confirm-panel .section-head {
  margin-bottom: 12px;
}

.pixel-bulk-confirm-panel .modal-actions {
  margin-top: 18px;
}

.pixel-review-change-form {
  display: grid;
  gap: 18px;
}

.pixel-review-compose-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(680px, 1.28fr);
  gap: 24px;
  align-items: start;
}

.pixel-review-compose-media,
.pixel-review-compose-editor {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.pixel-review-compose-image-frame {
  display: grid;
  height: min(500px, calc(100vh - 360px));
  min-height: 300px;
  overflow: hidden;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(-45deg, #f2f4f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f4f7 75%),
    linear-gradient(-45deg, transparent 75%, #f2f4f7 75%);
  background-color: #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.pixel-review-compose-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pixel-review-compose-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.pixel-review-compose-meta div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.pixel-review-compose-meta dt,
.pixel-review-compose-meta dd {
  margin: 0;
}

.pixel-review-compose-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.pixel-review-compose-meta dd {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pixel-review-error {
  padding: 10px 12px;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 8px;
  background: #fff1f2;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.pixel-review-error[hidden] {
  display: none;
}

.pixel-review-error.is-success {
  border-color: #b9e5cf;
  background: #edf9f2;
  color: #0f7a46;
}

.pixel-review-error.is-warning {
  border-color: #f2dfb2;
  background: #fff8e9;
  color: #9a5b00;
}

.pixel-review-page-error {
  margin-bottom: 12px;
}

.pixel-review-editor-shell .tiptap-toolbar {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.pixel-review-editor-shell,
.pixel-review-editor-shell .tiptap-editor,
.pixel-review-editor-shell .tiptap-editor .ProseMirror,
.pixel-review-editor-shell .tiptap-editor.is-fallback {
  overscroll-behavior: contain;
}

.pixel-review-editor-shell .tiptap-editor,
.pixel-review-editor-shell .tiptap-editor .ProseMirror,
.pixel-review-editor-shell .tiptap-editor.is-fallback {
  min-height: min(560px, calc(100vh - 420px));
}

.pixel-review-editor-actions {
  margin-top: -2px;
  justify-content: flex-end;
}

.pixel-decision-form {
  display: grid;
  gap: 10px;
}

.pixel-decision-form .card-actions {
  justify-content: flex-end;
}

.pixel-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.tiptap-shell {
  display: grid;
  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.tiptap-shell:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 79, 143, 0.12);
}

.tiptap-shell textarea[hidden] {
  display: none;
}

.tiptap-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  min-height: 48px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-strong);
  background: #fff;
}

.tiptap-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: #687386;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tiptap-toolbar button:hover,
.tiptap-toolbar button.is-active {
  color: var(--primary);
}

.tiptap-toolbar button:hover {
  background: #f7f8fa;
}

.tiptap-toolbar button.is-active {
  background: #edf3fa;
}

.tiptap-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.tiptap-toolbar svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
}

.tiptap-toolbar .tiptap-separator {
  width: 1px;
  height: 30px;
  margin: 0 14px;
  background: #dfe3ea;
}

.tiptap-toolbar button[data-tiptap-action="heading"],
.tiptap-toolbar button[data-tiptap-action="listMenu"] {
  width: 46px;
  min-width: 46px;
}

.tiptap-toolbar .tiptap-wide-button {
  gap: 3px;
}

.tiptap-toolbar .tiptap-text-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  background: transparent;
  color: currentColor;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
}

.tiptap-toolbar .tiptap-italic-icon {
  font-style: italic;
  font-weight: 500;
}

.tiptap-toolbar .tiptap-strike-icon {
  position: relative;
  font-weight: 500;
}

.tiptap-toolbar .tiptap-strike-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  right: 3px;
  height: 2px;
  background: currentColor;
}

.tiptap-toolbar .tiptap-underline-icon {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.tiptap-toolbar .tiptap-color-icon {
  font-weight: 600;
  transform: translateY(1px);
}

.tiptap-toolbar button[data-tiptap-action="highlightMenu"] svg {
  width: 21px;
  height: 21px;
  transform: translateY(1px);
}

.tiptap-toolbar .tiptap-chevron {
  width: 12px;
  height: 12px;
}

.tiptap-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tiptap-floating-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  display: grid;
  min-width: 170px;
  padding: 10px;
  border: 1px solid #edf1f6;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.13);
  transform-origin: top left;
  animation: tiptap-menu-in 0.14s ease-out;
}

.tiptap-floating-menu[hidden] {
  display: none;
}

.tiptap-floating-menu button {
  justify-content: flex-start;
  gap: 10px;
  width: auto;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  color: #59616c;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}

.tiptap-floating-menu button:hover {
  background: #f6f7fa;
  color: #313844;
}

.tiptap-heading-menu button span,
.tiptap-list-menu button > span {
  width: auto;
  height: auto;
  margin: 0;
  background: transparent;
  color: #646b75;
  font-size: 16px;
}

.tiptap-heading-menu button span {
  min-width: 28px;
  font-weight: 600;
}

.tiptap-heading-menu,
.tiptap-list-menu {
  min-width: 190px;
}

.tiptap-list-menu {
  padding: 12px;
}

.tiptap-list-menu button {
  height: 38px;
  min-height: 38px;
  font-size: 17px;
}

.tiptap-list-menu button > svg {
  width: 22px;
  min-width: 22px;
  height: 22px;
  color: #646b75;
}

.tiptap-color-menu {
  left: auto;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 18px;
}

.tiptap-color-menu button {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 2px solid #d5dce8;
  border-radius: 999px;
  background: var(--swatch, #fff);
}

.tiptap-color-menu button:hover {
  background: var(--swatch, #fff);
  box-shadow: 0 0 0 4px rgba(31, 79, 143, 0.12);
}

.tiptap-color-menu .tiptap-menu-divider,
.tiptap-link-menu .tiptap-menu-divider {
  width: 1px;
  height: 26px;
  margin: 0 2px;
  background: #e3e7ee;
}

.tiptap-color-menu .tiptap-clear-highlight {
  position: relative;
  border-color: #8a929d;
  background: #fff;
}

.tiptap-color-menu .tiptap-clear-highlight::before,
.tiptap-color-menu .tiptap-clear-highlight::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 14px;
  height: 2px;
  margin: auto;
  border-radius: 999px;
  background: #636b76;
  transform: rotate(45deg);
}

.tiptap-color-menu .tiptap-clear-highlight::after {
  transform: rotate(-45deg);
}

.tiptap-link-menu {
  left: auto;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 360px;
  padding: 12px 14px;
  border-radius: 18px;
}

.tiptap-link-menu input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 2px solid #e3e8f0;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #303742;
  font: inherit;
  font-size: 16px;
}

.tiptap-link-menu input:focus {
  border-color: #d7dee9;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.04);
}

.tiptap-link-button-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tiptap-link-menu button {
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  color: #7c8490;
  font-size: 18px;
  line-height: 1;
}

.tiptap-link-menu svg {
  display: block;
  width: 19px;
  height: 19px;
}

@keyframes tiptap-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tiptap-editor {
  min-height: 360px;
  overflow: auto;
  background: #fff;
  color: var(--text);
  line-height: 1.65;
  outline: none;
  cursor: text;
}

.tiptap-editor:focus-within {
  box-shadow: none;
}

.tiptap-editor .ProseMirror,
.tiptap-editor.is-fallback {
  min-height: 360px;
  padding: 14px 16px;
  outline: none;
}

.tiptap-editor p,
.tiptap-editor ul,
.tiptap-editor ol,
.tiptap-editor blockquote {
  margin: 0 0 10px;
}

.tiptap-editor h1,
.tiptap-editor h2,
.tiptap-editor h3,
.tiptap-editor h4 {
  margin: 14px 0 8px;
  color: var(--text);
  line-height: 1.25;
}

.tiptap-editor ul,
.tiptap-editor ol {
  padding-left: 22px;
}

.tiptap-editor blockquote {
  padding-left: 12px;
  border-left: 3px solid var(--line-strong);
  color: var(--text-soft);
}

.tiptap-editor img,
.tiptap-editor video {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tiptap-editor .tiptap-resizable-media {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 10px 0;
  line-height: 0;
}

.tiptap-editor .tiptap-resizable-media img,
.tiptap-editor .tiptap-resizable-media video {
  display: block;
  max-width: 100%;
  margin: 0;
}

.tiptap-editor .tiptap-resizable-media[data-media-kind="video"] video:not([width]) {
  width: min(100%, 720px);
}

.tiptap-editor .tiptap-resizable-media.is-selected img,
.tiptap-editor .tiptap-resizable-media.is-selected video,
.tiptap-editor .tiptap-resizable-media:hover img,
.tiptap-editor .tiptap-resizable-media:hover video {
  border-color: var(--primary);
}

.tiptap-media-resize-handle {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: none;
  width: 14px;
  min-width: 0;
  height: 14px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  border-radius: 0 0 5px 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
  cursor: nwse-resize;
  appearance: none;
  -webkit-appearance: none;
  transition: none;
}

.tiptap-media-delete-button {
  position: absolute;
  top: -9px;
  right: -9px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 0;
  height: 18px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.12);
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
  transition: none;
}

.tiptap-media-resize-handle:hover,
.tiptap-media-resize-handle:active {
  border-color: var(--primary);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.tiptap-media-delete-button:hover,
.tiptap-media-delete-button:active {
  border-color: rgba(248, 113, 113, 0.45);
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.14);
  color: #dc2626;
  transform: none;
}

.tiptap-editor .tiptap-resizable-media:hover .tiptap-media-resize-handle,
.tiptap-editor .tiptap-resizable-media.is-selected .tiptap-media-resize-handle,
.tiptap-editor .tiptap-resizable-media.is-resizing .tiptap-media-resize-handle,
.tiptap-editor .tiptap-resizable-media:hover .tiptap-media-delete-button,
.tiptap-editor .tiptap-resizable-media.is-selected .tiptap-media-delete-button,
.tiptap-editor .tiptap-resizable-media.is-resizing .tiptap-media-delete-button {
  display: flex;
}

.tiptap-upload-placeholder {
  display: grid;
  gap: 8px;
  width: min(100%, 520px);
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f7faff;
  color: var(--text);
  cursor: default;
}

.tiptap-upload-placeholder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
}

.tiptap-upload-placeholder-head strong {
  color: var(--primary);
  font-size: 12px;
}

.tiptap-upload-placeholder-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3ebf8;
}

.tiptap-upload-placeholder-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 160ms ease;
}

.pixel-reasons > span {
  flex-basis: 100%;
  color: var(--text);
  font-weight: 760;
}

.pixel-reasons label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.pixel-usage-list {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.pixel-settings-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
  align-items: end;
}

.kstage-cli-page {
  max-width: 920px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.kstage-cli-page .page-head p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.kstage-cli-tabs {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.kstage-cli-tab {
  min-height: 42px;
  padding: 8px 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
}

.kstage-cli-tab:hover {
  background: transparent;
  color: var(--text);
}

.kstage-cli-tab.is-active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.kstage-cli-panel {
  display: grid;
  gap: 16px;
}

.kstage-cli-panel[hidden] {
  display: none;
}

.kstage-cli-doc-entry {
  display: flex;
  justify-content: center;
  padding-top: 22px;
}

.kstage-cli-desc,
.kstage-cli-steps p,
.kstage-cli-card-foot span {
  margin: 0;
  color: var(--muted);
}

.kstage-cli-code-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
}

.kstage-cli-code-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.kstage-cli-code-row,
.kstage-cli-card-foot,
.kstage-token-secret {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kstage-cli-card-foot {
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.kstage-cli-prompt,
.kstage-cli-code-row code,
.kstage-token-secret code,
.kstage-token-row code {
  font: 13px ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.kstage-cli-prompt {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.8;
}

.kstage-cli-code-row code,
.kstage-token-secret code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.kstage-cli-steps {
  display: grid;
  gap: 22px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.kstage-cli-steps li {
  display: grid;
  gap: 10px;
}

.kstage-cli-steps h2 {
  margin: 0;
  font-size: 15px;
}

.kstage-cli-doc-page {
  max-width: 980px;
}

.kstage-cli-doc-page .page-head {
  text-align: left;
}

.kstage-cli-doc-hero,
.kstage-cli-doc-section {
  display: grid;
  gap: 14px;
}

.kstage-cli-doc-hero p,
.kstage-cli-doc-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.kstage-cli-doc-section h2 {
  margin: 0;
  font-size: 20px;
}

.kstage-cli-doc-callout {
  padding: 12px 14px;
  border: 1px solid #f4c36f;
  border-radius: 8px;
  background: var(--warn-soft);
  color: var(--text);
  font-weight: 750;
  line-height: 1.65;
}

.kstage-cli-doc-list {
  display: grid;
  gap: 8px;
  padding-left: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.kstage-cli-doc-muted {
  color: var(--muted);
}

.kstage-cli-doc-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.kstage-cli-doc-table > div {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.kstage-cli-doc-table > div:last-child {
  border-bottom: 0;
}

.kstage-cli-doc-table > div:first-child {
  background: var(--surface-soft);
  color: var(--text);
}

.kstage-cli-doc-table span {
  color: var(--muted);
}

.kstage-cli-doc-faq {
  display: grid;
  gap: 8px;
}

.kstage-cli-doc-faq h3 {
  margin: 8px 0 0;
  font-size: 15px;
}

.kstage-token-modal[hidden] {
  display: none;
}

.kstage-token-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.kstage-token-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
}

.kstage-token-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(920px, 100%);
  max-height: min(780px, calc(100vh - 48px));
  overflow: auto;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.kstage-token-head {
  padding-right: 42px;
  margin-bottom: 0;
}

.kstage-token-head h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.kstage-token-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 260px) auto;
  gap: 12px;
  align-items: end;
}

.kstage-token-create-form .kstage-token-error {
  grid-column: 1 / -1;
}

.kstage-token-scope {
  display: grid;
  gap: 6px;
}

.kstage-token-scope > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.kstage-token-scope > strong {
  font-size: 14px;
}

.kstage-token-product-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kstage-token-product-list span {
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kstage-token-warning {
  padding: 10px 12px;
  border: 1px solid #f4c36f;
  border-radius: 8px;
  background: var(--warn-soft);
  color: var(--text);
}

.kstage-token-warning strong {
  color: var(--warn);
}

.kstage-token-secret code {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  word-break: break-all;
}

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

.kstage-token-list-head,
.kstage-token-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.8fr) 88px 112px 96px 74px;
  gap: 10px;
  align-items: center;
}

.kstage-token-list-head {
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.kstage-token-row {
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.kstage-token-row strong,
.kstage-token-row code {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kstage-token-row code {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.kstage-token-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kstage-token-empty {
  padding: 24px;
  text-align: center;
}

.kstage-token-error {
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

@media (max-width: 900px) {
  .kstage-cli-tabs {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .kstage-token-create-form,
  .kstage-token-list-head,
  .kstage-token-row {
    grid-template-columns: 1fr;
  }

  .kstage-token-list-head {
    display: none;
  }

  .kstage-cli-code-row,
  .kstage-cli-card-foot,
  .kstage-token-secret {
    align-items: stretch;
    flex-direction: column;
  }

  .kstage-cli-doc-table > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-strip,
  .inline-actions,
  .member-form,
  .product-form {
    align-items: stretch;
    flex-direction: column;
  }

  .product-form,
  .management-product-row,
  .product-row,
  .status-form,
  .team-row,
  .member-table .member-row,
  .form-grid-two,
  .user-filter-form,
  .user-row,
  .user-edit-grid {
    grid-template-columns: 1fr;
  }

  .management-actions {
    justify-content: flex-start;
  }

  .member-actions {
    justify-content: flex-start;
  }

  .team-head {
    display: none;
  }

  .member-table .member-head {
    display: none;
  }

  .management-product-head {
    display: none;
  }

  .product-table-panel .product-head {
    display: none;
  }

  .product-table-panel .product-row {
    align-items: stretch;
  }

  .product-table-panel .member-actions {
    justify-content: flex-start;
  }

  .management-product-row {
    align-items: stretch;
  }

  .management-inline-fields {
    grid-template-columns: 1fr;
  }

  .user-row {
    grid-template-areas:
      "identity"
      "edit"
      "roles"
      "actions";
  }

  .user-row-actions {
    justify-items: stretch;
  }

  .compact-field {
    width: auto;
  }

  .inline-actions input[type="text"] {
    width: 100%;
  }

  .pixel-upload-form,
  .pixel-filter,
  .pixel-filter-with-view,
  .pixel-list-row,
  .pixel-asset-notes-layout,
  .pixel-preview-layout,
  .pixel-upload-result,
  .pixel-review-row,
  .pixel-review-compose-grid,
  .pixel-settings-form {
    grid-template-columns: 1fr;
  }

  .date-range-trigger {
    min-width: 0;
  }

  .date-range-picker {
    width: 100%;
  }

  .pixel-internal-review-filter,
  .pixel-prelevel-filter {
    flex-direction: column;
  }

  .pixel-internal-review-filter > .kstage-select,
  .pixel-internal-review-filter > .date-range-picker,
  .pixel-internal-review-filter > .pixel-filter-reset-button,
  .pixel-prelevel-filter > .kstage-select,
  .pixel-prelevel-filter > .date-range-picker,
  .pixel-prelevel-filter > .pixel-filter-reset-button {
    flex: 0 0 auto;
    width: 100%;
  }

  .pixel-filter-tools {
    width: 100%;
    justify-content: space-between;
  }

  .date-range-popover {
    right: auto;
    left: 0;
    grid-template-columns: 1fr;
    width: min(100%, calc(100vw - 32px));
    max-height: calc(100vh - 170px);
    overflow: auto;
  }

  .date-range-popover::before {
    right: auto;
    left: 22px;
  }

  .date-range-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
  }

  .date-range-calendars {
    grid-template-columns: 1fr;
  }

  .pixel-note {
    grid-column: auto;
  }

  .pixel-view-only-panel {
    justify-content: flex-start;
  }

  .pixel-view-switch {
    justify-self: start;
  }

  .pixel-list-thumb-wrap,
  .pixel-list-thumb-button,
  .pixel-list-thumb,
  .pixel-upload-preview {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .pixel-preview-panel {
    padding: 20px;
  }

  .pixel-asset-notes-panel {
    padding: 20px;
  }

  .pixel-preview-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .pixel-review-decision-panel {
    padding: 20px;
  }

  .pixel-preview-layout {
    padding-right: 0;
  }

  .pixel-preview-layout.pixel-preview-notes-layout {
    grid-template-columns: 1fr;
  }

  .pixel-preview-image-frame {
    height: 320px;
    min-height: 260px;
  }

  .pixel-preview-notes-media .pixel-preview-image-frame {
    height: 320px;
    min-height: 260px;
  }

  .pixel-asset-notes-image-frame {
    height: 320px;
    min-height: 260px;
  }

  .pixel-asset-notes-editor-shell,
  .pixel-asset-notes-editor-shell .tiptap-editor {
    min-height: 320px;
    max-height: none;
  }

  .pixel-preview-meta,
  .pixel-preview-color-row {
    grid-template-columns: 1fr;
  }

  .pixel-preview-color-row {
    gap: 4px;
    align-items: start;
    padding: 10px 0;
  }

  .pixel-preview-color-row b {
    text-align: left;
  }

  .pixel-review-compose-image-frame {
    height: 360px;
    min-height: 280px;
  }

  .pixel-review-compose-meta {
    grid-template-columns: 1fr;
  }

  .pixel-row-actions,
  .modal-actions {
    justify-content: flex-start;
  }

  .pixel-report-popover,
  .upload-revision-details .revision-form {
    position: static;
    width: auto;
    margin-top: 8px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    display: none;
  }

  .page {
    max-width: none;
    padding: 16px 12px 28px;
  }

  .asset-grid,
  .task-board {
    grid-template-columns: 1fr;
  }

  .review-row,
  .member-row {
    grid-template-columns: 1fr;
  }

  .review-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }
}
