@font-face { font-family: "Caveat"; src: url(/fonts/caveat.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(/fonts/nunito.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --cork: #c9a27a; --cork-2: #b88e64; --cork-dot: rgba(90,55,25,.18);
  --surface: rgba(255,252,246,.92); --fg: #2b2118; --muted: #7a6a5a; --line: rgba(60,40,20,.14);
  --accent: #2f6f5e; --accent-2: #3f8f7a; --accent-fg: #fff; --err: #b3261e; --ok: #2f8f5e;
  --ink: #2b2416; --ink-muted: #6e6350; --ink-line: rgba(40,30,10,.12);
  --jaune: #fff27a; --rose: #ffc4d4; --bleu: #bfe0ff; --vert: #c9f0b8; --orange: #ffcf9a; --violet: #dccdff;
  --shadow-note: 0 1px 1px rgba(0,0,0,.08), 0 10px 18px -6px rgba(50,30,10,.45), 0 22px 30px -18px rgba(50,30,10,.35);
  --shadow-ui: 0 2px 6px rgba(40,25,10,.12), 0 10px 30px rgba(40,25,10,.16);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --cork: #3a2c20; --cork-2: #2f241a; --cork-dot: rgba(0,0,0,.35);
    --surface: rgba(32,26,21,.94); --fg: #f2e9df; --muted: #b9a998; --line: rgba(255,240,220,.12);
    --accent: #5fc0a3; --accent-2: #7fd4ba; --accent-fg: #0d1a15; --err: #ff8a80; --ok: #7fd4ba;
    --jaune: #f0de6a; --rose: #f0b0c2; --bleu: #a9cdee; --vert: #b5dea3; --orange: #f0bd86; --violet: #c7b6f0;
    --shadow-note: 0 1px 1px rgba(0,0,0,.3), 0 12px 22px -6px rgba(0,0,0,.7);
    --shadow-ui: 0 2px 6px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--fg); font: 16px/1.5 var(--font);
  background-color: var(--cork);
  background-image:
    radial-gradient(var(--cork-dot) 1px, transparent 1.4px),
    radial-gradient(var(--cork-dot) 1px, transparent 1.4px),
    radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(180deg, var(--cork), var(--cork-2));
  background-size: 14px 14px, 14px 14px, 100% 100%, 100% 100%;
  background-position: 0 0, 7px 7px, 0 0, 0 0;
}
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
kbd { font: 600 .7rem var(--font); border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; opacity: .7; margin-left: 4px; }
[hidden] { display: none !important; }

/* ---------- Boutons génériques ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 999px; border: 0; font-weight: 700;
  background: var(--surface); color: var(--fg); box-shadow: var(--shadow-ui);
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-fg); }
.btn.small { padding: 6px 12px; font-size: .85rem; box-shadow: none; background: rgba(255,255,255,.55); color: var(--ink); }
.btn.small.ghost { background: transparent; color: var(--ink-muted); text-decoration: underline; text-underline-offset: 3px; }
.icon {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-muted); font-size: 1.25rem; line-height: 1;
  transition: background .12s, color .12s, transform .12s;
}
.icon:hover { background: rgba(0,0,0,.08); color: var(--ink); }
.chip {
  border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700;
  background: var(--surface); box-shadow: var(--shadow-ui); transition: transform .12s;
}
.chip:hover { transform: translateY(-2px) rotate(-1deg); }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); box-shadow: 0 4px 16px rgba(40,25,10,.1);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font: 700 1.9rem/1 var(--hand); }
.brand img { transform: rotate(-6deg); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-actions form { margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; text-decoration: none; color: var(--fg); }
.pill.ghost:hover { background: rgba(0,0,0,.06); }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.04); }
.sync i { width: 9px; height: 9px; border-radius: 50%; background: #aaa; }
.sync.ok i { background: #3cbf7f; box-shadow: 0 0 0 0 rgba(60,191,127,.5); animation: ping 2.4s infinite; }
.sync.busy i { background: #f0a020; animation: blink .6s infinite alternate; }
.sync.off i { background: var(--err); }
.avatar-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 3px 10px 3px 3px; border-radius: 999px; font-weight: 700; font-size: .9rem; }
.avatar-btn:hover { background: rgba(0,0,0,.06); }
.avatar {
  --h: 160; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: hsl(var(--h) 55% 45%); color: #fff; font-weight: 800; font-size: .85rem; text-transform: uppercase;
}

/* ---------- En-tête de page ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 0 16px 60px; }
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 26px 0 16px; }
.hero h1 { margin: 0; font: 700 clamp(2.2rem, 6vw, 3.2rem)/1 var(--hand); color: #fff; text-shadow: 0 2px 0 rgba(60,35,15,.35), 0 6px 18px rgba(60,35,15,.3); }
.today { margin: 6px 0 0; color: rgba(255,255,255,.92); font-weight: 600; text-shadow: 0 1px 3px rgba(60,35,15,.5); text-transform: capitalize; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { background: var(--surface); border-radius: 12px; padding: 8px 14px; box-shadow: var(--shadow-ui); min-width: 92px; }
.stat b { display: block; font-size: 1.35rem; line-height: 1.1; }
.stat span { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.stat.pop b { animation: pop .35s ease; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 0 16px; box-shadow: var(--shadow-ui); }
.search input { flex: 1; border: 0; background: transparent; padding: 11px 0; outline: none; min-width: 0; }
.search:focus-within { outline: 3px solid var(--accent-2); }

/* ---------- Tableau de post-it ---------- */
.board { display: grid; gap: 34px 26px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr)); align-items: start; }
.note {
  --paper: var(--jaune); --tilt: 0deg;
  position: relative; color: var(--ink); padding: 18px 16px 12px; min-height: 220px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 40px),
    linear-gradient(135deg, transparent calc(100% - 26px), rgba(0,0,0,.12) calc(100% - 26px), rgba(255,255,255,.3) calc(100% - 13px), transparent calc(100% - 13px)),
    var(--paper);
  border-radius: 3px 3px 26px 3px; box-shadow: var(--shadow-note);
  transform: rotate(var(--tilt)); transition: transform .25s cubic-bezier(.2,.8,.3,1.3), box-shadow .25s;
  animation: drop .45s cubic-bezier(.2,.8,.3,1.2) both;
}
.note:hover, .note:focus-within { transform: rotate(0deg) translateY(-3px); z-index: 2; }
.note.c-rose { --paper: var(--rose); } .note.c-bleu { --paper: var(--bleu); } .note.c-vert { --paper: var(--vert); }
.note.c-orange { --paper: var(--orange); } .note.c-violet { --paper: var(--violet); }
.note.complete { box-shadow: var(--shadow-note), 0 0 0 3px rgba(60,191,127,.55); }
.tape {
  position: absolute; top: -12px; left: 50%; width: 92px; height: 26px; margin-left: -46px; cursor: grab; touch-action: none;
  background: linear-gradient(90deg, rgba(255,255,255,.35), rgba(255,255,255,.6) 50%, rgba(255,255,255,.35));
  border-left: 2px dashed rgba(255,255,255,.4); border-right: 2px dashed rgba(255,255,255,.4);
  box-shadow: 0 1px 3px rgba(0,0,0,.12); transform: rotate(-3deg); backdrop-filter: blur(1px);
}
.tape:hover { background: rgba(255,255,255,.75); }
.tape:active { cursor: grabbing; }
.note-head { display: flex; align-items: center; gap: 4px; }
.emoji-btn { width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: rgba(255,255,255,.45); font-size: 1.35rem; transition: transform .15s; }
.emoji-btn:hover { transform: scale(1.12) rotate(-8deg); }
.note-title {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 2px 6px; border-radius: 8px;
  font: 700 1.9rem/1.1 var(--hand); color: var(--ink); text-overflow: ellipsis;
}
.note-title:hover { background: rgba(255,255,255,.3); }
.note-title:focus { background: rgba(255,255,255,.55); outline: none; }
.progress { height: 6px; margin: 10px 2px 2px; border-radius: 6px; background: rgba(0,0,0,.08); overflow: hidden; }
.progress b { display: block; height: 100%; width: var(--p, 0%); border-radius: 6px; background: linear-gradient(90deg, #44b884, #2f8f5e); transition: width .45s cubic-bezier(.2,.8,.3,1); }
.count { margin: 2px 2px 6px; font-size: .78rem; font-weight: 700; color: var(--ink-muted); }

.items { list-style: none; margin: 0; padding: 0; min-height: 10px; }
.items li {
  display: flex; align-items: center; gap: 6px; padding: 5px 2px; border-bottom: 1px dashed var(--ink-line);
  animation: slidein .3s ease both; border-radius: 6px; transition: background .15s, opacity .2s;
}
.items li.old { animation: none; }
.items li:hover { background: rgba(255,255,255,.3); }
.items li.leaving { animation: leave .25s ease forwards; }
.grip { width: 14px; flex: none; color: var(--ink-muted); opacity: .35; cursor: grab; touch-action: none; text-align: center; user-select: none; font-size: 1rem; }
.items li:hover .grip { opacity: .9; }
.tick {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center; padding: 0;
  border: 2px solid rgba(40,30,10,.45); border-radius: 7px; background: rgba(255,255,255,.55);
  transition: background .15s, border-color .15s, transform .15s;
}
.tick svg { width: 15px; height: 15px; stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .25s ease .05s; }
.tick:active { transform: scale(.85); }
li.done .tick { background: #3aa874; border-color: #3aa874; }
li.done .tick svg { stroke-dashoffset: 0; }
.it-emoji { width: 24px; flex: none; text-align: center; font-size: 1.05rem; }
.it-text { flex: 0 1 auto; margin-right: auto; min-width: 0; cursor: pointer; font-weight: 600; overflow-wrap: break-word; position: relative; user-select: none; -webkit-user-select: none; }
.it-text::after { content: ""; position: absolute; left: 0; top: 52%; height: 2px; width: 0; background: var(--ink-muted); transition: width .3s ease; }
li.done .it-text { color: var(--ink-muted); }
li.done .it-text::after { width: 100%; }
li.done .it-emoji, li.done .qty { opacity: .5; }
.qty { display: inline-block; margin-left: 6px; vertical-align: 1px; font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: rgba(0,0,0,.08); white-space: nowrap; }
.items .avatar { width: 20px; height: 20px; font-size: .64rem; opacity: .8; }
.del { width: 26px; height: 26px; font-size: 1.1rem; opacity: 0; }
.items li:hover .del, .del:focus-visible { opacity: 1; }
@media (hover: none) { .del { opacity: .5; } .grip { opacity: .55; } }
@media (hover: hover) {
  .items li { position: relative; }
  .del { position: absolute; right: 0; top: 50%; transform: translateY(-50%); background: var(--paper); box-shadow: -10px 0 10px var(--paper); }
}
.edit-input { flex: 1; min-width: 0; border: 0; border-radius: 6px; padding: 2px 6px; background: rgba(255,255,255,.8); font-weight: 600; }
mark { background: rgba(255,230,0,.75); color: inherit; border-radius: 3px; padding: 0 1px; }
li.filtered-out { display: none; }
.note.no-match { opacity: .35; }

.add-item { display: flex; gap: 6px; margin-top: 10px; }
.add-item input, .shop-add input {
  flex: 1; min-width: 0; border: 0; border-radius: 10px; padding: 9px 12px; background: rgba(255,255,255,.55);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08);
}
.add-item input:focus, .shop-add input:focus { background: rgba(255,255,255,.85); outline: 2px solid rgba(0,0,0,.25); }
.add-item input::placeholder { color: var(--ink-muted); }
.add { width: 40px; flex: none; border: 0; border-radius: 10px; background: var(--ink); color: var(--paper, #fff); font-size: 1.3rem; font-weight: 800; transition: transform .12s; }
.add:active { transform: scale(.9); }
.parse-hint { margin: 4px 4px 0; min-height: 1.2em; font-size: .78rem; color: var(--ink-muted); font-weight: 700; }
.note-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 6px; }

.add-card {
  display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 220px; border: 3px dashed rgba(255,255,255,.65);
  background: rgba(255,255,255,.14); box-shadow: none; color: #fff; font: 700 1.7rem var(--hand); text-shadow: 0 1px 3px rgba(60,35,15,.4);
  animation: none; transform: none; border-radius: 6px 6px 26px 6px;
}
.add-card .plus { font-size: 3rem; line-height: 1; transition: transform .25s; }
.add-card:hover { background: rgba(255,255,255,.26); transform: translateY(-3px); }
.add-card:hover .plus { transform: rotate(90deg); }

/* Glisser-déposer */
.sortable-ghost { opacity: .35; }
.note.sortable-chosen { transform: rotate(2deg) scale(1.03); }
.items li.sortable-chosen { background: rgba(255,255,255,.75); box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.sortable-fallback { opacity: .95 !important; }

/* ---------- Vide ---------- */
.empty { text-align: center; color: #fff; padding: 30px 10px; text-shadow: 0 1px 3px rgba(60,35,15,.5); }
.empty h2 { font: 700 2.2rem var(--hand); margin: 6px 0; }
.empty-art { font-size: 4rem; animation: float 3s ease-in-out infinite; }
.starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; text-shadow: none; }
.starters .chip { color: var(--fg); }
.tips { margin: 40px auto 0; max-width: 760px; text-align: center; font-size: .82rem; color: rgba(255,255,255,.85); text-shadow: 0 1px 2px rgba(60,35,15,.6); }

/* ---------- Popover ---------- */
.popover {
  position: fixed; z-index: 50; width: 268px; padding: 12px; border-radius: var(--radius);
  background: var(--surface); color: var(--fg); box-shadow: var(--shadow-ui); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); animation: popin .15s ease;
}
.popover h3 { margin: 4px 4px 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.swatches { display: flex; gap: 8px; margin: 0 4px 12px; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); transition: transform .12s; }
.swatches button:hover { transform: scale(1.15); }
.swatches button[aria-pressed=true] { border-color: var(--fg); }
.emojis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: 8px; }
.emojis button { border: 0; background: transparent; border-radius: 10px; font-size: 1.35rem; padding: 4px 0; transition: transform .12s, background .12s; }
.emojis button:hover { background: rgba(0,0,0,.07); transform: scale(1.2); }
.emojis button[aria-pressed=true] { background: rgba(47,111,94,.18); }
.menu-item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-weight: 600; }
.menu-item:hover { background: rgba(0,0,0,.06); }
.menu-item.danger { color: var(--err); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }

/* ---------- Mode magasin ---------- */
.shop { position: fixed; inset: 0; z-index: 40; background: rgba(30,20,10,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; animation: fade .2s ease; }
.shop-inner {
  --paper: var(--jaune); width: min(640px, 100%); height: min(860px, 100%); display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-note); border-radius: 18px; overflow: hidden; animation: rise .3s cubic-bezier(.2,.8,.3,1.1);
}
@media (max-width: 680px) { .shop-inner { border-radius: 0; height: 100%; } }
.shop-head { display: flex; align-items: center; gap: 10px; padding: max(14px, env(safe-area-inset-top)) 16px 12px; border-bottom: 2px dashed var(--ink-line); }
.shop-head > div:nth-child(2) { flex: 1; min-width: 0; }
.shop-head h2 { margin: 0; font: 700 2.1rem/1 var(--hand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-sub { margin: 2px 0 0; font-weight: 700; color: var(--ink-muted); font-size: .9rem; }
.ring { position: relative; width: 58px; height: 58px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring-bg { stroke: rgba(0,0,0,.1); }
.ring-fg { stroke: #2f9a68; stroke-linecap: round; stroke-dasharray: 97.4; stroke-dashoffset: var(--off, 97.4); transition: stroke-dashoffset .5s cubic-bezier(.2,.8,.3,1); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.shop-list { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 8px 12px; overscroll-behavior: contain; }
.shop-list li { display: flex; position: relative; align-items: center; gap: 14px; padding: 14px 10px; border-bottom: 1px dashed var(--ink-line); cursor: pointer; border-radius: 12px; font-size: 1.15rem; font-weight: 700; user-select: none; -webkit-user-select: none; transition: background .15s, opacity .2s; }
.shop-list li:active { background: rgba(255,255,255,.5); }
.shop-list .tick { width: 32px; height: 32px; border-radius: 10px; }
.shop-list .tick svg { width: 20px; height: 20px; }
.shop-list .it-emoji { font-size: 1.5rem; width: 32px; }
.shop-list li.done { opacity: .55; }
.shop-list .sep { cursor: default; padding: 14px 4px 4px; border: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); }
.shop-done { text-align: center; padding: 18px; }
.shop-done .big { font-size: 3.4rem; animation: float 2s ease-in-out infinite; }
.shop-done p { font: 700 1.8rem var(--hand); margin: 4px 0 12px; }
.shop-add { display: flex; gap: 8px; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); border-top: 2px dashed var(--ink-line); }
.shop-add .add { width: 48px; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 60; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 440px); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px 11px 16px; border-radius: 14px;
  background: #241c15; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.35); font-weight: 600; animation: toastin .25s cubic-bezier(.2,.8,.3,1.2);
}
.toast.err { background: #8c1d18; }
.toast span { flex: 1; }
.toast button { border: 0; background: rgba(255,255,255,.14); color: #ffe27a; font-weight: 800; padding: 6px 12px; border-radius: 999px; }
.toast button:hover { background: rgba(255,255,255,.25); }
.toast.out { animation: toastout .2s ease forwards; }

/* ---------- Confettis ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; width: 9px; height: 14px; border-radius: 2px; background: var(--c); animation: confetti 1.5s cubic-bezier(.15,.7,.35,1) forwards; box-shadow: 0 1px 2px rgba(0,0,0,.2); }

/* ---------- Page de connexion ---------- */
.login-page { display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  --paper: var(--jaune); position: relative; width: min(400px, 100%); padding: 34px 26px 24px; color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50px), var(--paper);
  border-radius: 3px 3px 30px 3px; box-shadow: var(--shadow-note); transform: rotate(-1.2deg); animation: drop .5s cubic-bezier(.2,.8,.3,1.2) both;
}
.login-card .tape { cursor: default; }
.login-card h1 { margin: 0; display: flex; align-items: center; gap: 10px; font: 700 2.6rem/1 var(--hand); }
.login-card .sub { margin: 6px 0 18px; color: var(--ink-muted); font-weight: 600; }
.login-card label { display: block; font-size: .85rem; font-weight: 700; color: var(--ink-muted); margin-bottom: 12px; }
.login-card input:not([type=checkbox]) { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; border: 0; border-radius: 10px; background: rgba(255,255,255,.65); color: var(--ink); box-shadow: inset 0 1px 2px rgba(0,0,0,.1); }
.login-card input:focus { background: #fff; outline: 2px solid rgba(0,0,0,.3); }
.login-card label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.login-card label.check input { width: 18px; height: 18px; accent-color: #2f6f5e; }
.login-card button[type=submit] { width: 100%; margin-top: 6px; padding: 13px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; font-size: 1rem; transition: transform .12s; }
.login-card button[type=submit]:active { transform: scale(.98); }
.login-card .hint { margin: 14px 0 0; font-size: .85rem; color: var(--ink-muted); }
.login-card .hint a { color: var(--ink); font-weight: 700; }
.login-card .err { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: rgba(179,38,30,.12); color: #8c1d18; font-weight: 700; animation: shake .4s; }
.back-link { position: fixed; top: 14px; left: 16px; color: #fff; font-weight: 700; text-decoration: none; text-shadow: 0 1px 3px rgba(60,35,15,.5); }

/* ---------- Animations ---------- */
@keyframes drop { from { opacity: 0; transform: translateY(-16px) rotate(calc(var(--tilt, 0deg) - 4deg)) scale(.96); } }
@keyframes slidein { from { opacity: 0; transform: translateX(-10px); } }
@keyframes leave { to { opacity: 0; transform: translateX(30px); height: 0; padding: 0; } }
@keyframes pop { 50% { transform: scale(1.3); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(60,191,127,.55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(60,191,127,0); } }
@keyframes blink { to { opacity: .35; } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes popin { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.97); } }
@keyframes toastin { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes toastout { to { opacity: 0; transform: translateY(10px); } }
@keyframes confetti { 75% { opacity: 1; } to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

@media (max-width: 560px) {
  .hide-sm { display: none; }
  .brand { font-size: 1.6rem; }
  .board { gap: 30px; }
  .hero { margin-top: 18px; }
  .stat { min-width: 0; flex: 1; padding: 6px 10px; }
  .stat b { font-size: 1.1rem; }
  .tips { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .note { transform: none !important; }
}
