/* ───── Pod factory panel (27 Oct 2026, owner only; opened from the Cloud tab) ───── */
.fx-sheet { max-width: 860px !important; }
.fx-body h4 { margin: 18px 0 8px; }
.fx-body .tbl td small, .fx-tbl td small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; overflow-wrap: anywhere; }
.fx-body .tbl td small.cl-err { color: #b42318; }
.fx-tbl td { font-size: 13px; }
.fx-tbl code { font-size: 12px; white-space: nowrap; }
.fx-wave .fx-tbl td:nth-child(2) { white-space: nowrap; }
.fx-badrow td { background: #fff6f5; }
.fx-msg { margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 13.5px; font-weight: 500; }
.fx-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fx-card { border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; background: var(--surface); }
.fx-sub { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.fx-set { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; }
.fx-set label, .fx-roll label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; }
.fx-set input, .fx-roll input[type=number], .fx-roll select, .fx-cut input, .fx-bulk textarea {
  font: inherit; font-weight: 400; font-size: 16px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); min-width: 0; }
.fx-set input:focus, .fx-roll input:focus, .fx-roll select:focus, .fx-cut input:focus, .fx-bulk textarea:focus { outline: none; border-color: var(--accent); }
.fx-bulk { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.fx-bulk textarea { font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; line-height: 1.5; resize: vertical; width: 100%; box-sizing: border-box; }
.fx-file { cursor: pointer; display: inline-flex; align-items: center; }
.fx-check { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 8px; font-size: 13.5px; font-weight: 500 !important; margin: 12px 0 0; }
.fx-check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }
.fx-cut { display: flex; gap: 8px; } .fx-cut input { flex: 1; }
.fx-roll { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.fx-roll .fx-check, .fx-roll .note, .fx-roll .fx-row { grid-column: 1 / -1; margin: 0; }
.fx-rels { display: flex; flex-direction: column; gap: 10px; }
.fx-rel { border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; }
.fx-rel p { margin: 6px 0; font-size: 13.5px; }
.fx-relhd { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .fx-relhd small { color: var(--muted); font-size: 12px; flex-basis: 100%; }
.fx-wave { margin-top: 10px; } .fx-wavehd { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.fx-bar { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; margin: 10px 0 4px; } .fx-bar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.fx-once { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #fff4e5; color: #6b3d00; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.fx-once a { text-decoration: none; }
.fx-pend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.fx-link { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; padding: 0; }
.fx-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fx-times { min-width: 760px; } .fx-times th { white-space: nowrap; }
.fx-hooks { display: flex; flex-direction: column; gap: 8px; }
.fx-hook { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.fx-hook code { overflow-wrap: anywhere; font-size: 12.5px; } .fx-hook small { color: var(--muted); font-size: 12px; }
.fx-body .note code { overflow-wrap: anywhere; }
/* Cloud tab additions */
.cl-hero .cl-hbtns { display: flex; gap: 8px; flex: none; }
.cl-hero .cl-btn.fx-open { background: transparent; color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 55%, transparent); }
.cl-rel { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; vertical-align: 1px; }
.banner.warn { background: #fff4e5; border-color: #f3d19c; color: #6b3d00; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.kpi.fx-cap { cursor: pointer; } .kpi.fx-cap:hover { border-color: var(--accent); }
@media (max-width: 600px) {
  .fx-roll { grid-template-columns: 1fr; }
  .fx-cut { flex-direction: column; }
  .fx-body .tbl { font-size: 12.5px; }
  .fx-tbl th:nth-child(4), .fx-tbl td:nth-child(4) { display: none; }
  .fx-times th:nth-child(4), .fx-times td:nth-child(4) { display: table-cell; }
  .cl-hero { flex-wrap: wrap; } .cl-hero .cl-hbtns { width: 100%; } .cl-hero .cl-hbtns .cl-btn { flex: 1; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fx-badrow td { background: #2c1214; }
  :root:not([data-theme="light"]) .fx-once, :root:not([data-theme="light"]) .banner.warn { background: #3a2a10; color: #f5c46b; border-color: #5c4318; }
}
:root[data-theme="dark"] .fx-badrow td { background: #2c1214; }
:root[data-theme="dark"] .fx-once, :root[data-theme="dark"] .banner.warn { background: #3a2a10; color: #f5c46b; border-color: #5c4318; }

/* ───── Desktop (28 Oct 2026): the factory is a wider right-hand drawer (its tables need the room); dense tables,
   settings in a row. Below 1024px is untouched. ───── */
@media (min-width: 1024px) {
  .cl-sheet.cl-wide.fx-sheet { width: min(940px, 72vw); }
  .fx-body .tbl th, .fx-tbl th { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 6px 8px 6px 0; }
  .fx-body .tbl td, .fx-tbl td { padding: 6px 8px 6px 0; }
  .fx-body .tbl tr:hover td { background: var(--bg); }
  .fx-body .tbl tr.fx-badrow:hover td { background: #fff6f5; }
  .fx-set { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .fx-roll { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fx-bulk textarea { min-height: 180px; }
  .fx-rel:hover, .fx-hook:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); }
  .fx-times { min-width: 0; }
  .fx-link:hover { text-decoration-thickness: 2px; }
}
@media (min-width: 1024px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fx-body .tbl tr.fx-badrow:hover td { background: #2c1214; }
}
