/* Objectifs + Médias + Idées + Planning + Logs */
body.media-page,
body.logs-page,
body.soutien-page {
  display: block;
}

body.soutien-page .soutien-wrap {
  max-width: 1280px;
  padding-top: 22px;
}
body.soutien-page .board-head h1 {
  margin: 8px 0 4px;
  font-size: 34px;
  letter-spacing: -0.03em;
}
body.soutien-page .lead { max-width: 62ch; }
body.soutien-page .disc-status[hidden],
body.soutien-page .soutien-guild[hidden] { display: none !important; }
.soutien-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
@media (max-width: 980px) {
  .soutien-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .soutien-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.soutien-kpis span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  position: relative;
  min-width: 0;
}
.soutien-kpis span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 99px;
  background: var(--muted);
}
.soutien-kpis span small {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.soutien-kpis span b {
  font-size: 14px;
  font-weight: 750;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.soutien-kpis span.is-ok::before { background: var(--green); box-shadow: 0 0 0 3px rgba(61, 190, 122, 0.18); }
.soutien-kpis span.is-info::before { background: var(--brown-2); }
.soutien-kpis span.is-warn::before { background: #e6c56a; }
.soutien-kpis span.is-bad::before { background: var(--danger); }
.soutien-kpis span.is-off { color: var(--muted); }
.soutien-kpis span.is-off b { color: var(--muted); font-weight: 650; }
.soutien-guild {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.soutien-guild > span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.soutien-guild select,
.soutien-guild .nice-select { width: 100%; }
.top-board {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--field);
}
.top-board h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.top-board p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.top-lots {
  white-space: pre-wrap;
  font-size: 13px;
  color: var(--ink);
}
.top-board ol {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 6px;
  max-height: 420px;
  overflow: auto;
}
.top-board li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  min-width: 0;
}
.top-board li em {
  font-style: normal;
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  text-align: center;
}
.top-board li[data-rank="1"] em { color: #e6c56a; }
.top-board li[data-rank="2"] em { color: #c5ccd8; }
.top-board li[data-rank="3"] em { color: #c47a4a; }
.top-board li span,
.top-board li b {
  min-width: 0;
  overflow-wrap: anywhere;
}
.top-board li b { font-size: 13.5px; }
.top-board li span {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.top-board li.is-empty {
  grid-template-columns: 1fr;
  justify-items: center;
  color: var(--muted);
}
.soutien-stack {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}
.soutien-stack[hidden] {
  display: none !important;
}
@media (max-width: 1080px) {
  .soutien-stack { grid-template-columns: 1fr; }
}
.soutien-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  padding: 18px 18px 16px;
  min-width: 0;
}
.soutien-card-head { margin-bottom: 4px; }
.soutien-card h2 {
  margin: 0 0 4px;
  font-family: var(--sans, inherit);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.soutien-card .lead {
  margin: 0 0 4px;
  font-size: 13.5px;
}
.soutien-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.soutien-block:first-child {
  margin-top: 8px;
  padding-top: 0;
  border-top: 0;
}
.soutien-block h3 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.soutien-toggles,
.soutien-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.soutien-toggles .check-row,
.soutien-platforms .check-row {
  flex: 1 1 160px;
}
body.soutien-page .disc-form .check-row {
  background: var(--field);
  border-radius: 12px;
}
body.soutien-page .disc-form .check-row:has(input:checked) {
  background: rgba(225, 6, 0, 0.14);
  border-color: rgba(225, 6, 0, 0.4);
  color: var(--ink);
}
.soutien-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}
.soutien-actions .do {
  display: inline-flex;
  align-items: center;
}
.reward-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reward-head,
.reward-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1.1fr) 110px 88px minmax(0, 1.2fr);
  gap: 8px;
  align-items: center;
}
.reward-head {
  padding: 0 2px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.reward-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.reward-row > * { min-width: 0; }
.reward-row input,
.reward-row select {
  width: 100%;
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
}
@media (max-width: 720px) {
  .reward-head { display: none; }
  .reward-row {
    grid-template-columns: 1fr 1fr;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--field);
  }
  .reward-name { grid-column: 1 / -1; }
}

body.logs-page .logs-wrap {
  max-width: 1280px;
  padding-top: 22px;
}
body.logs-page .board-head h1 {
  margin: 8px 0 4px;
  font-size: 34px;
  letter-spacing: -0.03em;
}
body.logs-page .lead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  max-width: none;
}
.logs-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(61, 190, 122, 0.35);
  background: rgba(61, 190, 122, 0.12);
  color: #8ed4a8;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.logs-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3dbe7a;
  box-shadow: 0 0 0 0 rgba(61, 190, 122, 0.7);
  animation: logs-pulse 1.8s ease-out infinite;
}
.logs-live[hidden] { display: none !important; }
@keyframes logs-pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 190, 122, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(61, 190, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 190, 122, 0); }
}

.logs-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
}
.logs-status[hidden],
.logs-alerts[hidden] { display: none !important; }
.logs-status strong {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.logs-status span {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.4;
}
.logs-status code {
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
}
.logs-status.is-warn {
  border-color: rgba(226, 196, 138, 0.45);
  background: rgba(226, 196, 138, 0.12);
}
.logs-status.is-warn strong { color: #e0b45a; }
.logs-status.is-ok {
  border-color: rgba(61, 190, 122, 0.35);
  background: rgba(61, 190, 122, 0.1);
}
.logs-status.is-ok strong { color: #8ed4a8; }

.logs-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 900px) {
  .logs-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .logs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.logs-kpi {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px 12px 16px;
  background: var(--card);
  min-width: 0;
  overflow: hidden;
}
.logs-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 99px;
  background: var(--kpi, var(--muted));
}
.logs-kpi small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.logs-kpi b {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
}
.logs-kpi.is-zero b { color: var(--muted); opacity: 0.55; }
.logs-kpi.tone-bridge { --kpi: #3dbe7a; }
.logs-kpi.tone-discord { --kpi: #5865f2; }
.logs-kpi.tone-bot { --kpi: #e6c56a; }
.logs-kpi.tone-staff { --kpi: #ff6b6b; }
.logs-kpi.tone-ink { --kpi: #3d8bff; }

.logs-alerts {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 196, 138, 0.4);
  border-radius: 14px;
  background: rgba(226, 196, 138, 0.1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.logs-alerts-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.logs-alerts-head strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e0b45a;
}
.logs-alerts-head span { font-size: 12px; color: #c9a05a; }
.logs-alert-item {
  text-align: left;
  border: 0;
  background: transparent;
  padding: 6px 0;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  border-top: 1px solid rgba(138, 106, 34, 0.15);
}
.logs-alert-item b { font-size: 12px; color: #e0b45a; }
.logs-alert-item span { font-size: 13px; color: var(--ink); }

.logs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}
@media (max-width: 980px) {
  .logs-layout { grid-template-columns: 1fr; }
  .logs-side { order: 2; position: static; }
}

.logs-main { min-width: 0; }
.logs-console {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  padding: 14px;
  min-width: 0;
}

.logs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.logs-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.logs-views {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
}
.logs-chip {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 7px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
}
.logs-chip:hover { color: var(--ink); background: var(--hover-wash); }
.logs-chip.is-on {
  background: var(--brown);
  color: #fff;
}

.logs-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 1fr) repeat(3, minmax(110px, 0.9fr));
  gap: 10px 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--field);
}
@media (max-width: 900px) {
  .logs-toolbar { grid-template-columns: 1fr 1fr; }
}
.logs-toolbar .field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  background: var(--card);
  color: var(--ink);
}
.logs-toolbar .field input:focus {
  outline: none;
  border-color: rgba(225, 6, 0, 0.45);
  background: var(--field-2);
  box-shadow: var(--focus);
}
.logs-search {
  position: relative;
  display: flex;
  align-items: center;
}
.logs-search-ico {
  position: absolute;
  left: 12px;
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}
.logs-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px 10px 34px;
  font: inherit;
  font-size: 14px;
  background: var(--card);
  color: var(--ink);
}
.logs-search input:focus {
  outline: none;
  border-color: rgba(225, 6, 0, 0.45);
  background: var(--field-2);
  box-shadow: var(--focus);
}
.logs-toolbar .field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.logs-toolbar .field > span:first-child,
.logs-search-field > span:first-child {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.logs-feed-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 2px 10px;
}
.logs-feed-head h2 {
  margin: 0;
  font-family: var(--sans, inherit);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.logs-count {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.logs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body.logs-page #list {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
body.logs-page #list:empty { display: flex; }
.logs-empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 42px 22px;
  text-align: center;
  background: var(--beige);
}
.logs-empty::before {
  content: "";
  display: block;
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background:
    linear-gradient(var(--muted), var(--muted)) center 13px / 18px 2px no-repeat,
    linear-gradient(var(--muted), var(--muted)) center 21px / 14px 2px no-repeat,
    linear-gradient(var(--muted), var(--muted)) center 29px / 10px 2px no-repeat,
    var(--field);
  border: 1px solid var(--line);
  opacity: 0.85;
}
.logs-empty strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--ink);
}
.logs-empty span {
  color: var(--muted);
  font-size: 13.5px;
}

.log-card {
  border: 1px solid var(--line);
  border-left: 3px solid #8b93a7;
  border-radius: 14px;
  padding: 13px 14px;
  background: var(--field);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}
.log-card:hover { border-color: rgba(225, 6, 0, 0.4); }
.log-card.source-bridge { border-left-color: #3d9a6a; }
.log-card.source-discord { border-left-color: #5865f2; }
.log-card.source-bot { border-left-color: #c9a227; }
.log-card.is-alert {
  background: rgba(226, 196, 138, 0.08);
  box-shadow: inset 0 0 0 1px rgba(226, 196, 138, 0.35);
}
.log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.log-head strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.log-head time {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.log-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9ebf3;
  color: #3a4154;
}
.log-badge.src-bridge { background: #e3f3ea; color: #216344; }
.log-badge.src-discord { background: #e6f3ff; color: #9B0000; }
.log-badge.src-bot { background: #fff3d1; color: #7a5a14; }
.log-badge.src-other { background: #eceef4; color: #4a5163; }
.log-badge.cat { background: #f0eef8; color: #4a4570; }
.log-badge.script { background: #eef2f7; color: #334155; }
.log-badge.kind { background: #f3f4f7; color: #64748b; }
.log-badge.alert { background: #ffe8c8; color: #8a4b12; }
.log-desc {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(225, 6, 0, 0.08);
  border: 1px solid rgba(225, 6, 0, 0.18);
  font-size: 13.5px;
  line-height: 1.4;
  white-space: pre-wrap;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.log-fields {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-top: 1px solid var(--line);
}
.log-fields > div {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 7px 2px;
  background: transparent;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  min-width: 0;
}
.log-fields > div:last-child { border-bottom: 0; }
.log-fields > div > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.log-fields b {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  min-width: 0;
}
.log-fields b.is-mono {
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
}
.log-line {
  display: block;
  overflow-wrap: anywhere;
}
.log-line + .log-line { margin-top: 3px; }
@media (max-width: 640px) {
  .log-fields > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.logs-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 16px;
}
.logs-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: var(--card);
}
.logs-panel h2 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.logs-help {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.logs-staff-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.logs-staff-item {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font: inherit;
  min-width: 0;
}
.logs-staff-item:hover { background: var(--field-2); border-color: rgba(225, 6, 0, 0.35); }
.logs-staff-item strong,
.logs-staff-item small {
  overflow-wrap: anywhere;
}
.logs-staff-item strong { font-size: 13px; }
.logs-staff-item small { color: var(--muted); font-size: 11px; }

.logs-settings summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.logs-settings summary::-webkit-details-marker { display: none; }
.logs-settings summary span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.logs-settings summary small {
  color: var(--muted);
  font-size: 12px;
}
.logs-settings[open] summary { margin-bottom: 12px; }
.logs-settings-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.logs-settings-block h3 {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 700;
}
.logs-checks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.logs-checks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 8px;
}
.logs-check,
.logs-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.logs-toggle { margin-bottom: 6px; }
.logs-check input:disabled,
.logs-toggle input:disabled { opacity: 0.5; }
#save-cfg.is-dirty {
  box-shadow: 0 0 0 2px #c9a227;
}

.gx-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 16px 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.gx-toolbar .do {
  margin-left: auto;
}

.gx-toolbar .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  flex: 1 1 140px;
}
#goal-form.gx-toolbar > .field:first-child {
  flex: 1 1 100%;
}

.gx-toolbar .field span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.gx-toolbar input,
.gx-toolbar select,
.gx-toolbar textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  padding: 9px 11px;
}

.gx-toolbar textarea {
  min-height: 64px;
  resize: vertical;
  flex: 1 1 100%;
}

.gx-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 14px;
}

.gx-chip {
  border: 1px solid var(--line);
  background: var(--beige);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
}

.gx-chip.on {
  background: var(--brown);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 6, 0, 0.22);
}

.gx-chip.soft {
  background: rgba(225, 6, 0, 0.12);
  color: var(--brown-2);
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.goal-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.goal-card:hover {
  border-color: #c4cada;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(28, 32, 48, 0.07);
}

.goal-card.done {
  opacity: 0.78;
  background: var(--beige);
}

.goal-card.pinned {
  border-color: rgba(225, 6, 0, 0.35);
  background: var(--chip);
}

.goal-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.goal-top h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.goal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  max-width: 46%;
}

.goal-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dde1ec;
  color: var(--brown-2);
  white-space: nowrap;
}

.goal-badge.high { background: rgba(161, 75, 58, 0.14); color: #a14b3a; }
.goal-badge.paused { background: rgba(201, 134, 45, 0.16); color: #8a5a1f; }
.goal-badge.done { background: rgba(47, 157, 87, 0.16); color: #2f9d57; }

.goal-detail {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.goal-progress {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(231, 233, 241, 0.85);
  border: 1px solid #d8dce8;
}

.goal-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.goal-progress-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.goal-pct {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 8px 4px 6px;
}

.goal-pct input[type="number"] {
  width: 52px;
  border: 0;
  background: transparent;
  padding: 2px 0;
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: right;
}

.goal-pct input[type="number"]:focus {
  outline: none;
}

.goal-pct em {
  font-style: normal;
  color: var(--brown-2);
  font-size: 12px;
  font-weight: 750;
}

.goal-progress .bar {
  height: 9px;
  border-radius: 999px;
  background: #d0d5e2;
  overflow: hidden;
}

.goal-progress .bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brown), #3d8bff);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.goal-progress input[type="range"] {
  width: 100%;
  accent-color: var(--brown);
  margin: 0;
  cursor: pointer;
}

.goal-steps {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 2px;
}

.goal-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink);
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.goal-step:hover {
  background: rgba(225, 6, 0, 0.08);
  border-color: rgba(225, 6, 0, 0.16);
}

.goal-step.done {
  color: var(--muted);
  text-decoration: line-through;
}

.goal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid rgba(212, 216, 228, 0.85);
}

.goal-actions .staff-btn {
  border-radius: 10px;
  padding: 7px 11px;
}

.media-albums {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 10px 0 4px;
}

.media-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.media-tags span {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--brown-2);
}

.media-drop {
  border: 1.5px dashed var(--line);
  border-radius: 18px;
  background: var(--field);
  padding: 26px 18px;
  text-align: center;
  margin: 14px 0;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.media-drop.over {
  border-color: var(--brown);
  background: rgba(225, 6, 0, 0.12);
  transform: translateY(-1px);
}

.media-drop strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.media-drop p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.media-drop input[type="file"] { display: none; }

.media-drop-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.media-drop .media-upload-status {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}

.media-drop .media-drop-hint {
  margin-top: 8px;
  font-size: 12px;
}

.media-drop.busy {
  opacity: 0.92;
}

.media-drop.compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 16px;
  text-align: left;
}

.media-drop.compact > p:not(.media-upload-status),
.media-drop.compact .media-drop-hint {
  display: none;
}

.media-drop.compact strong {
  margin: 0;
  font-size: 15px;
}

.media-drop.compact .media-upload-bar,
.media-drop.compact .media-drop-actions {
  margin: 0;
}

.media-drop.compact .media-upload-bar {
  flex: 1 1 420px;
}

.media-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.media-tools input[type="search"],
.media-tools select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  padding: 9px 11px;
  min-width: 140px;
  font-weight: 600;
}

.media-tools #count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.media-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.media-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.media-section-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.media-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.media-grid.portrait {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.media-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.media-card:hover {
  transform: translateY(-2px);
  border-color: #c4cada;
  box-shadow: 0 12px 28px rgba(28, 32, 48, 0.08);
}

.media-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #12141c;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
}

.media-card.is-portrait .media-thumb {
  aspect-ratio: 9 / 16;
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-thumb .kind {
  position: absolute;
  top: 9px;
  left: 9px;
  background: rgba(28, 32, 48, 0.72);
  color: #f4f2ff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.media-body {
  padding: 12px 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.media-body strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-body small {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.media-actions .staff-btn,
.media-actions a.staff-btn {
  text-decoration: none;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 11.5px;
}

.media-preview {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(28, 32, 48, 0.5);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.media-preview[hidden] { display: none; }

.media-preview-card {
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 14px;
  box-shadow: 0 20px 50px rgba(21, 24, 33, 0.2);
}

.media-preview-card img,
.media-preview-card video {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  background: #1c2030;
}

.media-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.media-preview-meta strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.media-preview-meta span {
  color: var(--muted);
  font-size: 12.5px;
}

.media-preview-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.media-preview-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-right: auto;
}

body.planning-page .board-wrap {
  max-width: none;
  width: 100%;
  padding: 16px 20px 20px;
  box-sizing: border-box;
}
body.planning-page .board-head h1 {
  margin: 2px 0 4px;
}
body.planning-page .board-head .lead {
  margin: 0;
  max-width: 46ch;
}
body.planning-page .board-top {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}
.plan-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.plan-week {
  margin: 0 4px;
  min-width: 168px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}
.plan-today {
  height: calc(100vh - 148px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.plan-today h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 550;
}
.plan-today-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.plan-today-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 0;
  border-left: 3px solid var(--brown);
  border-radius: 12px;
  background: var(--beige);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.plan-today-item[data-color="blue"] { background: #eef3fc; border-left-color: #3d6fd4; }
.plan-today-item[data-color="teal"] { background: #e8f6f8; border-left-color: #218e9c; }
.plan-today-item[data-color="green"] { background: #eaf6ef; border-left-color: #2f8d58; }
.plan-today-item[data-color="amber"] { background: #fbf4e6; border-left-color: #c4841d; }
.plan-today-item[data-color="rose"] { background: #fbecef; border-left-color: #c4526c; }
.plan-today-item[data-color="ink"] { background: #f1f2f5; border-left-color: #4e5568; }
.plan-today-item span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.plan-today-item small {
  color: var(--muted);
  white-space: pre-wrap;
}
.cal-scroll {
  margin-top: 0;
  height: calc(100vh - 148px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.cal-sheet { min-width: 860px; }
.cal-head,
.cal-body {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
}
.cal-head {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.cal-corner,
.cal-gutter {
  position: sticky;
  left: 0;
  background: var(--card);
}
.cal-corner { z-index: 5; }
.cal-gutter {
  z-index: 3;
  border-right: 1px solid var(--line);
}
.cal-head-days,
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-dayhead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 4px 10px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cal-dayhead b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.cal-dayhead.is-weekend span,
.cal-dayhead.is-weekend b {
  color: var(--muted);
}
.cal-dayhead.is-today {
  color: var(--brown-2);
}
.cal-dayhead.is-today b {
  background: var(--brown);
  color: #fff;
  box-shadow: 0 6px 14px rgba(225, 6, 0, 0.28);
}
.cal-gutter,
.cal-col {
  height: calc(24 * 52px);
}
.cal-hour {
  height: 52px;
  padding-right: 10px;
  text-align: right;
  font-size: 11px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: #8b90a0;
  transform: translateY(-8px);
}
.cal-hour:first-child {
  transform: none;
  padding-top: 6px;
}
.cal-col {
  position: relative;
  border-left: 1px solid var(--line);
  background-color: var(--card);
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 25px,
      rgba(148, 163, 184, 0.22) 25px,
      rgba(148, 163, 184, 0.22) 26px,
      transparent 26px,
      transparent 52px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 50px,
      rgba(148, 163, 184, 0.32) 50px,
      rgba(148, 163, 184, 0.32) 52px
    );
  cursor: pointer;
}
.cal-col.is-weekend {
  background-color: var(--beige);
}
.cal-col.is-today {
  background-color: rgba(225, 6, 0, 0.06);
}
.cal-col:hover {
  background-color: rgba(225, 6, 0, 0.08);
}
.cal-hover {
  position: absolute;
  left: 4px;
  right: 4px;
  z-index: 1;
  height: 52px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(225, 6, 0, 0.16);
  color: var(--brown-2);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}
.cal-event.is-drag {
  opacity: 0.55;
  cursor: grabbing;
}
.cal-now {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  height: 2px;
  background: #d4536a;
  pointer-events: none;
}
.cal-now::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d4536a;
}
.cal-event {
  position: absolute;
  z-index: 2;
  overflow: hidden;
  margin: 0;
  padding: 5px 8px;
  border: 0;
  border-left: 3px solid #3d3688;
  border-radius: 10px;
  background: linear-gradient(180deg, #7d75d6, #625bc0);
  color: #fff;
  text-align: left;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  box-shadow: 0 8px 16px rgba(87, 80, 176, 0.2);
  cursor: pointer;
}
.cal-event[data-color="blue"] { background: linear-gradient(180deg, #5b8def, #3d6fd4); border-left-color: #244e9e; box-shadow: 0 8px 16px rgba(61, 111, 212, 0.22); }
.cal-event[data-color="teal"] { background: linear-gradient(180deg, #3aabb8, #218e9c); border-left-color: #14616b; box-shadow: 0 8px 16px rgba(33, 142, 156, 0.22); }
.cal-event[data-color="green"] { background: linear-gradient(180deg, #4caf78, #2f8d58); border-left-color: #1d5e39; box-shadow: 0 8px 16px rgba(47, 141, 88, 0.22); }
.cal-event[data-color="amber"] { background: linear-gradient(180deg, #e0a43a, #c4841d); border-left-color: #8a5a0e; box-shadow: 0 8px 16px rgba(196, 132, 29, 0.22); }
.cal-event[data-color="rose"] { background: linear-gradient(180deg, #e07a90, #c4526c); border-left-color: #8d3148; box-shadow: 0 8px 16px rgba(196, 82, 108, 0.22); }
.cal-event[data-color="ink"] { background: linear-gradient(180deg, #6d7384, #4e5568); border-left-color: #2e3340; box-shadow: 0 8px 16px rgba(46, 51, 64, 0.22); }
.cal-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px;
}
.cal-swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px #d5dae6;
  cursor: pointer;
}
.cal-swatch.on {
  box-shadow: 0 0 0 2px var(--brown);
}
.cal-swatch[data-color="violet"] { background: #E10600; }
.cal-swatch[data-color="blue"] { background: #3d6fd4; }
.cal-swatch[data-color="teal"] { background: #218e9c; }
.cal-swatch[data-color="green"] { background: #2f8d58; }
.cal-swatch[data-color="amber"] { background: #c4841d; }
.cal-swatch[data-color="rose"] { background: #c4526c; }
.cal-swatch[data-color="ink"] { background: #4e5568; }
.cal-repeat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e4e8f1;
  border-radius: 16px;
  background: #f7f8fb;
}
.cal-repeat .check-row {
  border: 0;
  background: transparent;
  padding: 2px 4px;
}
.cal-days-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cal-days-pick[hidden] { display: none !important; }
.cal-days-pick label {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.cal-days-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cal-days-pick span {
  min-width: 42px;
  padding: 7px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #d5dae6;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.cal-days-pick label:has(input:checked) span {
  background: var(--brown);
  border-color: var(--brown);
  color: #fff;
}
.cal-times input[type="time"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
}
.cal-times input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  cursor: pointer;
}
.cal-event:hover {
  filter: brightness(1.06);
}
.cal-event .when {
  display: block;
  margin-bottom: 1px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.01em;
  opacity: 0.86;
}
.cal-event small {
  display: block;
  margin-top: 3px;
  font-weight: 500;
  white-space: pre-wrap;
  opacity: 0.92;
}
.cal-editor {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(28, 32, 48, 0.45);
}
.cal-editor[hidden] { display: none; }
.cal-editor-card {
  width: min(460px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 22px 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e4e8f1;
  box-shadow: 0 24px 60px rgba(21, 24, 33, 0.28);
}
.cal-editor-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -0.03em;
}
.cal-editor-card textarea { min-height: 96px; background: #fff; }
.cal-editor-card .field input { background: #fff; }
.cal-editor-card .field[hidden] { display: none !important; }
.cal-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cal-editor-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid #e4e8f1;
}
.cal-editor-danger,
.cal-editor-save {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.media-upload-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 4px;
  text-align: left;
}
.media-upload-bar .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  flex: 1 1 140px;
}
.media-upload-bar .field span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.media-upload-bar input,
.media-upload-bar select {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  padding: 9px 11px;
  font: inherit;
}
.goal-badge.late {
  background: rgba(196, 92, 92, 0.16);
  color: #9a3d3d;
}
.goal-badge.soon {
  background: rgba(201, 162, 39, 0.18);
  color: #8a6a12;
}
.pa-search-list a.on {
  background: #dde1ec;
}

/* Idées */
.idea-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.idea-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.idea-top { display: flex; gap: 12px; align-items: flex-start; }
.idea-vote {
  flex: 0 0 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  padding: 8px 6px;
  cursor: pointer;
}
.idea-vote b { font-size: 16px; }
.idea-vote span { font-size: 11px; color: var(--muted); }
.idea-vote.on {
  background: rgba(225, 6, 0, 0.14);
  border-color: rgba(225, 6, 0, 0.35);
  color: var(--brown-2);
}
.idea-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.idea-body strong { font-size: 15px; font-weight: 700; }
.idea-body p { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.4; }
.idea-body small { color: var(--muted); font-size: 11.5px; }
.idea-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.idea-card.status-done { opacity: 0.72; }
.idea-card.status-rejected { opacity: 0.55; }

/* Médias sélection / ZIP */
.media-select-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
}
.media-select-bar #zip-dl { margin-left: auto; }
.cut-studio {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cut-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.cut-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  max-width: 72ch;
}
.cut-prompt textarea,
.cut-readme textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
  min-height: 72px;
}
.cut-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}
.cut-row .field { min-width: 220px; flex: 1 1 220px; }
.cut-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  padding: 9px 11px;
  font: inherit;
}
.cut-jobs { display: flex; flex-direction: column; gap: 10px; }
.cut-job {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--field);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cut-job-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cut-job-top strong { font-size: 14px; }
.cut-status, .cut-meta {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--brown-2);
}
.cut-status.is-review { background: rgba(225, 6, 0, 0.16); }
.cut-status.is-error { background: rgba(196, 92, 92, 0.18); color: #9a3d3d; }
.cut-status.is-accepted { background: rgba(46, 140, 90, 0.18); color: #1d6b45; }
.cut-status.is-run { background: rgba(201, 162, 39, 0.18); color: #8a6a12; }
.cut-job p { margin: 0; font-size: 13px; line-height: 1.4; }
.cut-job .cut-note { color: var(--muted); }
.cut-picks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cut-picks li { font-size: 12.5px; }
.cut-picks small { color: var(--muted); }
.cut-job video {
  width: min(420px, 100%);
  max-height: 460px;
  border-radius: 12px;
  background: #0c0e14;
}
.cut-actions, .cut-readme-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cut-correct {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cut-correct input {
  flex: 1 1 220px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  padding: 9px 11px;
  font: inherit;
}
.cut-readme { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cut-readme span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.media-readme {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.media-readme.is-empty { font-style: italic; }
.media-select-bar[hidden] { display: none; }
.media-card.selected { outline: 2px solid var(--brown); outline-offset: 1px; }
.media-pick {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  width: 20px;
  height: 20px;
  accent-color: var(--brown);
}


.pa-search {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(28, 32, 48, 0.45);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: start center;
  padding: 12vh 16px 16px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.pa-search.in { opacity: 1; }
.pa-search[hidden] { display: none; }
.pa-search-card {
  width: min(560px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 20px 50px rgba(21, 24, 33, 0.22);
}
.pa-search-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #e9ebf3;
}
.pa-search-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 50vh;
  overflow: auto;
}
.pa-search-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}
.pa-search-list a:hover { background: #e9ebf3; }
.pa-search-list strong { font-size: 14px; }
.pa-search-list small { color: var(--muted); font-size: 11.5px; }
.pa-search-hint {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.team-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.team-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 12px;
  background: #e9ebf3;
}
.team-row span { color: var(--muted); font-size: 12.5px; }

.disc-offline-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8ece8;
  border: 1px solid #e5cfc6;
  color: #8a4b35;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.disc-offline-banner[hidden] { display: none; }
.disc-offline-banner strong { font-size: 14px; }
.disc-offline-banner span { font-size: 12.5px; line-height: 1.4; }
.disc-status.warn {
  background: #fff6e8;
  color: #8a6a12;
  border-color: #ead7a8;
}

body.todo-focus aside,
body.todo-focus #list,
body.todo-focus .stats,
body.todo-focus #nav,
body.todo-focus .spaces,
body.todo-focus .side-progress,
body.todo-focus .search,
body.todo-focus .new-folder {
  display: none !important;
}
body.todo-focus main {
  max-width: 720px;
  margin: 0 auto;
}
body.todo-focus #hero .hero {
  min-height: 40vh;
}

@media (max-width: 1100px) {
  body.planning-page .board-wrap { padding: 14px 12px 16px; }
  .plan-layout { grid-template-columns: 1fr; }
  .cal-scroll,
  .plan-today { height: auto; max-height: calc(100vh - 220px); }
  .plan-week { min-width: 0; }
}
@media (max-width: 720px) {
  .goal-grid,
  .media-grid,
  .idea-grid { grid-template-columns: 1fr; }
}

.publish-page .board-wrap { max-width: 1080px; }
.pub-accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 14px;
}
.pub-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: inherit;
  font: inherit;
  font-size: 13px;
}
button.pub-account { cursor: pointer; }
.pub-account strong { font-weight: 700; }
.pub-account span { color: var(--muted); }
.pub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c5cad6;
}
.pub-account.on .pub-dot { background: #2f9e62; }
.pub-note {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.pub-quota {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.pub-quota > div { display: inline-flex; align-items: center; gap: 8px; }
.pub-pips { display: inline-flex; gap: 4px; }
.pub-pips i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.pub-pips i.on { background: var(--brown); }
.pub-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.82fr);
  gap: 16px;
  align-items: start;
}
.pub-layout:has(.pub-form[hidden]) { grid-template-columns: 1fr; }
.pub-board,
.pub-form {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.pub-board { padding: 6px 8px 10px; min-height: 280px; }
.publish-page #list {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.pub-board-head,
.pub-form-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 4px;
}
.pub-board-head h2,
.pub-form-head h2 {
  margin: 0;
  font-size: 22px;
}
.pub-board-head span,
.pub-form-head span { color: var(--muted); font-size: 13px; font-weight: 700; }
.pub-empty {
  margin: 28px 12px;
  color: var(--muted);
}
.pub-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 4px 10px;
  padding: 12px;
  border-radius: 14px;
}
.pub-item + .pub-item { box-shadow: inset 0 1px 0 var(--line); }
.pub-item time {
  padding-top: 2px;
  color: var(--brown-2);
  font-weight: 700;
}
.pub-item.done time,
.pub-item.done h3 { opacity: 0.72; }
.pub-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pub-item h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.pub-item-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}
.pub-nets,
.pub-item-actions,
.pub-actions,
.pub-hours,
.pub-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pub-nets { margin-top: 6px; }
.pub-net {
  display: inline-flex;
  align-items: center;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
}
.pub-net.published { background: #d9f2e3; }
.pub-net.failed { background: #fde2e1; }
.pub-net.publishing { background: rgba(225, 6, 0, 0.14); }
.pub-problem {
  margin: 6px 0 0;
  color: #9b2c2c;
  font-size: 12.5px;
}
.pub-item-actions { margin-top: 8px; }
.pub-badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper);
  font-size: 11px;
  font-weight: 800;
}
.pub-badge.done { background: #d9f2e3; }
.pub-badge.failed,
.pub-badge.partial { background: #fde2e1; }
.pub-badge.publishing { background: rgba(225, 6, 0, 0.14); }
.pub-form {
  display: grid;
  gap: 12px;
  padding: 6px 14px 14px;
}
.pub-form[hidden] { display: none; }
.pub-form .field span { letter-spacing: 0; text-transform: none; }
.pub-when {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}
.pub-hours { margin-top: -4px; }
.pub-hours button,
.pub-picks button,
.pub-picks label {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--field);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.pub-hours button.on,
.pub-picks button.on,
.pub-picks label:has(input:checked) {
  border-color: transparent;
  background: var(--brown);
  color: #fff;
}
.pub-picks input { position: absolute; opacity: 0; pointer-events: none; }
.pub-picks label { position: relative; cursor: pointer; }
.pub-short {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.pub-file {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 88px;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--field);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.pub-file strong {
  color: var(--ink);
  font-size: 14px;
}
.pub-file[hidden] { display: none; }
.pub-form .pub-file input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.pub-preview {
  display: grid;
  gap: 8px;
}
.pub-preview[hidden] { display: none; }
.pub-preview video {
  width: 100%;
  max-height: 280px;
  border-radius: 14px;
  background: #12141c;
  object-fit: contain;
}
.pub-preview.is-short {
  justify-items: center;
}
.pub-preview.is-short video {
  width: min(220px, 72%);
  height: 390px;
  max-height: none;
  object-fit: cover;
  background: #000;
}
.pub-preview .staff-btn { justify-self: start; }
.pub-actions { justify-content: flex-end; align-items: center; }
.pub-watch {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 20, 28, 0.55);
  opacity: 0;
  transition: opacity 0.16s ease;
}
.pub-watch.in { opacity: 1; }
.pub-watch[hidden] { display: none; }
.pub-watch-card {
  width: min(720px, 100%);
  padding: 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.pub-watch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.pub-watch-head h3 { margin: 0; font-size: 16px; }
.pub-watch video {
  width: 100%;
  max-height: min(70vh, 520px);
  border-radius: 12px;
  background: #12141c;
}
@media (max-width: 860px) {
  .pub-layout { grid-template-columns: 1fr; }
  .pub-when { grid-template-columns: 1fr; }
}

html:not([data-theme="light"]) .soutien-kpis span,
html:not([data-theme="light"]) .soutien-card,
html:not([data-theme="light"]) .soutien-guild,
html:not([data-theme="light"]) .top-board li,
html:not([data-theme="light"]) .logs-status,
html:not([data-theme="light"]) .logs-kpi,
html:not([data-theme="light"]) .logs-console,
html:not([data-theme="light"]) .logs-panel,
html:not([data-theme="light"]) .plan-today-item,
html:not([data-theme="light"]) .cal-editor-card,
html:not([data-theme="light"]) .cal-editor-card textarea,
html:not([data-theme="light"]) .cal-editor-card .field input,
html:not([data-theme="light"]) .media-tools input,
html:not([data-theme="light"]) .media-tools select,
html:not([data-theme="light"]) .pa-search-card,
html:not([data-theme="light"]) .rule-list,
html:not([data-theme="light"]) .people,
html:not([data-theme="light"]) .feed,
html:not([data-theme="light"]) .staff-row {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line);
}
html:not([data-theme="light"]) .logs-views,
html:not([data-theme="light"]) .logs-toolbar,
html:not([data-theme="light"]) .log-card,
html:not([data-theme="light"]) .logs-empty,
html:not([data-theme="light"]) .top-board {
  background: var(--field);
  border-color: var(--line);
}
html:not([data-theme="light"]) .logs-search input,
html:not([data-theme="light"]) .logs-toolbar .field input,
html:not([data-theme="light"]) .staff-btn,
html:not([data-theme="light"]) .rights-check,
html:not([data-theme="light"]) .staff-form input,
html:not([data-theme="light"]) .staff-form select {
  background: var(--field);
  color: var(--ink);
  border-color: var(--line);
}
html:not([data-theme="light"]) .staff-row.open,
html:not([data-theme="light"]) .staff-row .rights-editor {
  background: var(--beige);
}
html:not([data-theme="light"]) .log-desc,
html:not([data-theme="light"]) .log-fields b {
  color: var(--ink);
}
html:not([data-theme="light"]) .log-desc {
  background: rgba(225, 6, 0, 0.12);
  border-color: rgba(61, 139, 255, 0.28);
}
html:not([data-theme="light"]) .logs-chip.is-on {
  background: var(--solid);
  color: var(--solid-text);
}
html:not([data-theme="light"]) .log-badge,
html:not([data-theme="light"]) .pub-net,
html:not([data-theme="light"]) .pub-badge {
  filter: none;
  background: var(--chip);
  color: var(--ink);
}
html:not([data-theme="light"]) .log-badge.src-bridge { background: #163224; color: #8ed4a8; }
html:not([data-theme="light"]) .log-badge.src-discord { background: #23285a; color: #9fd8ff; }
html:not([data-theme="light"]) .log-badge.src-bot { background: #3a3118; color: #e6c56a; }
html:not([data-theme="light"]) .log-badge.alert { background: #3a2a14; color: #e8b56a; }
html:not([data-theme="light"]) .logs-staff-item,
html:not([data-theme="light"]) .plan-today-item[data-color="ink"] { background: var(--beige); }
html:not([data-theme="light"]) .logs-staff-item:hover { background: var(--field); border-color: #4a5268; }
html:not([data-theme="light"]) .plan-today-item[data-color="blue"] { background: #1a2740; }
html:not([data-theme="light"]) .plan-today-item[data-color="teal"] { background: #163034; }
html:not([data-theme="light"]) .plan-today-item[data-color="green"] { background: #163024; }

.studio-wrap { max-width: 760px; }
.studio-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.studio-tabs .ghost {
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
}
.studio-tabs .ghost.on {
  background: rgba(225, 6, 0, 0.16);
  border-color: rgba(225, 6, 0, 0.4);
  color: var(--brown-2);
}
.studio-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.studio-card h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.studio-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.studio-card label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.studio-card label > :is(input, select, textarea) {
  color: var(--ink);
  font-weight: 650;
}
.studio-card textarea {
  min-height: 92px;
  resize: vertical;
  font-weight: 500;
  line-height: 1.45;
}
.studio-ytd {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--chip), transparent 80%);
}
.studio-ytd h2 { font-size: 18px; }
.studio-card .ghost,
.studio-card .do {
  width: fit-content;
  justify-self: start;
}
.studio-card input[type="file"] {
  min-height: 52px;
  display: flex;
  align-items: center;
  border-style: dashed;
  border-width: 1.5px;
  border-color: rgba(225, 6, 0, 0.4);
  background:
    linear-gradient(180deg, rgba(225, 6, 0, 0.12), transparent 72%),
    var(--field);
}
.studio-card input[type="file"]:hover {
  border-style: solid;
  border-color: var(--brown-2);
}
.studio-card select {
  min-height: 44px;
}
#ytd-preview {
  max-width: 180px;
  image-rendering: pixelated;
  border-radius: 10px;
  background:
    linear-gradient(45deg, #1a1f30 25%, transparent 25%),
    linear-gradient(-45deg, #1a1f30 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1a1f30 75%),
    linear-gradient(-45deg, transparent 75%, #1a1f30 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  border: 1px solid var(--line);
  padding: 6px;
}
#view-stage[hidden] { display: none; }
#view-stage:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  margin-top: 14px;
}
.view-canvas-wrap { display: grid; gap: 8px; }
#view-canvas {
  width: 100%;
  height: 480px;
  border-radius: 12px;
  background: #0a0c18;
  touch-action: none;
}
#view-note { margin: 0; color: var(--muted); font-size: 13px; }
.view-side { display: grid; align-content: start; gap: 8px; }
.view-side p {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
#view-thumbs {
  display: grid;
  gap: 8px;
  max-height: 480px;
  overflow: auto;
  padding-right: 2px;
}
.view-thumb {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  align-items: center;
  text-align: left;
  padding: 7px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.view-thumb:hover {
  border-color: rgba(225, 6, 0, 0.4);
  background: var(--chip);
}
.view-thumb img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #111;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.view-thumb span { font-size: 12px; word-break: break-all; font-weight: 650; }
.view-thumb.on {
  border-color: rgba(225, 6, 0, 0.55);
  background: rgba(225, 6, 0, 0.14);
  box-shadow: var(--focus);
}
@media (max-width: 800px) {
  #view-stage { grid-template-columns: 1fr; }
  #view-canvas { height: 320px; }
}
.studio-error { color: var(--danger); font-weight: 650; }
.studio-ok { color: var(--green); font-weight: 650; }
.studio-warn { color: #e0a24a; font-weight: 650; margin: 0; }
.studio-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-check {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink) !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.studio-ba {
  display: grid;
  grid-template-columns: 180px;
  gap: 10px;
}
.studio-ba figure { margin: 0; display: grid; gap: 6px; }
.studio-ba figcaption { font-size: 12px; font-weight: 700; color: var(--muted); }
.studio-ba img,
.studio-ba canvas {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--line);
  background:
    linear-gradient(45deg, #1a1f30 25%, transparent 25%),
    linear-gradient(-45deg, #1a1f30 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1a1f30 75%),
    linear-gradient(-45deg, transparent 75%, #1a1f30 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  touch-action: none;
}
.studio-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.studio-drop {
  margin: 14px 0 18px;
  padding: 22px 18px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 650;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.studio-drop.on {
  border-color: var(--brown);
  background: var(--hover-wash);
  color: var(--ink);
}
.studio-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.studio-presets .ghost { font-size: 12.5px; }
#ytd-batch {
  min-height: 110px;
}
.studio-paint {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.studio-paint-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.studio-paint-tools label { min-width: 120px; }
#paint-stage {
  overflow: auto;
  max-height: 70vh;
  min-height: 280px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background:
    linear-gradient(45deg, #1a1f30 25%, transparent 25%),
    linear-gradient(-45deg, #1a1f30 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1a1f30 75%),
    linear-gradient(-45deg, transparent 75%, #1a1f30 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-color: #12141c;
  touch-action: none;
}
#paint-stage[data-tool="hand"] #ytd-after,
#paint-stage[data-tool="hand"] { cursor: grab; }
#paint-sheet { position: relative; width: fit-content; min-width: 100%; }
#ytd-after,
#ytd-overlay {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
}
#ytd-overlay {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}
.studio-demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.studio-demo-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.studio-demo-card h2 {
  margin: 0 0 6px;
  font-size: 17px;
}
.studio-demo-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13.5px;
}
.studio-stream {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  word-break: break-all;
}
.studio-history {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.studio-history h2 { margin: 0 0 10px; font-size: 16px; }
.studio-history ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.studio-history li {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--field);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
html:not([data-theme="light"]) .plan-today-item[data-color="amber"] { background: #332818; }
html:not([data-theme="light"]) .plan-today-item[data-color="rose"] { background: #331c24; }
html:not([data-theme="light"]) .pa-search-list a:hover { background: var(--hover-wash); }
html:not([data-theme="light"]) .pub-net.failed,
html:not([data-theme="light"]) .pub-badge.partial { background: #3a1c1a; color: #f0b0aa; }
html:not([data-theme="light"]) .pub-net.publishing,
html:not([data-theme="light"]) .pub-badge.publishing { background: #0c1c3d; color: var(--brown-2); }

/* —— Dark : panneaux / empty / badges encore en clair —— */
html:not([data-theme="light"]) .plan-today,
html:not([data-theme="light"]) .cal-scroll,
html:not([data-theme="light"]) .cal-head,
html:not([data-theme="light"]) .cal-corner,
html:not([data-theme="light"]) .cal-gutter,
html:not([data-theme="light"]) .cal-col {
  background-color: var(--card);
  border-color: var(--line);
}
html:not([data-theme="light"]) .cal-col.is-weekend { background-color: var(--beige); }
html:not([data-theme="light"]) .cal-col.is-today { background-color: rgba(225, 6, 0, 0.08); }
html:not([data-theme="light"]) .cal-hour { color: var(--muted); }
html:not([data-theme="light"]) .pub-file,
html:not([data-theme="light"]) .media-drop,
html:not([data-theme="light"]) .gx-toolbar,
html:not([data-theme="light"]) .goal-card,
html:not([data-theme="light"]) .idea-card,
html:not([data-theme="light"]) .media-card,
html:not([data-theme="light"]) .cut-studio,
html:not([data-theme="light"]) .media-select-bar {
  background: var(--card);
  border-color: var(--line);
  box-shadow: none;
}
html:not([data-theme="light"]) .cut-status.is-error { color: #f0b0aa; }
html:not([data-theme="light"]) .cut-status.is-accepted { color: #8ed4a8; }
html:not([data-theme="light"]) .cut-status.is-run { color: #f0d48a; }
html:not([data-theme="light"]) .pub-file,
html:not([data-theme="light"]) .media-drop {
  background: var(--field);
}
html:not([data-theme="light"]) .pub-hours button,
html:not([data-theme="light"]) .pub-picks button,
html:not([data-theme="light"]) .pub-picks label,
html:not([data-theme="light"]) .idea-vote,
html:not([data-theme="light"]) .gx-chip:not(.on),
html:not([data-theme="light"]) .media-upload-bar input,
html:not([data-theme="light"]) .media-upload-bar select,
html:not([data-theme="light"]) .gx-toolbar input,
html:not([data-theme="light"]) .gx-toolbar select,
html:not([data-theme="light"]) .gx-toolbar textarea {
  background: var(--field);
  color: var(--ink);
  border-color: var(--line);
}
html:not([data-theme="light"]) .pub-badge.done { background: #163224; color: #8ed4a8; }
html:not([data-theme="light"]) .pub-badge.failed,
html:not([data-theme="light"]) .pub-badge.partial { background: #3a1c1a; color: #f0b0aa; }
html:not([data-theme="light"]) .pub-badge.publishing { background: #0c1c3d; color: #9fd8ff; }
html:not([data-theme="light"]) .logs-empty,
html:not([data-theme="light"]) .plan-today-empty,
html:not([data-theme="light"]) .pub-empty,
html:not([data-theme="light"]) .idea-grid:empty,
html:not([data-theme="light"]) [class*="empty"] {
  color: var(--muted);
}
html:not([data-theme="light"]) .studio-tabs .ghost.on {
  background: var(--brown);
  border-color: transparent;
  color: #fff;
}
html:not([data-theme="light"]) .pa-search-list a.on {
  background: var(--chip);
  color: var(--ink);
}

/* Réseaux, visibilité, créneaux : l’état choisi doit rester visible en sombre. */
#platforms.pub-picks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
#platforms.pub-picks label {
  width: 100%;
  justify-content: flex-start;
}
.pub-picks label,
.pub-hours button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
}
.pub-picks label i {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(148, 163, 184, 0.55);
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  flex: 0 0 auto;
  box-shadow: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pub-picks label:has(input:checked) i {
  border-color: #fff;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%230066ff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M3.6 8.15 6.45 11 12.4 4.85'/%3E%3C/svg%3E");
  box-shadow: none;
}
html:not([data-theme="light"]) .pub-picks label,
html:not([data-theme="light"]) .pub-hours button {
  background: #12161f;
  border-color: rgba(186, 198, 220, 0.38);
  color: var(--ink);
}
html:not([data-theme="light"]) .pub-picks label:hover,
html:not([data-theme="light"]) .pub-hours button:hover {
  border-color: rgba(61, 139, 255, 0.8);
  background: rgba(225, 6, 0, 0.1);
}
html:not([data-theme="light"]) .pub-hours button.on {
  background: #0066ff;
  border-color: #0066ff;
  color: #fff;
  box-shadow: none;
}
html:not([data-theme="light"]) .pub-picks label:has(input:checked) {
  color: #fff;
  box-shadow: none;
}
html:not([data-theme="light"]) .pub-picks label[data-net="youtube"]:has(input:checked) {
  background: rgba(255, 77, 77, 0.18);
  border-color: #ff6b6b;
}
html:not([data-theme="light"]) .pub-picks label[data-net="instagram"]:has(input:checked) {
  background: rgba(214, 72, 158, 0.2);
  border-color: #e86bb8;
}
html:not([data-theme="light"]) .pub-picks label[data-net="tiktok"]:has(input:checked) {
  background: rgba(255, 45, 45, 0.16);
  border-color: #3dceff;
}
.pub-picks.pub-seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(186, 198, 220, 0.34);
  border-radius: 14px;
  background: #12161f;
}
html:not([data-theme="light"]) .pub-picks.pub-seg button,
.pub-picks.pub-seg button {
  min-height: 38px;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}
html:not([data-theme="light"]) .pub-picks.pub-seg button:hover {
  background: rgba(225, 6, 0, 0.1);
  color: var(--ink);
}
html:not([data-theme="light"]) .pub-picks.pub-seg button.on,
.pub-picks.pub-seg button.on {
  background: #0066ff;
  color: #fff;
  border-color: transparent;
  box-shadow: none;
}
html[data-theme="light"] .pub-picks.pub-seg {
  background: var(--field);
  border-color: var(--line);
}
html[data-theme="light"] .pub-hours button.on,
html[data-theme="light"] .pub-picks label:has(input:checked) {
  background: rgba(225, 6, 0, 0.12);
  border-color: #0066ff;
  color: #06306e;
}

html:not([data-theme="light"]) .staff-btn.danger {
  color: #ffb4a8;
  background: rgba(255, 107, 107, 0.16);
  border-color: rgba(255, 107, 107, 0.4);
}
html:not([data-theme="light"]) .staff-btn.danger:hover {
  background: rgba(255, 107, 107, 0.28);
  border-color: rgba(255, 107, 107, 0.55);
}

html:not([data-theme="light"]) .media-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

@media (max-width: 720px) {
  .media-grid.portrait {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .media-drop.compact {
    align-items: stretch;
  }
}

