:root {
  --red: #E1232B; --red-dark: #B9161D; --yellow: #FFD23F;
  --bg: #F4F4F6; --card: #FFFFFF; --ink: #1D1D1F; --muted: #6E6E73; --line: #E3E3E8;
  --ok: #1E9E57; --warn-bg: #FFF6D6;
  --safe-b: env(safe-area-inset-bottom); --safe-t: env(safe-area-inset-top);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg:#111113; --card:#1C1C1F; --ink:#F2F2F4; --muted:#9A9AA2; --line:#2E2E33; --warn-bg:#3A3112; }
}
:root[data-theme="dark"] { --bg:#111113; --card:#1C1C1F; --ink:#F2F2F4; --muted:#9A9AA2; --line:#2E2E33; --warn-bg:#3A3112; color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Anek Malayalam", "Noto Sans Malayalam", sans-serif; }
.ml { font-family: "Anek Malayalam", "Noto Sans Malayalam", -apple-system, sans-serif; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.err { color: var(--red); min-height: 1.2em; }
.warn { background: var(--warn-bg); padding: 10px 12px; border-radius: 10px; font-size: 14px; }

.wordmark { font-weight: 800; letter-spacing: .5px; font-size: 20px; color: var(--ink); }
.wordmark b { color: var(--red); }
.wordmark.big { font-size: 34px; }

/* login */
.screen { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-box { width: 100%; max-width: 360px; text-align: center; }
.login-box input { margin: 18px 0 12px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-right { display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.run { background: var(--yellow); } .dot.bad { background: var(--red); }
.status-line { font-size: 12px; color: var(--muted); padding: 6px 16px 0; }

main { padding: 10px 12px calc(84px + var(--safe-b)); max-width: 640px; margin: 0 auto; }

/* inputs */
input, textarea, select { width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; outline: none; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--red); }

.btn { appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: 600 15px/1 -apple-system, sans-serif; padding: 13px 16px; border-radius: 12px; cursor: pointer; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:active { background: var(--red-dark); }
.btn.ghost { background: transparent; }
.btn.small { padding: 8px 12px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; }

/* cards */
.card { background: var(--card); border-radius: 18px; padding: 12px; margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04); }
.poster-wrap { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1/1; background: var(--line); }
.poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.busy { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; align-items: center;
  justify-content: center; background: rgba(255,255,255,.75); color: #333; font-weight: 600; }
.spin { width: 28px; height: 28px; border: 3px solid #ddd; border-top-color: var(--red); border-radius: 50%; animation: s 0.8s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }
.meta { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.meta .cat { width: auto; flex: none; padding: 6px 10px; border-radius: 999px; background: var(--yellow);
  color: var(--red-dark); font-weight: 700; border: none; font-size: 14px; }
.meta .source { color: var(--muted); font-size: 13px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checks { margin: 6px 0; font-size: 13px; }
.checks summary { color: var(--muted); cursor: pointer; }
.checks p { margin: 6px 0; white-space: pre-wrap; }
.checks .spell:not(:empty) { background: var(--warn-bg); padding: 8px 10px; border-radius: 8px; }
.lbl { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 12px 2px 5px; }
.headline { font-weight: 700; font-size: 18px; }
.caption { font-size: 16px; line-height: 1.55; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 8px; }
.card.done { opacity: .55; }
.card .result { margin-top: 10px; font-size: 14px; }

/* posted list */
.post-row { display: flex; gap: 12px; align-items: center; background: var(--card); padding: 10px; border-radius: 14px; margin-bottom: 10px; }
.post-row img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; }
.post-row .t { flex: 1; min-width: 0; font-size: 14px; }
.post-row .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.pill.posted { background: #DDF5E7; color: var(--ok); } .pill.failed { background: #FDE2E3; color: var(--red); }
.pill.rejected, .pill.skipped { background: var(--line); color: var(--muted); }

/* panels */
.panel { background: var(--card); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.panel h2 { font-size: 17px; margin: 0 0 6px; }
.field { display: block; margin-top: 12px; } .field span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.switch-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.switch-row input { width: auto; transform: scale(1.3); }
.rules { list-style: none; padding: 0; margin: 14px 0 0; }
.rules li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.rules li span { flex: 1; }
.rules li button { border: none; background: none; color: var(--red); font-size: 20px; line-height: 1; }
.row { margin: 12px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; }
.chip.on { background: var(--red); color: #fff; border-color: var(--red); }
.empty { text-align: center; padding: 60px 20px; }

/* tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding: 6px 0 calc(6px + var(--safe-b)); z-index: 6; }
.tabbar button { position: relative; background: none; border: none; color: var(--muted); font-size: 11px; font-weight: 600; padding: 4px; }
.tabbar .ico { display: flex; align-items: center; justify-content: center; width: 52px; height: 30px; margin: 0 auto 2px; border-radius: 15px; font-size: 20px; line-height: 1; }
.tabbar .ico .lki { width: 24px; height: 24px; }                      /* v114: Tabler outline icons */
.tabbar .ico .lki.on { display: none; }
.tabbar button.active { color: var(--red); }
.tabbar button.active .ico { background: rgba(225, 35, 43, .12); }    /* the active tab: red, a soft pill, the filled icon */
.tabbar button.active .ico .lki.o { display: none; }
.tabbar button.active .ico .lki.on { display: inline-block; }
.badge { position: absolute; top: 0; left: 55%; background: var(--red); color: #fff; font-style: normal; font-size: 11px;
  min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; padding: 0 5px; }

/* sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 10; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; background: var(--card); border-radius: 20px 20px 0 0;
  padding: 18px 16px calc(16px + var(--safe-b)); max-width: 640px; margin: 0 auto; }
.sheet h3 { margin: 0 0 4px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); z-index: 20;
  background: #222; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: 90vw; }

/* platforms */
.plats { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.plats .muted { margin-right: 2px; }
.plat { border: 1px solid var(--line); background: var(--card); color: var(--muted); font: 600 14px/1 -apple-system, sans-serif;
  padding: 9px 14px; border-radius: 999px; }
.plat.on { background: #1D1D1F; color: #fff; border-color: #1D1D1F; }
.plat[disabled] { opacity: .4; text-decoration: line-through; }
@media (prefers-color-scheme: dark) { .plat.on { background: #F2F2F4; color: #111; border-color: #F2F2F4; } }
.panel h2.sub { margin-top: 18px; font-size: 15px; }
.page-list { margin: 12px 0; }
.page-opt { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; color: var(--ink); font: inherit; }
.page-opt.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.page-opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.page-opt.on .radio { border: 6px solid var(--red); }
.page-opt small { display: block; color: var(--muted); }
.page-opt small.ok { color: var(--ok); }
.links { display: flex; gap: 10px; margin-top: 3px; font-size: 13px; }
.links a { color: var(--red); text-decoration: none; font-weight: 600; }
.plat.done[disabled] { opacity: 1; text-decoration: none; color: var(--ok); border-color: var(--ok); }

.actions.two { grid-template-columns: 1fr 1fr; margin-top: 0; }
.export-row { display: flex; gap: 10px; margin-top: 10px; }
.export-row input { flex: 1; min-width: 0; }
.row-actions { display: flex; gap: 12px; margin-top: 4px; font-size: 13px; }
.row-actions button { background: none; border: none; padding: 0; color: var(--red); font-weight: 600; font: 600 13px -apple-system, sans-serif; }

/* ---------- swipe deck ---------- */
body.no-scroll { overflow: hidden; }
#tab-queue { display: flex; flex-direction: column; }
.deck-wrap { position: relative; }
.deck { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; position: relative; width: min(100%, 50vh); margin: 4px auto 0; aspect-ratio: 1 / 1.6; }
.deck.fitted { aspect-ratio: auto; }
.swipe { position: absolute; inset: 0; background: var(--card); border-radius: 22px; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 14px 30px rgba(0,0,0,.10);
  transform: translateY(calc(var(--depth, 0) * 12px)) scale(calc(1 - var(--depth, 0) * .04));
  transition: transform .25s ease; touch-action: none; cursor: grab; z-index: calc(10 - var(--depth, 0)); }
.swipe:not(.is-top) { pointer-events: none; }
.swipe.enter { animation: pop .22s ease; }
@keyframes pop { from { transform: scale(.96); opacity: .6; } to { transform: none; opacity: 1; } }
.sw-poster { position: relative; aspect-ratio: 4 / 5; background: var(--line); }
.sw-poster img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; -webkit-user-drag: none; }
.stamp { position: absolute; top: 22px; padding: 6px 14px; border: 4px solid; border-radius: 10px; font: 800 30px/1 -apple-system, sans-serif;
  letter-spacing: 2px; background: rgba(255,255,255,.85); }
.stamp.yes { left: 18px; color: var(--ok); transform: rotate(-14deg); opacity: var(--yes, 0); }
.stamp.nope { right: 18px; color: var(--red); transform: rotate(14deg); opacity: var(--nope, 0); }
.sw-body { padding: 10px 14px 12px; }
.sw-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; overflow: hidden; white-space: nowrap; }
.sw-cat { background: var(--yellow); color: var(--red-dark); font-weight: 700; padding: 3px 10px; border-radius: 999px; flex: none; }
.sw-src { overflow: hidden; text-overflow: ellipsis; }
.sw-head { margin: 6px 0 2px; font-weight: 700; font-size: 17px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sw-cap { margin: 0; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sw-plats { margin: 4px 0 0; font-size: 12px; }
.sw-fail { margin: 6px 0 0; font-size: 13px; color: var(--red); }
.deck-actions { display: flex; justify-content: center; gap: 26px; margin: 16px 0 6px; }
.round { width: 64px; height: 64px; border-radius: 50%; border: none; background: var(--card); font-size: 28px; font-weight: 700;
  box-shadow: 0 3px 12px rgba(0,0,0,.14); }
.round:active { transform: scale(.94); }
.round.nope { color: var(--red); } .round.yes { color: var(--ok); }
.round.edit { width: 52px; height: 52px; font-size: 22px; color: #3478F6; align-self: center; }
.deck-hint { text-align: center; font-size: 12px; margin: 0; }

/* ---------- undo bar ---------- */
.undo { position: fixed; left: 12px; right: 12px; bottom: calc(80px + var(--safe-b)); z-index: 30; max-width: 616px; margin: 0 auto;
  background: #1f1f22; color: #fff; border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; overflow: hidden; }
.undo span { flex: 1; font-size: 14px; }
.undo button { background: none; border: none; color: #FFD23F; font: 700 15px -apple-system, sans-serif; padding: 4px; }
.undo i { position: absolute; left: 0; bottom: 0; height: 3px; background: #FFD23F; animation: undoTime 5s linear forwards; }
@keyframes undoTime { from { width: 100%; } to { width: 0; } }

/* ---------- editor ---------- */
.editor { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: flex; flex-direction: column; }
.ed-top { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + var(--safe-t)) 12px 10px; border-bottom: 1px solid var(--line); background: var(--card); }
.ed-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px calc(30px + var(--safe-b)); max-width: 640px; width: 100%; margin: 0 auto; }
.ed-stage { position: relative; width: 100%; border-radius: 14px; overflow: hidden; background: var(--line); }
.ed-stage iframe { position: absolute; left: 0; top: 0; width: 1080px; height: 1080px; border: 0; transform-origin: 0 0; }
.ed-tip { text-align: center; font-size: 13px; margin: 8px 0 12px; }
.slider { display: block; margin: 4px 0 12px; }
.slider span { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.slider em { font-style: normal; }
.slider input { padding: 0; border: none; background: none; accent-color: var(--red); }
.chip.sty i { font-style: normal; font-weight: 800; padding: 1px 6px; border-radius: 6px; margin-right: 4px; border: 1px solid var(--line); }
.ed-tools .chips { margin: 4px 0 12px; }
.ed-tools .lbl { margin-top: 2px; }

.photo-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; margin: 0 -2px; scroll-snap-type: x mandatory; }
.photo-strip button { flex: none; width: 108px; padding: 0; border: 2px solid transparent; border-radius: 12px; background: var(--card);
  overflow: hidden; scroll-snap-align: start; text-align: left; color: var(--ink); }
.photo-strip button.on { border-color: var(--red); }
.photo-strip img { width: 100%; height: 80px; object-fit: cover; display: block; }
.photo-strip small { display: block; padding: 3px 6px 5px; font-size: 11px; line-height: 1.25; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-strip small b { color: var(--ink); }
.photo-strip small b.hd { color: var(--ok); }
.photo-strip .none { padding: 10px; font-size: 13px; color: var(--muted); width: auto; }
.credit { font-size: 12px; margin: 0 0 8px; min-height: 1em; }
.photo-search { display: flex; gap: 8px; margin-bottom: 12px; }
.photo-search input { flex: 1; min-width: 0; }
.pill.ready { background: #FFF3C4; color: #8A6A00; }

/* browse deck */
.swipe.from-right { animation: inRight .22s ease; }
.swipe.from-left { animation: inLeft .22s ease; }
@keyframes inRight { from { transform: translateX(40%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes inLeft { from { transform: translateX(-40%); opacity: 0; } to { transform: none; opacity: 1; } }
.deck-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0 0; font-size: 14px; }
.deck-nav .nav { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 22px; line-height: 1; }
.deck-nav .nav[disabled] { opacity: .3; }
.deck-actions { gap: 14px; margin: 10px 0 6px; }
.deck-actions .act { display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: none; padding: 0;
  font: 600 12px -apple-system, sans-serif; color: var(--muted); width: 70px; }
.deck-actions .act b { font-weight: 600; }
.deck-actions .round { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; font-size: 24px; }
.round.save { color: #3478F6; } .round.edit { width: 58px; height: 58px; font-size: 22px; color: #6E6E73; }

/* copy buttons */
.ci { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ci.ok { stroke: var(--ok); stroke-width: 2.6; }
.copy { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 4px 9px; color: var(--muted); font: 600 12px -apple-system, sans-serif; cursor: pointer; }
.copy:active { transform: scale(.95); }
.copy.done { color: var(--ok); border-color: var(--ok); }
.lbl-row { display: flex; align-items: flex-end; justify-content: space-between; margin: 12px 2px 5px; }
.lbl-row .lbl { margin: 0; }
.sw-copy { display: flex; gap: 6px; margin-top: 6px; }
.copy-all { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* ================= advanced editor ================= */
.ed-top { gap: 8px; }
.ed-hist { display: flex; gap: 6px; margin-left: auto; }
.icon-btn { width: 40px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 20px; line-height: 1; }
.icon-btn[disabled] { opacity: .35; }
.dirty { color: #F5A623; font-size: 18px; margin-right: 2px; }
.ed-wrap { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px calc(30px + var(--safe-b)); }
.ed-canvas { position: sticky; top: 0; z-index: 3; background: var(--bg); padding-bottom: 6px; }
.ed-stage { position: relative; margin: 0 auto; border-radius: 12px; overflow: hidden; background: var(--line); }
.ed-stage iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; }
.ed-selbar { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin: 6px 2px 0; }
.snap { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.snap input { width: auto; }
.ed-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; position: sticky; top: 0; z-index: 2; background: var(--bg); }
.ed-tabs::-webkit-scrollbar { display: none; }
.ed-tabs button { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 13px; font: 600 13px -apple-system, sans-serif; }
.ed-tabs button.on { background: var(--red); border-color: var(--red); color: #fff; }
.ed-panel { padding: 12px; }
.sec { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.sec:first-child { border-top: none; padding-top: 0; }
.sec h4 { margin: 0 0 8px; font-size: 15px; }
.ctl { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; }
.ctl.col { flex-direction: column; align-items: stretch; gap: 4px; }
.ctl-l { font-size: 13px; color: var(--muted); flex: none; min-width: 92px; }
.ctl-r { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.ctl-r input[type=range] { flex: 1; min-width: 0; padding: 0; border: none; background: none; accent-color: var(--red); }
.ctl .num { width: 70px; flex: none; padding: 6px 8px; font-size: 14px; }
.ctl .clr { width: 44px; height: 34px; padding: 2px; flex: none; border-radius: 8px; }
.ctl .hex { width: 96px; flex: none; padding: 6px 8px; font: 14px ui-monospace, monospace; }
.ctl.tg input { width: auto; transform: scale(1.25); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; padding: 6px 10px; font: 600 12px -apple-system, sans-serif; }
.seg button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.swatch { border: none; text-transform: capitalize; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.chip.danger { color: var(--red); border-color: var(--red); }
.hint { padding: 6px 0; } .hint p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.small { font-size: 12px; } .err { color: var(--red); font-size: 13px; }
.layers { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.lrow { display: flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 2px 4px; background: var(--card); }
.lrow.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.lrow.off .lname { opacity: .45; }
.lname { flex: 1; text-align: left; background: none; border: none; color: var(--ink); font: 600 14px -apple-system, sans-serif; padding: 8px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb { width: 34px; height: 34px; border: none; background: none; font-size: 15px; color: var(--muted); border-radius: 8px; }
.lb[disabled] { opacity: .25; }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stylecard { border: 2px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: left; display: flex; flex-direction: column; gap: 3px; font: 13px -apple-system, sans-serif; }
.stylecard small { opacity: .8; font-size: 11px; }
.stylecard.pleasant { background: linear-gradient(140deg,#fff,#FFE6E6); color: #B9161D; }
.stylecard.gray { background: linear-gradient(140deg,#9AA0A6,#3C4043); color: #fff; }
.stylecard.dark { background: linear-gradient(140deg,#2A0008,#000); color: #fff; }
.stylecard.on { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.fonts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.frow { border: 1px solid var(--line); border-radius: 12px; padding: 10px; content-visibility: auto; contain-intrinsic-size: auto 130px; }
.fsearch { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; background: var(--card, #fff); }
.chip.on { background: var(--red, #E1232B); color: #fff; border-color: transparent; }
.fsample { font-size: 26px; line-height: 1.4; margin: 6px 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fact { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fact .enc { width: auto; padding: 6px 8px; font-size: 13px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; }
.badge.ok { background: #DDF5E7; color: var(--ok); }
textarea.raw { font-size: 22px; }


/* ---------- library gallery & downloads (Phase 2) ---------- */
.lib-filters { margin: 0 0 10px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
.lib-filters .chip { white-space: nowrap; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
.gallery .empty { grid-column: 1 / -1; }
.gcard { background: var(--card); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.gthumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; background: var(--line); cursor: pointer; }
.gthumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gcard.is-dl .gthumb img { filter: brightness(.82); }
/* the tick is drawn on top of the thumbnail only — never part of the poster file */
.gtick { position: absolute; left: 50%; top: 50%; width: 30%; max-width: 76px; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,.35)); }
.gtick svg { width: 100%; height: 100%; display: block; }
.gtick circle { fill: #1E9E57; stroke: #fff; stroke-width: 3; }
.gtick path { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.gbody { padding: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; flex: 1; }
.gbody b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.35; }
.gdl { font-size: 12px; color: var(--muted); }
.gdl.ok { color: var(--ok); font-weight: 600; }
.gwarn { font-size: 12px; color: #A86A00; }
.gact { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.gact .btn.small { padding: 7px 10px; font-size: 13px; }
.pnl { max-height: 86vh; overflow-y: auto; }
.pnl-head { display: flex; align-items: center; gap: 10px; }
.pnl-head h3 { flex: 1; margin: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pnl h4 { margin: 14px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.pnl .seg { display: flex; gap: 6px; }
.pnl .seg button { flex: 1; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 10px 6px; font: inherit; font-size: 14px; display: flex; flex-direction: column; align-items: center; }
.pnl .seg button.on { border-color: var(--red); background: var(--red); color: #fff; }
.pnl .seg small { font-size: 11px; opacity: .8; }
.pnl .check { display: flex; align-items: center; gap: 6px; margin: 12px 0; font-size: 14px; }
.pnl-prev { width: 100%; max-width: 280px; display: block; margin: 10px auto; border-radius: 12px; }
.menu-item { display: block; width: 100%; text-align: left; padding: 13px 4px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-size: 15px; }
.menu-item.danger { color: var(--red); }
.hist { margin: 10px 0; }
.hrow { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hrow > div { flex: 1; min-width: 0; }
.hrow b { display: block; }
.hbadge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--line); color: var(--muted); white-space: nowrap; }
.hbadge.completed { background: #DDF5E7; color: var(--ok); } .hbadge.failed { background: #FDE2E3; color: var(--red); }
.sw-dl { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ok); }
.dl-ready { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); z-index: 80; background: var(--ink); color: var(--bg);
  border-radius: 999px; padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.dl-ready .icon-btn { color: var(--bg); background: none; border: 0; }
.gact .btn.primary { flex: 1 1 100%; }
.gact .btn.ghost { flex: 1 1 0; }
.pnl .check input { width: auto; flex: none; margin: 0; transform: scale(1.2); }

/* ---------- News Studio (Phase 3) ---------- */
.seg { display: flex; gap: 6px; margin: 10px 0; }
.seg button { flex: 1; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 10px 6px; font: inherit; font-size: 14px; }
.seg button.on { background: var(--red); border-color: var(--red); color: #fff; }
.st-input input, .st-input textarea { width: 100%; margin: 4px 0 10px; }
.st-top { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.st-top a { word-break: break-all; color: var(--red); }
.st-saved { align-self: flex-end; }
.st-busy { background: var(--ink); color: var(--bg); border-radius: 10px; padding: 10px 14px; font-weight: 600; animation: stpulse 1.4s ease-in-out infinite; }
@keyframes stpulse { 50% { opacity: .65; } }
.st-sec h3 { font-size: 15px; margin: 0 0 8px; }
.st-sec h3 + * { margin-top: 0; }
.st-sec h4 { font-size: 13px; color: var(--muted); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .03em; }
.st-fh { display: flex; align-items: center; justify-content: space-between; }
.st-fh h3 { margin: 0; }
.st-ta { width: 100%; font-size: 16px; line-height: 1.6; margin: 8px 0 6px; resize: vertical; }
.st-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.st-tools .chip:disabled, .st-tools select:disabled { opacity: .5; }
.st-tools select { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 14px; width: auto; }
.st-alts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.st-alts .chip { text-align: left; border-radius: 12px; }
.st-tags { width: 100%; }
.st-alert { background: var(--warn-bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.st-alert.bad { background: #FDE2E3; color: #8A1016; }
.st-facts { display: flex; flex-direction: column; gap: 8px; }
.st-fact { border-left: 4px solid var(--ok); padding: 6px 10px; background: var(--bg); border-radius: 8px; font-size: 14px; }
.st-fact.unverified { border-color: #E0A100; } .st-fact.conflicting { border-color: var(--red); }
.fbadge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-bottom: 4px; background: #DDF5E7; color: var(--ok); }
.fbadge.unverified { background: #FFF1C9; color: #8A6400; } .fbadge.conflicting { background: #FDE2E3; color: var(--red); }
.st-sources { padding-left: 22px; margin: 0; font-size: 14px; }
.st-sources li { margin-bottom: 8px; word-break: break-word; }
.src-open { color: var(--red); font-weight: 600; white-space: nowrap; }
.st-review .check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: 14px; }
.st-review .check input { width: auto; margin-top: 3px; transform: scale(1.2); }
.st-review .check.danger { color: var(--red); }
.st-review .btn.wide { margin-top: 14px; }
.st-review .btn:disabled { opacity: .5; }
.st-style .sw-gray.on { background: #555; border-color: #555; } .st-style .sw-dark.on { background: #111; border-color: #111; }
.st-recent { display: flex; flex-direction: column; gap: 6px; }
.st-rec { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; color: var(--ink); font: inherit; display: flex; flex-direction: column; gap: 2px; }
.st-rec.on { border-color: var(--red); }
.st-rec { min-width: 0; width: 100%; overflow: hidden; }
.st-rec b { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.st-working h3, .st-failed h3 { font-size: 15px; margin: 0 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-failed .st-alert { margin: 0 0 6px; }
.copy.small { font-size: 13px; }

/* ---------- News Desk ---------- */
.desk { display: flex; flex-direction: column; gap: 0; }
@media (min-width: 1100px) {
  body:has(#tab-studio:not(.hidden)) main { max-width: 1440px; }
  .desk { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
  .desk-side { position: sticky; top: 64px; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); overflow-y: auto; }
  .desk-main { grid-column: 2; grid-row: 1 / span 2; }
  #stWork.hidden + * { }
}
.dk-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dk-head h2 { margin: 0; }
.dk-mode textarea, .dk-mode input { width: 100%; margin: 4px 0 8px; }
.dk-opts { margin: 4px 0 12px; font-size: 14px; }
.dk-opts summary { cursor: pointer; color: var(--muted); padding: 6px 0; }
.dk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.dk-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.dk-grid label.wide { grid-column: 1 / -1; }
.dk-grid select, .dk-grid input, .dk-grid textarea { width: 100%; font-size: 14px; color: var(--ink); }
.dk-filters { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 8px 0; }
.dk-filters select { font-size: 13px; padding: 6px; width: 100%; }
#dkQ { width: 100%; margin-top: 8px; }
.st-rec { flex-direction: row !important; align-items: center; gap: 10px; }
.dk-thumb { flex: none; width: 52px; height: 52px; border-radius: 8px; background: var(--line); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-weight: 700; }
.dk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dk-rec-t { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.dk-rec-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dk-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--line); color: var(--ink); white-space: nowrap; }
.dk-pill.ok { background: #DDF5E7; color: var(--ok); } .dk-pill.warn { background: #FFF1C9; color: #8A6400; }
.dk-pill.bad { background: #FDE2E3; color: var(--red); } .dk-pill.info { background: #E1ECFF; color: #1F4FB0; } .dk-pill.run { background: var(--ink); color: var(--bg); }
.dk-top h2 { font-size: 18px; margin: 0 0 6px; line-height: 1.4; }
.dk-top .st-busy { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0; }
.dk-top .st-busy .btn { color: var(--bg); border-color: var(--bg); }
.dk-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; position: sticky; top: 52px; z-index: 4; background: var(--bg); }
.dk-tabs button { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; position: relative; }
.dk-tabs button.on { background: var(--red); color: #fff; border-color: var(--red); }
.dk-badge { font-style: normal; font-size: 11px; background: #E0A100; color: #fff; border-radius: 9px; padding: 1px 6px; margin-left: 6px; }
.dk-cols { display: block; }
@media (min-width: 1300px) { .dk-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; } }
.dk-ftools { display: flex; gap: 6px; }
.dk-wc { display: block; }
.dk-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 10px; font-size: 14px; margin: 0 0 10px; }
.dk-dl dt { color: var(--muted); } .dk-dl dd { margin: 0; word-break: break-word; }
.dk-source { white-space: pre-wrap; font-size: 14px; line-height: 1.6; max-height: 420px; overflow-y: auto; background: var(--bg); border-radius: 10px; padding: 10px; margin-top: 8px; }
.dk-legend { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.fbadge.corroborated, .fbadge.supported { background: #DDF5E7; color: var(--ok); }
.fbadge.not_checked { background: var(--line); color: var(--muted); } .fbadge.contradicted { background: #FDE2E3; color: var(--red); }
.st-fact.corroborated, .st-fact.supported { border-color: var(--ok); } .st-fact.not_checked { border-color: var(--muted); } .st-fact.contradicted { border-color: var(--red); }
.st-fact { margin-bottom: 10px; }
.dk-claim { font-weight: 600; margin: 2px 0 6px; }
.dk-ev { margin: 6px 0; padding-left: 8px; border-left: 2px solid var(--line); }
.dk-ev.contradicts { border-color: var(--red); }
.dk-ev blockquote { margin: 4px 0 0; font-size: 13px; color: var(--muted); font-style: italic; }
.dk-rec-note { color: #8A6400; }
.dk-cards { display: grid; gap: 0 14px; }
@media (min-width: 1100px) { .dk-cards { grid-template-columns: 1fr 1fr; } }
.dk-card { margin-bottom: 10px; }
.dk-card textarea { width: 100%; font-size: 15px; line-height: 1.5; }
.dk-frame { position: relative; width: 100%; max-width: 420px; overflow: hidden; border-radius: 12px; background: #000; cursor: crosshair; touch-action: none; margin: 6px 0 10px; }
.dk-frame.r1x1 { aspect-ratio: 1 / 1; } .dk-frame.r4x5 { aspect-ratio: 4 / 5; } .dk-frame.r9x16 { aspect-ratio: 9 / 16; max-width: 300px; }
.dk-frame img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.dk-focal-hint { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 999px; }
.st-sec input[type=range] { width: 100%; }
.st-sec > input:not([type=range]):not([type=checkbox]) { width: 100%; margin: 4px 0; }
.dk-rights { font-size: 14px; padding: 8px 10px; border-radius: 10px; background: var(--bg); margin-top: 8px; }
.dk-rights.unknown, .dk-rights.restricted { background: #FFF1C9; }
.dk-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.dk-photo { position: relative; border: 2px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 3px; background: var(--card); }
.dk-photo.on { border-color: var(--red); }
.dk-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.dk-rbadge { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fff; color: var(--ink); }
.dk-rbadge.free, .dk-rbadge.own { background: #DDF5E7; color: var(--ok); } .dk-rbadge.attribution { background: #E1ECFF; color: #1F4FB0; }
.dk-rbadge.unknown, .dk-rbadge.restricted { background: #FFF1C9; color: #8A6400; }
.dk-needs { margin: 4px 0 10px; padding-left: 20px; font-size: 14px; color: #8A6400; }
.dk-hist { padding-left: 18px; max-height: 260px; overflow-y: auto; }
.dk-ver { border-top: 1px solid var(--line); padding: 8px 0; font-size: 14px; }
.dk-cmp { padding: 6px 0; border-top: 1px dashed var(--line); } .dk-cmp.diff b { color: #8A6400; }
.chip.danger { color: var(--red); }
.check input[type=checkbox] { width: auto; flex: none; margin: 3px 0 0; transform: scale(1.15); }
.st-sec .check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: 14px; }

/* ---------- Android / install ---------- */
.install-bar { display: flex; align-items: center; gap: 10px; margin: 8px 12px 0; padding: 10px 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; font-size: 14px; max-width: 616px; }
@media (min-width: 640px) { .install-bar { margin: 8px auto 0; } }
.install-bar span { flex: 1; }
.install-bar .icon-btn { background: none; border: 0; color: var(--muted); font-size: 16px; }
button, .chip, .btn, .copy { touch-action: manipulation; }            /* no double-tap zoom delay on Android */
@media (pointer: coarse) { input, select, textarea { font-size: max(16px, 1em); } }   /* stops zoom-on-focus on phones */
/* phones with shorter screens (most Android): keep Reject / Save / Edit / Approve always reachable above the tab bar */
@media (max-height: 940px) and (max-width: 700px) {
  .deck-actions { position: sticky; bottom: calc(66px + var(--safe-b)); z-index: 5; margin: 6px -12px 0; padding: 8px 12px 6px;
    background: linear-gradient(to top, var(--bg) 70%, color-mix(in srgb, var(--bg) 0%, transparent)); }
  .deck-actions .round { width: 52px; height: 52px; font-size: 22px; }
  .deck-hint { display: none; }
}
.deck { isolation: isolate; z-index: 1; }       /* card stacking stays inside the deck, so the sticky buttons sit on top */
.sw-checks { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; }
.sw-checks:empty, .hidden-empty:empty { display: none; }
#edFacts { white-space: pre-wrap; font-size: 14px; }
.nr-tabs { margin: 0 0 12px; overflow-x: auto; }
.nr-form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.nr-form .btn { grid-column: 1 / -1; }
@media (max-width: 520px) { .nr-form { grid-template-columns: 1fr; } }
#nrPane input, #nrPane textarea, #nrPane select { width: 100%; margin: 3px 0; }
.nr-list { margin-top: 12px; }
.nr-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.nr-row > div:first-child { flex: 1; min-width: 180px; }

/* ---- live poster preview in the Desk */
.dk-live { position: relative; width: 100%; max-width: 420px; margin: 10px auto; border-radius: 12px; overflow: hidden; background: #ddd; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.dk-live-in { position: relative; overflow: hidden; }
.dk-live iframe { border: 0; display: block; transform-origin: 0 0; pointer-events: none; background: #fff; }
.dk-live-tag { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 99px; }
.dk-live-wrap { margin-top: 10px; }
.dk-live-wrap > summary { cursor: pointer; font-weight: 600; }
.dk-quick { margin: 10px 0 6px; gap: 10px; align-items: flex-start; }
.dk-quick span { font-size: 13px; line-height: 1.35; }

/* ---- scheduling */
.sched-at { width: 100%; font-size: 16px; padding: 10px; margin: 8px 0; }

/* ---- settings: Meta checklist, team, backups */
.setup { margin-top: 12px; }
.setup > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.setup-steps { padding-left: 0; list-style: none; margin: 8px 0; display: grid; gap: 8px; }
.setup-steps li { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--bg); overflow-wrap: anywhere; }
.setup-steps li.ok b { color: var(--ok, #1a7f37); }
.setup-steps li.todo b { color: var(--red, #c62828); }
.setup-steps li .btn { justify-self: start; margin-top: 4px; }
.user-list { display: grid; gap: 8px; margin: 8px 0; }
.user-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.user-row.off { opacity: .55; }
.user-row .row-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.user-add { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 6px; }
@media (max-width: 599px) { .user-add { grid-template-columns: 1fr 1fr; } }
.backup-list { display: grid; gap: 6px; margin: 8px 0; }
.backup-row { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg); color: inherit; text-decoration: none; }
.center { text-align: center; }
#login input + input { margin-top: 8px; }

/* panels and sheets open above the full-screen poster editor (e.g. Schedule from the editor) */
#pnlBg { z-index: 40; } #pnl { z-index: 41; }
#sheetBg { z-index: 42; } #sheet { z-index: 43; }
.toast { z-index: 60; }

/* share a whole post */
.sw-copy .share-post { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; background: var(--red); color: #fff;
  border: 1px solid var(--red); border-radius: 8px; padding: 4px 10px; font: 600 12px -apple-system, sans-serif; cursor: pointer; }
.sw-copy .share-post:active { transform: scale(.95); }
.sw-copy .share-post .ci { stroke: #fff; }
.share-text { width: 100%; margin: 8px 0; font-size: 14px; }
.share-links { display: flex; flex-wrap: wrap; gap: 6px; }
.share-links a { text-decoration: none; }

/* poster looks (editor) */
.styles.looks { grid-template-columns: 1fr 1fr; }
.stylecard.look-tint { background: linear-gradient(160deg, #16395A, #0C253B); color: #fff; }
.stylecard.look-fade { background: linear-gradient(180deg, #E6E7EA, #B0B8BF); color: #16395A; }
.stylecard.look-cutout { background: radial-gradient(60% 60% at 50% 80%, #8a6a3a, #3B280C); color: #fff; }
.stylecard.look-classic { background: #fff; color: #E1232B; }
.stylecard.look-tint small, .stylecard.look-cutout small { color: rgba(255,255,255,.8); }
.lines-ed textarea, .sec textarea.ml { width: 100%; font-size: 16px; }
.line-rows { display: grid; gap: 6px; margin-top: 8px; }
.line-row { display: flex; align-items: center; gap: 6px; }
.line-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.two-col .ctl.col { margin: 0; }
#posterPanel select { max-width: 100%; }


/* queue card: compact copy row on narrow cards (labels hidden, Share keeps its label) */
.deck.narrow .sw-copy .share-post { display: none; }          /* Share is in the button row below */
.deck.narrow .sw-copy .copy { padding: 4px 7px; font-size: 11px; }
.deck.narrow .sw-cap { -webkit-line-clamp: 1; }
.sw-copy { flex-wrap: nowrap; }
.round.share { color: #E1232B; }
.round.share .ci { width: 24px; height: 24px; stroke-width: 2.2; }
.deck-actions { flex-wrap: nowrap; }
@media (max-width: 420px) { .deck-actions { gap: 6px; } .deck-actions .act { width: 62px; } }

/* smaller action buttons → more room for the poster (fitDeck uses the space automatically) */
.deck-actions { margin: 6px 0 4px; gap: 10px; }
.deck-actions .act { width: 56px; gap: 3px; font-size: 11px; }
.deck-actions .round, .deck-actions .round.edit { width: 44px; height: 44px; font-size: 19px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.round.share .ci { width: 20px; height: 20px; }
.deck-nav { margin: 6px 0 0; }
.deck-nav .nav { width: 30px; height: 30px; font-size: 19px; }
@media (max-height: 940px) and (max-width: 700px) {
  .deck-actions { padding: 4px 12px 4px; margin: 4px -12px 0; }
  .deck-actions .round, .deck-actions .round.edit { width: 42px; height: 42px; font-size: 18px; }
}
/* v23: colour families, line effects */
.line-row { flex-wrap: wrap; }
.line-row span.ml { flex: 1 1 100%; }
.chip-sel { padding: 7px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; }
.moods { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 12px; }
.mood i { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: block; }
.mood.on { outline: 2px solid var(--accent, #E1232B); }
/* daily news plan */
.pl-tots { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.pl-tot { padding: 4px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; }
.pl-rows { display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.pl-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; padding: 3px 4px; border-radius: 8px; }
.pl-row.now { background: rgba(225,35,43,.08); outline: 1px solid rgba(225,35,43,.35); }
.pl-h { width: 52px; font-weight: 600; }
.pl-c { padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); }
.pl-c.full { background: rgba(40,160,90,.14); border-color: rgba(40,160,90,.4); }
/* Desk → make a poster myself */
.mk-open { margin: 6px 0 10px; }
.mk-grid { display: grid; gap: 12px; }
@media (min-width: 1100px) { .mk-grid { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .mk-preview { position: sticky; top: 64px; } }
.mk-prev { position: relative; width: 100%; overflow: hidden; border-radius: 12px; background: #eee; min-height: 120px; }
.mk-prev iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; }
.mk-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; }
.mk-preview .btn { margin-top: 8px; }
.mk-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-bottom: 8px; }
.mk-tpl { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 11.5px; }
.mk-tpl i { width: 100%; aspect-ratio: 4 / 5; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.7); font: 700 22px Georgia, serif; position: relative; }
.mk-tpl .mk-fr { position: absolute; left: 12%; right: 12%; top: 16%; height: 36%; border: 2px solid #F7C948; border-radius: 4px; background: rgba(255,255,255,.25); }
.mk-tpl.on { outline: 2px solid var(--accent, #E1232B); }
.mk-sl { display: grid; grid-template-columns: 120px 1fr 54px; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.mk-val { text-align: right; font-variant-numeric: tabular-nums; }
.mk-clrs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.mk-clr { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.mk-clr input { width: 38px; height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 0; background: none; }
.mk-clr.auto span::after { content: " (template)"; color: var(--muted, #888); }
.mk-sub { padding-left: 12px; border-left: 2px solid var(--line); margin: 4px 0 8px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
@media (max-width: 1099px) {
  .mk-grid { display: flex; flex-direction: column; }
  .mk-preview { order: -1; position: sticky; top: 52px; z-index: 5; display: grid; grid-template-columns: 38% 1fr; gap: 10px; align-items: end; }
  .mk-preview .mk-prev { grid-row: span 2; }
  .mk-preview .btn { margin-top: 0; }
}
/* v26: field sheet, hashtag library, line controls, poster-only editor */
.sw-tags, .sw-ment { margin: 4px 0 0; font-size: 13px; color: var(--accent, #E1232B); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-ment { color: var(--muted, #777); }
.sw-head, .sw-cap { cursor: pointer; }
.fsheet { max-height: 92vh; max-height: 92dvh; overflow-y: auto; z-index: 40; }
#fsBg { z-index: 39; }
.fs-top { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 10px; position: sticky; top: 0; background: var(--card); padding: 4px 0; z-index: 1; }
.fs-top h3 { margin: 0; font-size: 16px; }
#fsBody textarea, #fsBody input { width: 100%; font-size: 16px; }
.hash-lib { margin-top: 10px; }
.hash-groups { flex-wrap: wrap; margin-bottom: 8px; }
.hash-lib .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hash-lib .chip.on { background: var(--accent, #E1232B); color: #fff; border-color: transparent; }
.hash-gem { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }
.hash-more-l { margin: 4px 0 2px; }
.line-row.sel { outline: 2px solid var(--accent, #E1232B); border-radius: 8px; }
.line-row.deleted span.ml { text-decoration: line-through; opacity: .5; }
.chip.danger.on { background: #fde8e8; }
#editor.poster-only .ed-tabs button[data-tab="post"] { display: none; }
/* v27: pictures in "Make a poster myself", drag & drop */
.mk-drop { border: 2px dashed var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; cursor: pointer; background: var(--card); }
.mk-drop.drop-on, .mk-prev.drop-on, #edStage.drop-on { outline: 3px dashed var(--accent, #E1232B); outline-offset: -3px; background: rgba(225,35,43,.06); }
.mk-imgs { display: grid; gap: 8px; margin: 8px 0; }
.mk-img { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: start; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.mk-img.on { outline: 2px solid var(--accent, #E1232B); }
.mk-img img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.mk-img .mk-sl { grid-template-columns: 70px 1fr 48px; margin: 2px 0; }
.mk-ov { position: absolute; z-index: 3; border: 2px dashed rgba(255,255,255,.85); outline: 1px solid rgba(0,0,0,.35); border-radius: 6px; cursor: move; touch-action: none; }
.mk-ov.on { border-color: #FFD21F; }
.mk-ov-x { position: absolute; top: -12px; right: -12px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: #E1232B; color: #fff; font-size: 13px; line-height: 26px; padding: 0; cursor: pointer; }
.mk-ov-r { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid #E1232B; cursor: nwse-resize; }
.mk-place { flex-wrap: wrap; }
.btn.danger { color: #C62828; }
/* v28: arrange pictures and the title */
.mk-arr { margin: 8px 0; }
.mk-arr .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.mk-arr .chip.on { background: var(--accent, #E1232B); color: #fff; border-color: transparent; }
.mk-arr .chip[disabled] { opacity: .4; }
.mk-arr-what { margin: 6px 0 2px; font-weight: 600; }
.mk-ov-title { border-style: dotted; border-color: rgba(255,255,255,.55); cursor: pointer; background: transparent; }
.mk-ov-title.on { border-color: #FFD21F; border-style: dashed; }
.mk-img-t { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.mk-img-t img { cursor: pointer; }
@media (max-width: 1099px) { .mk-preview .mk-arr { grid-column: 1 / -1; } }
/* v29: template colour overlay */
.tint-ctl .mk-sl { grid-template-columns: 70px 1fr 54px; }
.tint-tpls { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.tint-tpls .mk-tpl i { aspect-ratio: 1; }
.tint-none { background: repeating-linear-gradient(45deg, #eee 0 6px, #fff 6px 12px); color: #999 !important; font: 600 20px sans-serif !important; }
.tint-ctl .seg { flex-wrap: wrap; margin-top: 6px; }
/* v29: picture search sheet, colour overlays */
.pic-sheet { position: fixed; inset: 0; z-index: 60; background: var(--bg, #f4f4f6); display: flex; flex-direction: column; overflow: hidden; }
.pic-sheet.hidden { display: none; }
.ps-top { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.ps-top b { text-align: center; }
.ps-bar { display: flex; gap: 8px; padding: 10px 14px 4px; }
.ps-bar input { flex: 1; font-size: 16px; }
.ps-filters { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; padding: 6px 14px 10px; border-bottom: 1px solid var(--line); }
.ps-fl { font-size: 12px; color: var(--muted, #777); }
.ps-seg { flex-wrap: wrap; }
.ps-seg button { padding: 6px 10px; font-size: 13px; }
.ps-body { flex: 1; overflow-y: auto; padding: 12px 14px 20px; }
.ps-grid { columns: 3 160px; column-gap: 10px; }
.ps-tile { position: relative; display: block; width: 100%; margin: 0 0 10px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: #ddd; break-inside: avoid; cursor: pointer; }
.ps-tile img { display: block; width: 100%; height: auto; min-height: 60px; object-fit: cover; }
.ps-tile.on { border-color: var(--accent, #E1232B); }
.ps-tile.added { opacity: .7; }
.ps-badge { position: absolute; left: 6px; top: 6px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; color: #fff; }
.ps-free { background: #1b8a4a; } .ps-credit { background: #2563eb; } .ps-bad { background: #c62828; }
.ps-dim { position: absolute; right: 6px; bottom: 6px; font-size: 10px; color: #fff; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 6px; }
.ps-added { position: absolute; inset: auto 0 0 0; background: rgba(27,138,74,.9); color: #fff; font-size: 12px; font-weight: 700; padding: 4px; text-align: center; }
.ps-busy { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 20px; }
.ps-detail { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 14px; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,.08); }
.ps-detail img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; }
.ps-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ps-info .warn { color: #c62828; }
.ps-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.mk-swatch { display: block; width: 64px; height: 64px; border-radius: 8px; border: 1px solid rgba(0,0,0,.15); cursor: pointer; }
.mk-arr .chip.col { border-style: dashed; }
.mk-add-row .btn { flex: 1 1 auto; }
@media (max-width: 600px) { .ps-grid { columns: 2 140px; } .ps-detail { grid-template-columns: 90px 1fr; } .ps-detail img { width: 90px; height: 90px; } }
@media (max-width: 1099px) {
  .mk-arr-phone { margin: 0; }
  .mk-arr-phone:empty { display: none; }
  .mk-preview { grid-template-columns: 30% 1fr; }
}
/* v30: tools, filters, Google, viewer, paste */
.mk-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mk-tools { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.mk-tool { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 11.5px; line-height: 1.15; cursor: pointer; }
.mk-tool b { font-size: 19px; line-height: 1.1; font-weight: 700; }
.mk-tool.on { background: var(--accent, #E1232B); color: #fff; border-color: transparent; }
@media (max-width: 1099px) {
  .mk-tools { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 2px; scrollbar-width: none; grid-column: 1 / -1; }
  .mk-tools::-webkit-scrollbar { display: none; }
  .mk-tool { flex: 0 0 74px; }
}
.fx-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin-bottom: 8px; }
.fx-p { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 11px; cursor: pointer; }
.fx-p img, .fx-p i { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; display: block; background: linear-gradient(135deg, #e53935, #fdd835 50%, #1e88e5); }
.fx-p.on { outline: 2px solid var(--accent, #E1232B); }
.fx-ctl .mk-sl { grid-template-columns: 100px 1fr 54px; }
.fx-details summary { cursor: pointer; font-weight: 600; margin: 8px 0; }
.ps-google { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.ps-google .muted { flex: 1 1 260px; }
.ps-view { position: absolute; inset: 0; z-index: 5; background: #111; color: #fff; display: flex; flex-direction: column; }
.ps-view-top { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; }
.ps-view-top .btn { color: #fff; border-color: rgba(255,255,255,.3); background: transparent; }
.ps-view-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; touch-action: pan-y; }
.ps-view-img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.ps-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 30px; line-height: 44px; cursor: pointer; }
.ps-nav.prev { left: 10px; } .ps-nav.next { right: 10px; }
.ps-nav[disabled] { opacity: .25; }
.ps-view-info { background: #1d1d20; padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.ps-view-info a { color: #9cc3ff; } .ps-view-info .warn { color: #ff8a80; } .ps-view-info .muted { color: #bbb; }
.ps-view-info .btn.ghost { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }
.paste-sheet .ps-body { display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin: 0 auto; width: 100%; }
.paste-zone { min-height: 90px; border: 2px dashed var(--line); border-radius: 14px; padding: 12px; background: var(--card); color: var(--muted, #888); }
.paste-zone:empty::before { content: "Tap here and paste (long-press → Paste, or Ctrl/⌘+V). You can also drop a picture here."; }
.paste-zone:focus { outline: 3px solid rgba(225,35,43,.35); }
.paste-prev { min-height: 120px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #eee; overflow: hidden; }
.paste-prev img { max-width: 100%; max-height: 320px; object-fit: contain; display: block; }
@media (max-width: 1099px) { #mkForm { scroll-margin-top: 320px; } }
.ps-view .ps-badge { position: static; display: inline-block; }
.mk-ov:not(.on) .mk-ov-x, .mk-ov:not(.on) .mk-ov-r { display: none; }   /* handles only on the selected picture */

/* ✂ Remove background */
.cut-sheet { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; }
.cut-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.cut-top-r { display: flex; gap: 6px; } .cut-top-r .btn.off { opacity: .35; }
.cut-stage { position: relative; flex: 1 1 52vh; min-height: 220px; background: #26262a; overflow: hidden; }
.cut-view { display: block; touch-action: none; cursor: crosshair; }
.cut-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(0,0,0,.45); color: #fff; }
.cut-panel { flex: 0 1 auto; max-height: 46vh; overflow-y: auto; padding: 10px 12px 18px; background: var(--card); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.cut-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cut-row .btn { padding: 9px 12px; }
.cut-l { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.cut-row .btn.on { border-color: var(--red); color: var(--red); }
.cut-row .btn[disabled] { opacity: .45; }
.cut-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cut-mode { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 12px; }
.cut-mode i { font-style: normal; font-size: 20px; }
.cut-mode.on { background: var(--red); border-color: var(--red); color: #fff; }
.cut-sl { display: flex; flex-direction: column; gap: 2px; flex: 1 1 140px; font-size: 13px; color: var(--muted); }
.cut-sl input { padding: 0; }
.cut-ck { display: flex; align-items: center; gap: 6px; font-size: 13px; } .cut-ck input { width: auto; }
.cut-edge summary { cursor: pointer; font-size: 14px; color: var(--muted); padding: 4px 0; }
.cut-done { display: flex; flex-wrap: wrap; gap: 8px; position: sticky; bottom: -18px; background: var(--card); padding: 8px 0 10px; z-index: 1; }
.cut-done .btn { flex: 1 1 160px; }
.cut-note { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--warn-bg, #FFF4CC); font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cut-fine { margin: 0; }
@media (min-width: 1000px) {
  .cut-sheet { flex-direction: row; flex-wrap: wrap; }
  .cut-top { flex: 1 1 100%; }
  .cut-stage { flex: 1 1 60%; height: calc(100vh - 56px); }
  .cut-panel { flex: 0 0 380px; max-height: calc(100vh - 56px); border-top: none; border-left: 1px solid var(--line); }
}


/* ================= v32: editor workspace (top bar · tool rail · canvas · properties) ================= */
:root { --blue: #2F6BFF; --blue-dark: #1F54D6; --ws: #E9E9EE; --rail: #FFFFFF; --rail-ink: #4A4A50; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ws: #0B0B0E; --rail: #16161A; --rail-ink: #B8B8C0; } }
:root[data-theme="dark"] { --ws: #0B0B0E; --rail: #16161A; --rail-ink: #B8B8C0; }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.blue:active { background: var(--blue-dark); }
.editor { background: var(--ws); }
.ed-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 10px 8px; background: var(--card); border-bottom: 1px solid var(--line); min-height: 56px; }
.ed-brand { display: none; flex-direction: column; line-height: 1; font: 900 21px/1 -apple-system, "Arial Black", sans-serif; letter-spacing: -.5px; color: var(--ink); padding-right: 10px; margin-right: 4px; border-right: 1px solid var(--line); }
.ed-brand b { color: var(--red); font-weight: 900; }
.ed-brand small { font-size: 7.5px; letter-spacing: .6px; font-weight: 700; color: var(--muted); margin-top: 3px; }
.ed-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.ed-title span { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-title small { font-size: 11px; color: var(--muted); }
.ed-hist { display: flex; gap: 4px; margin-left: 0; }
.ed-top .icon-btn { width: 36px; height: 34px; font-size: 17px; }
.ed-top .icon-btn.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.ed-top .btn.small { padding: 8px 12px; }
.ed-hide-s { display: none; }
@media (min-width: 560px) { .ed-hide-s { display: inline; } }
@media (max-width: 559px) {
  .ed-top { gap: 5px; padding-left: 6px; padding-right: 6px; }
  .ed-top #edPreview, .ed-title small { display: none; }
  .ed-top .icon-btn { width: 32px; }
  .ed-top .btn.small { padding: 8px 10px; }
}

/* phone first: canvas on top, panel under it, the tool rail as a bar at the bottom */
.ed-wrap { flex: 1; min-height: 0; overflow: hidden; padding: 0 0 calc(70px + var(--safe-b)); display: flex; flex-direction: column; max-width: none; }
.ed-canvas { position: relative; flex: none; z-index: 3; background: var(--ws); padding: 8px 10px 4px; }
.ed-scroll { position: relative; overflow: hidden; display: flex; justify-content: center; }
.ed-scroll.zoomed { overflow: auto; justify-content: flex-start; max-height: 56vh; }
.ed-stage { flex: none; margin: 0 auto; border-radius: 6px; box-shadow: 0 6px 26px rgba(0,0,0,.18); background: #fff; }
.ed-grid { position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background-image: linear-gradient(to right, rgba(47,107,255,.45) 1px, transparent 1px), linear-gradient(to bottom, rgba(47,107,255,.45) 1px, transparent 1px);
  background-size: 10% 10%; }
.ed-margins { position: absolute; inset: 5%; border: 2px dashed rgba(255,210,31,.95); outline: 1px dashed rgba(0,0,0,.35); pointer-events: none; z-index: 2; border-radius: 2px; }
.ed-selbar { margin: 6px 2px 0; }
.ed-zoombar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 6px 0 2px; font-size: 13px; color: var(--muted); }
.ed-zoombar .zb { min-width: 32px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 16px; padding: 0 8px; }
.ed-zoombar .zb.txt { font-size: 13px; font-weight: 600; }
.ed-zoombar #edZoomV { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink); }
.ed-zoombar .zt { display: inline-flex; align-items: center; gap: 5px; padding: 0 6px; }
.ed-zoombar .zt input { width: auto; accent-color: var(--blue); }
.ed-zoombar .zsize { display: none; }
.ed-rail { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 25; display: flex; gap: 2px; overflow-x: auto; padding: 6px 6px calc(6px + var(--safe-b));
  background: var(--rail); border-top: 1px solid var(--line); scrollbar-width: none; }
.ed-rail::-webkit-scrollbar { display: none; }
.ed-rail button { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 62px; padding: 6px 6px; border: none; border-radius: 12px;
  background: transparent; color: var(--rail-ink); font: 600 11px -apple-system, sans-serif; }
.ed-rail button i { font-style: normal; font-size: 19px; line-height: 1; height: 22px; display: flex; align-items: center; font-weight: 800; }
.ed-rail button.on { background: rgba(225,35,43,.12); color: var(--red); }
.ed-side { background: var(--card); border-top: 1px solid var(--line); flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.ed-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 4px; position: sticky; top: 0; background: var(--card); z-index: 2; flex-wrap: wrap; }
.ed-side-head b { font-size: 16px; }
.ed-subtabs { display: flex; gap: 4px; width: 100%; }
.ed-subtabs button { flex: 1; padding: 8px 6px; }
.ed-subtabs button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.ed-panels .ed-panel { background: transparent; border-radius: 0; margin: 0; }
.editor.previewing .ed-selbar { visibility: hidden; }
.switch-row.off { opacity: .5; }
.ex-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.ex-seg button { padding: 10px 6px; font-size: 13px; border-radius: 10px; }
.ex-seg button.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.ex-go { margin-top: 10px; }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.badge-tile { border: none; border-radius: 8px; padding: 10px 8px; font-weight: 800; font-size: 15px; box-shadow: 0 3px 10px rgba(0,0,0,.15); cursor: pointer; }
.shape-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shape-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font-size: 11px; cursor: pointer; }
.shape-tile .shp { display: block; width: 34px; height: 34px; background: var(--red); font-style: normal; }
.shape-tile:active { transform: scale(.96); }

/* the workspace on computers and tablets in landscape */
@media (min-width: 1000px) {
  .editor { display: grid; grid-template-rows: auto 1fr; }
  .ed-brand { display: flex; }
  .ed-title { flex: 0 1 auto; max-width: 34vw; margin-right: auto; padding-left: 4px; }
  .ed-wrap { display: grid; grid-template-columns: 88px minmax(0, 1fr) 380px; padding: 0; overflow: hidden; height: 100%; }
  .ed-rail { position: static; flex-direction: column; overflow-y: auto; overflow-x: hidden; padding: 10px 6px; border-top: none; border-right: 1px solid var(--line); gap: 4px; }
  .ed-rail button { min-width: 0; width: 100%; padding: 9px 2px; font-size: 11px; }
  .ed-rail button i { font-size: 21px; }
  .ed-canvas { position: relative; display: flex; flex-direction: column; min-height: 0; padding: 0; background: var(--ws); }
  .ed-scroll { flex: 1; min-height: 0; align-items: center; padding: 24px; }
  .ed-scroll.zoomed { overflow: auto; align-items: flex-start; max-height: none; }
  .ed-selbar { margin: 0; padding: 6px 16px; }
  .ed-zoombar { margin: 0; padding: 8px 16px; background: var(--card); border-top: 1px solid var(--line); justify-content: flex-start; gap: 8px; }
  .ed-zoombar .zsize { display: inline; margin-left: auto; }
  .ed-side { border-top: none; border-left: 1px solid var(--line); overflow-y: auto; min-height: 0; }
  .ed-side-head { padding: 14px 16px 6px; }
}

/* v32: Library → Calendar / Analytics */
.lib-views { margin: 0 0 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.lib-views button { padding: 10px 6px; font-size: 14px; border-radius: 12px; }
.cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-head h2 { margin: 0; flex: 1; font-size: 20px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 8px; }
.cal-wd { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal-cell { aspect-ratio: 1 / 1; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 4px 2px; font: inherit; cursor: pointer; }
.cal-cell.empty { border: none; background: transparent; cursor: default; }
.cal-cell b { font-size: 13px; }
.cal-cell.today b { color: #fff; background: var(--red); border-radius: 999px; padding: 0 6px; }
.cal-cell.on { outline: 2px solid var(--blue); outline-offset: -2px; }
.cal-dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.cd { font-style: normal; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 0 5px; line-height: 16px; color: #fff; }
.cd.sch { background: var(--blue); } .cd.pos { background: var(--ok); }
.cal-list { display: flex; flex-direction: column; gap: 8px; }
.cal-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.cal-item img { width: 52px; height: 65px; object-fit: cover; border-radius: 6px; background: var(--line); }
.cal-txt { display: flex; flex-direction: column; min-width: 0; }
.cal-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.ana-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 10px 0; }
.ana-tile { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.ana-tile b { font-size: 26px; line-height: 1.1; } .ana-tile span { font-size: 13px; color: var(--muted); }
.ana-tile.ok b { color: var(--ok); }
.ana-bars { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--line); }
.ana-col { flex: 1; height: 100%; position: relative; display: flex; align-items: flex-end; }
.ana-col i { position: absolute; bottom: 0; left: 10%; right: 10%; border-radius: 3px 3px 0 0; }
.ana-col i.made { background: rgba(47,107,255,.35); } .ana-col i.posted { background: var(--blue); left: 25%; right: 25%; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
.lg.made { background: rgba(47,107,255,.35); } .lg.posted { background: var(--blue); }
.ana-hbars { display: flex; flex-direction: column; gap: 6px; }
.ana-hrow { display: grid; grid-template-columns: 110px 1fr 46px; align-items: center; gap: 8px; font-size: 13px; }
.ana-hrow span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ana-hrow i { display: block; height: 12px; border-radius: 6px; background: var(--red); min-width: 2px; }
.ana-hrow i.full { background: var(--ok); }
.ana-hrow b { text-align: right; font-variant-numeric: tabular-nums; }
.ana-hours { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.ana-hr { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.ana-hr i { width: 100%; background: var(--blue); border-radius: 3px 3px 0 0; min-height: 1px; }
.ana-hr small { font-size: 9px; color: var(--muted); height: 12px; }
.two-col-ana { display: grid; gap: 16px; }
@media (min-width: 800px) { .two-col-ana { grid-template-columns: 1fr 1fr; } }
.cal-head .seg button { white-space: nowrap; }
/* a checkbox in a switch row never stretches (the Desk's "Quick mode" row was squashed into one word per line) */
.switch-row input[type="checkbox"], .st-input .switch-row input[type="checkbox"] { width: auto; flex: none; margin: 0 4px; }
.switch-row > span { flex: 1 1 auto; min-width: 0; }
.desk-side { overflow-x: hidden; }

/* Queue sound choice (v46) */
.sound-list { display:flex; flex-direction:column; gap:6px; }
.sound-row { display:flex; align-items:center; gap:8px; }
.sound-row .sound-pick { all:unset; cursor:pointer; flex:1; display:flex; justify-content:space-between; align-items:center; padding:10px 12px; border-radius:10px; background:var(--card2, rgba(127,127,127,.12)); font-weight:600; }
.sound-row.on .sound-pick { outline:2px solid #E1232B; }
.sound-row .sound-pick b { color:#E1232B; }

/* v50: asks for one tap when the phone is holding the page-flip sound back */
.sound-chip { display: block; margin: 8px auto 0; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13px; }
.sound-chip.hidden { display: none; }

/* v51: vibrate when sliding (Settings) */
.buzz-row { display:flex; gap:10px; align-items:flex-start; margin-top:14px; cursor:pointer; }
.buzz-row input { width:20px; height:20px; margin-top:2px; accent-color:#E1232B; flex:none; }
.lk-haptic { position:fixed; left:-200px; top:0; width:1px; height:1px; opacity:0; pointer-events:none; }

/* ---------------------------------------------------------------- No-AI mode (v80) */
#pnl.na-wide { max-width: 760px; max-height: 92vh; }
.na-studio input, .na-studio textarea, .na-studio select { margin-top: 8px; }
.na-seg button { flex: 1; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 9px 6px;
  font: inherit; font-size: 14px; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.na-seg button.on { border-color: var(--red); background: var(--red); color: #fff; }
.na-seg small { font-size: 11px; opacity: .8; }
.na-in { margin-bottom: 12px; }
.na-art { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); border-radius: 12px; padding: 10px 12px; margin: 6px 0; font: inherit; }
.na-notes .warn { margin: 6px 0; }
.na-heads { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.na-head { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 12px; padding: 9px 12px; font: inherit; font-size: 16px; }
.na-head.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.na-head small { font-size: 12px; }
.na-more { margin: 10px 0; } .na-more summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.na-tr { border-top: 1px solid var(--line); padding: 6px 0; }
.na-photo { margin: 6px 0 4px; }
.na-src { overflow-wrap: anywhere; }
.na-sites { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.na-site { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.na-site.bad { border-color: #E9A23B; }
.na-site-top { display: flex; align-items: center; gap: 10px; }
.na-site-top input { width: auto; }
.na-site-name { min-width: 0; overflow-wrap: anywhere; }
.na-site-acts { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.na-err { color: #B4540A; margin-top: 4px; overflow-wrap: anywhere; }
.na-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.na-add input[type=url], .na-add .btn { grid-column: 1 / -1; }
.na-vform { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.na-vform .btn { grid-column: 1 / -1; }
.na-vlist { max-height: 46vh; overflow-y: auto; margin-top: 8px; }
.na-vrow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.na-vrow span { overflow-wrap: anywhere; }
.na-opts { margin: 6px 0 10px; gap: 6px; }
.na-opts .chip { text-align: left; border-radius: 12px; font-size: 14px; }
.na-opts .chip.on { border-color: var(--red); color: var(--red); }
@media (max-width: 420px) { .na-add, .na-vform { grid-template-columns: 1fr; } }
/* v81 */
.na-site-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.na-site-opts .na-kw { grid-column: 1 / -1; }
.na-feed { overflow-wrap: anywhere; margin-top: 2px; }
.na-item { border-top: 1px solid var(--line); padding: 6px 0; }
.na-item span { overflow-wrap: anywhere; }
.na-item-acts { display: flex; gap: 10px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.na-perm { display: flex; gap: 8px; align-items: center; margin: 6px 0; } .na-perm input { width: auto; }
.na-bulk textarea { margin: 8px 0; }
.line-pick { width: 40px; height: 34px; padding: 2px; border-radius: 8px; flex: 0 0 auto; }
.line-col.on { border-color: var(--red); }
/* v85 translator settings */
.mt-badge { display: inline-block; font-weight: 700; font-size: 14px; padding: 4px 10px; border-radius: 999px; background: var(--line); margin: 4px 0 8px; }
.mt-installed { background: #EAF1FD; color: #173E87; }
.mt-ready { background: #E3F4E8; color: #1E7B3A; } .mt-error { background: #FDECEA; color: #B3261E; } .mt-downloading, .mt-loading { background: #FFF4DB; color: #8A5A00; }
.mt-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 6px 0; } .mt-bar i { display: block; height: 100%; background: var(--red); }
.mt-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.mt-out { white-space: pre-wrap; font-size: 18px; line-height: 1.6; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin: 10px 0 6px; }
#mtText { margin: 8px 0; }

/* v89 — Dictionary and the spelling check */
.dict-q { display: flex; gap: 8px; margin: 8px 0; }
.dict-q input { flex: 1; min-width: 0; }
.dict-g { border-top: 1px solid var(--line); padding: 6px 0; }
.dict-g p { margin: 2px 0 0; font-size: 16px; line-height: 1.5; }
.dict-credit { margin-top: 12px; }
.na-spell { margin: 6px 0 10px; }
.dict-spell .dict-h { font-weight: 700; margin: 4px 0; }
.dict-flag { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); }
.dict-flag span { font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
.dict-flag s { opacity: .7; text-decoration-color: #E1232B; }
.dict-flag b { color: var(--accent, #1a7f37); }
.dict-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.dict-again { margin-top: 4px; }
.na-vocab .na-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.na-vocab .na-seg button { flex: 1 1 30%; min-width: 0; }
.dict-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; }
.dict-txt small { font-size: 12px; }
.dict-gram s { text-decoration-color: #E0A100; }

/* v94 — Settings as icons */
#tab-settings > .panel.set-off { display: none !important; }
.set-head h2 { margin: 4px 0 2px; }
.set-head p { margin: 0 0 12px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 16px; }
.set-tile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card, #fff); color: inherit; text-align: left; cursor: pointer; font: inherit; min-height: 72px; }
.set-tile:hover, .set-tile:focus-visible { border-color: var(--red, #E1232B); }
.set-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(225, 35, 43, .08); color: var(--red, #E1232B); }
.set-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.set-txt b { font-size: 15px; }
.set-txt small { color: var(--muted, #6b7280); font-size: 12.5px; line-height: 1.35; }
.set-go { font-size: 22px; color: var(--muted, #9ca3af); }
.set-bar { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; position: sticky; top: 0; z-index: 5;
  background: var(--bg, #f6f6f7); padding: 8px 0; }
.set-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 16px; color: var(--red, #E1232B); }
.set-title svg { width: 22px; height: 22px; }
.set-title { color: inherit; }
@media (max-width: 420px) { .set-grid { grid-template-columns: 1fr; } }

/* v95 — Settings → Headline style */
.sty-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.sty-cat { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.sty-cat summary { cursor: pointer; font-weight: 600; }
.sty-shape { margin: 6px 0 6px 6px; }
.sty-shape p { margin: 2px 0 0; }
.sty-spell { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }

/* v97 — Settings → Image model: two models and Compare */
.vis-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.vis-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.vis-using { font-size: 12px; font-weight: 700; color: #0a7a3d; background: #e3f5ea; border-radius: 999px; padding: 2px 8px; }
.vis-cmp { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.vis-col { flex: 1 1 260px; min-width: 0; }
.vis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.vis-grid figure { margin: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; }
.vis-grid figure.vis-good { border-color: #0a7a3d; }
.vis-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.vis-grid figcaption { text-align: center; padding: 2px 0; }
#visCmpText, #visCmpImg { width: 100%; box-sizing: border-box; margin: 4px 0; }

/* v98 — same-story matcher test */
#tsA, #tsB { width: 100%; box-sizing: border-box; margin: 4px 0; }

/* v99 — picture maker */
#pgText { width: 100%; box-sizing: border-box; margin: 4px 0; }
.pg-img { display: block; width: 100%; max-width: 420px; border-radius: 10px; margin: 6px 0; }
.pg-auto { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; text-align: left; }
.pg-auto input[type=checkbox] { width: auto; flex: 0 0 auto; margin: 3px 0 0; }   /* v102: next to its sentence */

/* v100 — Security log */
.audit-list { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; margin-top: 6px; }
.audit-row { font-size: 13px; padding: 6px 8px; border-radius: 8px; background: var(--card, rgba(127,127,127,.06)); overflow-wrap: anywhere; }
.audit-row.audit-bad { background: rgba(225, 35, 43, .08); }
.audit-at { display: block; font-size: 11px; opacity: .7; }

/* v103 — Sign out of Gemini sheet */

/* v114: icons in buttons and the Queue's round buttons */
.round .lki { width: 26px; height: 26px; }
.round.edit .lki { width: 22px; height: 22px; }
.deck-actions .round .lki { width: 24px; height: 24px; }
.btn .lki, .chip .lki { width: 1.15em; height: 1.15em; }

/* v123 — roles: the Queue's filter row, who made it, Poster info, Ask to change, Send back, invites, plan */
.roles-bar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; align-items: center; }
.rchip { flex: none; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 13px/1 inherit; }
.rchip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rchip.ask { background: var(--red); color: #fff; border-color: var(--red); }
.roles-bar .rnote { font-size: 12.5px; color: var(--muted); }
.sw-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin: 2px 0 4px; }
.sw-info { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 3px 10px; font: 600 12px inherit; min-height: 28px; }
.sw-back { background: var(--warn-bg); border-radius: 10px; padding: 8px 10px; font-size: 13px; margin: 4px 0; }
.rinfo, .rform { display: flex; flex-direction: column; gap: 10px; }
.rhead { font-weight: 700; margin: 0; }
.rask { border: 2px solid var(--red); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.rask p { margin: 0; }
.rbtns { display: flex; gap: 8px; }
.rbtns .btn { flex: 1; min-height: 42px; }
.rtime { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.rtime li { position: relative; font-size: 14px; }
.rtime li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.rparts { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rparts legend { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.rpart { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; min-height: 36px; }
.rpart input { accent-color: var(--red); }
.invite-box { margin-top: 12px; }
.inv-out { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.inv-out p { flex-basis: 100%; margin: 0; }
.inv-link { flex: 1; min-width: 0; font-size: 13px; }
.role-pick { min-height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13px; }
.rplan { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.rmeter { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 14px; }
.rmeter i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--red) var(--p), var(--line) var(--p)); }
.plan-banner { margin: 8px 12px 0; }
