/* ————— Page & section headers ————— */

.page {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 6px;
}

.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.page-heading {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--text);
}

.page-lead {
  max-width: 64ch;
  font-size: 14.5px;
  color: var(--text-2);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-head__sub {
  font-size: 12.5px;
  color: var(--text-3);
}

.section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ————— Cards ————— */

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 12px;
  box-shadow: var(--shadow-1);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.card--hover:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.card--glass {
  background: rgba(23, 23, 27, 0.6);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-head h2 {
  font-size: 15.5px;
  font-weight: 600;
}

.card-head h3 {
  font-size: 14px;
  font-weight: 600;
}

.card-text {
  font-size: 13.5px;
  color: var(--text-2);
}

/* ————— Badges & chips ————— */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge--online {
  color: var(--accent);
  background: var(--accent-dim);
}

.badge--standby {
  color: var(--amber);
  background: var(--amber-dim);
}

.badge--offline {
  color: var(--red);
  background: var(--red-dim);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.status-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseDot 2.6s ease-out infinite;
}

.status-chip--online {
  color: var(--text);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  white-space: nowrap;
}

.chip::before {
  content: "·";
  color: var(--text-4);
}

.chip--accent {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-faint);
}

.chip--accent::before {
  color: var(--accent);
  opacity: 0.6;
}

/* ————— Buttons ————— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-s);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  background: var(--surface-2);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.btn--primary {
  color: #04170a;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--primary:hover {
  color: #04170a;
  background: linear-gradient(180deg, #9bf7a7, var(--accent));
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-2);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.btn.selected,
.btn.is-selected,
.btn--ghost.selected,
.btn--ghost.is-selected {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--text);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn--sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

/* ————— Icon button (topbar / dialog close) ————— */

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-s);
  color: var(--text-2);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ————— Stats / KPI ————— */

.stat {
  padding: 18px 20px;
}

.stat__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}

.stat__value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
  word-break: break-word;
}

.stat__value--accent {
  color: var(--accent);
}

.stat__sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
}

/* ————— Grids ————— */

.grid {
  display: grid;
  gap: 16px;
}

.grid--stats {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.grid--cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--list {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ————— Detail rows ————— */

.detail-list {
  display: flex;
  flex-direction: column;
}

.detail-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-faint);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-row dt {
  font-size: 13px;
  color: var(--text-3);
}

.detail-row dd {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text);
  text-align: right;
  word-break: break-word;
  max-width: 60%;
}

/* ————— Progress bars ————— */

.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width var(--dur-slow) var(--ease);
}

.bar__fill--warn {
  background: linear-gradient(90deg, #b98f2e, var(--amber));
  box-shadow: 0 0 10px rgba(232, 196, 104, 0.3);
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-faint);
}

.bar-row:last-child {
  border-bottom: 0;
}

.bar-row__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.bar-row__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-row__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

/* ————— Service cards ————— */

.service-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.service-card__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-s);
  background: var(--accent-faint);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  flex: none;
}

.service-card__icon svg {
  width: 18px;
  height: 18px;
}

.service-card h3 {
  font-size: 14.5px;
  font-weight: 600;
}

.service-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.service-card p {
  font-size: 13px;
  color: var(--text-2);
}

/* ————— Forms ————— */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.input {
  width: 100%;
  padding: 2px 0px;
  text-align: center;
  border-radius: var(--radius-s);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.input:focus,
.input.is-dragover {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}

.input.is-dragover {
  background: var(--surface-2);
  border-style: dashed;
  box-shadow: 0 0 0 3px var(--accent-faint), 0 0 12px var(--accent-glow);
}

.field.is-dragover > label {
  color: var(--accent);
}

.field.is-dragover > .input {
  border-color: var(--accent);
  background: var(--surface-2);
  border-style: dashed;
  box-shadow: 0 0 0 3px var(--accent-faint), 0 0 12px var(--accent-glow);
}

.input::placeholder {
  color: var(--text-4);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form-note {
  font-size: 12px;
  color: var(--text-3);
}

/* ————— Switch ————— */

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__track {
  width: 40px;
  height: 23px;
  flex: none;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  position: relative;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #8b8b93;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.switch input:checked + .switch__track {
  background: var(--accent);
  border-color: var(--accent);
}

.switch input:checked + .switch__track::after {
  transform: translateX(17px);
  background: #0c1f10;
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.switch__label {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
}

.switch__hint {
  font-size: 12px;
  color: var(--text-3);
}

/* ————— Empty state ————— */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 56px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-l);
  background: radial-gradient(80% 60% at 50% 0%, var(--accent-faint), transparent 70%), var(--bg-elevated);
}

.empty__art {
  width: 84px;
  height: 84px;
  margin-bottom: 12px;
  color: var(--text-4);
}

.empty__art svg {
  width: 100%;
  height: 100%;
}

.empty h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.empty p {
  max-width: 46ch;
  font-size: 13.5px;
  color: var(--text-3);
  margin-bottom: 6px;
}

.empty__actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ————— Log terminal ————— */

.terminal {
  background: #0a0c0a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-faint);
  background: var(--surface);
}

.terminal__bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal__bar .dot--g {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.terminal__bar .dot--a {
  background: #3a3a40;
}

.terminal__bar .dot--b {
  background: #2a2a2e;
}

.terminal__bar .title {
  margin-left: 8px;
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.log-list {
  max-height: 460px;
  overflow-y: auto;
  padding: 8px 0;
  font-size: 12.5px;
  line-height: 1.75;
}

.log-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 2px 16px;
  white-space: nowrap;
}

.log-line:hover {
  background: var(--surface-2);
}

.log-line__time {
  color: var(--text-4);
  flex: none;
}

.log-line__level {
  flex: none;
  min-width: 38px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.log-line--info .log-line__level {
  color: var(--accent);
}

.log-line--warn .log-line__level {
  color: var(--amber);
}

.log-line--error .log-line__level {
  color: var(--red);
}

.log-line__body {
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-line--warn .log-line__body {
  color: var(--amber);
}

.log-line--error .log-line__body {
  color: var(--red);
}

/* ————— Callout / note ————— */

.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--accent-dim);
  background: var(--accent-faint);
}

.callout svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--accent);
  margin-top: 2px;
}

.callout p {
  font-size: 13px;
  color: var(--text-2);
}

.callout p strong {
  color: var(--text);
  font-weight: 600;
}

/* ————— Code block (deploy guide) ————— */

.code-block {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
  background: #0a0c0a;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre;
}

.code-block .cmt {
  color: var(--text-4);
}

/* ————— Details (collapsible) ————— */

details.guide {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

details.guide > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}

details.guide > summary::-webkit-details-marker {
  display: none;
}

details.guide > summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 1.6px solid var(--text-3);
  border-bottom: 1.6px solid var(--text-3);
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
}

details.guide[open] > summary::after {
  transform: rotate(-135deg);
}

details.guide > summary:hover {
  background: var(--surface-2);
}

details.guide > .guide__body {
  padding: 2px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ————— Check steps ————— */

.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step {
  display: flex;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.step__num {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-faint);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 2px;
}

/* ————— Callout grid (security) ————— */

.mini-feature {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-faint);
}

.mini-feature:last-child {
  border-bottom: 0;
}

.mini-feature__icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-s);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
}

.mini-feature__icon svg {
  width: 17px;
  height: 17px;
}

.mini-feature h3 {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.mini-feature p {
  font-size: 12.5px;
  color: var(--text-3);
}

/* ————— Hero (home) ————— */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(40px, 7vw, 80px) 0 28px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 420px;
  background:
    radial-gradient(42% 55% at 22% 12%, rgba(110, 231, 126, 0.10), transparent 70%),
    radial-gradient(50% 60% at 85% 8%, rgba(255, 255, 255, 0.04), transparent 70%);
  pointer-events: none;
}

.hero__tag {
  align-self: flex-start;
}

.hero h1 {
  position: relative;
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.04;
  max-width: 18ch;
}

.hero h1 .accent-word {
  color: var(--accent);
}

.hero__lead {
  position: relative;
  max-width: 58ch;
  font-size: 16px;
  color: var(--text-2);
}

.hero__actions {
  position: relative;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.hero__meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* ————— Clip cards ————— */

.clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.clip-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.clip-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(90% 130% at 50% 0%, var(--surface-3), var(--bg-elevated));
  overflow: hidden;
}

.clip-card__thumb svg {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 42px;
  height: 42px;
  color: var(--text-4);
}

.clip-card__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(11, 11, 13, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border-strong);
  color: var(--text);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.clip-card__play svg {
  width: 20px;
  height: 20px;
  margin: 0;
  position: static;
  color: inherit;
}

.clip-card:hover .clip-card__play,
.clip-card:focus-within .clip-card__play {
  opacity: 1;
  transform: none;
}

.clip-card__play:hover {
  background: var(--accent);
  color: #04170a;
}

.clip-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
}

.clip-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.clip-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--text-3);
}

.clip-card__meta .sep {
  color: var(--text-4);
}

/* ————— Post cards & Gallery (Generic across Art, Weebshit, Blog, Clips, Music, Games) ————— */

.new-post-card {
  margin-bottom: 20px;
}

.section-dropzone,
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-m);
  padding: 24px;
  text-align: center;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.section-dropzone:hover,
.section-dropzone:focus-visible,
.section-dropzone.is-dragover,
.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--surface-2);
  outline: none;
}

.section-dropzone__content svg,
.dropzone__content svg {
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  color: var(--text-3);
  display: block;
}

.section-dropzone__content p,
.dropzone__content p {
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 4px;
}

.section-dropzone__hint,
.dropzone__hint {
  font-size: 12px;
  color: var(--text-3);
}

.section-previews,
.art-previews {
  margin-top: 12px;
}

.section-previews__head,
.art-previews__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}

.section-previews__list,
.art-previews__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.section-preview-item,
.art-preview-item {
  position: relative;
  border-radius: var(--radius-s);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  aspect-ratio: 1 / 1;
}

.section-preview-item img,
.section-preview-item video,
.art-preview-item img,
.art-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-preview-item__remove,
.art-preview-item__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color var(--dur) var(--ease);
}

.section-preview-item__remove svg,
.preview-item__remove svg {
  width: 12px;
  height: 12px;
}

.sec-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
}

.section-card,
.sec-card,
.section-post {
  overflow: hidden;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.section-card:hover,
.sec-card:hover,
.section-post:hover {
  border-color: var(--border-strong);
}

.section-post__header,
.section-card__body,
.sec-card__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-post__info,
.section-card__info,
.sec-card__info {
  min-width: 0;
  flex: 1;
}

.section-post__title,
.section-card__title,
.sec-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 6px;
  word-break: break-word;
}

.section-post__meta,
.section-card__meta,
.sec-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
  flex-wrap: wrap;
}

.section-post__author,
.section-card__by,
.sec-card__by {
  color: var(--text-2);
  font-weight: 500;
}

.section-post__flow {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 4px;
}

.section-post__text-block {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
}

.section-post__media-block {
  width: 100%;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border-subtle);
}

.section-post__img {
  width: 100%;
  height: auto;
  max-height: 720px;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-m);
}

.section-post__video {
  width: 100%;
  max-height: 720px;
  border-radius: var(--radius-m);
  display: block;
  outline: none;
  background: #000;
}

/* ————— Flow Builder (Text & Media vertical sequence) ————— */
.flow-builder {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.flow-builder__bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.flow-builder__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.flow-block {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--dur) var(--ease);
}

.flow-block:focus-within {
  border-color: var(--accent);
}

.flow-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flow-block__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
  background: var(--surface-3);
  padding: 3px 8px;
  border-radius: 4px;
}

.flow-block__actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.flow-block__btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  padding: 5px 7px;
  border-radius: var(--radius-s);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.flow-block__btn:hover {
  color: var(--text);
  background: var(--surface-3);
}

.flow-block__btn--remove:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

.flow-block__btn svg {
  width: 14px;
  height: 14px;
}

.flow-block__textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
  line-height: 1.5;
}

.flow-block__media-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-3);
  padding: 8px 12px;
  border-radius: var(--radius-s);
}

.flow-block__media-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  flex: none;
  background: #000;
}

.flow-block__media-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flow-block__media-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-block__media-meta {
  font-size: 11.5px;
  color: var(--text-3);
}

.flow-builder__empty {
  text-align: center;
  padding: 16px 12px;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-m);
  color: var(--text-3);
  font-size: 13px;
}

.section-card__img-wrap,
.sec-card__img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, var(--surface-3), var(--bg-elevated));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-card__img,
.section-card__video,
.sec-card__img,
.sec-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur) var(--ease);
}

.section-card__img-wrap:hover .section-card__img,
.section-card__img-wrap:hover .section-card__video,
.sec-card__img-wrap:hover .sec-card__img,
.sec-card__img-wrap:hover .sec-card__video {
  transform: scale(1.03);
}

.section-card__badge,
.sec-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.section-card__badge svg,
.sec-card__badge svg {
  width: 12px;
  height: 12px;
}

.section-card__thumbs,
.sec-card__thumbs {
  display: flex;
  gap: 6px;
  padding: 8px 14px 0;
  overflow-x: auto;
}

.section-card__thumb,
.sec-card__thumb {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-s);
  overflow: hidden;
  border: 1px solid var(--border-faint);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.section-card__thumb:hover,
.section-card__thumb.is-active,
.sec-card__thumb:hover,
.sec-card__thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
}

.section-card__thumb img,
.section-card__thumb video,
.sec-card__thumb img,
.sec-card__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-card__body,
.sec-card__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-faint);
}

.section-card__info,
.sec-card__info {
  min-width: 0;
  flex: 1;
}

.section-card__title,
.sec-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.section-card__meta,
.sec-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
  flex-wrap: wrap;
}

.section-card__by,
.sec-card__by {
  color: var(--text-2);
}

.section-card__delete,
.sec-card__delete {
  flex: none;
  color: var(--text-4);
  padding: 4px;
}

.section-card__delete:hover,
.sec-card__delete:hover {
  color: #f87171;
}

/* ————— Section Viewer (Lightbox) ————— */

.section-viewer__body,
.viewer__body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #000;
  min-height: 320px;
  max-height: 70vh;
  overflow: hidden;
}

.section-viewer__stage,
.viewer__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.section-viewer__img,
.section-viewer__video,
.viewer__img,
.viewer__video {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: var(--radius-s);
}

.section-viewer__nav,
.viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 10;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.section-viewer__nav:hover,
.viewer__nav:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.05);
}

.section-viewer__nav svg,
.viewer__nav svg {
  width: 20px;
  height: 20px;
}

.section-viewer__nav--prev,
.viewer__nav--prev {
  left: 16px;
}

.section-viewer__nav--next,
.viewer__nav--next {
  right: 16px;
}

.section-viewer__foot,
.viewer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-strong);
  background: var(--bg-surface);
}

.section-viewer__thumbnails,
.viewer__thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: calc(100% - 80px);
}

.section-viewer__thumb,
.viewer__thumb {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.section-viewer__thumb:hover,
.section-viewer__thumb.is-active,
.viewer__thumb:hover,
.viewer__thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
}

.section-viewer__thumb img,
.section-viewer__thumb video,
.viewer__thumb img,
.viewer__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ————— Gallery toolbar ————— */

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chips button {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.filter-chips button:hover {
  color: var(--text);
}

.filter-chips button.is-selected {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-faint);
}

/* ————— Video viewer dialog ————— */

.viewer[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0;
}

.viewer {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  border: 1px solid var(--border-strong);
  border-radius: 0;
  background: #08080a;
  color: var(--text);
  box-shadow: var(--shadow-2);
  padding: 5px;
  overflow: hidden;
  z-index: 80;
}

.viewer::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-faint);
}

.viewer__title {
  font-size: 14.5px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  display: grid;
  place-items: center;
}

.viewer__stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.viewer__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 24px;
  color: var(--text-3);
  font-size: 13px;
}

.viewer__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-top: 1px solid var(--border-faint);
  font-size: 12px;
  color: var(--text-3);
}

/* ————— Misc utilities ————— */

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.text-accent {
  color: var(--accent);
}

@media (max-width: 720px) {
  .grid--cols-2,
  .grid--cols-3 {
    grid-template-columns: 1fr;
  }

  .hero__meta {
    gap: 6px;
  }
}

/* ————— Authentication & User Management ————— */

.auth-wrapper {
  display: flex;
  justify-content: flex-start;
  width: 100%;
}

.auth-card {
  width: 100%;
  max-width: 480px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.form-required {
  color: var(--accent);
}

.form-optional {
  font-size: 11.5px;
  color: var(--text-4);
  font-weight: 400;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}

.form-input::placeholder {
  color: var(--text-4);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-3);
}

.auth-alert {
  padding: 12px 16px;
  border-radius: var(--radius-s);
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.auth-alert--error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.auth-alert--success {
  background: var(--accent-faint);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
}

.auth-alert--info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.auth-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-faint);
}

.link-accent {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.link-accent:hover {
  text-decoration: underline;
}

/* Profile styles */
.profile-overview-card {
  display: flex;
  flex-direction: column;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: #0b0b0d;
  font-size: 22px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(110, 231, 126, 0.2);
  flex-shrink: 0;
  text-transform: uppercase;
}

.profile-header__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-header__name {
  font-size: 18px;
  font-weight: 650;
  color: var(--text);
  margin: 0;
}

.profile-header__username {
  font-size: 13px;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin: 0;
}

.profile-bio-box {
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-s);
  border: 1px solid var(--border-faint);
  margin-bottom: 18px;
}

.profile-detail-list {
  margin-bottom: 8px;
}

/* Topbar auth widget */
.topbar-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-auth__user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
}

.topbar-auth__user:hover {
  border-color: var(--accent-dim);
  background: var(--surface-3);
}

.topbar-auth__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0b0d;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  text-transform: uppercase;
}

/* User management table */
.table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.user-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-3);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-faint);
  color: var(--text-2);
  vertical-align: middle;
}

.user-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-cell__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.user-cell__names {
  display: flex;
  flex-direction: column;
}

.user-cell__display {
  font-weight: 600;
  color: var(--text);
  font-size: 13.5px;
}

.user-cell__username {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-3);
}

.py-6 {
  padding-top: 24px;
  padding-bottom: 24px;
}

.items-center {
  align-items: center;
}

.flex {
  display: flex;
}

.gap-2 {
  gap: 8px;
}

.mt-4 {
  margin-top: 16px;
}

/* ————— Image Manipulation / Image Overlay ————— */

.overlay-workspace {
  margin-top: 14px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overlay-workspace__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.overlay-workspace__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.overlay-workspace__canvas-wrap {
  position: relative;
  width: 100%;
  /*max-height: 500px;*/
  overflow: auto;
  /*background: repeating-conic-gradient(#1e1e2e 0% 25%, #181825 0% 50%) 50% / 20px 20px;*/
  /*border: 1px solid var(--border-strong);*/
  /*border-radius: var(--radius-sm, 6px);*/
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  box-sizing: border-box;
}

.overlay-workspace__stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

.overlay-workspace__bg {
  display: block;
  max-width: 100%;
  height: auto;
  pointer-events: none;
  border-radius: 4px;
}

#overlayLayersContainer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.overlay-workspace__movable {
  position: absolute;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  box-sizing: border-box;
  display: block;
  pointer-events: auto;
}

.overlay-workspace__movable:active {
  cursor: grabbing;
}

.overlay-workspace__movable .overlay-workspace__guide {
  opacity: 0;
}

.overlay-workspace__movable .overlay-workspace__handle {
  display: none;
}

.overlay-workspace__movable:hover .overlay-workspace__guide,
.overlay-workspace__movable:focus .overlay-workspace__guide,
.overlay-workspace__movable:focus-visible .overlay-workspace__guide,
.overlay-workspace__movable.is-selected .overlay-workspace__guide,
.overlay-workspace__movable.is-resizing .overlay-workspace__guide {
  opacity: 1;
}

.overlay-workspace__movable:hover .overlay-workspace__handle,
.overlay-workspace__movable:focus .overlay-workspace__handle,
.overlay-workspace__movable:focus-visible .overlay-workspace__handle,
.overlay-workspace__movable.is-selected .overlay-workspace__handle,
.overlay-workspace__movable.is-resizing .overlay-workspace__handle {
  display: block;
}

.overlay-workspace__guide {
  position: absolute;
  inset: -2px;
  border: 2px dashed var(--accent, #c6a0f6);
  border-radius: 4px;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.15s ease;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.overlay-workspace__handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent, #c6a0f6);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  z-index: 5;
  box-sizing: border-box;
  touch-action: none;
}

.overlay-workspace__handle--nw {
  top: -5px;
  left: -5px;
  cursor: nwse-resize;
}

.overlay-workspace__handle--ne {
  top: -5px;
  right: -5px;
  cursor: nesw-resize;
}

.overlay-workspace__handle--se {
  bottom: -5px;
  right: -5px;
  cursor: nwse-resize;
}

.overlay-workspace__handle--sw {
  bottom: -5px;
  left: -5px;
  cursor: nesw-resize;
}

.overlay-workspace__handle:hover {
  transform: scale(1.3);
  background: #ffffff;
  border-color: var(--accent, #c6a0f6);
}

.overlay-workspace__fg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: contain;
}

.overlay-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.overlay-control-item {
  flex: 1 1 140px;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overlay-control-item label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
}

.overlay-control-item input[type="range"] {
  width: 100%;
  cursor: pointer;
  accent-color: var(--accent, #c6a0f6);
}

.overlay-control-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.overlay-chroma {
  padding: 12px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  display: flex;
  gap: 10px;
}


.overlay-chroma__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.overlay-chroma__toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.overlay-chroma__checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent, #c6a0f6);
  cursor: pointer;
}

.overlay-chroma__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}

.overlay-chroma__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.overlay-color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay-color-input {
  width: 38px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface-2);
  cursor: pointer;
}

.overlay-color-hex {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-2);
  min-width: 55px;
}

.image-overlay-popup {
  width: 90vw;
  max-width: 800px;
}

.image-overlay-popup__stage {
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  max-height: 65vh;
  overflow: auto;
  background: #0d0e15;
}

.image-overlay-popup__img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-overlay-popup__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-faint);
}

.overlay-chroma-scroll {
  padding: 12px 14px;
  border: 1px solid var(--border);
  gap: 10px;
}

div.scroll-container {
  height: 150px;
  box-sizing: border-box;
  padding: 10px;
  overflow-y: hidden;
  white-space: nowrap;
  background-color: #366;
  flex-direction: row;
}

#scrollTemplates img,
#scrollTemplates video,
.scroll-container img,
.scroll-container video {
  height: 100%;
  max-width: var(--max-templates);
  width: auto;
  object-fit: contain;
  display: inline-block;
  cursor: grab;
  user-select: none;
  border-radius: var(--radius-sm, 4px);
  transition: transform var(--transition-fast, 0.15s ease);
}

#scrollTemplates img:hover,
#scrollTemplates video:hover,
.scroll-container img:hover,
.scroll-container video:hover {
  transform: scale(1.05);
}

#scrollTemplates img:active,
#scrollTemplates video:active,
.scroll-container img:active,
.scroll-container video:active {
  cursor: grabbing;
}

.scroll-container .temp-audio-thumb {
  height: 100%;
  width: 140px;
  min-width: 140px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--surface-1, #181825);
  border: 1px solid var(--border, #313244);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  user-select: none;
  vertical-align: top;
  white-space: normal;
  text-align: center;
  transition: transform var(--transition-fast, 0.15s ease), border-color var(--transition-fast, 0.15s ease), background var(--transition-fast, 0.15s ease);
}

.scroll-container .temp-audio-thumb:hover {
  transform: scale(1.05);
  border-color: var(--accent, #c6a0f6);
  background: var(--surface-2, #1e1e2e);
}

.scroll-container .temp-effect-thumb {
  height: 100%;
  width: 130px;
  min-width: 130px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background: var(--surface-1, #181825);
  border: 1px solid var(--border, #313244);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  user-select: none;
  vertical-align: top;
  white-space: normal;
  text-align: center;
  transition: transform var(--transition-fast, 0.15s ease), border-color var(--transition-fast, 0.15s ease), background var(--transition-fast, 0.15s ease), box-shadow var(--transition-fast, 0.15s ease);
}

.scroll-container .temp-effect-thumb:hover {
  transform: scale(1.05);
  border-color: var(--accent, #c6a0f6);
  background: var(--surface-2, #1e1e2e);
}

.scroll-container .temp-effect-thumb.is-active {
  border-color: var(--accent, #c6a0f6);
  background: var(--accent-dim, rgba(198, 160, 246, 0.15));
  box-shadow: 0 0 0 2px var(--accent, #c6a0f6);
}

.scroll-container .temp-effect-thumb .effect-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-3, #313244);
  color: var(--accent, #c6a0f6);
}

.scroll-container .temp-effect-thumb.is-active .effect-badge {
  background: var(--accent, #c6a0f6);
  color: var(--bg-base, #11111b);
}

.overlay-workspace__stage--dragover {
  outline: 2px dashed var(--accent, #c6a0f6);
  outline-offset: -2px;
}

/* ————— Chat Widget ————— */

.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.chat-toggle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 16px var(--accent-glow);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.chat-toggle-btn:hover {
  transform: scale(1.06);
  border-color: var(--accent);
  background: var(--surface-3);
}

.chat-toggle-btn .chat-icon-close {
  display: none;
}

.chat-widget.chat-widget--open .chat-toggle-btn .chat-icon-open {
  display: none;
}

.chat-widget.chat-widget--open .chat-toggle-btn .chat-icon-close {
  display: block;
}

.chat-window {
  width: 360px;
  height: 480px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2), 0 0 24px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(16px);
  animation: chatSlideUp 0.2s var(--ease);
}

@keyframes chatSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chat-window__header {
  padding: 12px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-window__title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-window__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.chat-window__subtitle {
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
  display: block;
}

.chat-window__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-window__messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
}

.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.chat-message--user {
  align-self: flex-end;
}

.chat-message--assistant {
  align-self: flex-start;
}

.chat-message--system {
  align-self: center;
  max-width: 95%;
}

.chat-bubble {
  padding: 8px 12px;
  border-radius: var(--radius-s);
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-bubble--user {
  background: var(--accent);
  color: #0b0b0d;
  font-weight: 500;
  border-bottom-right-radius: 2px;
}

.chat-bubble--assistant {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 2px;
}

.chat-bubble--system {
  background: var(--surface-3);
  color: var(--text-3);
  font-size: 11.5px;
  text-align: center;
  border-radius: 20px;
  padding: 4px 12px;
}

.chat-bubble--error {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(240, 113, 120, 0.3);
}

.chat-window__input-area {
  padding: 10px 12px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-s);
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}

.chat-input:focus {
  border-color: var(--accent);
}

.chat-input::placeholder {
  color: var(--text-4);
}

.chat-send-btn {
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 2px;
}

.chat-typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: chatDotPulse 1.2s infinite ease-in-out;
}

.chat-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes chatDotPulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.scrollbar-editor::-webkit-scrollbar {
  width: 13px;
  height: 13px;
  background: #3a3a40;
 }

.overlay-imgs {
  margin: 12px 0 4px;
  font-weight: 600;
  text-transform: capitalize;
}

#TemplateTitle, #EffTitle {
  display: inline-block;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-s);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

#TemplateTitle:hover,
#EffTitle:hover {
  color: var(--accent);
  background: var(--surface-2);
}

.btn.is-active {
  color: var(--mikupink);
  background: var(--accent-dim);
}

.SelectTempCont {
  display: grid;
  grid-template-columns: 1fr 2fr;
}

.column {
  display: flex;
  flex-direction: column;
}

.left {
  align-items: flex-start;
  text-align: left;
}

.right {
  align-items: flex-end;
  text-align: right;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.right .button-row {
  width: 100%;
  justify-content: flex-end;
}

.right .input {
  flex: 1;
  min-width: 200px;
}

/*===================== Translator ==========================*/
.ccvoYb {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
}
.translator-card {
  border: 1px solid #dadce0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
}
/* Language selector row */
.language-bar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border-bottom: 1px solid #dadce0;
}
.language-bar select {
  height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #3c4043;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}
.language-bar select:hover,
.language-bar select:focus {
  background: #f1f3f4;
  border-color: #dadce0;
}
.language {
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3c4043;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.language:hover {
  background: #f1f3f4;
}
.language.active {
  color: #1a73e8;
  background: #e8f0fe;
}
.swap {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  font-size: 22px;
  cursor: pointer;
}
.swap:hover {
  background: #f1f3f4;
}
/* Translation panels */
.translation-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 300px;
}
.source-panel,
.result-panel {
  position: relative;
  min-width: 0;
}
.source-panel {
  border-right: 1px solid #dadce0;
}
.source-input {
  width: 100%;
  height: 230px;
  padding: 24px;
  box-sizing: border-box;
  resize: none;
  border: 0;
  outline: none;
  font-family: Arial, sans-serif;
  font-size: 24px;
  line-height: 1.45;
  color: #202124;
}
.source-input::placeholder {
  color: #9aa0a6;
}
/* Translation output */
.translation-result {
  min-height: 230px;
  padding: 24px;
  box-sizing: border-box;
  font-size: 24px;
  line-height: 1.45;
  color: #202124;
}
.placeholder {
  color: #9aa0a6;
}
/* Bottom controls */
.source-footer,
.result-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-sizing: border-box;
}
.result-footer {
  gap: 4px;
}
.character-count {
  margin-left: auto;
  color: #80868b;
  font-size: 12px;
}
.icon-button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5f6368;
  font-size: 18px;
  cursor: pointer;
}
.icon-button:hover {
  background: #f1f3f4;
}
/* Mobile */
@media (max-width: 700px) {
  .ccvoYb {
    padding: 8px;
  }
  .translation-area {
    grid-template-columns: 1fr;
  }
  .source-panel {
    border-right: 0;
    border-bottom: 1px solid #dadce0;
  }
  .language-bar {
    padding: 0 8px;
    overflow-x: auto;
  }
  .source-input,
  .translation-result {
    font-size: 20px;
  }
}