  /* ====== Publish modal — "live card" composition ======
     The publish modal renders as a single feed-style job card that the
     poster edits in place. Inputs are borderless until hovered/focused so
     the form reads as a real card rather than a stack of form fields.
     Reuses existing .tone-* gradients and .meta-pill / .chip-toggle
     vocabularies from the feed surface. */
  .publish-modal-frame {
    background: #faf9f6;
    border-radius: 18px;
    padding: 22px;
    width: 100%;
    max-width: 640px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(14,14,16,0.45), 0 10px 24px -12px rgba(14,14,16,0.18);
    /* `position: relative` so the success overlay can absolute-fill the
       frame (covering form + actionbar) once a publish succeeds. */
    position: relative;
  }
  .publish-modal-titlebar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
  }
  .publish-modal-title {
    font-family: 'Geist', 'Noto Sans SC', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #0e0e10;
    letter-spacing: -0.1px;
  }
  .publish-modal-hint {
    font-family: 'Geist', 'Noto Sans SC', sans-serif;
    font-size: 12px;
    color: #5a5a62;
    margin-top: 2px;
  }
  .publish-modal-close {
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #5a5a62;
    flex-shrink: 0;
    transition: background 120ms ease, color 120ms ease;
  }
  .publish-modal-close:hover { background: rgba(14,14,16,0.06); color: #0e0e10; }
  .publish-modal-scroll {
    overflow-y: auto;
    flex: 1 1 auto;
    /* gives the live card a touch of room from the slate frame */
    padding: 1px;
  }

  /* The live card itself — mirrors .job-card exactly (white, 18px radius,
     cover banner). Hover lift is disabled because it's stationary inside
     the modal frame. */
  .publish-live-card {
    background: #ffffff;
    border: 1px solid rgba(14,14,16,0.08);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 2px rgba(14,14,16,0.03);
  }

  /* Cover banner — reuses .job-card-cover tone gradients via duplicate
     selectors so we can keep our scoped classname while inheriting the
     palette. */
  .publish-live-cover {
    position: relative;
    height: 76px;
    flex-shrink: 0;
  }
  .publish-live-cover.tone-pink {
    background:
      radial-gradient(ellipse 80% 100% at 30% 0%, rgba(255,255,255,0.55), transparent 60%),
      linear-gradient(135deg, #fde4ef 0%, #f5cee0 50%, #e8c7e4 100%);
  }
  .publish-live-cover.tone-violet {
    background:
      radial-gradient(ellipse 80% 100% at 30% 0%, rgba(255,255,255,0.55), transparent 60%),
      linear-gradient(135deg, #e1edfa 0%, #c8def4 50%, #b3d4f0 100%);
  }
  .publish-live-cover.tone-amber {
    /* Kept in lockstep with .job-card-cover.tone-amber (desaturated ramp). */
    background:
      radial-gradient(ellipse 80% 100% at 30% 0%, rgba(255,255,255,0.55), transparent 60%),
      linear-gradient(135deg, #fdf6e5 0%, #f7e7c9 50%, #eed8b2 100%);
  }
  .publish-live-logo {
    position: absolute;
    left: 16px;
    bottom: 14px;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: #0e0e10;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Geist', 'Noto Sans SC', sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 4px 10px -2px rgba(14,14,16,0.14), 0 1px 2px rgba(14,14,16,0.06);
    z-index: 2;
  }

  /* Logo upload control — sized to claim the empty space across the cover
     band rather than tucked into the corner. Centered both axes and at
     56×56 the band reads as a deliberate brand frame instead of a
     half-empty stripe. The whole square is a clickable <label> that opens
     the file picker; on hover an overlay hint appears; after an upload
     an "✕" button clears the image. */
  .publish-logo-slot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    z-index: 2;
  }
  .publish-logo-slot input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    border-radius: 14px;
    z-index: 4;
  }
  .publish-logo-slot input[type="file"]:focus-visible + .publish-logo-display {
    outline: 2px solid #0a87f7;
    outline-offset: 2px;
  }
  .publish-logo-display {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(14,14,16,0.06);
    box-shadow: 0 6px 14px -4px rgba(14,14,16,0.18), 0 1px 3px rgba(14,14,16,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .publish-logo-display.is-fallback {
    background: #0e0e10;
    color: #ffffff;
    font-family: 'Geist', 'Noto Sans SC', sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
  }
  .publish-logo-display img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    background: #ffffff;
  }
  .publish-logo-overlay {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: rgba(14,14,16,0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Geist', 'Noto Sans SC', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 120ms ease;
    pointer-events: none;
    z-index: 3;
  }
  .publish-logo-slot:hover .publish-logo-overlay { opacity: 1; }
  .publish-logo-clear {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #0e0e10;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px -1px rgba(14,14,16,0.4);
    border: 1.5px solid #ffffff;
    cursor: pointer;
    z-index: 5;
    transition: transform 120ms ease;
  }
  .publish-logo-clear:hover { transform: scale(1.1); }
  .publish-logo-busy {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: rgba(14,14,16,0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    pointer-events: none;
  }
  .publish-logo-busy::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #ffffff;
    border-radius: 999px;
    animation: publish-logo-spin 0.8s linear infinite;
  }
  @keyframes publish-logo-spin { to { transform: rotate(360deg); } }
  /* Body wrapper — mirrors .job-card-body-wrap padding/gap so the live
     card body breathes the same way feed cards do. */
  .publish-live-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 20px 18px;
  }

  /* Inline-editable text inputs (org/team/role). Look like plain text on
     the card until the poster hovers (faint border) or focuses (violet
     ring). */
  .publish-inline-wrap { position: relative; }
  .publish-inline {
    width: 100%;
    /* Locked box height + border-box so all three inputs (org/team at
       13px, role at 17px) render at exactly the same 36px regardless of
       font-size. Without box-sizing the larger role font would push the
       input taller because <input> intrinsic height tracks font metrics.
       Browser auto-centers single-line text vertically inside the box. */
    height: 36px;
    box-sizing: border-box;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 8px;
    margin: 0 -8px;
    outline: none;
    color: #0e0e10;
    font-family: 'Geist', 'Noto Sans SC', sans-serif;
    line-height: 1.2;
    transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
  }
  .publish-inline:hover:not(:focus) {
    border-color: rgba(14,14,16,0.10);
    background: #faf9f6;
  }
  .publish-inline:focus {
    border-color: #0a87f7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(10,135,247,0.12);
  }
  .publish-inline::placeholder { color: #b6b6bd; }
  /* Required-but-empty treatment: red tint on the whole input so the cue
     reads at a glance (same vocabulary as .publish-meta-pill.is-required-empty
     on the contact pill). */
  .publish-inline.is-required-empty {
    border-color: rgba(220,38,38,0.45);
    background: rgba(220,38,38,0.06);
  }
  .publish-inline.is-required-empty::placeholder { color: #c97a7a; }
  .publish-inline.is-required-empty:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.15);
  }
  .publish-inline-org {
    font-size: 13px;
    font-weight: 500;
    color: #5a5a62;
    letter-spacing: 0.01em;
  }
  .publish-inline-role {
    /* Matches org/team font-size/weight; hierarchy now reads only through
       darker color (#0e0e10 vs the secondary gray) — the row visually
       lines up with the org/team row instead of standing out as bigger. */
    font-size: 13px;
    font-weight: 500;
    color: #0e0e10;
    letter-spacing: 0.01em;
  }
  .publish-req-dot {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #dc2626;
    opacity: 0.85;
    pointer-events: none;
  }

  /* Body sections — small uppercase label + transparent textarea that
     types onto the card. */
  .publish-live-section {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed rgba(14,14,16,0.08);
  }
  .publish-live-section-label {
    font-family: 'Geist', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0969da;
    margin-bottom: 4px;
  }
  .publish-live-textarea {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 6px 8px;
    margin: -6px -8px;
    outline: none;
    resize: vertical;
    min-height: 56px;
    font-family: 'Geist', 'Noto Sans SC', sans-serif;
    font-size: 13px;
    line-height: 1.55;
    color: #4a4a52;
    transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
  }
  .publish-live-textarea:hover:not(:focus) {
    border-color: rgba(14,14,16,0.10);
    background: #faf9f6;
  }
  .publish-live-textarea:focus {
    border-color: #0a87f7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(10,135,247,0.12);
  }
  .publish-live-textarea::placeholder { color: #b6b6bd; }

  /* Contact-section inputs — single-line variant for the 联系方式 group
     (contact / referral code). Visible border so it reads as a "real" data
     input compared to the inline-editable headlines above. Mirrors the
     is-required-empty red wash used on org/role. */
  .publish-contact-field {
    width: 100%;
    height: 36px;
    box-sizing: border-box;
    background: transparent;
    border: 1px solid rgba(14,14,16,0.12);
    border-radius: 8px;
    padding: 0 12px;
    outline: none;
    color: #0e0e10;
    font-family: 'Geist', 'Noto Sans SC', sans-serif;
    font-size: 13px;
    line-height: 1.2;
    transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
  }
  .publish-contact-field:hover:not(:focus) { border-color: rgba(14,14,16,0.22); }
  .publish-contact-field:focus {
    border-color: #0a87f7;
    box-shadow: 0 0 0 3px rgba(10,135,247,0.12);
  }
  .publish-contact-field::placeholder { color: #b6b6bd; }
  .publish-contact-field.is-required-empty {
    border-color: rgba(220,38,38,0.45);
    background: rgba(220,38,38,0.06);
  }
  .publish-contact-field.is-required-empty::placeholder { color: #c97a7a; }
  .publish-contact-field.is-required-empty:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.15);
  }
  .publish-contact-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  /* ====== Multi-position blocks ====== */
  /* Wraps the per-position fields (role + 描述 + 要求 + 岗位类型). When
     the poster only has one position the block is visually flat; with 2+
     positions each block gets a header strip + soft divider above so the
     boundary is obvious. */
  .publish-position-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .publish-position-block + .publish-position-block {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px dashed rgba(10,135,247,0.30);
  }
  .publish-position-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Geist', 'Noto Sans SC', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0969da;
  }
  .publish-position-remove {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #94949c;
    transition: background 120ms ease, color 120ms ease;
  }
  .publish-position-remove:hover {
    background: rgba(220,38,38,0.10);
    color: #dc2626;
  }
  /* Full-width dashed "slot" treatment so the add control reads as a
     card placeholder rather than another chip in the 岗位类型 group above.
     Centered label + purple stroke matches the section-label vocabulary
     used elsewhere. */
  .publish-add-position-btn {
    width: 100%;
    margin-top: 12px;
    padding: 14px 16px;
    border: 1.5px dashed rgba(10,135,247,0.35);
    border-radius: 12px;
    background: rgba(10,135,247,0.03);
    color: #0969da;
    font-family: 'Geist', 'Noto Sans SC', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
  }
  .publish-add-position-btn:hover {
    border-color: #0a87f7;
    border-style: solid;
    background: rgba(10,135,247,0.07);
  }

  /* Meta row + meta pill inputs — mirror .job-card-meta / .meta-pill, but
     the pill body holds an inline input so locating/sourcing reads as
     "edit the pill directly". */
  .publish-live-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px dashed rgba(14,14,16,0.08);
  }
  .publish-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f3f3f1;
    color: #38383d;
    border-radius: 999px;
    padding: 4px 11px;
    font-family: 'Geist', sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
  }
  .publish-meta-pill:focus-within {
    background: #ffffff;
    color: #0e0e10;
    box-shadow: 0 0 0 1px rgba(14,14,16,0.16), 0 0 0 4px rgba(10,135,247,0.12);
  }
  .publish-meta-pill.is-required-empty {
    background: rgba(220,38,38,0.10);
    color: #b91c1c;
  }
  .publish-meta-pill input {
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    min-width: 90px;
  }
  .publish-meta-pill input::placeholder { color: #94949c; }
  .publish-meta-pill svg { flex-shrink: 0; }

  /* Chip groups (employment type, poster type) — labelled cluster
     beneath the meta row. Reuses .chip-toggle from the existing form. */
  .publish-chipgroup {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding: 10px 12px 0;
    margin-left: -12px;
    margin-right: -12px;
    border-top: 1px dashed rgba(14,14,16,0.08);
    border-radius: 10px;
    transition: background 120ms ease, box-shadow 120ms ease;
  }
  /* Required-but-empty for chip groups: pink wash + soft inset so the row
     reads as "you missed this" without breaking the card composition. */
  .publish-chipgroup.is-required-empty {
    background: rgba(220,38,38,0.06);
    box-shadow: inset 0 0 0 1px rgba(220,38,38,0.30);
    padding-bottom: 10px;
    padding-top: 10px;
    border-top-color: transparent;
  }
  .publish-chipgroup.is-required-empty .publish-chipgroup-label { color: #b91c1c; }
  .publish-chipgroup-label {
    font-family: 'Geist', sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0969da;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }
  .publish-chipgroup-hint {
    font-size: 10px;
    color: #94949c;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
  }
  .publish-chipgroup-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  /* Action bar at the bottom of the modal frame */
  .publish-modal-actionbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
  }
  .publish-actionbar-status {
    font-family: 'Geist', sans-serif;
    font-size: 12px;
    color: #5a5a62;
    display: inline-flex;
    align-items: center;
  }
  .publish-actionbar-status .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    margin-right: 6px;
    background: #dc2626;
  }
  .publish-actionbar-status.is-ready { color: #047857; }
  .publish-actionbar-status.is-ready .dot { background: #22c55e; }
