@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #0b0d11;
  --bg-2: #12151c;
  --card: #181c25;
  --card-2: #1e2430;
  --line: #2b3240;
  --text: #eef1f6;
  --muted: #8b93a7;
  --dim: #5c6478;
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.14);
  --warn: #fbbf24;
  --warn-dim: rgba(251, 191, 36, 0.12);
  --fill: #7dd3fc;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.top-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex-wrap: wrap; }
h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.range { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.count {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.count.full { color: var(--warn); }
.progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: #0f131a;
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2dd4bf, #5eead4);
  transition: width 0.25s ease;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.ideas {
  overflow: auto;
  padding: 18px 22px 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  align-content: start;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 16px 12px;
  min-width: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.post-day {
  flex: 0 0 18px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 700 11px/18px "IBM Plex Sans", sans-serif;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-align: center;
  width: 100%;
  min-width: 0;
  margin: 0 0 4px;
}
.post-day:empty {
  display: none;
  height: 0;
  min-height: 0;
  max-height: 0;
  flex: 0 0 0;
  margin: 0;
}
.card.pending { opacity: 0.92; }
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
  height: 80px;
  min-height: 80px;
  max-height: 80px;
  overflow: hidden;
  flex: 0 0 80px;
}
.thumb-link {
  display: block;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 10px;
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: #0e1117;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.thumb-link:hover .thumb { border-color: var(--accent); }
.thumb.missing {
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 11px;
}
.card-title {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  max-height: 100%;
}
.card-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  height: 2.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  word-break: break-word;
}
.badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.badge.ready { color: var(--accent); }
.badge.more { color: var(--warn); }

.rendering {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.render-secs {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.render-msg {
  color: var(--muted);
  font-size: 13px;
}
.render-sub {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  max-width: 90%;
  opacity: 0.9;
}
.rendering.img-loading {
  z-index: 2;
  background: #0a0c10;
}
.rendering.on-preview {
  z-index: 2;
  justify-content: flex-end;
  background: linear-gradient(transparent 40%, rgba(10, 12, 16, 0.78));
  pointer-events: none;
}
.rendering.on-preview .render-msg {
  color: #fff;
  font-weight: 600;
}
.rendering.modeling-timer,
.rendering.on-preview.modeling-timer {
  background: transparent;
  justify-content: flex-end;
  padding-bottom: 10px;
}
.rendering.modeling-timer .render-secs,
.rendering.on-preview.modeling-timer .render-secs {
  color: #000;
}

.empty-ideas { grid-column: 1 / -1; }

.sheet-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  flex: 0 0 auto;
  overflow: hidden;
}
.sheet-wrap.multi {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.sheet-block { margin: 0; min-width: 0; width: 100%; }
.sheet-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 6px 2px;
  letter-spacing: 0.02em;
}
.sheet-frame {
  position: relative;
  width: 100%;
  min-width: 0;
  background: #0a0c10;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 1;
}
.sheet-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sheet-frame.cell-zoom img {
  position: absolute;
  width: 300%;
  height: 300%;
  max-width: none;
  object-fit: fill;
}
.sheet-frame.empty {
  min-height: 0;
  aspect-ratio: 1;
}
.cells {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  pointer-events: auto;
}
.cells button {
  appearance: none;
  background: transparent;
  border: 2px solid transparent;
  color: transparent;
  font: 700 22px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
  padding: 0;
  text-shadow: none;
}
.cells button:hover {
  background: var(--accent-dim);
  color: transparent;
  text-shadow: none;
}
.cells button.picked {
  box-shadow: inset 0 0 0 3px var(--accent);
  border-color: transparent;
  background: rgba(94, 234, 212, 0.07);
  color: transparent;
}
.cells button.picked:hover { color: transparent; }
.cells button.checked::after {
  content: "✓";
  color: #5eead4;
  font: 700 28px/1 "IBM Plex Sans", sans-serif;
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}
.cells button.checked,
.cells button.checked:hover,
.cells button.checked:disabled {
  color: transparent;
  cursor: default;
  background: transparent;
  box-shadow: none;
}
.created-name {
  cursor: text;
}
.created-name-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 2px 6px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text);
  background: #141820;
  border: 1px solid var(--accent);
  border-radius: 6px;
  outline: none;
}
.card.created .card-title h2.created-name {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  height: auto;
  min-height: 1.25em;
}

.more-btn {
  appearance: none;
  margin-top: 10px;
  width: 100%;
  background: transparent;
  color: var(--text);
  border: 1px dashed #3a4356;
  border-radius: 8px;
  padding: 8px 12px;
  font: 600 13px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.more-btn:hover { border-color: var(--accent); color: var(--accent); }
.more-btn[disabled] {
  cursor: default;
  color: var(--warn);
  border-style: solid;
  border-color: #5b4a1f;
  background: var(--warn-dim);
}

.empty-ideas {
  color: var(--muted);
  padding: 40px 8px;
  text-align: center;
}

.sidebar {
  overflow: auto;
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  padding: 10px 10px 28px;
}
.day {
  margin-bottom: 12px;
}
.day h3 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 0 6px;
  padding: 8px 8px 6px;
  background: var(--bg-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.slot {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 28px;
  padding: 5px 8px;
  margin: 0 0 3px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.slot.empty { color: var(--dim); }
.slot.filled {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  background: var(--card);
  border-color: var(--line);
  cursor: pointer;
  color: var(--text);
}
.slot.filled:hover {
  border-color: #f87171;
  background: #2a1b1d;
}
.slot .t {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
}
.slot.filled .t { color: var(--fill); }
.slot .n {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 550;
}
.slot .c {
  font-size: 11px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .layout { display: block; height: auto; }
  .sidebar { border-left: 0; border-top: 1px solid var(--line); }
}

.tag-hot {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: #facc15;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.tag-hot:hover { text-decoration: underline; }
.tag-row.flash {
  outline: 2px solid #facc15;
  outline-offset: 1px;
}
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex: 0 0 40px;
  min-height: 40px;
  max-height: 40px;
  align-items: stretch;
}
.card-actions .more-btn,
.card-actions .deny-btn,
.card-actions .queue-btn {
  flex: 1;
  width: auto;
  margin-top: 0;
  height: 100%;
  min-height: 0;
}
.card.created .card-actions {
  max-height: none;
  height: auto;
  flex: 0 0 auto;
}
.card.created .card-actions .more-btn {
  font-size: 12px;
  padding: 8px 10px;
  white-space: nowrap;
}
.deny-btn {
  appearance: none;
  background: transparent;
  color: #fca5a5;
  border: 1px solid #7f1d1d;
  border-radius: 8px;
  padding: 8px 12px;
  font: 600 13px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.deny-btn:hover {
  border-color: #f87171;
  color: #fecaca;
  background: #2a1b1d;
}
.queue-btn {
  appearance: none;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
  font: 600 13px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.queue-btn:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}
.side-empty {
  color: var(--muted);
  padding: 16px 10px;
  font-size: 13px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 8px;
}
.tab {
  appearance: none;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 9px;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.tab.on {
  color: var(--text);
  background: var(--card);
  border-color: var(--line);
}
.tab:hover { color: var(--text); }
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  flex-shrink: 0;
}
.pager button {
  appearance: none;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  font: 600 13px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.pager button:disabled {
  opacity: 0.4;
  cursor: default;
}
.pager span { color: var(--muted); font-variant-numeric: tabular-nums; }
.card.archive .sheet-frame { max-width: 100%; }

.card.archive .post-day {
  padding: 0;
}

.ideas.tag-mode {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-content: stretch;
}
.tag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 0;
}
.tag-word {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag-n {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  white-space: nowrap;
}
.tag-slash {
  color: var(--muted);
  opacity: 0.55;
}
.tag-minus {
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: #f87171;
  font: 700 18px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.tag-minus:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: #f87171;
}

.tag-row.excluded {
  background: rgba(248, 113, 113, 0.16);
  border-color: #f87171;
}
.tag-row.excluded .tag-word { color: #fecaca; }
.tag-row.excluded .tag-minus {
  background: rgba(248, 113, 113, 0.22);
  border-color: #f87171;
  color: #fecaca;
}

a.more-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}
a.more-btn:hover { color: var(--accent); }

.slot-sheet {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #0e1117;
  border: 1px solid var(--line);
}
.slot-sheet img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slot-cells {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  pointer-events: none;
}
.slot-cells span.on {
  box-shadow: inset 0 0 0 2px var(--accent);
  background: rgba(94, 234, 212, 0.12);
}
.slot.filled .n, .slot.filled .c { padding: 0 2px; }

.empty-ideas .next-page-btn {
  width: auto;
  min-width: 180px;
  margin-top: 16px;
}

.zoom-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 6;
  pointer-events: auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(238, 241, 246, 0.22);
  background: rgba(11, 13, 17, 0.72);
  color: #eef1f6;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.zoom-btn:hover {
  background: rgba(18, 21, 28, 0.92);
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}
.lightbox.on {
  display: block;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}
.lightbox-inner {
  position: absolute;
  inset: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}
.lightbox-inner img {
  pointer-events: auto;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.lightbox-model {
  pointer-events: none;
  flex-shrink: 0;
  background: rgba(18, 21, 28, 0.92);
  color: var(--fill);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  font: 650 14px/1 "IBM Plex Sans", sans-serif;
  letter-spacing: -0.01em;
}
.lightbox-model[hidden] { display: none; }
.lightbox-catalog {
  pointer-events: auto;
  width: auto;
  margin-top: 0;
  flex-shrink: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lightbox-catalog[hidden] {
  display: none !important;
}
.lightbox-close {
  pointer-events: auto;
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(238, 241, 246, 0.22);
  background: rgba(11, 13, 17, 0.8);
  color: #eef1f6;
  font: 700 22px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sidebar, #sidebar { display: none; }

.subbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  flex-shrink: 0;
  min-height: 42px;
}
.subbar[hidden] { display: none; }
.sub-btn {
  appearance: none;
  width: auto;
  flex: 0 0 auto;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
}
.sub-btn:hover { border-color: var(--accent); color: var(--accent); }
.sub-btn.on {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.sub-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.sub-right {
  margin-left: auto;
}
.sub-hint {
  color: var(--muted);
  font-size: 12px;
}
.card.swap-a {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sheet-frame .slot-cells {
  z-index: 1;
}
.created-date {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.card.created .thumb[data-act="zoom"],
.created-thumb {
  cursor: pointer;
}
.card.created .thumb[data-act="zoom"]:hover {
  border-color: var(--accent);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}
#token-box { display: none !important; }
.other-box,
.token-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  font: 700 18px/1 "IBM Plex Sans", sans-serif;
  letter-spacing: -0.02em;
  min-width: 120px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.other-box { cursor: pointer; color: var(--fill); flex-direction: column; gap: 2px; padding: 8px 12px; min-width: 108px; }
.other-box:hover { border-color: var(--fill); }
.other-box .box-kicker {
  font: 650 10px/1 "IBM Plex Sans", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.other-box .box-val { color: var(--fill); }
#cursor-box .box-val { color: var(--text); }
#disk-box { cursor: default; min-width: 132px; }
#disk-box .box-val { color: var(--text); }
#disk-box.low {
  border-color: #5b4a1f;
  background: var(--warn-dim);
}
#disk-box.low .box-val { color: var(--warn); }

.token-box .token-spend { color: #facc15; }
.token-box .token-have {
  color: var(--muted);
  font-weight: 650;
}
.token-box.low .token-spend {
  color: var(--warn);
}
.token-box.low {
  border-color: #5b4a1f;
  background: var(--warn-dim);
}
.queue-box {
  appearance: none;
  flex-shrink: 0;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 18px;
  font: 700 18px/1 "IBM Plex Sans", sans-serif;
  letter-spacing: -0.02em;
  cursor: pointer;
  min-width: 200px;
  text-align: center;
  white-space: nowrap;
}
.queue-box:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.queue-box.on {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.card-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  line-height: 16px;
  height: 16px;
  min-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sub-select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 12px;
  font: 600 12px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
  height: 32px;
}
.sub-select:hover { border-color: var(--accent); color: var(--accent); }
.sub-select:disabled,
.sub-select.disabled {
  opacity: 0.45;
  cursor: default;
  color: var(--muted);
}
.sub-select option {
  background: var(--card);
  color: var(--text);
}
#filter-image-model,
#filter-isolate-model {
  min-width: 240px;
  max-width: 360px;
}
#filter-mesh-model {
  min-width: 160px;
  max-width: 240px;
}
#filter-image-model optgroup,
#filter-isolate-model optgroup {
  font-weight: 700;
  color: var(--muted);
}


.modifybox-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 48px 22px 22px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.modify-preview {
  width: 100%;
}
.modify-preview .sheet-frame {
  max-width: 520px;
  margin: 0 auto;
}
#modify-prompt {
  display: block;
  width: 100%;
  margin-top: 14px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: 14px/1.4 "IBM Plex Sans", sans-serif;
  resize: vertical;
  min-height: 72px;
}
.modify-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
  align-items: center;
}
#modify-image-model {
  min-width: 240px;
  max-width: 360px;
  flex: 1 1 auto;
  margin-right: auto;
}
.modify-actions .sub-btn {
  min-width: 110px;
}
.modify-actions .sub-btn[disabled] {
  opacity: 0.45;
  cursor: default;
}
.modifybox .lightbox-close {
  top: 12px;
  right: 12px;
}

.tag-add {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.tag-add input {
  width: 200px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font: 13px/1.2 "IBM Plex Sans", sans-serif;
}
.tag-add input:focus {
  outline: none;
  border-color: var(--accent);
}
.tag-add input::placeholder { color: var(--dim); }

.more-btn:disabled {
  opacity: 0.85;
  cursor: default;
}
.card.archive .more-btn:disabled {
  border-color: var(--accent);
  color: var(--accent);
}

.zoom-info {
  margin-top: 14px;
  width: 100%;
}
.zoom-info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font: 14px/1.35 "IBM Plex Sans", sans-serif;
}
.zoom-info-row:last-child { border-bottom: 0; }
.zoom-k {
  color: var(--muted);
  font-weight: 650;
  flex-shrink: 0;
}
.zoom-v {
  color: var(--text);
  font-weight: 650;
  text-align: right;
  overflow-wrap: anywhere;
}

#zoom-cells {
  z-index: 3;
}
#zoom-cells button,
#zoom-cells button:hover,
#zoom-cells button.picked {
  color: transparent;
  font-size: 0;
}

.zoom-preview {
  position: relative;
}
.zoom-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
  width: 64px;
  height: auto;
  border-radius: 0;
  border: 0;
  background: rgba(12, 14, 18, 0.28);
  color: var(--text);
  font: 48px/1 "IBM Plex Sans", sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.zoom-nav:hover {
  background: rgba(12, 14, 18, 0.55);
  color: var(--accent);
}
.zoom-prev { left: 0; }
.zoom-next { right: 0; }
.zoom-nav[hidden] { display: none; }

.modify-actions a.sub-btn {
  text-decoration: none;
  box-sizing: border-box;
}

.modify-actions .queue-btn:disabled {
  opacity: 0.45;
  cursor: default;
}


.cells {
  z-index: 5;
}
.cells button {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: auto;
}
.sheet-frame > img {
  pointer-events: none;
}
.sheet-frame img[data-act] {
  pointer-events: auto;
}
.rendering.img-loading {
  pointer-events: none;
}
.zoom-file-link {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 650;
  text-align: right;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}
.zoom-file-link:hover {
  color: var(--fill);
}
#lightbox-info[hidden] {
  display: none !important;
}
.filebox {
  z-index: 90;
}
#zoom-cancel {
  margin-right: auto;
}
#zoom-cancel[hidden] {
  display: none !important;
}
.modify-actions .deny-btn {
  min-width: 110px;
}
.confirmbox {
  z-index: 100;
}
.confirmbox-panel {
  width: min(420px, calc(100vw - 48px));
  padding: 40px 22px 22px;
}
.confirm-title {
  margin: 0 0 8px;
  font: 700 18px/1.25 "IBM Plex Sans", sans-serif;
  color: var(--text);
}
.confirm-copy {
  margin: 0 0 18px;
  color: var(--muted);
  font: 14px/1.45 "IBM Plex Sans", sans-serif;
}

