:root {
  --ink: #101b36;
  --navy: #101b36;
  --blue: #1b3868;
  --orange: #ff572e;
  --cream: #fff2dc;
  --paper: #fffbf2;
  --canvas: #f3f0ea;
  --muted: #525b6a;
  --line: #c6c8c7;
  --gutter: clamp(16px, 4.7vw, 72px);
  --panel-pad: clamp(18px, 1.9vw, 30px);
  --title-face: var(--headline, "Barlow Condensed"), var(--headline-zh, "Noto Sans SC"), "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  color-scheme: light;
  font: 16px/1.5 "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--title-face); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, textarea, select { touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { opacity: .55; cursor: wait; }
a { color: var(--blue); text-decoration: none; }
:where(button, a, input, textarea, select, summary):focus-visible,
:where(.drop, .capture-action):focus-within {
  outline: 3px solid #c94720;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.symbols { width: 0; height: 0; position: absolute; overflow: hidden; }

/* The masthead and the desk share the same alignment as the cover. */
.header { background: var(--navy); color: var(--cream); border-bottom: 3px solid var(--orange); }
.header-inner, .page { max-width: 1512px; padding-inline: var(--gutter); margin-inline: auto; }
.header-inner { min-height: 76px; display: grid; grid-template-columns: minmax(140px,1fr) auto minmax(140px,1fr); align-items: center; gap: 24px; }
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 10px; color: var(--cream); }
.brand img { width: 43px; height: 43px; }
.wordmark { font: italic 900 1.75rem/1 var(--headline); letter-spacing: .015em; }
.header nav { align-self: stretch; display: flex; align-items: stretch; gap: clamp(6px, 1.25vw, 22px); }
.header nav a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 12px 0; color: #e1dfda; font-size: .94rem; font-weight: 700; line-height: 1.3; position: relative; }
.header nav a:hover, .header nav a[aria-current="page"] { color: #fff; }
.header nav a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 8px; height: 3px; background: var(--orange); }
.header-tools { display: flex; justify-self: end; align-items: center; gap: clamp(8px,1vw,16px); min-width: 0; }
#language { white-space: nowrap; border: 1px solid #79859b; color: var(--cream); font-size: .83rem; line-height: 1; padding: 8px 9px; }
#language:hover { background: var(--blue); }
.account { display: flex; align-items: center; gap: 8px; min-width: 0; padding-block: 5px; color: var(--cream); font-size: .9rem; font-weight: 700; }
#account-name { max-width: 12ch; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.avatar { display: grid; place-items: center; color: var(--cream); width: 32px; height: 32px; border: 1px solid #788295; border-radius: 50%; }
.caret { width: 13px; }
.page { padding-top: clamp(18px, 2.2vw, 33px); }

/* The two desks use different heading bands to distinguish writing and routing. */
.compose-layout { display: grid; grid-template-columns: minmax(0,1.62fr) minmax(320px,1fr); align-items: start; gap: clamp(15px,1.6vw,26px); margin-top: clamp(20px,1.8vw,28px); }
.panel { min-width: 0; background: var(--paper); border: 1px solid #9b9e9e; border-top: 4px solid var(--navy); }
.panel-head, .modal-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px var(--panel-pad); border-bottom: 1px solid #a9acae; min-height: 71px; }
.panel-head { background: var(--cream); }
h2 { display: flex; align-items: center; gap: 10px; color: inherit; font-size: clamp(1.22rem,1.55vw,1.5rem); line-height: 1.13; font-weight: 850; }
h2 i { background: var(--orange); width: 6px; height: 1em; display: inline-block; transform: skew(-12deg); }
.switch { display: inline-flex; align-items: stretch; border: 1px solid var(--navy); background: var(--paper); }
.switch button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 4px 12px; color: var(--blue); font-size: .875rem; font-weight: 650; }
.switch button + button { border-left: 1px solid var(--navy); }
.switch button:hover { background: #e8e7e4; }
.switch button[aria-pressed="true"] { color: var(--cream); background: var(--navy); }
.switch svg, .button svg { width: 16px; height: 16px; }
.editor-body { padding: 18px var(--panel-pad) 23px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: .6em; margin: 17px 0 7px; font-size: .94rem; line-height: 1.45; font-weight: 750; }
#video-field > .field-label:first-child,
#video-field[hidden] + .field-label,
#dialog-body .field-label:first-child { margin-top: 0; }
.field-label small, .counter, .type-note { color: var(--muted); font-size: .81rem; font-weight: 450; }
.field-label small { margin-left: 5px; }
.counter { font-variant-numeric: tabular-nums; }
.drop { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; color: var(--ink); background: #f4f2ec; border: 1.5px dashed #808796; min-height: clamp(138px,11vw,166px); padding: 15px; text-align: center; }
.drop.drag, .drop:hover { border-color: var(--blue); background: #eeeae0; }
.drop input, .capture-action input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 1; }
.upload-icon { display: grid; place-items: center; color: var(--navy); width: 40px; height: 40px; margin-bottom: 4px; border: 1px solid var(--navy); background: var(--cream); }
.upload-icon svg { width: 21px; height: 21px; }
.drop strong { font-size: 1rem; font-weight: 750; max-width: 100%; overflow-wrap: anywhere; }
.drop small { color: var(--muted); font-size: .83rem; }
.capture-action { display: none; }
#preview, .detail-video { display: block; background: var(--navy); width: 100%; max-height: 330px; margin-top: 12px; }
input:is([type="text"],[type="password"],[type="search"],[type="number"],[type="url"]), textarea, select { width: 100%; min-width: 0; border: 1px solid #9ba0a5; border-radius: 2px; padding: 10px 12px; background: #fffef9; font-size: 1rem; }
textarea { resize: vertical; min-height: 84px; display: block; }
input::placeholder, textarea::placeholder { color: #69717b; opacity: 1; }
.feedback { background: #ffead9; color: #77341d; border-left: 3px solid #bd4628; padding: 9px 12px; margin-top: 12px; font-size: .9rem; }
.feedback:empty { display: none; }
.editor-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); padding: 15px var(--panel-pad); }
.type-note { overflow-wrap: anywhere; margin-right: auto; }
.type-note:empty { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border: 1px solid var(--navy); border-radius: 2px; font-size: .92rem; font-weight: 750; line-height: 1.3; text-align: center; }
.primary { background: var(--navy); color: var(--cream); }
.primary:hover { background: var(--blue); }
#submit { background: var(--orange); border-color: var(--orange); color: var(--navy); }
#submit:hover { background: #ff7959; border-color: #e45b37; }
.secondary { color: var(--navy); background: var(--paper); }
.secondary:hover { background: var(--cream); }

/* Platform choices and their recorded statuses. */
.distribution .panel-head, .modal-head { background: var(--navy); color: var(--cream); border-bottom: 1px solid var(--navy); }
.selected { font-size: .82rem; font-weight: 700; white-space: nowrap; padding: 3px 8px; color: var(--cream); border: 1px solid #73829a; }
.channel-intro, .directory-hint { color: var(--muted); font-size: .9rem; line-height: 1.55; }
.channel-intro { margin: 17px var(--panel-pad) 12px; }
.channel-options { padding-inline: var(--panel-pad); display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.option { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 48px; text-align: left; padding: 8px 9px; background: #fffef9; border: 1px solid #c2c4c3; color: var(--ink); font-size: .89rem; line-height: 1.25; font-weight: 680; }
.option:hover { border-color: var(--blue); background: #f3eee1; }
.option[aria-pressed="true"] { background: #ecedf0; border-color: var(--blue); }
.tick { display: grid; place-items: center; flex: none; margin-left: auto; width: 15px; height: 15px; border: 1px solid #9da4ad; color: transparent; }
.option[aria-pressed="true"] .tick { background: var(--blue); color: white; border-color: var(--blue); }
.tick svg { width: 11px; height: 11px; stroke-width: 3; }
.platform-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 7px; }
.platform-icon svg { display: block; width: 25px; height: 25px; stroke: none; }
.platform-icon.douyin { background: #101114; }
.platform-icon.bili { background: #00a1d6; }
.platform-icon.red { background: #ff2442; }
.platform-icon.red svg { width: 28px; height: 28px; }
.platform-icon.channels { background: #fff4e3; box-shadow: inset 0 0 0 1px #f4ddbc; }
.platform-icon.weibo { background: #fff1db; box-shadow: inset 0 0 0 1px #f4dabe; }
.platform-icon.weixin { background: #07ad58; }
.channel-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 13px var(--panel-pad) 15px; }
.text-button, .creator-links a, .unlink { color: var(--blue); font-weight: 700; font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; }
:is(.text-button,.creator-links a,.unlink):hover { color: #9a341c; }
.channel-help { display: flex; align-items: flex-start; gap: 8px; padding: 11px 12px; margin: 0 var(--panel-pad) 21px; background: #f1eee5; color: #414b59; border-left: 3px solid var(--orange); font-size: .83rem; line-height: 1.6; }
.channel-help svg { width: 16px; margin-top: 2px; }
.view-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 15px; margin: 6px 0 24px; padding: 14px 0 21px; border-bottom: 2px solid var(--navy); }
.view-heading h1 { font-size: clamp(2.05rem,4.3vw,4.25rem); line-height: 1.13; font-weight: 900; margin-bottom: 10px; }
.view-heading p, .muted, .details-meta { color: var(--muted); font-size: .94rem; }
.filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 15px var(--panel-pad); background: var(--cream); border-bottom: 1px solid #a9acae; }
.search { display: block; position: relative; max-width: 100%; }
.search svg { position: absolute; top: 50%; transform: translateY(-50%); left: 10px; width: 16px; color: var(--muted); }
.search input { width: min(250px,100%); padding: 7px 10px 7px 33px; font-size: .9rem; }
.empty { padding: clamp(38px,6vw,84px) 22px; text-align: center; }
.empty > svg { color: var(--blue); width: 35px; height: 35px; margin-bottom: 8px; }
.empty h3, .handoff h3 { font-size: 1.18rem; font-weight: 800; }
.empty p { margin: 7px auto 17px; color: var(--muted); font-size: .94rem; }
.post-row, .directory-row { display: flex; align-items: center; gap: 15px; width: 100%; padding: 16px var(--panel-pad); border-bottom: 1px solid var(--line); text-align: left; }
.post-row:last-child, .directory-row:last-child { border-bottom: 0; }
.post-row:hover { background: #f5ecd9; }
.post-info, .directory-label { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.post-info strong { display: block; font-weight: 750; }
.post-info small, .directory-label small { display: block; margin-top: 4px; color: var(--muted); font-size: .82rem; }
.pill { border: 1px solid currentColor; padding: 3px 7px; white-space: nowrap; font-size: .8rem; line-height: 1.35; font-weight: 650; color: #4a5263; background: #f0ede6; }
.pill.pending, .channel-setup { background: #fff0de; color: #86401d; }
.channel-configured { background: #e9edf2; color: var(--blue); }
.channel-manual { background: #eeede9; color: #4d5562; }
.directory-hint { margin-top: 4px; }
.directory-label .binding-entry { display: flex; align-items: center; gap: 8px; }
.unlink { padding: 2px; }
.channel-state { padding: 24px var(--panel-pad); color: var(--muted); }
.channel-state button { margin-top: 12px; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 26px; padding-top: 15px; border-top: 2px solid var(--navy); color: var(--muted); font-size: .81rem; }
footer > span:last-child { font: italic 900 1rem/1 var(--title-face); letter-spacing: .06em; color: var(--navy); }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand img { width: 20px; height: 20px; }

/* Story detail, account configuration and the external publishing confirmation. */
dialog { width: min(510px,calc(100% - 28px)); max-height: 90dvh; margin: auto; padding: 0; overflow: auto; border: 1px solid var(--navy); border-top: 4px solid var(--orange); color: var(--ink); background: var(--paper); box-shadow: 0 18px 72px #101b3652; }
dialog::backdrop { background: #101b36b8; }
.modal-head { min-height: 58px; padding-block: 11px; }
.icon-button { display: grid; place-items: center; width: 32px; height: 32px; color: var(--cream); border: 1px solid #69758c; }
.icon-button:hover { background: var(--blue); }
#dialog-body { padding: 20px var(--panel-pad) 23px; }
#dialog-body p { line-height: 1.65; overflow-wrap: anywhere; }
.modal-actions, .handoff-tools, .creator-links { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-actions { margin-top: 19px; justify-content: flex-end; }
.modal-note { margin-bottom: 15px; font-size: .9rem; color: var(--muted); }
.login-other, .manual { padding-top: 14px; margin-top: 17px; border-top: 1px solid var(--line); }
.item-title { font-size: 1.46rem; line-height: 1.25; overflow-wrap: anywhere; }
.post-content { white-space: pre-wrap; margin: 12px 0; }
.detail-primary, .detail-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.detail-primary { margin: 15px 0; }
.detail-content { margin-top: 13px; padding: 9px 0; border-block: 1px solid var(--line); }
.detail-content summary { cursor: pointer; font-weight: 700; }
.detail-tools { margin: 14px 0; }
.share-note { margin-top: 7px; font-size: .84rem; color: var(--muted); }
#share-story:disabled { cursor: default; }
#copy-feedback { color: var(--blue); font-size: .85rem; }
#copy-feedback:not(:empty) { margin-top: 6px; }
.destinations-title { margin-top: 17px; padding-bottom: 7px; border-bottom: 2px solid var(--ink); font-size: 1.15rem; }
.detail-destination { padding: 11px 0; border-bottom: 1px solid var(--line); }
.detail-row-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 9px; }
.detail-row-head h4, .manual-record h4 { margin: 0; font-size: .97rem; font-weight: 750; }
.detail-state, .receipt-note { font-size: .83rem; color: var(--muted); overflow-wrap: anywhere; }
.detail-row-actions { margin-top: 4px; }
.detail-link { display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 3px; min-height: 30px; color: var(--blue); font-size: .86rem; font-weight: 650; }
.detail-link:hover { color: #9a341c; }
.manual-record { padding: 14px; margin-top: 16px; background: var(--cream); border: 1px solid var(--line); }
@media (pointer: coarse) { .detail-link { min-height: 40px; } }
.delivery-row, .publish-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.delivery-row span:last-child { text-align: right; }
.publish-row label { font-weight: 700; }
.publish-row input { accent-color: var(--blue); }
.publish-row select { width: auto; max-width: 68%; padding: 6px; }
.publish-row + .modal-note { margin-top: 14px; }
.handoff { padding-top: 16px; }
.operator-setup p { margin-block: 10px; }
.setup-checks { list-style: none; padding: 0; margin: 12px 0; }
.setup-checks li { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); padding-block: 6px; font-size: .88rem; }
.setup-checks strong { flex: none; }
.setup-needed { color: #93421f; }
.setup-ok { color: #245144; }
.setup-url { display: block; overflow-wrap: anywhere; font-size: .84rem; user-select: all; margin-bottom: 12px; }
.handoff .modal-note { margin: 5px 0 11px; }
.handoff-tools .button { min-height: 34px; padding: 6px 10px; font-size: .84rem; }
.creator-links { margin-top: 12px; gap: 7px 14px; }
.bili-fields { min-width: 0; margin: 15px 0; padding: 8px 13px 14px; border: 1px solid var(--line); }
.bili-fields legend, .manual summary { font-size: .94rem; font-weight: 750; }
.manual summary { cursor: pointer; }
.manual .modal-note { margin-top: 8px; }
.manual button { margin-top: 10px; }
.toast { position: fixed; z-index: 5; bottom: 20px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 28px); width: max-content; border-left: 4px solid var(--orange); padding: 11px 16px; color: var(--cream); background: var(--navy); font-size: .93rem; box-shadow: 0 6px 20px #101b362e; }

@media (max-width: 1099px) {
  :root { --gutter: 22px; --panel-pad: 17px; }
  .header-inner { gap: 12px; grid-template-columns: auto 1fr auto; }
  .header nav { justify-content: center; gap: 1px; }
  .header nav a { padding-inline: 10px; }
  .compose-layout { grid-template-columns: minmax(0,1.4fr) minmax(309px,1fr); }
  .option { padding-inline: 7px; gap: 6px; }
}
@media (max-width: 768px), (pointer: coarse) {
  .capture-action { display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; margin-top: 8px; min-height: 40px; padding: 8px; background: var(--cream); border: 1px solid var(--blue); color: var(--blue); font-size: .9rem; font-weight: 700; }
}
@media (max-width: 768px) {
  :root { --gutter: 14px; --panel-pad: 16px; }
  .header-inner { grid-template-columns: minmax(0,1fr) auto; gap: 0 8px; padding-top: 9px; min-height: 0; }
  .brand { gap: 8px; }
  .brand img { width: 36px; height: 36px; }
  .wordmark { font-size: 1.4rem; }
  .header-tools { grid-column: 2; grid-row: 1; gap: 9px; }
  .account { font-size: .84rem; gap: 6px; }
  .avatar { width: 28px; height: 28px; }
  #account-name { max-width: 12ch; }
  .header nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; margin-top: 6px; }
  .header nav a { flex: 1; min-height: 40px; padding: 5px 5px 7px; font-size: .9rem; gap: 5px; }
  .header nav a[aria-current="page"]::after { bottom: 0; height: 3px; left: 12%; right: 12%; }
  .header { border-bottom-width: 1px; }
  .page { padding-top: 14px; }
  .compose-layout { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
  .compose-layout > .panel { width: 100%; }
  .editor { display: contents; }
  .editor > .panel-head, .editor-body, .editor-actions { width: 100%; border: 1px solid #9b9e9e; }
  .editor > .panel-head { order: 1; border-top: 4px solid var(--navy); }
  .editor-body { order: 2; margin-top: -14px; border-top: 0; padding-block: 15px 19px; background: var(--paper); }
  .distribution { order: 3; }
  .editor-actions { order: 4; padding: 12px var(--panel-pad); background: var(--paper); }
  .panel-head { min-height: 60px; padding-block: 11px; gap: 8px; }
  .switch button { padding: 5px 9px; }
  .view-heading { margin: 1px 0 17px; padding: 9px 0 14px; align-items: center; }
  .view-heading h1 { margin-bottom: 5px; }
  .view-heading .button { font-size: .84rem; padding: 8px 10px; }
  .filters { gap: 9px; }
  .channel-help { margin-bottom: 15px; }
  .directory-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: start; gap: 6px 9px; }
  .directory-label { grid-column: 2 / -1; grid-row: 1; }
  .directory-row .pill { grid-column: 2; justify-self: start; align-self: center; white-space: normal; }
  .directory-row > .button { grid-column: 3; min-height: 32px; padding: 5px 9px; font-size: .83rem; }
  footer { margin-block: 23px 18px; }
}
@media (max-width: 370px) {
  :root { --panel-pad: 12px; }
  .header-tools { gap: 6px; }
  .avatar { display: none; }
  #language { padding-inline: 7px; }
  .option { font-size: .84rem; }
  .button { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
