/* ---------- Brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.045em;
  color: var(--ink);
  white-space: nowrap;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--brand);
  color: var(--mint-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), var(--shadow-xs);
  flex: none;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-word em { font-style: normal; color: var(--brand); }
.brand-sub {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  font-weight: 800;
  display: block;
  margin-top: -3px;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-bd: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-xs);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease),
    background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0) scale(0.985); box-shadow: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-primary { --btn-bg: var(--brand); --btn-fg: #fff; --btn-bd: var(--brand); box-shadow: 0 8px 20px -10px rgba(16, 88, 74, 0.75); }
.btn-primary:hover { --btn-bg: var(--brand-2); --btn-bd: var(--brand-2); box-shadow: 0 12px 26px -10px rgba(16, 88, 74, 0.6); }
.btn-dark { --btn-bg: var(--ink); --btn-fg: #fff; --btn-bd: var(--ink); }
.btn-soft { --btn-bg: var(--brand-3); --btn-fg: var(--brand-2); --btn-bd: transparent; box-shadow: none; }
.btn-soft:hover { --btn-bg: var(--brand-4); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink-2); --btn-bd: transparent; box-shadow: none; }
.btn-ghost:hover { --btn-bg: var(--surface-3); }
.btn-quiet { --btn-bg: var(--surface-2); --btn-fg: var(--ink-2); --btn-bd: var(--line); box-shadow: none; }
.btn-danger { --btn-bg: var(--surface); --btn-fg: var(--rose); --btn-bd: #e8cfcd; box-shadow: none; }
.btn-danger:hover { --btn-bg: var(--rose-2); }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: var(--fs-md); }
.btn-sm { min-height: 36px; padding: 0 13px; font-size: var(--fs-xs); gap: 6px; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 32px; min-height: 32px; }
.btn-block { width: 100%; }
.btn-spinner { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; }

/* ---------- Surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: var(--sp-6); }
.card-hover { transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  background: var(--surface-3);
  color: var(--muted);
  white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge-brand { background: var(--brand-3); color: var(--brand); }
.badge-mint { background: var(--mint-2); color: var(--brand-2); }
.badge-amber { background: var(--amber-2); color: var(--amber); }
.badge-rose { background: var(--rose-2); color: var(--rose); }
.badge-violet { background: var(--violet-2); color: var(--violet); }
.badge-dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.badge-demo { background: var(--ink); color: var(--mint-2); letter-spacing: 0.1em; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-2);
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-3); }
.chip[aria-pressed="true"], .chip.is-active {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 6px 14px -8px rgba(16, 88, 74, 0.9);
}
.chip svg { width: 15px; height: 15px; }

/* ---------- Form controls ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-2);
}
.field-label .hint { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--muted-2); font-size: var(--fs-xs); }
.field-help { font-size: var(--fs-sm); color: var(--muted); }
.field-error { font-size: var(--fs-sm); color: var(--rose); font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }
.field-error svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }

.input, .textarea, .select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: var(--fs-base);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: var(--shadow-focus); }
.input.has-error, .textarea.has-error { border-color: var(--rose); }
.input-affix { position: relative; display: flex; align-items: center; }
.input-affix .input { padding-left: 46px; padding-right: 116px; }
.input-affix > svg:first-child {
  position: absolute; left: 15px; width: 19px; height: 19px; color: var(--muted); pointer-events: none;
}
.input-affix .affix-action {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
}
.input-affix .affix-hint {
  position: absolute; right: 14px; font-size: 0.625rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); pointer-events: none;
}
.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d7973' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 17px;
}

.segment {
  display: inline-flex;
  padding: 4px;
  gap: 3px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  width: 100%;
}
.segment button {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 9px 8px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--muted);
  transition: all var(--t-fast) var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.segment button svg { width: 15px; height: 15px; }
.segment button:hover { color: var(--ink); background: rgba(255,255,255,0.6); }
.segment button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--line);
}

.stepper {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--surface); padding: 4px;
}
.stepper button {
  width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent;
  display: grid; place-items: center; color: var(--ink-2); transition: background var(--t-fast), color var(--t-fast);
}
.stepper button:hover { background: var(--brand-3); color: var(--brand); }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper output { min-width: 42px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 17px; height: 17px; border-radius: 50%; background: var(--brand);
  border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,0.28); margin-top: -7px;
  transition: transform var(--t-fast) var(--ease);
}
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.14); }
input[type="range"]::-moz-range-track { height: 5px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line); }
input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,0.28); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  width: 42px; height: 24px; border-radius: 99px; background: var(--line-2);
  padding: 3px; transition: background var(--t-base) var(--ease); flex: none;
}
.switch-track::after {
  content: ""; display: block; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-xs); transition: transform var(--t-base) var(--ease);
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ---------- Progress ---------- */
.progress-track { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; border: 1px solid var(--line); }
.progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), #2f8b72 55%, var(--mint));
  background-size: 200% 100%;
  transition: width var(--t-slow) var(--ease);
  animation: progressFlow 2.2s linear infinite;
}
@keyframes progressFlow { to { background-position: -200% 0; } }

.stage-list { display: grid; gap: 2px; }
.stage {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center;
  padding: 11px 12px; border-radius: var(--r-md);
  transition: background var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
  color: var(--muted);
}
.stage.is-active { background: var(--brand-3); color: var(--brand-2); }
.stage.is-done { color: var(--ink-2); }
.stage.is-pending { opacity: 0.5; }
.stage-icon {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted); border: 1px solid var(--line);
}
.stage.is-active .stage-icon { background: var(--brand); color: #fff; border-color: var(--brand); }
.stage.is-done .stage-icon { background: var(--mint-2); color: var(--brand); border-color: var(--mint-2); }
.stage-icon svg { width: 16px; height: 16px; }
.stage-title { font-weight: 700; font-size: var(--fs-sm); line-height: 1.3; }
.stage-desc { font-size: var(--fs-xs); color: var(--muted); line-height: 1.4; }
.stage-time { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--muted-2); font-weight: 700; }

/* ---------- Video ---------- */
.video-frame {
  position: relative;
  overflow: hidden;
  background: #101a17;
  border-radius: var(--r-md);
  isolation: isolate;
}
.video-frame.ratio-9-16 { aspect-ratio: 9 / 16; }
.video-frame.ratio-1-1 { aspect-ratio: 1 / 1; }
.video-frame.ratio-16-9 { aspect-ratio: 16 / 9; }
.video-frame video { width: 100%; height: 100%; object-fit: cover; background: #101a17; }
.video-frame .video-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 8px;
  background: radial-gradient(circle at 30% 20%, #23483d, #101a17 70%);
  color: var(--mint-2); text-align: center; padding: 18px;
  font-size: var(--fs-xs); font-weight: 700;
}
.video-fallback svg { width: 26px; height: 26px; opacity: 0.75; margin: 0 auto; }
.video-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,15,11,0.38) 0%, transparent 32%, transparent 58%, rgba(5,15,11,0.72) 100%);
}
.video-top { position: absolute; z-index: 2; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 8px; }
.video-bottom { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.video-play {
  position: absolute; z-index: 3; inset: 0; margin: auto;
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: var(--brand-2);
  border: 0; display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease), background var(--t-base);
}
.video-play svg { width: 24px; height: 24px; margin-left: 3px; }
.video-play:hover { transform: scale(1.08); background: #fff; }
.video-frame.is-playing .video-play { opacity: 0; transform: scale(0.8); pointer-events: none; }
.video-frame.is-playing:hover .video-play { opacity: 0.85; transform: scale(0.85); pointer-events: auto; background: rgba(16,26,23,0.7); color: #fff; }
.video-caption-overlay {
  font-weight: 800; font-size: clamp(0.9rem, 2.6vw, 1.05rem); line-height: 1.3;
  color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,0.7); text-align: center;
  padding: 0 4px; max-height: 3.9em; overflow: hidden;
  transition: background var(--t-base) var(--ease), padding var(--t-base) var(--ease);
}
.video-caption-overlay.is-bold { font-weight: 800; letter-spacing: -0.03em; font-size: clamp(1rem, 3.1vw, 1.2rem); }
.video-caption-overlay.is-boxed {
  background: rgba(8, 20, 15, 0.76); border: 1px solid rgba(255,255,255,0.22);
  border-radius: 9px; padding: 7px 10px; text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.video-meta-chip {
  background: rgba(10,22,17,0.72); color: #fff; border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(8px); border-radius: var(--r-pill);
  font-size: 0.6875rem; font-weight: 800; padding: 5px 9px; letter-spacing: 0.02em;
}
.video-progress-mini { height: 3px; border-radius: 99px; background: rgba(255,255,255,0.28); overflow: hidden; }
.video-progress-mini > i { display: block; height: 100%; background: var(--mint); width: 0; transition: width 120ms linear; }

/* ---------- Clip card ---------- */
.clip-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
  display: flex; flex-direction: column;
}
.clip-card:hover { box-shadow: var(--shadow-md); border-color: var(--line-2); transform: translateY(-2px); }
.clip-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-3), var(--shadow-md); }
.clip-preview { padding: 12px; background: var(--surface-3); }
.clip-preview .video-frame { max-height: 420px; margin: 0 auto; }
.clip-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.clip-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.clip-index {
  width: 26px; height: 26px; border-radius: 8px; background: var(--brand-3); color: var(--brand);
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; flex: none;
}
.clip-title-input {
  border: 1px solid transparent; background: transparent; border-radius: 7px;
  font-weight: 800; font-size: var(--fs-md); letter-spacing: -0.02em;
  padding: 3px 6px; margin-left: -6px; width: 100%;
  transition: background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.clip-title-input:hover { background: var(--surface-3); }
.clip-title-input:focus { outline: none; background: var(--surface); border-color: var(--brand); box-shadow: var(--shadow-focus); }
.clip-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.clip-row-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.clip-foot {
  margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.score {
  display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 800; color: var(--amber);
}
.score svg { width: 14px; height: 14px; }

.trim { display: grid; gap: 7px; }
.trim-labels { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.trim-bars { position: relative; height: 30px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.trim-bars .trim-window { position: absolute; top: 0; bottom: 0; background: var(--brand-4); border-left: 2px solid var(--brand); border-right: 2px solid var(--brand); transition: left var(--t-fast) linear, width var(--t-fast) linear; }
.trim-bars .trim-flag { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(16,88,74,0.22); }
.trim-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.trim-controls .field-label { font-size: 0.625rem; }

/* ---------- Editor ---------- */
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 0; }
.editor-stage {
  padding: clamp(18px, 3vw, 32px);
  background: linear-gradient(145deg, #10251f, #0b1714 60%, #122a22);
  display: grid; place-items: center; min-height: 460px;
  position: relative; overflow: hidden;
}
.editor-stage::before {
  content: ""; position: absolute; inset: 0; opacity: 0.32;
  background-image: radial-gradient(rgba(159,227,189,0.35) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
}
.editor-stage .video-frame {
  position: relative; z-index: 1;
  width: min(100%, 360px); max-height: 68vh;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.12);
}
.editor-stage.ratio-16-9 .video-frame { width: min(100%, 620px); }
.editor-stage.ratio-1-1 .video-frame { width: min(100%, 460px); }
.editor-side { padding: clamp(20px, 3vw, 30px); display: flex; flex-direction: column; gap: 20px; max-height: 78vh; overflow-y: auto; }
.editor-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.editor-tabs button {
  border: 0; background: transparent; padding: 11px 13px 12px; font-size: var(--fs-sm); font-weight: 800;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.editor-tabs button:hover { color: var(--ink); }
.editor-tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: grid; gap: 18px; animation: viewIn var(--t-base) var(--ease-out) both; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(12, 22, 18, 0.55); backdrop-filter: blur(5px);
  display: grid; place-items: center; padding: 18px;
  animation: fadeIn var(--t-base) var(--ease-out) both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(100%, 520px); max-height: calc(100vh - 36px); overflow-y: auto;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: clamp(20px, 4vw, 30px);
  animation: modalIn var(--t-base) var(--ease-out) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.modal-title { font-size: var(--fs-xl); }
.modal-desc { color: var(--muted); font-size: var(--fs-sm); margin-top: 5px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast-root {
  position: fixed; z-index: 200; right: 18px; bottom: 18px;
  display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 36px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 15px; border-radius: var(--r-md);
  background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm); line-height: 1.45;
  animation: toastIn var(--t-base) var(--ease-out) both;
}
.toast.is-leaving { animation: toastOut var(--t-base) var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(0.97); } }
.toast-icon { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.toast-icon.is-error { color: #ffa9a3; }
.toast-icon.is-success { color: var(--mint); }
.toast strong { display: block; font-size: var(--fs-sm); }
.toast span { color: rgba(255,255,255,0.68); }
.toast-close { margin-left: auto; background: transparent; border: 0; color: rgba(255,255,255,0.6); padding: 0; }
.toast-close:hover { color: #fff; }

/* ---------- Empty & notice states ---------- */
.empty {
  text-align: center; padding: clamp(38px, 7vw, 70px) 24px;
  border: 1px dashed var(--line-2); border-radius: var(--r-xl); background: var(--surface-2);
}
.empty-icon {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 20px;
  display: grid; place-items: center; background: var(--brand-3); color: var(--brand);
}
.empty-icon svg { width: 28px; height: 28px; }
.empty h3 { font-size: var(--fs-xl); margin-bottom: 7px; }
.empty p { color: var(--muted); max-width: 44ch; margin: 0 auto 20px; font-size: var(--fs-sm); }

.notice {
  display: flex; gap: 12px; padding: 13px 15px; border-radius: var(--r-md);
  background: var(--amber-2); border: 1px solid #f0dfc3; color: #6d4712; font-size: var(--fs-sm);
}
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice strong { font-weight: 800; }
.notice-info { background: var(--brand-3); border-color: #cfe4d7; color: var(--brand-2); }
.notice-error { background: var(--rose-2); border-color: #eccac7; color: var(--rose); }

/* ---------- History rows ---------- */
.project-row {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 14px; border: 1px solid transparent; border-radius: var(--r-lg);
  transition: background var(--t-base), border-color var(--t-base), transform var(--t-base);
}
.project-row + .project-row { border-top-color: var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
.project-row:hover { background: var(--surface-2); border-color: var(--line); transform: translateX(2px); }
.project-thumb {
  width: 112px; height: 68px; border-radius: 10px; overflow: hidden; background: var(--surface-3);
  display: grid; place-items: center; position: relative; border: 1px solid var(--line);
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; }
.project-thumb .thumb-fallback { font-family: var(--font-display); font-size: 1.5rem; color: var(--brand); }
.project-thumb .thumb-count {
  position: absolute; right: 5px; bottom: 5px; background: rgba(10,22,17,0.78); color: #fff;
  font-size: 0.625rem; font-weight: 800; padding: 3px 7px; border-radius: 99px;
}
.project-name { font-weight: 800; font-size: var(--fs-md); letter-spacing: -0.02em; }
.project-sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 5px 10px; }
.project-actions { display: flex; align-items: center; gap: 7px; }

/* ---------- Stats / info ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  padding: 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line);
}
.stat-value { font-weight: 800; font-size: var(--fs-xl); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 800; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: var(--fs-sm); }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; text-align: right; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: var(--mint-2); font-weight: 800; font-size: var(--fs-xs); flex: none;
}
.avatar-lg { width: 62px; height: 62px; font-size: var(--fs-lg); border-radius: 20px; }
