/* =========================================================
   CONTENT PILLARS — a temple of the brand's themes
   Approved pillars are marble columns (height grows with the posts built
   on them); AI suggestions are dashed blueprints; taken-down ones rubble.
   Autopilot sits below: automation cards and the builder.
========================================================= */

/* on :root, not the page: the pillar and automation modals live outside it */
:root { --marble: #f7fbff; --marble-2: #e0edfa; --vein: #cbddf1; --ink: #0e1b28; }

/* ---------- hero ---------- */

.pl-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.pl-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.pl-hero h2, .auto-head h2 { margin: 4px 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.pl-hero p, .auto-head p { margin: 0; max-width: 640px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.pl-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-hero-actions svg, .auto-head .btn svg { width: 15px; height: 15px; }

/* ---------- channel tabs ---------- */

.pl-channels { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

.pl-channel {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    cursor: pointer;
    transition: all var(--transition);
}

.pl-channel:hover { border-color: var(--border-strong); color: var(--text); }
.pl-channel.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pl-channel b { min-width: 18px; padding: 1px 6px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: 10.5px; }
.pl-channel.is-active b { background: var(--primary); color: #fff; }
.pl-channel small { font-size: 10.5px; font-weight: 700; color: var(--primary-dark); }
.pl-channel.is-active small { color: #b3d5f9; }

/* ---------- stage ---------- */

.pl-stage { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }

.pl-temple-wrap {
    position: relative;
    overflow-x: auto;
    padding: 26px 22px 0;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0, 113, 219, .18), transparent 60%),
        linear-gradient(180deg, #f2f8ff 0%, #fbfdff 70%);
    box-shadow: var(--shadow-sm);
}

/* a sun rising behind the temple */
.pl-temple-wrap::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 34px;
    width: 340px;
    height: 340px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(120, 176, 241, .28), rgba(120, 176, 241, 0) 65%);
    pointer-events: none;
}

.pl-temple { position: relative; min-width: max-content; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; }

.pl-pediment {
    position: relative;
    height: 74px;
    margin: 0 -14px;
    display: grid;
    place-items: end center;
    padding-bottom: 12px;
    background: linear-gradient(180deg, var(--marble) 0%, var(--marble-2) 100%);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    filter: drop-shadow(0 -1px 0 var(--vein));
    text-align: center;
}

.pl-pediment-kicker { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--primary-dark); }
.pl-pediment-title { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 15px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }

.pl-frieze {
    height: 22px;
    margin: 0 -14px;
    border-top: 3px solid var(--vein);
    border-bottom: 3px solid var(--vein);
    background:
        repeating-linear-gradient(90deg, transparent 0 18px, var(--vein) 18px 20px, transparent 20px 23px, var(--vein) 23px 25px, transparent 25px 28px, var(--vein) 28px 30px, transparent 30px 48px),
        var(--marble);
}

.pl-colonnade {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 22px;
    min-height: 250px;
    padding: 0 18px;
}

.pl-empty-plaque {
    align-self: center;
    max-width: 280px;
    padding: 14px 16px;
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, .7);
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-2);
    text-align: center;
}

.pl-steps { display: flex; flex-direction: column; align-items: center; }
.pl-steps span { display: block; height: 10px; border: 1px solid var(--vein); border-bottom: 0; background: linear-gradient(180deg, var(--marble), var(--marble-2)); }
.pl-steps span:nth-child(1) { width: calc(100% + 28px); }
.pl-steps span:nth-child(2) { width: calc(100% + 56px); }
.pl-steps span:nth-child(3) { width: calc(100% + 84px); border-bottom: 1px solid var(--vein); }

/* ---------- a column ---------- */

.pl-col {
    --h: 170px;
    position: relative;
    width: 124px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
    transform-origin: bottom center;
    animation: pl-rise .7s cubic-bezier(.2, .9, .3, 1.2) both;
    animation-delay: calc(var(--i, 0) * 70ms);
    transition: transform var(--transition), filter var(--transition);
}

@keyframes pl-rise {
    from { transform: scaleY(0.05); opacity: 0; }
    to { transform: scaleY(1); opacity: 1; }
}

.pl-col:hover { transform: translateY(-4px); }
.pl-col.is-selected { filter: drop-shadow(0 0 14px rgba(0, 113, 219, .55)); }
.pl-col:focus-visible { outline: none; filter: drop-shadow(0 0 0 2px var(--primary)); }

/* capital: abacus + two ionic volutes */
.pl-capital {
    position: relative;
    width: 124px;
    height: 24px;
    border: 1px solid var(--vein);
    border-radius: 4px 4px 10px 10px;
    background: linear-gradient(180deg, var(--marble) 0%, var(--marble-2) 100%);
}

.pl-capital::before, .pl-capital::after {
    content: "";
    position: absolute;
    top: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--vein);
    background: radial-gradient(circle, var(--vein) 0 2px, var(--marble) 2.5px 5px, var(--vein) 5.5px 6.5px, var(--marble) 7px);
}

.pl-capital::before { left: -8px; }
.pl-capital::after { right: -8px; }

.pl-col.is-selected .pl-capital { border-color: var(--primary); }

/* fluted shaft; the height is the pillar's weight */
.pl-shaft {
    position: relative;
    width: 94px;
    height: var(--h);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 16px;
    border-left: 1px solid var(--vein);
    border-right: 1px solid var(--vein);
    background:
        linear-gradient(90deg, rgba(12, 34, 58, .10) 0%, transparent 25%, transparent 70%, rgba(12, 34, 58, .14) 100%),
        repeating-linear-gradient(90deg, var(--marble) 0 9px, var(--marble-2) 9px 11px, var(--marble) 11px 13px);
    transition: height .5s ease;
}

.pl-plaque {
    width: 84px;
    padding: 7px 6px;
    border: 1px solid var(--vein);
    border-radius: 6px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 2px 6px rgba(12, 34, 58, .08);
    text-align: center;
}

.pl-plaque b {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 11.5px;
    line-height: 1.3;
    font-weight: 800;
    color: var(--ink);
}

.pl-plaque small { display: block; margin-top: 4px; font-size: 9.5px; font-weight: 700; color: var(--text-3); }

.pl-base { width: 110px; height: 10px; border: 1px solid var(--vein); border-radius: 6px 6px 0 0; background: var(--marble-2); }
.pl-base::after { content: ""; display: block; width: 124px; height: 9px; margin: 9px 0 0 -8px; border: 1px solid var(--vein); background: var(--marble); }

/* the one waiting to be raised */
.pl-col-ghost { animation-name: pl-fade; opacity: .9; }
.pl-col-ghost .pl-capital, .pl-col-ghost .pl-shaft, .pl-col-ghost .pl-base, .pl-col-ghost .pl-base::after, .pl-col-ghost .pl-capital::before, .pl-col-ghost .pl-capital::after {
    background: rgba(255, 255, 255, .45);
    border-style: dashed;
    border-color: var(--border-strong);
}
.pl-col-ghost .pl-shaft { border-left-style: dashed; border-right-style: dashed; }
.pl-col-ghost .pl-plaque { border-style: dashed; background: transparent; box-shadow: none; }
.pl-col-ghost .pl-plaque b { color: var(--primary-dark); }
.pl-col-ghost:hover .pl-plaque { background: var(--primary-soft-2); }

@keyframes pl-fade { from { opacity: 0; } to { opacity: .9; } }

.pl-col.is-busy .pl-shaft::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 113, 219, .25), transparent);
    background-size: 100% 60px;
    animation: pl-scan 1.1s linear infinite;
}

@keyframes pl-scan { from { background-position: 0 -60px; } to { background-position: 0 calc(var(--h) + 60px); } }

/* ---------- detail ---------- */

.pl-detail {
    position: sticky;
    top: calc(var(--topbar) + 12px);
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.pl-detail-empty { padding: 18px 6px; text-align: center; font-size: 12.5px; line-height: 1.6; color: var(--text-3); }
.pl-detail-empty svg { width: 46px; height: 64px; margin-bottom: 8px; color: var(--border-strong); }

.pl-origin {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--purple-soft);
    color: var(--purple);
    font-size: 10.5px;
    font-weight: 800;
}

.pl-origin.is-suggested { background: #e8f0ff; color: #3552a8; }
.pl-origin.is-dropped { background: var(--danger-soft); color: var(--danger); }

.pl-detail h3 { margin: 8px 0 12px; font-size: 17px; font-weight: 800; line-height: 1.3; color: var(--text); }
.pl-detail .auto-field { margin-bottom: 10px; }
.pl-detail textarea { min-height: 90px; }

.pl-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
.pl-stat { padding: 8px; border-radius: 10px; background: var(--surface-soft); text-align: center; }
.pl-stat b { display: block; font-size: 17px; font-weight: 800; color: var(--text); }
.pl-stat span { font-size: 10px; font-weight: 700; color: var(--text-3); }

.pl-subtopics { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 12px; }
.pl-subtopics span { padding: 3px 8px; border-radius: 999px; background: var(--primary-soft-2); border: 1px solid var(--primary-soft); font-size: 10.5px; font-weight: 600; color: var(--primary-dark); }
.pl-label { display: block; margin-top: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; color: var(--text-3); text-transform: uppercase; }

.pl-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-actions .btn { padding: 7px 11px; font-size: 12px; }
.pl-actions .btn-danger-ghost { background: none; border: 1px solid transparent; color: var(--danger); }
.pl-actions .btn-danger-ghost:hover { background: var(--danger-soft); }
.pl-meta { margin-top: 10px; font-size: 11px; color: var(--text-3); }

/* ---------- blueprints ---------- */

.pl-section { margin-top: 22px; }
.pl-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pl-section-head h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--text); }
.pl-section-head p { margin: 3px 0 0; font-size: 12px; color: var(--text-2); }
.pl-count { font-size: 11.5px; font-weight: 800; color: var(--text-3); }

.pl-blueprints { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }

.pl-blueprint {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
    border: 1.5px dashed #9fb3de;
    border-radius: 14px;
    background:
        linear-gradient(rgba(53, 82, 168, .06) 1px, transparent 1px) 0 0 / 14px 14px,
        linear-gradient(90deg, rgba(53, 82, 168, .06) 1px, transparent 1px) 0 0 / 14px 14px,
        #f8faff;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    animation: pl-fade .4s ease both;
}

.pl-blueprint:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pl-blueprint.is-selected { border-color: #3552a8; box-shadow: 0 0 0 3px rgba(53, 82, 168, .15); }
.pl-blueprint.is-busy { opacity: .6; pointer-events: none; }
.pl-blueprint.is-raising { animation: pl-lift .6s ease forwards; }

@keyframes pl-lift { to { transform: translateY(-40px) scale(.9); opacity: 0; } }

/* a little column sketched in blueprint ink */
.pl-mini { width: 34px; height: 64px; color: #3552a8; }

.pl-blueprint h4 { margin: 0 0 4px; font-size: 13.5px; font-weight: 800; color: #1f2f63; }
.pl-blueprint p { margin: 0 0 10px; font-size: 12px; line-height: 1.5; color: #4a5a86; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pl-blueprint .pl-actions .btn { padding: 5px 10px; font-size: 11.5px; }
.pl-blueprint .btn-ghost { color: #4a5a86; }

.pl-blueprint.is-drafting { cursor: default; border-color: #c7d3ef; }
.pl-blueprint.is-drafting h4, .pl-blueprint.is-drafting p {
    color: transparent;
    border-radius: 6px;
    background: linear-gradient(90deg, #e8eefc 25%, #f4f7ff 50%, #e8eefc 75%) 0 0 / 200% 100%;
    animation: pl-shimmer 1.4s linear infinite;
}
.pl-blueprint.is-drafting p { height: 36px; }

@keyframes pl-shimmer { to { background-position: -200% 0; } }

.pl-none { padding: 18px; border: 1px dashed var(--border-strong); border-radius: 14px; font-size: 12.5px; color: var(--text-3); text-align: center; }

/* ---------- rubble ---------- */

.pl-rubble { margin-top: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.pl-rubble[hidden] { display: none; }
.pl-rubble summary { padding: 11px 14px; font-size: 12.5px; font-weight: 800; color: var(--text-2); cursor: pointer; }
.pl-rubble-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--border); font-size: 12.5px; }
.pl-rubble-row b { flex: 1; min-width: 0; color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.pl-rubble-row .btn { padding: 4px 10px; font-size: 11.5px; }

/* =========================================================
   AUTOPILOT
========================================================= */

.auto-section {
    margin-top: 30px;
    padding: 22px;
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0%, rgba(0, 113, 219, .22), transparent 45%),
        linear-gradient(135deg, #0e1b28 0%, #142434 100%);
    color: #f2f8ff;
}

.auto-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.auto-head h2 { color: #fff; }
.auto-head p { color: #c9dcf2; }
.auto-head .pl-eyebrow { color: #6aa9ef; }

.auto-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }

.auto-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(4px);
    transition: border-color var(--transition), background var(--transition);
}

.auto-card:hover { border-color: rgba(106, 169, 239, .5); }
.auto-card:not(.is-on) { opacity: .72; }

.auto-card-top { display: flex; align-items: center; gap: 9px; }
.auto-card-top h4 { flex: 1; min-width: 0; margin: 0; font-size: 14px; font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auto-light { width: 9px; height: 9px; border-radius: 50%; background: #6f8399; flex: 0 0 9px; }
.auto-card.is-on .auto-light { background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); animation: auto-pulse 2s infinite; }

@keyframes auto-pulse { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

.auto-switch { position: relative; width: 36px; height: 20px; flex: 0 0 36px; cursor: pointer; }
.auto-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.auto-switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .2); transition: background var(--transition); pointer-events: none; }
.auto-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform var(--transition); }
.auto-switch input:checked + span { background: var(--primary); }
.auto-switch input:checked + span::after { transform: translateX(16px); }
.auto-switch input:focus-visible + span { outline: 2px solid #6aa9ef; outline-offset: 2px; }

.auto-sentence { margin: 0; font-size: 12.5px; line-height: 1.55; color: #d9e8f7; }
.auto-sentence b { color: #fff; }

.auto-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.auto-card .auto-chips span { padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 10.5px; font-weight: 700; color: #c0dcfa; }

.auto-next { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.auto-next-label { margin-right: 3px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #9db4c9; }
.auto-slot { display: inline-flex; flex-direction: column; align-items: center; min-width: 44px; padding: 4px 6px; border-radius: 8px; background: rgba(255, 255, 255, .08); font-size: 10px; color: #c9dcf2; }
.auto-slot b { font-size: 11px; color: #fff; }
.auto-slot:first-of-type { background: var(--primary); color: #fff; }

.auto-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 11px; color: #9db4c9; }
.auto-foot .spacer { flex: 1; }
.auto-foot button {
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: transparent;
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}
.auto-foot button:hover { background: rgba(255, 255, 255, .1); }
.auto-foot button[data-auto-act="run"] { background: var(--primary); border-color: var(--primary); }
.auto-foot button[data-auto-act="delete"] { color: #ffb4b4; }
.auto-foot button:disabled { opacity: .5; cursor: wait; }

.auto-empty { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.auto-empty > p { grid-column: 1 / -1; margin: 0 0 4px; font-size: 12.5px; color: #c9dcf2; }

.auto-template {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px dashed rgba(106, 169, 239, .5);
    border-radius: 14px;
    background: transparent;
    font: inherit;
    text-align: left;
    color: #fff;
    cursor: pointer;
    transition: background var(--transition);
}

.auto-template:hover { background: rgba(255, 255, 255, .07); }
.auto-template b { font-size: 13px; }
.auto-template span { font-size: 11.5px; color: #c9dcf2; }

/* rhythm dots: a week, lit on posting days */
.auto-dots { display: flex; gap: 4px; }
.auto-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.auto-dots i.on { background: var(--primary); }

/* ---------- builder ---------- */

.modal-overlay .auto-modal { width: min(1080px, 100%); max-width: none; }

/* the sidebar sits above the overlay, so a wide modal centres in the space left of it */
@media (min-width: 1025px) {
    .modal-overlay .auto-modal {
        margin-left: var(--sidebar);
        width: min(1080px, calc(100% - var(--sidebar) - 32px));
    }
}
.modal-overlay .pl-modal { width: min(520px, 100%); max-width: none; }
.pl-modal-sub { margin-top: 3px; font-size: 11px; color: var(--text-3); }
.pl-modal .modal-body { display: flex; flex-direction: column; gap: 10px; }

.auto-builder { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; max-height: calc(100vh - 220px); overflow-y: auto; }

.auto-form { display: flex; flex-direction: column; gap: 16px; }
.auto-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.auto-field > span { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; font-weight: 800; color: var(--text); }
.auto-field > span em { font-style: normal; font-weight: 600; font-size: 11px; color: var(--text-3); }
.auto-field > span i {
    display: inline-grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 10.5px;
    font-style: normal;
}

.auto-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }

.auto-pick {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    cursor: pointer;
    transition: all var(--transition);
}

.auto-pick:hover { border-color: var(--primary); }
.auto-pick.is-on { background: var(--primary-soft-2); border-color: var(--primary); color: var(--primary-dark); }
.auto-pick.is-on::before { content: "✓"; font-size: 11px; }

.auto-pillar-group { margin-bottom: 8px; }
.auto-pillar-group > b { display: block; margin-bottom: 5px; font-size: 11px; font-weight: 800; color: var(--text-3); }
.auto-warn { font-size: 11.5px; color: var(--warning); }

.auto-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }

.auto-preset {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--surface);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition);
}

.auto-preset b { font-size: 12.5px; color: var(--text); }
.auto-preset small { font-size: 10.5px; color: var(--text-3); }
.auto-preset .auto-dots i { background: var(--border); }
.auto-preset .auto-dots i.on { background: var(--primary); }
.auto-preset:hover { border-color: var(--primary); }
.auto-preset.is-on { border-color: var(--primary); background: var(--primary-soft-2); box-shadow: 0 0 0 3px var(--primary-soft); }

.auto-extra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.auto-extra:empty { display: none; }

.auto-stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; }
.auto-stepper button { width: 30px; height: 30px; border: 0; background: var(--surface-soft); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.auto-stepper b { min-width: 34px; text-align: center; font-size: 13px; }

.auto-weekday { width: 38px; height: 34px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface); font: inherit; font-size: 11.5px; font-weight: 800; color: var(--text-2); cursor: pointer; }
.auto-weekday.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }

.auto-times { display: flex; gap: 6px; flex-wrap: wrap; }
.auto-time { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 11px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.auto-time button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; cursor: pointer; font-size: 11px; }

.auto-time-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.auto-time-add button { padding: 5px 10px; border: 1px dashed var(--border-strong); border-radius: 999px; background: none; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--text-2); cursor: pointer; }
.auto-time-add button:hover { border-color: var(--primary); color: var(--primary-dark); }
.auto-time-add input { width: 120px; padding: 5px 8px; }

.auto-toggle-card {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    cursor: pointer;
}

.auto-toggle-card input { margin-top: 2px; accent-color: var(--primary); }
.auto-toggle-card b { display: block; font-size: 12.5px; color: var(--text); }
.auto-toggle-card small { font-size: 11px; line-height: 1.4; color: var(--text-3); }
.auto-toggle-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft-2); }

/* preview */
.auto-preview {
    position: sticky;
    top: 0;
    align-self: start;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(160deg, #0e1b28 0%, #142434 100%);
    color: #f2f8ff;
}

.auto-preview-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 13px; }
.auto-preview-head span { font-size: 11px; color: #c9dcf2; }

.auto-cal-dow, .auto-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.auto-cal-dow span { font-size: 9.5px; font-weight: 800; text-align: center; color: #9db4c9; }
.auto-cal { margin-top: 4px; }

.auto-day {
    position: relative;
    aspect-ratio: 1;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: rgba(255, 255, 255, .05);
    font: inherit;
    font-size: 11px;
    color: #c9dcf2;
    cursor: default;
}

.auto-day.is-past { opacity: .3; }
.auto-day.is-today { border-color: rgba(106, 169, 239, .6); }
.auto-day.has-posts { background: rgba(0, 113, 219, .9); color: #fff; font-weight: 800; }
.auto-day.is-window { box-shadow: inset 0 -3px 0 #4ade80; }
.auto-day .auto-day-dots { display: flex; gap: 2px; }
.auto-day .auto-day-dots i { width: 4px; height: 4px; border-radius: 50%; background: #fff; }
.auto-cal.is-picking .auto-day:not(.is-past) { cursor: pointer; }
.auto-cal.is-picking .auto-day:not(.is-past):hover { border-color: #6aa9ef; }

.auto-summary { margin: 12px 0 6px; font-size: 12.5px; line-height: 1.6; color: #d9e8f7; }
.auto-summary b { color: #fff; }
.auto-cost { margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .07); font-size: 11px; line-height: 1.5; color: #c9dcf2; }
.auto-legend { display: flex; gap: 10px; margin-top: 8px; font-size: 10px; color: #9db4c9; }
.auto-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 2px; background: var(--primary); vertical-align: -1px; }
.auto-legend i.window { background: #4ade80; height: 3px; vertical-align: 2px; }

/* ---------- narrower screens ---------- */

@media (max-width: 1100px) {
    .pl-stage { grid-template-columns: 1fr; }
    .pl-detail { position: static; }
    .auto-builder { grid-template-columns: 1fr; }
    .auto-preview { position: static; }
}

@media (max-width: 640px) {
    .auto-row { grid-template-columns: 1fr; }
    .auto-list { grid-template-columns: 1fr; }
    .pl-col { width: 104px; }
    .pl-capital { width: 104px; }
    .pl-shaft { width: 80px; }
    .pl-plaque { width: 72px; }
}
