:root {
  --bg: #f7f8fa;
  --paper: #fff;
  --ink: #18212f;
  --muted: #677284;
  --line: #e4e8ef;
  --primary: #0f766e;
  --pale: #eef7f5;
  --amber: #fff2d2;
  --red: #b42318;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
}
button,
.upload-button,
summary {
  cursor: pointer;
}
button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 17px;
  transition: background 0.16s;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:hover:not(:disabled) {
  filter: brightness(0.97);
}
:focus-visible {
  outline: 3px solid #0f766e;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 18px;
  font-weight: 650;
}
h3 {
  font-size: 16px;
}
.muted,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 12px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.primary {
  background: var(--primary);
  color: white;
  font-weight: 600;
}
.secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}
.text-button {
  background: transparent;
  color: var(--primary);
  padding: 4px 8px;
}
.hidden {
  display: none !important;
}
.shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: white;
  border-right: 1px solid var(--line);
  padding: 29px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  padding: 0 8px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--muted);
  font-weight: 500;
}
.small-mark {
  background: var(--primary);
  color: white;
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 20px;
}
.nav-caption {
  font-size: 11px;
  color: var(--muted);
  margin: 45px 12px 12px;
}
nav {
  display: grid;
  gap: 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  background: none;
  color: var(--muted);
  text-align: left;
  padding: 12px 15px;
}
.nav-item span {
  font-size: 20px;
  width: 22px;
}
.nav-item.active {
  background: var(--pale);
  color: var(--primary);
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
.sidebar-bottom button {
  margin-left: auto;
  font-size: 12px;
}
.personal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
main {
  min-width: 0;
}
.topbar {
  height: 70px;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.version {
  font-size: 10px;
  letter-spacing: 1px;
}
.version i {
  display: inline-block;
  width: 3px;
  height: 3px;
  background: #9aa5b4;
  border-radius: 50%;
  margin: 0 10px;
}
.view {
  padding: 32px 36px 50px;
  max-width: 1600px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 18px;
}
.page-heading .muted {
  margin-top: 5px;
  font-size: 14px;
}
.workspace {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 660px;
  overflow: hidden;
}
.library-panel {
  border-right: 1px solid var(--line);
  background: #fcfcfd;
  padding: 20px 14px;
}
.panel-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 18px;
}
.panel-label h2 {
  font-size: 13px;
}
.pill {
  background: #eef1f5;
  color: var(--muted);
  font-size: 11px;
  border-radius: 5px;
  padding: 2px 7px;
}
.content-list {
  display: grid;
  gap: 7px;
}
.content-item {
  background: transparent;
  width: 100%;
  border-color: transparent;
  text-align: left;
  min-width: 0;
  padding: 15px 12px;
}
.content-item.active {
  background: white;
  border-color: var(--line);
}
.content-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.content-item p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.content-item time {
  display: block;
  font-size: 10px;
  color: #8993a2;
  margin-top: 10px;
}
.editor-panel {
  padding: 25px 30px;
  min-width: 0;
}
.empty-editor {
  min-height: 570px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.empty-glyph {
  width: 92px;
  height: 112px;
  background: var(--amber);
  color: #9b6d1e;
  border-radius: 5px;
  font:
    40px Georgia,
    serif;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 25px;
  transform: rotate(-5deg);
}
.empty-glyph span {
  font: 20px sans-serif;
  position: absolute;
  right: 10px;
  bottom: 8px;
}
.empty-editor p {
  color: var(--muted);
  margin: 10px 0 23px;
  font-size: 14px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
input:not([type="checkbox"]),
textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 11px 13px;
  margin-top: 7px;
  color: var(--ink);
  min-width: 0;
}
input::placeholder,
textarea::placeholder {
  color: #8b95a4;
}
textarea {
  resize: vertical;
  line-height: 1.8;
  min-height: 220px;
}
#title {
  font-size: 20px;
  font-weight: 600;
}
#body {
  border-color: var(--line);
  font-size: 15px;
}
.editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 23px;
  font-size: 12px;
}
.field-label {
  margin-bottom: 20px;
}
.field-label .hint {
  margin-left: 8px;
  font-weight: 400;
}
.two-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 16px 0;
}
.extra-fields,
details {
  margin: 18px 0;
  font-size: 12px;
  color: var(--muted);
}
summary {
  min-height: 36px;
}
.assets-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 23px 0 12px;
}
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  font-size: 13px;
  border-radius: 8px;
}
.assets-heading .upload-button {
  color: var(--primary);
}
.selected-assets {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.asset-selected {
  width: 112px;
  position: relative;
}
.asset-selected img {
  width: 112px;
  height: 98px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.asset-selected small {
  position: absolute;
  top: 5px;
  left: 5px;
  background: white;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
}
.asset-selected .asset-controls {
  display: flex;
  justify-content: space-between;
}
.asset-selected button {
  font-size: 11px;
  padding: 0 8px;
  min-height: 36px;
  background: white;
  color: var(--muted);
}
.publish-options {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}
.platform-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.platform-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 46px;
  padding: 8px 12px;
  cursor: pointer;
}
.platform-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--pale);
}
input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
}
.platform-logo {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  color: white;
}
.xhs {
  background: #e82f54;
}
.xhh {
  background: #273241;
}
.wx {
  background: #078441;
}
.editor-footer {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.editor-footer > div,
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}
.asset-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  text-align: left;
  min-width: 0;
}
.asset-card img {
  width: 100%;
  height: 155px;
  object-fit: cover;
  border-radius: 6px;
}
.asset-card span {
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 8px;
}
.asset-card.selected {
  border: 2px solid var(--primary);
}
.empty-state {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 50px 24px;
  color: var(--muted);
  text-align: center;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.account-card,
.settings-panel,
.batch {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 24px;
}
.account-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-card p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f0f2f5;
  font-size: 11px;
  white-space: nowrap;
}
.status.good {
  background: #e7f6ed;
  color: #1e6944;
}
.status.pending {
  background: #fff2d2;
  color: #805500;
}
.status.bad {
  background: #fef0ee;
  color: var(--red);
}
.account-card .status {
  margin-top: 16px;
}
.settings-panel {
  margin-top: 20px;
  max-width: 960px;
}
.settings-panel .muted {
  font-size: 13px;
  margin-top: 10px;
}
.settings-panel form {
  margin-top: 20px;
}
.settings-panel .actions {
  margin-top: 20px;
}
#login-help img {
  display: block;
  max-width: 240px;
  margin-top: 18px;
}
.batch {
  margin-bottom: 18px;
}
.batch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--muted);
}
.task-row {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}
.task-info p {
  font-size: 12px;
  margin-top: 7px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.task-info a {
  color: var(--primary);
  font-size: 12px;
  display: block;
  overflow-wrap: anywhere;
}
.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 260px;
}
.task-actions button {
  font-size: 12px;
  padding: 7px 10px;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f1f6f4;
}
.login-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 45px;
  max-width: 520px;
  width: 100%;
}
.mark {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 11px;
  font-size: 30px;
  padding-left: 11px;
  margin-bottom: 30px;
}
.mark span {
  font-size: 20px;
}
.login-card h1 {
  font-size: 27px;
}
.login-card .muted {
  margin: 10px 0 28px;
}
.login-card button {
  margin: 22px 0;
  width: 100%;
}
.login-card .hint {
  font-weight: 400;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  width: min(1260px, calc(100vw - 48px));
  max-height: 90vh;
  padding: 26px;
  background: var(--bg);
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(16, 24, 40, 0.45);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.dialog-heading .muted {
  font-size: 13px;
  margin-top: 8px;
}
.icon-button {
  background: white;
  border-color: var(--line);
  font-size: 24px;
  padding: 0;
  width: 44px;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.preview-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 20px;
  min-width: 0;
}
.preview-card label {
  margin-top: 15px;
}
.preview-card textarea {
  min-height: 220px;
  font-size: 13px;
}
.preview-card .preview-images {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-top: 15px;
}
.preview-images img {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 6px;
}
.preview-card .notice {
  font-size: 12px;
  margin-top: 13px;
  background: var(--amber);
  padding: 10px;
  border-radius: 7px;
}
.preview-card .notice.error {
  background: #fef0ee;
  color: var(--red);
}
.preview-card iframe {
  border: 1px solid var(--line);
  width: 100%;
  height: 260px;
  margin-top: 15px;
  background: white;
  border-radius: 8px;
}
.dialog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
}
.dialog-footer > div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #18212f;
  color: white;
  max-width: calc(100vw - 40px);
  padding: 13px 22px;
  border-radius: 9px;
  z-index: 100;
  font-size: 14px;
}
.toast.error {
  background: #922018;
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .view {
    padding: 25px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .editor-panel {
    padding: 22px;
  }
  .editor-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .preview-grid {
    grid-template-columns: 1fr;
  }
  .account-grid {
    grid-template-columns: 1fr;
  }
  .task-row {
    grid-template-columns: 90px minmax(0, 1fr);
  }
  .task-actions {
    grid-column: 2;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 15px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 17px;
  }
  .brand small {
    font-size: 8px;
  }
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow-x: auto;
    margin-top: 13px;
    gap: 5px;
  }
  .nav-item {
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 13px;
  }
  .nav-item span {
    display: none;
  }
  .topbar {
    height: 48px;
    padding: 0 18px;
  }
  .version {
    display: none;
  }
  .view {
    padding: 22px 18px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .page-heading .muted {
    font-size: 12px;
  }
  .page-heading .primary {
    white-space: nowrap;
    font-size: 12px;
    padding: 9px 12px;
  }
  .workspace {
    display: block;
    min-height: 0;
  }
  .library-panel {
    border-right: none;
    border-bottom: 1px solid var(--line);
    max-height: 210px;
    overflow: auto;
  }
  .content-list {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .content-item {
    padding: 10px;
  }
  .content-item p {
    display: none;
  }
  .editor-panel {
    padding: 20px 16px;
  }
  .two-fields {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .empty-editor {
    min-height: 420px;
  }
  .assets-heading {
    align-items: flex-start;
    gap: 10px;
  }
  .assets-heading .hint {
    display: block;
  }
  .platform-options {
    gap: 7px;
  }
  .platform-option {
    font-size: 12px;
    padding: 8px;
  }
  .platform-logo {
    width: 20px;
    height: 20px;
  }
  .editor-footer > div {
    width: 100%;
  }
  .editor-footer > div button {
    flex: 1;
  }
  .dialog-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .dialog-footer > div button {
    flex: 1;
  }
  .task-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .task-actions {
    grid-column: 1;
    max-width: none;
    justify-content: flex-start;
  }
  dialog {
    width: calc(100vw - 20px);
    padding: 16px;
  }
  .login-card {
    padding: 30px 24px;
  }
  .asset-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  .asset-card img {
    height: 125px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
:root {
  color-scheme: light;
}
[hidden] {
  display: none !important;
}
.brand small {
  white-space: nowrap;
  letter-spacing: 1px;
  font-size: 8px;
}
.upload-button {
  flex-shrink: 0;
  white-space: nowrap;
}
.assets-heading > label:first-child {
  min-width: 0;
}
@media (min-width: 1151px) {
  .preview-grid[data-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .preview-grid[data-count="1"] {
    grid-template-columns: minmax(0, 1fr);
  }
}
