.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast.ok { border-left-color: #2f8a52; }
.toast.err { border-left-color: #c23b3b; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.6);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  animation: fadeIn 0.2s ease both;
}
.modal-box {
  width: 100%;
  max-width: 1000px;
  max-height: 92vh;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: scaleIn 0.22s ease both;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-body { overflow: auto; padding: 0; background: #ffffff; }
.modal-body iframe { width: 100%; height: 78vh; border: none; }

@media (max-width: 1100px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
}

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

.badge.ok { color: #2f8a52; border-color: #cdeada; }
.badge.err { color: #c23b3b; border-color: #f0cccc; }
.badge.soft { color: var(--muted-text); }

.btn.tiny { padding: 5px 9px; font-size: 11px; border-radius: 8px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.field-label { font-size: 12.5px; color: var(--muted-text); }
.field .tag { font-size: 10px; color: #9a7300; border: 1px solid #f0e0ad; border-radius: 999px; padding: 1px 6px; }

.kv span { color: var(--muted-text); }
.kv b, .kv code { justify-self: start; }

.banner { width: 100%; max-height: 190px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #f0f0f1; }

.actions { display: flex; gap: 6px; flex-wrap: wrap; }

.copy { cursor: pointer; }
.copy:hover { color: var(--accent); }
.break { word-break: break-all; display: inline-block; }
.big { font-size: 18px; }

.emoji-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.emoji-row:last-child { border-bottom: none; }
.emoji-row b { min-width: 90px; }
.emoji-row .badge { margin-left: auto; }
.emoji-row .emoji-remove { margin-left: 4px; }
.emoji { width: 28px; height: 28px; object-fit: contain; }
.emoji-fallback {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f1;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}

.modal-body { color: var(--text); }
.modal-body > p, .modal-body > code, .modal-body > .row { margin: 16px; }
.modal-body > code { padding: 12px; background: #f1f1f2; border-radius: 8px; font-family: "Consolas", monospace; }
.modal-body > p { color: var(--muted-text); }
