/* ==========================================================================
   usetool — styles du site public (les jetons sont réutilisés par l'admin)
   ========================================================================== */

:root {
  --bg: #f6f6fb;
  --surface: #ffffff;
  --surface-2: #efeff7;
  --text: #14142b;
  --muted: #5d5f7e;
  --border: #e3e3ef;
  --accent: #5b4dff;
  --accent-2: #ff4fa3;
  --accent-3: #ffb547;
  --accent-soft: #ecebff;
  --accent-text: #ffffff;
  --success: #0f9f6e;
  --danger: #e5484d;
  --warning: #c27c00;
  --star: #f5a524;
  --shadow-sm: 0 1px 2px rgba(20, 20, 43, .05);
  --shadow: 0 1px 2px rgba(20, 20, 43, .04), 0 10px 30px rgba(20, 20, 43, .07);
  --shadow-lg: 0 20px 60px rgba(20, 20, 43, .18);
  --radius: 20px;
  --radius-sm: 12px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0c0c16;
  --surface: #151524;
  --surface-2: #1d1d30;
  --text: #f1f1fa;
  --muted: #a3a5c4;
  --border: #29293f;
  --accent: #8a7fff;
  --accent-2: #ff6bb5;
  --accent-soft: #24224a;
  --accent-text: #0c0c16;
  --success: #34d399;
  --danger: #ff6b6f;
  --warning: #f5b43a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
kbd {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.muted { color: var(--muted); }
.section { padding: 48px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-head h2 { font-size: 24px; }

/* --- Boutons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700; font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent-2)));
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn-primary:hover { box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 45%, transparent); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn[disabled] { opacity: .6; cursor: wait; }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s;
}
.icon-btn:hover { border-color: var(--accent); }

/* --- En-tête ------------------------------------------------------------ */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; text-decoration: none; }
.logo.small { font-size: 16px; gap: 8px; }
.main-nav { display: none; gap: 4px; }
.main-nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.donate-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent-3) 55%, var(--border));
  background: color-mix(in srgb, var(--accent-3) 16%, var(--surface));
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap;
  transition: transform .15s, background .15s;
}
.donate-btn:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--accent-3) 28%, var(--surface)); }
.donate-btn span { display: none; }
.donate-link { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
/* Logo Ko-fi : contour noir, éclairci en thème sombre pour rester lisible. */
.kofi { display: inline-block; flex-shrink: 0; object-fit: contain; }
[data-theme="dark"] .kofi { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .85)); }
@media (min-width: 900px) { .donate-btn span { display: inline; } }
.search-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 10px 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.search-trigger:hover { border-color: var(--accent); color: var(--text); }
.search-trigger span, .search-trigger kbd { display: none; }
@media (min-width: 720px) {
  .main-nav { display: flex; }
  .search-trigger { min-width: 220px; }
  .search-trigger span { display: inline; margin-right: auto; font-size: 14px; }
  .search-trigger kbd { display: inline; }
}
.i-moon { display: none; }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="dark"] .i-moon { display: block; }

/* --- Hero --------------------------------------------------------------- */

.hero { position: relative; padding: 28px 0 0; text-align: center; }
/* Déborde sous l'en-tête et s'efface en fondu : pas de bord net sous les filtres. */
.hero-bg {
  position: absolute; inset: -64px 0 -140px; overflow: hidden; pointer-events: none; z-index: -1;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent);
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
}
.hero-bg span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; animation: float 18s ease-in-out infinite; }
.hero-bg span:nth-child(1) { width: 420px; height: 420px; background: var(--accent); top: -80px; left: 8%; }
.hero-bg span:nth-child(2) { width: 360px; height: 360px; background: var(--accent-2); top: 20px; right: 6%; animation-delay: -6s; opacity: .3; }
.hero-bg span:nth-child(3) { width: 300px; height: 300px; background: var(--accent-3); top: 180px; left: 40%; animation-delay: -12s; opacity: .22; }
[data-theme="dark"] .hero-bg span { opacity: .22; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 20px) scale(1.08); }
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 20%, transparent); }
.hero h1 { font-size: clamp(28px, 4.5vw, 44px); font-weight: 800; margin: 14px 0 0; max-width: 820px; letter-spacing: -.04em; }
.grad {
  background: linear-gradient(120deg, var(--accent) 10%, var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--muted); max-width: 620px; margin: 0; }

.search-box {
  display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: 640px;
  margin-top: 20px;
  padding: 0 20px;
  height: 54px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
  cursor: text;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 5px color-mix(in srgb, var(--accent) 15%, transparent); }
.search-box svg { color: var(--muted); width: 22px; height: 22px; }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; max-width: 760px; }
.chip {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* --- Cartes outils ------------------------------------------------------ */

.section-tools { padding-top: 32px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

/* Grille compacte : icône à gauche, nom et description à droite, tout l'inventaire d'un coup d'œil. */
.tool-grid .tool-card {
  display: grid; grid-template-columns: auto 1fr; align-content: start;
  column-gap: 12px; row-gap: 2px;
  padding: 14px;
  border-radius: 16px;
}
.tool-grid .tool-top { display: contents; }
.tool-grid .tool-icon { grid-column: 1; grid-row: 1 / span 3; align-self: start; width: 44px; height: 44px; font-size: 24px; border-radius: 13px; }
.tool-grid .fav-btn { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; }
.tool-grid .tool-card h3 { grid-column: 2; font-size: 15px; padding-right: 28px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-grid .tool-card p { grid-column: 2; font-size: 13px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.tool-grid .tool-meta { grid-column: 2; margin-top: 4px; }
.tool-grid .b-cat { display: none; }
.tool-grid .badge { padding: 2px 7px; font-size: 11px; }
.tool-grid .details { font-size: 12px; padding: 2px 4px; margin-left: auto; }
.tool-grid .tool-card:hover { transform: translateY(-2px); }
.tool-grid .tool-card.is-featured {
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%), var(--surface);
  border-color: color-mix(in srgb, var(--c) 35%, var(--border));
}
.b-featured { background: color-mix(in srgb, var(--star) 16%, transparent); color: var(--star); }

/* Mobile : écran d'accueil façon téléphone, une grille d'icônes d'applis. */
@media (max-width: 640px) {
  .hero { padding-top: 16px; }
  .hero .pill, .hero-bg { display: none; }
  .hero h1 { font-size: 24px; margin: 0; }
  .search-box { margin-top: 14px; height: 48px; border-radius: 14px; padding: 0 14px; box-shadow: var(--shadow-sm); }
  .search-box input { font-size: 16px; }
  .chips {
    flex-wrap: nowrap; justify-content: flex-start;
    width: calc(100% + 32px); margin: 12px -16px 0; padding: 0 16px 4px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; padding: 7px 13px; font-size: 13px; }

  .section-tools { padding-top: 20px; }
  .section-tools .section-head { margin-bottom: 14px; }
  .section-tools .section-head h2 { font-size: 17px; }

  .tool-grid { grid-template-columns: repeat(4, 1fr); gap: 18px 6px; }
  .tool-grid .tool-card,
  .tool-grid .tool-card.is-featured {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none;
    text-align: center; animation: none;
  }
  .tool-grid .tool-card:hover { transform: none; box-shadow: none; }
  .tool-grid .tool-card:active .tool-icon { transform: scale(.92); }
  .tool-grid .tool-icon {
    width: 62px; height: 62px; font-size: 32px; border-radius: 18px;
    background: color-mix(in srgb, var(--c) 22%, var(--surface));
    box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 22%, transparent);
    transition: transform .12s ease;
  }
  .tool-grid .is-featured .tool-icon { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--star); }
  .tool-grid .tool-card h3 { width: 100%; padding: 0; font-size: 12px; font-weight: 600; letter-spacing: 0; }
  .tool-grid .tool-card p, .tool-grid .tool-meta { display: none; }
  /* Étoile discrète au coin de l'icône, avec une zone de tap de 32 px. */
  .tool-grid .fav-btn { top: -8px; right: calc(50% - 47px); width: 32px; height: 32px; background: none; }
  .tool-grid .fav-btn svg { width: 15px; height: 15px; opacity: .45; }
  .tool-grid .fav-btn.on svg { opacity: 1; }
  .tool-grid .fav-btn:hover { background: none; }
}

.tool-card {
  --c: var(--accent);
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  animation: rise .4s ease both;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow), 0 12px 32px color-mix(in srgb, var(--c) 18%, transparent);
  border-color: color-mix(in srgb, var(--c) 45%, var(--border));
}
.tool-card.big {
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--c) 20%, transparent), transparent 60%),
    var(--surface);
  justify-content: flex-end;
  min-height: 150px;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tool-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: auto; padding-bottom: 6px; }
.tool-card h3 { font-size: 18px; font-weight: 700; }
.tool-card p { margin: 0; color: var(--muted); font-size: 15px; }
.stretched { text-decoration: none; }
.stretched::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.stretched:focus-visible { outline: none; }
.stretched:focus-visible::after { outline: 3px solid color-mix(in srgb, var(--c) 60%, transparent); outline-offset: 2px; }

.tool-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  font-size: 28px; line-height: 1;
  background: color-mix(in srgb, var(--c) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
  overflow: hidden;
  flex-shrink: 0;
}
.tool-icon img { width: 70%; height: 70%; object-fit: contain; }
.tool-icon.sm { width: 40px; height: 40px; font-size: 22px; border-radius: 12px; }
.tool-icon.xl { width: 96px; height: 96px; font-size: 52px; border-radius: 28px; }

.fav-btn {
  position: relative; z-index: 2;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 0; background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s, background .15s, transform .15s;
}
.fav-btn:hover { background: var(--surface-2); color: var(--star); }
.fav-btn.on { color: var(--star); }
.fav-btn.on svg { fill: currentColor; animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.3); } }

.tool-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.b-cat { background: var(--surface-2); color: var(--muted); }
.b-new { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.b-beta { background: color-mix(in srgb, var(--warning) 16%, transparent); color: var(--warning); }
.b-hot { background: color-mix(in srgb, var(--accent-2) 14%, transparent); color: var(--accent-2); }
.details {
  position: relative; z-index: 2;
  font-size: 13px; font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 6px; border-radius: 8px;
}
.details:hover { color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }

.empty { text-align: center; padding: 56px 16px; color: var(--muted); border: 2px dashed var(--border); border-radius: var(--radius); }
.empty-emoji { font-size: 40px; display: block; margin-bottom: 8px; }

/* --- Suggestions -------------------------------------------------------- */

.suggest-card {
  display: grid; gap: 24px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(80% 120% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(60% 100% at 100% 100%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
}
@media (min-width: 820px) { .suggest-card { grid-template-columns: 1fr 1.1fr; padding: 40px; align-items: center; } }
.suggest-emoji { font-size: 36px; }
.suggest-text h2 { font-size: 28px; margin: 8px 0; }
.suggest-text p { margin: 0; color: var(--muted); }
.suggest-form { display: grid; gap: 10px; }
.suggest-form textarea, .suggest-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  resize: vertical;
}
.suggest-form textarea:focus, .suggest-form input:focus { outline: none; border-color: var(--accent); }
.suggest-form .btn { justify-self: start; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* --- Page outil --------------------------------------------------------- */

.tool-page { padding-top: 24px; padding-bottom: 24px; }
.back { display: inline-block; margin-bottom: 20px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.back:hover { color: var(--text); }
.tool-hero {
  position: relative;
  display: grid; gap: 24px;
  padding: 32px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
@media (min-width: 720px) { .tool-hero { grid-template-columns: auto 1fr; padding: 48px; gap: 36px; } }
.tool-hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 100% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%);
}
.tool-hero > * { position: relative; }
.tool-hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; margin: 12px 0 8px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-actions .btn-primary {
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 65%, var(--accent-2)));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--c) 35%, transparent);
}
.fav-btn-lg { display: inline-flex; width: auto; height: auto; z-index: auto; color: var(--text); border: 1px solid var(--border); background: var(--surface); border-radius: 999px; }
.fav-btn-lg.on { color: var(--star); border-color: var(--star); }
.perks { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 20px 0 0; font-size: 14px; font-weight: 600; }
.prose { max-width: 720px; margin-top: 36px; font-size: 17px; }
.prose p { margin: 0 0 16px; white-space: pre-line; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.tags li { padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600; }

.not-found { text-align: center; padding: 96px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.big-code { font-size: 120px; font-weight: 800; line-height: 1; letter-spacing: -.05em; }
.not-found .btn { margin-top: 16px; }

.legal { max-width: 760px; padding-top: 48px; line-height: 1.65; }
.legal h2 { font-size: 20px; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal a { color: var(--accent); }
.footer-inner a { color: inherit; }

/* --- Pied de page ------------------------------------------------------- */

.site-footer { margin-top: 72px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 28px; padding-bottom: 28px; color: var(--muted); font-size: 14px; }
.footer-inner p { margin: 0; }

/* --- Palette Ctrl+K ----------------------------------------------------- */

.palette {
  width: min(640px, calc(100vw - 32px));
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}
.palette::backdrop { background: rgba(10, 10, 25, .45); backdrop-filter: blur(4px); }
.palette[open] { animation: pal .18s ease; }
@keyframes pal { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 60px; border-bottom: 1px solid var(--border); }
.palette-input svg { color: var(--muted); }
.palette-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.palette-list a {
  --c: var(--accent);
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
}
.palette-list a.sel { background: var(--surface-2); }
.palette-list strong { display: block; font-size: 15px; }
.palette-list small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-list .p-text { min-width: 0; flex: 1; }
.palette-list .p-empty { padding: 24px; text-align: center; color: var(--muted); }
.palette-hint { margin: 0; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }

/* --- Toast -------------------------------------------------------------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--text); color: var(--bg);
  font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: toast .25s ease;
}
.toast.error { background: var(--danger); color: #fff; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
