/* ==========================================================================
   纸上 · Studio
   ========================================================================== */

.studio-page {
  --paper: #f1f0e8;
  --paper-deep: #e5e3d8;
  --surface: #faf9f3;
  --ink: #0a0a0a;
  --ink-soft: #4d4d46;
  --ink-faint: #62625a;
  --line: rgba(10, 10, 10, 0.18);
  --line-strong: #0a0a0a;
  --accent: #0a0a0a;
  --accent-deep: #000000;
  --sand: #d8ff00;
  background: var(--paper);
}

.studio-page .btn--accent {
  --btn-bg: var(--sand);
  --btn-fg: var(--ink);
  --btn-border: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.studio-page .btn--accent:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--sand);
  --btn-border: var(--ink);
}

.studio-loading {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
.login-view {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr);
}

.login-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100svh;
  padding: clamp(28px, 3.4vw, 54px);
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

.login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(241, 237, 228, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 237, 228, 0.055) 1px, transparent 1px);
  background-size: 25% 25%;
  pointer-events: none;
}

.login-art::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -46%;
  width: 78%;
  aspect-ratio: 1;
  border: 1px solid rgba(241, 237, 228, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.login-art-top,
.login-art-foot,
.login-quote {
  position: relative;
  z-index: 2;
}

.login-art-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.login-brand {
  display: flex;
  align-items: baseline;
  gap: 13px;
}

.login-brand span {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.login-brand small {
  color: rgba(241, 237, 228, 0.58);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-back {
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(241, 237, 228, 0.25);
  color: rgba(241, 237, 228, 0.75);
  font-size: 10px;
  letter-spacing: 0.06em;
  transition:
    color var(--dur-fast) ease,
    border-color var(--dur-fast) ease;
}

.login-back:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.login-quote {
  max-width: 760px;
  padding-block: 80px;
}

.login-quote .eyebrow {
  color: rgba(241, 237, 228, 0.58);
}

.login-quote p {
  margin-top: clamp(24px, 4vh, 45px);
  font-family: var(--font-serif);
  font-size: clamp(62px, 8.2vw, 128px);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.login-quote em {
  color: var(--sand);
  font-style: normal;
}

.login-art-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid rgba(241, 237, 228, 0.16);
  color: rgba(241, 237, 228, 0.58);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-orbit {
  position: absolute;
  z-index: 1;
  right: 15%;
  bottom: 24%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sand);
  box-shadow: 0 0 0 9px rgba(216, 255, 0, 0.18), 0 0 0 18px rgba(216, 255, 0, 0.08);
}

.login-panel {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 100svh;
  padding: clamp(34px, 5vw, 84px);
  background: var(--paper);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 80% 20%, rgba(217, 201, 165, 0.32), transparent 32%);
}

.login-box {
  position: relative;
  z-index: 1;
  width: min(100%, 410px);
}

.login-box h1 {
  margin: 22px 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(42px, 4vw, 58px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.login-intro {
  margin-bottom: 38px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.9;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 19px;
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  padding-right: 44px !important;
}

.password-toggle {
  position: absolute;
  right: -6px;
  display: grid;
  width: 44px;
  height: 44px;
  color: var(--ink-faint);
  place-items: center;
}

.password-toggle:hover {
  color: var(--ink);
}

.login-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 8px;
  justify-content: space-between;
  padding-inline: 22px;
}

.login-submit:hover .icon {
  transform: translateX(3px);
}

.login-hint {
  margin-top: 28px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.8;
}

.login-hint code {
  padding: 2px 5px;
  background: rgba(25, 24, 20, 0.06);
  font-family: var(--font-mono);
  font-size: 9px;
}

.login-copyright {
  position: absolute;
  bottom: 28px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Studio shell
   -------------------------------------------------------------------------- */
.studio-app {
  min-height: 100svh;
  background:
    radial-gradient(circle at 86% -10%, rgba(217, 201, 165, 0.28), transparent 30%),
    #eee9df;
}

.studio-top {
  position: sticky;
  top: 0;
  z-index: 70;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 233, 223, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.studio-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1360px);
  height: 76px;
  margin-inline: auto;
  padding-inline: clamp(20px, 3.4vw, 46px);
}

.studio-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
}

.studio-brand-cn {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.studio-brand-tag {
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.studio-top-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 8px 11px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color var(--dur-fast) ease;
}

.top-link:hover {
  color: var(--ink);
}

.top-divider {
  width: 1px;
  height: 20px;
  margin-inline: 7px;
  background: var(--line);
}

.icon-btn {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--ink-soft);
  place-items: center;
  transition:
    color var(--dur-fast) ease,
    background var(--dur-fast) ease,
    border-color var(--dur-fast) ease;
}

.icon-btn:hover {
  background: rgba(25, 24, 20, 0.06);
  color: var(--ink);
}

.icon-btn--border {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
}

.icon-btn:disabled {
  opacity: 0.24;
  cursor: not-allowed;
}

.icon-btn:disabled:hover {
  background: transparent;
}

.icon-btn--danger:hover {
  background: rgba(158, 47, 34, 0.08);
  color: var(--danger);
}

.studio-main {
  width: min(100%, 1360px);
  margin-inline: auto;
  padding-inline: clamp(20px, 3.4vw, 46px);
}

.studio-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-block: clamp(42px, 6vw, 76px) clamp(34px, 4vw, 52px);
}

.studio-hero h1 {
  margin-top: 19px;
  font-family: var(--font-serif);
  font-size: clamp(56px, 6.8vw, 94px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.studio-hero h1 .accent {
  color: var(--accent);
}

.studio-hero p {
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 12px;
}

.studio-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 4px;
}

/* Stats */
.studio-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 152px;
  padding: 22px 26px 22px 0;
}

.stat + .stat {
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.stat-label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.stat strong {
  margin: auto 0 4px;
  font-family: var(--font-serif);
  font-size: clamp(44px, 4.4vw, 64px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.stat-foot {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Works manager */
.works-manager {
  padding-block: clamp(48px, 7vw, 84px) 100px;
}

.manager-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 32px;
}

.manager-head h2 {
  margin-top: 15px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 3.8vw, 52px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.manager-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 210px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(250, 247, 240, 0.55);
  color: var(--ink-faint);
  transition:
    border-color var(--dur-fast) ease,
    background var(--dur-fast) ease;
}

.search-box:focus-within {
  border-color: var(--line-strong);
  background: var(--surface);
}

.search-box input {
  width: 100%;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  outline: 0;
}

.search-box input::placeholder {
  color: var(--ink-faint);
}

.manager-count {
  flex: 0 0 auto;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.works-table-head {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 112px 88px 68px 126px;
  gap: 18px;
  padding: 0 14px 10px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.works-table-head span:nth-child(1) {
  grid-column: 1 / 3;
}

.works-table-head span:nth-child(2) {
  grid-column: 3;
}

.works-table-head span:nth-child(3) {
  grid-column: 4;
}

.works-table-head span:nth-child(4) {
  grid-column: 5;
  text-align: center;
}

.works-table-head span:nth-child(5) {
  grid-column: 6;
  text-align: right;
}

.work-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 112px 88px 68px 126px;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) ease;
}

.work-row:hover {
  background: rgba(250, 247, 240, 0.58);
}

.work-row.is-dragging {
  opacity: 0.45;
}

.work-row.is-drop-target {
  box-shadow: inset 0 2px 0 var(--accent);
}

.work-thumb {
  position: relative;
  display: block;
  width: 62px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-deep);
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease-out);
}

.work-thumb:hover img {
  transform: scale(1.05);
}

.work-thumb-draft {
  position: absolute;
  inset: auto 0 0;
  padding: 3px 4px;
  background: rgba(25, 24, 20, 0.7);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-align: center;
}

.work-row-main {
  min-width: 0;
}

.work-row-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-row-title:hover {
  color: var(--accent);
}

.work-row-pin {
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.09em;
}

.work-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 9px;
}

.work-row-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
  transition:
    border-color var(--dur-fast) ease,
    background var(--dur-fast) ease;
}

.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.status-pill.is-published {
  border-color: rgba(62, 97, 70, 0.25);
  background: rgba(62, 97, 70, 0.06);
  color: var(--success);
}

.status-pill.is-published::before {
  background: var(--success);
}

.status-pill:hover {
  border-color: var(--line-strong);
}

.work-date {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.order-buttons {
  display: flex;
  justify-content: center;
  gap: 3px;
}

.order-buttons .icon-btn {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
}

.order-buttons .icon-btn:hover {
  border-color: var(--line);
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.row-actions .icon-btn {
  width: 34px;
  height: 34px;
}

.no-results {
  display: grid;
  justify-items: center;
  gap: 13px;
  padding: 68px 24px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.no-results p {
  color: var(--ink-soft);
  font-size: 12px;
}

.studio-empty {
  display: grid;
  justify-items: center;
  padding: 74px 24px 90px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.empty-mark {
  display: grid;
  width: 76px;
  height: 76px;
  margin-bottom: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-faint);
  font-family: var(--font-serif);
  font-size: 25px;
  place-items: center;
}

.studio-empty h3 {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.studio-empty p {
  margin: 10px 0 24px;
  color: var(--ink-soft);
  font-size: 12px;
}

.studio-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1360px);
  margin-inline: auto;
  padding: 22px clamp(20px, 3.4vw, 46px) 32px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.studio-footer > div {
  display: flex;
  gap: 20px;
  align-items: center;
}

.studio-footer a:hover,
.studio-footer button:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.field-label i {
  color: var(--accent);
  font-style: normal;
}

.field input,
.field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  outline: 0;
  transition: border-color var(--dur-fast) ease;
}

.field input {
  height: 42px;
  padding: 7px 0;
}

.field textarea {
  min-height: 92px;
  padding: 11px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: rgba(250, 247, 240, 0.5);
  padding-inline: 12px;
  line-height: 1.7;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-faint);
  opacity: 0.72;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--danger);
}

.field-help {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.6;
}

.field-group {
  display: grid;
  gap: 22px;
}

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

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

.form-error {
  color: var(--danger);
  font-size: 11px;
  line-height: 1.6;
}

/* Toggles */
.field-toggles {
  display: grid;
  gap: 16px;
  padding-top: 8px;
}

.switch {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 34px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  transition:
    background var(--dur-fast) ease,
    border-color var(--dur-fast) ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink-soft);
  transition:
    transform var(--dur) var(--ease-out),
    background var(--dur-fast) ease;
}

.switch input:checked + .switch-track {
  border-color: var(--ink);
  background: var(--ink);
}

.switch input:checked + .switch-track::after {
  background: var(--paper);
  transform: translateX(14px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.switch-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-copy strong {
  font-size: 11px;
  font-weight: 600;
}

.switch-copy small {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.5;
}

/* Dialog base */
.editor-dialog,
.profile-dialog,
.confirm-dialog {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0;
  background: var(--paper);
  color: var(--ink);
}

.editor-dialog::backdrop,
.profile-dialog::backdrop,
.confirm-dialog::backdrop {
  background: rgba(20, 20, 17, 0.56);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.editor-dialog {
  width: min(1120px, calc(100vw - 36px));
  max-width: none;
  height: min(920px, calc(100svh - 36px));
  max-height: none;
  margin: auto;
}

.editor-form {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px clamp(20px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}

.editor-head h2 {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.editor-body {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1.16fr) minmax(300px, 0.84fr);
  min-height: 0;
  overflow-y: auto;
}

.editor-fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 30px clamp(20px, 3vw, 34px) 40px;
}

.editor-media {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 30px clamp(20px, 2.6vw, 30px);
  border-left: 1px solid var(--line);
  background: rgba(232, 226, 213, 0.48);
}

.media-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.media-ratio {
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  background: rgba(250, 247, 240, 0.45);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    border-color var(--dur-fast) ease,
    background var(--dur-fast) ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: rgba(250, 247, 240, 0.9);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone--cover {
  min-height: 280px;
  aspect-ratio: 4 / 5;
  max-height: 380px;
}

.dropzone-empty {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 9px;
  padding: 26px;
  text-align: center;
}

.dropzone-empty .icon {
  margin-bottom: 5px;
  color: var(--ink-faint);
}

.dropzone-empty strong {
  font-size: 11px;
  font-weight: 600;
}

.dropzone-empty span {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.6;
}

.dropzone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(25, 24, 20, 0.04);
}

.dropzone-change {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(25, 24, 20, 0.72);
  color: var(--white);
  font-size: 9px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.dropzone--gallery {
  gap: 7px;
  min-height: 54px;
  padding: 12px;
  font-size: 10px;
  font-weight: 500;
}

.dropzone--gallery .icon {
  width: 14px;
  height: 14px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.preview-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--paper-deep);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(25, 24, 20, 0.72);
  color: var(--white);
  place-items: center;
}

.preview-item button .icon {
  width: 11px;
  height: 11px;
}

.existing-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.existing-gallery:empty {
  display: none;
}

.existing-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--paper-deep);
}

.existing-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.existing-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(25, 24, 20, 0.66);
  color: var(--white);
  place-items: center;
}

.existing-item button .icon {
  width: 11px;
  height: 11px;
}

.existing-item.is-removing {
  opacity: 0.34;
}

.existing-item.is-removing::after {
  content: "将删除";
  position: absolute;
  inset: 0;
  display: grid;
  color: var(--white);
  font-size: 9px;
  background: rgba(158, 47, 34, 0.45);
  place-items: center;
}

.media-note {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.75;
}

.editor-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-progress > span {
  display: block;
  height: 2px;
  overflow: hidden;
  background: var(--line);
}

.editor-progress > span::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent);
  animation: upload-slide 1.15s ease-in-out infinite;
}

@keyframes upload-slide {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(350%);
  }
}

.editor-progress small {
  color: var(--ink-faint);
  font-size: 9px;
}

.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 14px clamp(20px, 3vw, 34px);
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.editor-foot-actions {
  display: flex;
  gap: 9px;
  margin-left: auto;
}

/* Profile dialog */
.profile-dialog {
  width: min(940px, calc(100vw - 36px));
  max-width: none;
  max-height: min(920px, calc(100svh - 36px));
  margin: auto;
}

.profile-form {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.profile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  padding: 28px clamp(20px, 3vw, 34px) 36px;
}

.profile-note {
  max-width: 72ch;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 8px;
}

.profile-section + .profile-section {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.profile-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.profile-section-head span {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.profile-section-head h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Confirm */
.confirm-dialog {
  width: min(460px, calc(100vw - 36px));
  max-width: none;
  margin: auto;
}

.confirm-inner {
  padding: 32px;
}

.confirm-inner h2 {
  margin: 18px 0 12px;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.confirm-inner p {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 30px;
}

.btn--danger {
  --btn-bg: var(--danger);
  --btn-fg: var(--white);
  --btn-border: var(--danger);
}

.btn--danger:hover {
  --btn-bg: #7e251b;
  --btn-border: #7e251b;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1060px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .login-art {
    min-height: 42svh;
    padding: 26px 30px;
  }

  .login-quote {
    padding-block: 54px 30px;
  }

  .login-quote p {
    font-size: clamp(50px, 9vw, 78px);
  }

  .login-art-foot {
    display: none;
  }

  .login-panel {
    min-height: 58svh;
    padding-block: 56px 76px;
  }

  .editor-body {
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  }

  .work-row,
  .works-table-head {
    grid-template-columns: 64px minmax(0, 1fr) 104px 74px 104px;
  }

  .works-table-head span:nth-child(3) {
    display: none;
  }

  .work-date {
    display: none;
  }
}

@media (max-width: 860px) {
  .studio-brand-tag,
  .top-link span,
  .top-link {
    font-size: 0;
  }

  .top-link {
    gap: 0;
    padding-inline: 9px;
  }

  .top-link .icon {
    width: 17px;
    height: 17px;
  }

  .studio-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 28px;
  }

  .studio-hero-actions {
    width: 100%;
  }

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

  .stat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .manager-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .manager-tools {
    width: 100%;
    justify-content: space-between;
  }

  .search-box {
    width: min(100%, 300px);
  }

  .works-table-head {
    display: none;
  }

  .work-row {
    grid-template-columns: 68px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb main actions"
      "thumb status actions";
    gap: 4px 14px;
    padding: 16px 6px;
  }

  .work-thumb {
    grid-area: thumb;
    width: 58px;
  }

  .work-row-main {
    grid-area: main;
  }

  .work-row .status-pill {
    grid-area: status;
    justify-self: start;
    min-height: 23px;
    padding: 3px 8px;
  }

  .row-actions {
    grid-area: actions;
  }

  .row-actions .icon-btn {
    width: 42px;
    height: 42px;
  }

  .status-pill {
    min-height: 32px;
    padding: 6px 11px;
  }

  .search-box input {
    height: 42px;
  }

  .order-buttons {
    display: none;
  }

  .work-date {
    display: none;
  }

  .editor-dialog {
    width: 100vw;
    height: 100svh;
    max-width: 100vw;
    max-height: 100svh;
    border: 0;
    border-radius: 0;
  }

  .editor-body {
    grid-template-columns: 1fr;
  }

  .editor-media {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .dropzone--cover {
    min-height: 250px;
    max-height: 340px;
  }
}

@media (max-width: 620px) {
  .login-art {
    min-height: 37svh;
  }

  .login-brand small {
    display: none;
  }

  .login-back {
    font-size: 9px;
  }

  .login-quote {
    padding-block: 38px 10px;
  }

  .login-quote .eyebrow {
    display: none;
  }

  .login-quote p {
    margin-top: 0;
    font-size: clamp(44px, 12vw, 64px);
  }

  .login-panel {
    align-content: start;
    min-height: 63svh;
    padding: 42px 22px 84px;
  }

  .login-box h1 {
    font-size: 42px;
  }

  .login-copyright {
    bottom: 22px;
  }

  .studio-top-inner {
    height: 64px;
  }

  .studio-brand-cn {
    font-size: 20px;
  }

  .studio-top-actions {
    gap: 0;
  }

  .top-link {
    min-height: 44px;
  }

  .studio-top-actions .icon-btn {
    width: 42px;
    height: 42px;
  }

  .top-divider {
    margin-inline: 3px;
  }

  .studio-hero h1 {
    font-size: 60px;
  }

  .studio-hero-actions .btn {
    flex: 1;
    padding-inline: 14px;
  }

  .studio-hero-actions .btn .icon {
    width: 15px;
    height: 15px;
  }

  .stat {
    min-height: 126px;
    padding: 16px 18px 16px 0;
  }

  .stat + .stat {
    padding-left: 18px;
  }

  .stat strong {
    font-size: 44px;
  }

  .stat-foot {
    display: none;
  }

  .works-manager {
    padding-top: 46px;
  }

  .manager-head h2 {
    font-size: 38px;
  }

  .manager-tools {
    flex-wrap: wrap;
    gap: 10px;
  }

  .search-box {
    width: 100%;
  }

  .field-group--two,
  .field-group--three {
    grid-template-columns: 1fr;
  }

  .editor-head {
    padding: 18px;
  }

  .editor-head h2 {
    font-size: 28px;
  }

  .editor-fields {
    padding: 22px 18px 30px;
  }

  .editor-media {
    padding: 22px 18px 30px;
  }

  .editor-foot {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 13px 18px;
  }

  .editor-foot-actions {
    width: 100%;
  }

  .editor-foot-actions .btn {
    flex: 1;
  }

  .profile-body {
    padding: 22px 18px 30px;
  }

  .studio-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-inline: 20px;
  }

  .studio-footer > div {
    flex-wrap: wrap;
  }

  .confirm-inner {
    padding: 26px 22px;
  }
}
