/* Контент-план · components (tokens.css holds the tokens and the font). Mockups: wt-design/mockups/studio/content-*.png */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic { width: 17px; height: 17px; flex: none; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; width: 232px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--bg); }
.logo { display: block; width: 46px; aspect-ratio: 158 / 70; background: var(--text); -webkit-mask: url(/img/wt-logo-mask.png) center / contain no-repeat; mask: url(/img/wt-logo-mask.png) center / contain no-repeat; }
.rail-logo { display: flex; align-items: center; padding: 4px 10px 14px; }
.switcher-wrap { position: relative; margin-bottom: 14px; }
.switcher { display: flex; align-items: center; gap: 10px; height: 44px; width: 100%; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel); font-weight: 600; text-align: left; }
.switcher .app-ic { width: 24px; height: 24px; border-radius: 6px; background: var(--raised); display: grid; place-items: center; }
.switcher .app-ic .ic { width: 14px; height: 14px; }
.switcher .chev { margin-left: auto; width: 14px; height: 14px; }
.menu { position: absolute; z-index: 30; min-width: 220px; padding: 6px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--raised); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.switcher-wrap .menu { top: 48px; left: 0; right: 0; }
.menu-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 7px; border: 0; background: none; text-decoration: none; color: var(--text); font-size: 14px; text-align: left; width: 100%; }
.menu-item:hover { background: var(--sunken); }
.menu-item.on { color: var(--accent); }
.menu-item.danger { color: var(--st-error); }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--line); }
.nav { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; }
.nav:hover { color: var(--text); }
.nav.on { background: var(--raised); color: var(--text); }
.badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; font: 600 11px/18px var(--sans); text-align: center; background: var(--accent-soft); color: var(--accent); }
.rail-sec { padding: 14px 10px 6px; font-size: 12px; color: var(--faint); }
.rail-wheel { padding: 0 10px; display: flex; flex-direction: column; gap: 6px; }
.rail-wheel .line { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); position: relative; }
.rail-foot .menu { bottom: 44px; left: 0; right: 0; }
.avatar { width: 20px; height: 20px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; font-size: 10px; font-weight: 600; flex: none; }
.nav.as-btn { border: 0; background: none; width: 100%; text-align: left; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { min-height: 64px; flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.h1 { margin: 0; font: 600 22px/1.2 var(--sans); letter-spacing: -.015em; }
.h2 { margin: 0; font: 600 15px/1.3 var(--sans); }
.sub { color: var(--muted); font-size: 13px; }
.faint { color: var(--faint); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.week-top .titles { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; min-width: 0; }
.toolbar { min-height: 52px; flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }

/* phone bars */
.mbar, .tabbar { display: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: transparent; font-weight: 500; font-size: 13px; white-space: nowrap; text-decoration: none; transition: background var(--t) var(--ease); }
.btn:hover { background: var(--raised); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 600; }
.btn.primary:hover { opacity: .92; }
.btn.quiet { border-color: transparent; color: var(--muted); }
.btn.quiet:hover { color: var(--text); }
.btn.icon { width: 34px; padding: 0; }
.btn.sm { height: 28px; font-size: 12px; padding: 0 10px; }
.btn .ic { width: 15px; height: 15px; }
.kbd { font: 500 11px var(--sans); padding: 1px 5px; border-radius: 4px; border: 1px solid currentColor; opacity: .55; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--sunken); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg button.on { background: var(--raised); color: var(--text); box-shadow: var(--shadow-sm); }
.seg button:disabled { cursor: default; }
.field { height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--sunken); width: 100%; font-size: 14px; }
textarea.field { height: auto; min-height: 160px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.label { font-size: 12px; color: var(--muted); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.sec-t { display: flex; font-size: 12px; color: var(--faint); margin: 0 0 8px; font-weight: 400; }
.sec-t span { margin-left: auto; }

.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--c, var(--muted)); background: color-mix(in srgb, var(--c, var(--muted)) 14%, transparent); }
.l-first { --c: var(--accent); } .l-hit { --c: var(--st-published); } .l-ok { --c: var(--st-ready); }
.l-demand { --c: var(--st-draft); } .l-nodata { --c: var(--st-error); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ref { font-size: 12px; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.fmt { font-size: 11.5px; color: var(--muted); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); white-space: nowrap; }
.bar { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--st-published); transition: width .3s var(--ease); }

/* ---------- week ---------- */
.week { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.week-main { padding: 22px 24px 40px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.week-side { border-left: 1px solid var(--line); padding: 22px 20px 40px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.topic { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; border-color: var(--accent-line); }
.topic.preview { border-style: dashed; border-color: var(--line-strong); }
.topic-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topic-head .sub { margin-left: auto; }
.topic-body { display: flex; align-items: flex-start; gap: 18px; }
.topic-body > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.topic-title { font: 600 22px/1.25 var(--sans); letter-spacing: -.015em; }
.topic-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topic-foot { display: flex; align-items: center; gap: 14px; }
.topic-foot .bar { flex: 1; }
.hint { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--r); background: var(--sunken); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.hint b { color: var(--text); font-weight: 500; }
.hint .ic { margin-top: 1px; }
.hint.warn { border-color: color-mix(in srgb, var(--st-error) 35%, var(--line)); }
.groups { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grp-h { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.grp-h .gi { width: 28px; height: 28px; border-radius: 8px; background: var(--raised); display: grid; place-items: center; color: var(--muted); }
.grp-h .gi .ic { width: 16px; height: 16px; }
.grp-h .cnt { margin-left: auto; color: var(--faint); font-size: 12.5px; }
.task { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 6px 8px 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.task:first-of-type { border-top: 0; }
.task .t { flex: 1; min-width: 0; }
.task.done .t { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.task .meta { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12px; white-space: nowrap; }
.task .doing { color: var(--st-publishing); }
.task .more { width: 28px; height: 28px; border: 0; background: none; border-radius: 6px; color: var(--faint); display: grid; place-items: center; }
.task .more:hover { background: var(--raised); color: var(--text); }
.task .menu { right: 6px; top: 36px; }
.to-pl { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 11.5px; }
.to-pl .ic { width: 12px; height: 12px; }
.to-pl:hover { color: var(--accent); border-color: var(--accent-line); }
.to-pl:disabled { opacity: .5; }
.pl-state { display: inline-flex; align-items: center; gap: 5px; height: 20px; font-size: 11.5px; color: var(--c); text-decoration: none; }
.pl-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.pl-state:hover { text-decoration: underline; }
.menu-sub { margin-left: auto; color: var(--faint); font-size: 12px; }
.check { width: 20px; height: 20px; flex: none; border-radius: 5px; border: 1.5px solid var(--line-strong); background: none; display: grid; place-items: center; padding: 0; color: var(--bg); }
.check .ic { width: 12px; height: 12px; stroke-width: 3.2; }
.check.on { background: var(--st-published); border-color: var(--st-published); }
.check.half { border-color: var(--st-publishing); background: color-mix(in srgb, var(--st-publishing) 18%, transparent); }
.check:disabled { cursor: default; opacity: .6; }
.add-task { display: flex; gap: 6px; padding: 8px 10px 10px; border-top: 1px solid var(--line); }
.add-task .field { height: 32px; font-size: 13px; }
.add-link { border: 0; background: none; color: var(--faint); font-size: 12.5px; padding: 8px 14px 10px; text-align: left; width: 100%; border-top: 1px solid var(--line); }
.add-link:hover { color: var(--text); }
.grp-empty { padding: 12px 14px; color: var(--faint); font-size: 13px; }
.next-row { cursor: pointer; align-items: flex-start; padding: 12px 14px; text-decoration: none; }
.next-row:hover { background: var(--raised); }
.next-date { width: 54px; flex: none; }
.next-date b { display: block; font-size: 13px; font-weight: 600; }
.next-date span { font-size: 11.5px; color: var(--faint); }
.next-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.next-body .dir { font-size: 12px; color: var(--muted); }
.next-body .tt { font-size: 13.5px; line-height: 1.35; }
.idea-row { align-items: flex-start; flex-direction: column; gap: 8px; padding: 12px 14px; }
.idea-row .tt { font-size: 13.5px; line-height: 1.35; }
.idea-row .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.idea-row .when { font-size: 12px; color: var(--faint); }

/* ---------- empty / welcome ---------- */
.welcome { max-width: 640px; margin: 48px auto; padding: 0 24px; display: flex; flex-direction: column; gap: 16px; }
.welcome .h1 { font-size: 26px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 20px; border-radius: var(--r-lg); border: 1.5px dashed var(--line-strong); background: var(--sunken); text-align: center; color: var(--muted); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .ic { width: 28px; height: 28px; color: var(--faint); }
.steps { margin: 0; padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.steps b { color: var(--text); font-weight: 500; }
.dropping::after { content: "Отпусти файл колеса"; position: fixed; inset: 12px; z-index: 50; border: 2px dashed var(--accent); border-radius: var(--r-lg); background: color-mix(in srgb, var(--bg) 80%, transparent); display: grid; place-items: center; font: 600 20px var(--sans); color: var(--accent); pointer-events: none; }

/* ---------- wheel ---------- */
.wheel-cols { padding: 18px 24px 40px; display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 14px; align-items: start; }
.w-col { overflow: hidden; }
.w-head { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.w-head .top-line { display: flex; align-items: baseline; gap: 8px; }
.w-head .top-line .sub { margin-left: auto; }
.w-sub { padding: 12px 14px 6px; font-size: 12px; color: var(--faint); border-top: 1px solid var(--line); }
.w-head + .w-sub { border-top: 0; }
.w-item { display: flex; gap: 10px; padding: 7px 14px 9px; }
.w-item .ref { width: 28px; flex: none; padding-top: 2px; }
.w-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.w-title { font-size: 13px; line-height: 1.35; }
.w-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.w-tags .tag { height: 20px; font-size: 11.5px; padding: 0 6px; }
.w-item.work { background: color-mix(in srgb, var(--st-publishing) 7%, transparent); box-shadow: inset 2px 0 0 var(--st-publishing); }
.w-item.plan { box-shadow: inset 2px 0 0 var(--st-ready); }
.w-item.done .w-title { color: var(--muted); }
.w-item.done { box-shadow: inset 2px 0 0 var(--st-published); }
.w-state { display: inline-flex; align-items: center; gap: 5px; height: 20px; font-size: 11.5px; color: var(--c); padding-right: 2px; }
.w-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.legend { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.archive { padding: 0 24px 40px; }
.archive summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; }

/* ---------- inbox, report ---------- */
.page { padding: 22px 24px 48px; max-width: 860px; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.quick { display: flex; gap: 8px; align-items: center; }
.quick .field { flex: 1; }
.rep-week { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.rep-week .tt { font-size: 14px; }
.rep-week .missed { font-size: 12.5px; color: var(--faint); }

/* ---------- sheet (modal), toast ---------- */
.layer { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: flex; justify-content: center; align-items: flex-start; padding: 48px 16px; overflow-y: auto; }
.sheet { width: 780px; max-width: 100%; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.sheet.narrow { width: 560px; }
.sheet-head { padding: 20px 24px 16px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); }
.sheet-head .line { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sheet-head .line .sub { margin-left: auto; }
.sheet-body { padding: 6px 24px 16px; display: flex; flex-direction: column; }
.sheet-foot { padding: 14px 24px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); background: var(--sunken); flex-wrap: wrap; }
.sheet-foot .sub { flex: 1; min-width: 200px; }
.d-sec { padding: 16px 0 6px; font-size: 12px; color: var(--faint); }
.d-row { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.d-row .ref { width: 32px; flex: none; }
.d-row .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.d-row s { color: var(--faint); font-size: 12.5px; }
.d-row .meta { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12px; flex-wrap: wrap; justify-content: flex-end; }
.d-keep { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 12px 14px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--st-publishing) 40%, var(--line)); background: color-mix(in srgb, var(--st-publishing) 8%, transparent); }
.d-keep .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.d-keep .t span:last-child { font-size: 12.5px; color: var(--st-publishing); }
.errs { margin: 12px 0 4px; padding: 12px 16px 12px 32px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--st-error) 40%, var(--line)); color: var(--text); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.warns { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.cand { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.cand:hover .tt { color: var(--accent); }
.cand .ref { width: 32px; flex: none; padding-top: 2px; }
.cand .b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cand .tt { font-size: 14px; line-height: 1.35; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 10px 16px; border-radius: var(--r); background: var(--text); color: var(--bg); font-size: 13.5px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); }
.toast.err { background: var(--st-error); color: #fff; }
.toast button { border: 0; background: none; color: inherit; font-weight: 600; text-decoration: underline; padding: 0; }
.loading { padding: 48px 24px; color: var(--faint); }


/* scripts */
.script-btn.has { color: var(--accent); border-color: var(--accent-line); }
.script-btn .ic { width: 15px; height: 15px; }
.w-script { border: 0; background: none; padding: 0 0 0 6px; color: var(--accent); vertical-align: -2px; }
.w-script .ic { width: 13px; height: 13px; }
.script-sheet { max-height: calc(100vh - 96px); }
.script-sheet .script-body { overflow-y: auto; flex: 1; min-height: 0; padding-top: 14px; }
.script-h { font-size: 19px; }
.script-text { white-space: pre-wrap; font-size: 17px; line-height: 1.6; padding-bottom: 12px; overflow-wrap: anywhere; }
.script-edit { min-height: 50vh; font-size: 15px; line-height: 1.55; }
.copy-btn { height: 44px; padding: 0 22px; font-size: 15px; }
.copy-btn .ic { width: 17px; height: 17px; }

/* several wheel files in a row */
.q-bar { display: flex; justify-content: space-between; gap: 12px; padding: 10px 24px; font-size: 12.5px; font-weight: 500; color: var(--accent); background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.q-bar .faint { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- platforms: filter, blocks, wheels in the rail ---------- */
.plat { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--sunken); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.plat button, .plat a { min-width: 30px; height: 28px; padding: 0 7px; border: 0; border-radius: 6px; background: transparent; color: var(--faint); display: grid; place-items: center; text-decoration: none; }
.plat button.on, .plat a.on { background: var(--raised); color: var(--text); box-shadow: var(--shadow-sm); }
.plat .all { padding: 0 10px; font-size: 13px; font-weight: 500; }
.plat .ic { width: 16px; height: 16px; }
.pf-sum { margin-left: auto; }
.pb-name { display: inline-flex; align-items: center; gap: 6px; }
.pb-name .ic { width: 14px; height: 14px; }
.pblock-ep { display: flex; flex-direction: column; gap: 14px; }
.pblock { overflow: hidden; }
.pblock.preview { border-style: dashed; border-color: var(--line-strong); }
.pb-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pb-head .gi { width: 30px; height: 30px; border-radius: 8px; background: var(--raised); display: grid; place-items: center; color: var(--text); flex: none; }
.pb-head .gi .ic { width: 16px; height: 16px; }
.pb-title { display: flex; flex-direction: column; min-width: 0; }
.pb-title .sub { font-size: 12.5px; }
.pb-head .cnt { margin-left: auto; color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.pb-dir { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.slot { border-bottom: 1px solid var(--line); }
.slot:last-of-type { border-bottom: 0; }
.slot-head { display: flex; align-items: center; gap: 8px; padding: 10px 6px 4px 14px; min-width: 0; }
.slot-title { flex: 1; min-width: 0; font-weight: 500; font-size: 14px; line-height: 1.35; }
.slot-tags { padding: 0 14px 6px 14px; }
.slot-tags .tag { height: 20px; font-size: 11.5px; padding: 0 6px; }
.pc-steps { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 14px 12px; }
.pc-step { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 7px; border-radius: 7px; border: 1px solid var(--line-strong); background: transparent; font-size: 12.5px; color: var(--text); }
.pc-step i { width: 13px; height: 13px; border-radius: 4px; border: 1.5px solid var(--line-strong); }
.pc-step .ic { width: 13px; height: 13px; stroke-width: 3; color: var(--st-published); }
.pc-step.on { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line-strong); background: var(--sunken); }
.pc-step.doing i { border-color: var(--st-publishing); background: color-mix(in srgb, var(--st-publishing) 18%, transparent); }
.pc-step:disabled { cursor: default; opacity: .7; }
.pc-step:not(:disabled):hover { border-color: var(--muted); }
.slot-day { flex: none; }
.slot .task { border-top: 0; min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
.fmt-tag { gap: 5px; flex: none; }
.fmt-tag .ic { width: 12px; height: 12px; }
.pblock .add-link { border-top: 1px solid var(--line); }
.rail-wh { height: 32px; font-size: 13px; }
.rail-wh .ic { width: 15px; height: 15px; }
.rw-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-meta { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.rep-h { align-items: center; gap: 8px; }
.rep-h .ic { width: 15px; height: 15px; }
.rep-h .btn { margin-left: auto; }
.wheel-switch { border-bottom: 1px solid var(--line); }

/* ---------- narrow screens ---------- */
@media (max-width: 1180px) {
  .week { grid-template-columns: minmax(0, 1fr); }
  .week-side { border-left: 0; border-top: 1px solid var(--line); }
  .wheel-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .rail { display: none; }
  .mbar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: var(--bg); }
  .mbar .switcher-wrap { margin: 0; position: relative; }
  .mbar .switcher { height: 38px; border: 0; background: none; padding: 0 4px; }
  .mbar .switcher-wrap .menu { top: 44px; right: auto; min-width: 240px; }
  .mbar .acts { display: flex; gap: 4px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: sticky; bottom: 0; z-index: 20; height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--panel); }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--faint); text-decoration: none; position: relative; }
  .tab.on { color: var(--text); }
  .tab .ic { width: 20px; height: 20px; }
  .tab .dot { position: absolute; top: 8px; left: calc(50% + 8px); width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
  .shell { flex-direction: column; }
  .top { padding: 12px 16px; gap: 8px; }
  .top .h1 { font-size: 19px; }
  .week-top { flex-wrap: nowrap; }
  .week-top .titles { flex: 1; flex-direction: column; align-items: center; gap: 0; text-align: center; }
  .week-top .top-actions { display: none; }
  .week-top .today { height: 24px; }
  .mbar .switcher { width: auto; }
  .mbar .acts { margin-left: auto; }
  .task { flex-wrap: wrap; row-gap: 2px; }
  .task .t { flex-basis: calc(100% - 80px); }
  .task .meta { order: 3; margin-left: 30px; flex-basis: 100%; }
  .task .more { position: absolute; right: 6px; top: 6px; }
  .top-actions .hide-m { display: none; }
  .toolbar { padding: 8px 16px; }
  .week-main, .week-side, .page { padding-left: 16px; padding-right: 16px; }
  .groups { grid-template-columns: 1fr; }
  .pf-sum { display: none; }
  .slot-head { flex-wrap: wrap; }
  .slot-head .slot-title { flex-basis: calc(100% - 120px); }
  .pb-title .sub { font-size: 12px; }
  .topic { padding: 16px; }
  .topic-title { font-size: 19px; }
  .topic-body { flex-direction: column; gap: 12px; }
  .topic-head .sub { margin-left: 0; width: 100%; }
  .wheel-cols { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .legend { display: none; }
  .layer { padding: 0; align-items: flex-end; }
  .sheet { border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92vh; overflow-y: auto; }
  .script-sheet { overflow: hidden; height: 92vh; }
  .script-foot .copy-btn { flex: 1; }
  .script-text { font-size: 18px; }
  .sheet-head, .sheet-body, .sheet-foot { padding-left: 16px; padding-right: 16px; }
  .d-row { flex-wrap: wrap; }
  .d-keep { flex-wrap: wrap; }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
