:root {
  --bg: #f6f4ff;
  --bg2: #fff7e8;
  --card: #ffffff;
  --ink: #2b2d42;
  --muted: #6c7086;
  --line: #e7e5f3;
  --primary: #6c4cf5;
  --primary-2: #8f74ff;
  --accent: #ffb703;
  --ok: #06a77d;
  --ok-bg: #e3f9f0;
  --ko: #e5484d;
  --ko-bg: #fdecec;
  --radius: 22px;
  --shadow: 0 6px 0 rgba(108, 76, 245, .08), 0 12px 30px rgba(43, 45, 66, .08);
  --font-title: 'Fredoka', 'Comic Sans MS', 'Trebuchet MS', system-ui, sans-serif;
  --font: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5;
  background: radial-gradient(1200px 600px at 10% -10%, #e6e0ff 0, transparent 60%),
              radial-gradient(900px 500px at 110% 10%, var(--bg2) 0, transparent 60%), var(--bg);
  min-height: 100vh;
}
a { color: var(--primary); }
h1, h2, h3, .title { font-family: var(--font-title); font-weight: 600; line-height: 1.2; }
button { font: inherit; }
.page { max-width: 1080px; margin: 0 auto; padding: 20px 16px 60px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.row.center { justify-content: center; }
.row.between { justify-content: space-between; }
.hint, .muted { color: var(--muted); font-size: .9rem; }
.link { color: var(--primary); text-decoration: none; font-weight: 700; }
.link:hover { text-decoration: underline; }
.back { display: inline-block; margin-bottom: 12px; }
.big { font-size: 1.6rem; font-family: var(--font-title); }
.mono { font-family: ui-monospace, Consolas, monospace; text-align: right; display: inline-block; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--primary); color: #fff; font-weight: 800; padding: 12px 22px; border-radius: 16px;
  text-decoration: none; box-shadow: 0 4px 0 #4b2fd1; transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #4b2fd1; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.big { font-size: 1.2rem; padding: 16px 30px; }
.btn.small { padding: 8px 14px; font-size: .9rem; }
.btn.secondary { background: var(--accent); color: var(--ink); box-shadow: 0 4px 0 #d18f00; }
.btn.ghost { background: #fff; color: var(--primary); box-shadow: 0 0 0 2px var(--line), 0 4px 0 var(--line); }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 1rem; border-radius: 50%; width: 32px; height: 32px; }
.icon-btn.danger:hover { background: var(--ko-bg); color: var(--ko); }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 10px 20px;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--font-title); font-size: 1.4rem; color: var(--ink); text-decoration: none; display: flex; gap: 6px; align-items: center; }
.logo b { color: var(--primary); }
.topbar nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.topbar nav a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 8px 14px; border-radius: 12px; }
.topbar nav a:hover { background: #efeaff; }
.me { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.xp-chip { background: #fff3cd; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: .9rem; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: 0 0 0 3px var(--line); }
.avatar.sm { width: 38px; height: 38px; font-size: 1.3rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 2.8rem; }

/* ---------- Cartes ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.card.narrow { max-width: 620px; margin: 30px auto; }
.card h2 { margin-top: 0; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.section-title { margin: 34px 0 14px; font-size: 1.5rem; }
.tip { background: #fff8e1; border: 2px dashed #ffd166; border-radius: 16px; padding: 14px 18px; margin: 18px 0; }
.tip.locked { background: #f1f0f7; border-color: #cfcbe6; }
.chip { display: inline-block; background: color-mix(in srgb, var(--c, #8d99ae) 15%, white); color: var(--ink); padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: .8rem; }

/* ---------- Profils ---------- */
.profiles { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin: 30px 0; }
.profile-card { position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); width: 190px; text-decoration: none; color: var(--ink); transition: transform .15s; }
.profile-card:hover { transform: translateY(-4px) rotate(-1deg); }
.profile-pick, .profile-card.add { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 14px; width: 100%; background: none; border: 0; cursor: pointer; color: inherit; }
.profile-pick b, .profile-card.add b { font-size: 1.15rem; }
.profile-pick small { color: var(--muted); }
.profile-card .icon-btn { position: absolute; top: 8px; right: 8px; color: var(--muted); }
.profile-card.add { border: 3px dashed var(--line); box-shadow: none; background: transparent; }
.muted-actions { justify-content: center; }

.form { display: grid; gap: 22px; }
.form label { display: grid; gap: 6px; font-weight: 800; }
.form input[name=name] { font: inherit; font-size: 1.2rem; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line); outline: none; }
.form input[name=name]:focus { border-color: var(--primary); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 800; margin-bottom: 8px; }
.avatar-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.avatar-grid label, .chips label { cursor: pointer; }
.avatar-grid input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-grid span { display: grid; place-items: center; font-size: 1.8rem; aspect-ratio: 1; border-radius: 14px; background: #f4f2fb; transition: transform .1s; }
.avatar-grid input:checked + span { background: #e3dcff; box-shadow: 0 0 0 3px var(--primary); transform: scale(1.08); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips span { display: inline-block; padding: 8px 16px; border-radius: 999px; background: #f4f2fb; font-weight: 800; }
.chips input:checked + span { background: var(--primary); color: #fff; }
.avatar-grid input:focus-visible + span, .chips input:focus-visible + span { outline: 3px solid var(--accent); }

/* ---------- Accueil ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: center; margin: 10px 0 20px; }
.hero-text { display: flex; gap: 18px; align-items: center; }
.hero-text h1 { margin: 0; font-size: 2rem; }
.hero-text p { margin: 4px 0 0; color: var(--muted); font-size: 1.1rem; }
.rank-card { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); }
.rank-icon { font-size: 2.6rem; }
.rank-card small { color: var(--muted); }
.meter { height: 12px; background: #eeebf8; border-radius: 999px; overflow: hidden; margin: 6px 0; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #ff7ac6); border-radius: inherit; transition: width .5s; min-width: 0; }
.meter.big { height: 16px; }
.mini-meter { display: block; height: 6px; background: #eeebf8; border-radius: 9px; overflow: hidden; margin-top: 6px; width: 100%; }
.mini-meter > span { display: block; height: 100%; background: var(--ok); }

.continue {
  display: flex; align-items: center; gap: 18px; padding: 20px 24px; border-radius: var(--radius); text-decoration: none; color: #fff;
  background: linear-gradient(120deg, #6c4cf5, #b44cf5 60%, #ff7ac6); box-shadow: 0 8px 0 #4b2fd1, 0 16px 30px rgba(108, 76, 245, .3);
  transition: transform .15s;
}
.continue:hover { transform: translateY(-3px); }
.continue-icon { font-size: 3rem; background: rgba(255, 255, 255, .2); border-radius: 20px; width: 80px; height: 80px; display: grid; place-items: center; flex: none; }
.continue small { opacity: .85; font-weight: 700; display: block; }
.continue b { font-family: var(--font-title); font-size: 1.5rem; display: block; }
.continue .btn { background: #fff; color: var(--primary); box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.continue.done { color: var(--ink); background: #fff; box-shadow: var(--shadow); }

.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.level-card { --c: var(--primary); background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border-top: 6px solid var(--c); }
.level-card .meter > span { background: var(--c); }
.level-card.global {
  grid-column: 1 / -1; background: linear-gradient(160deg, #fff, #f3efff); border-top-color: var(--accent);
  display: grid; grid-template-columns: auto 1fr; gap: 4px 28px; align-items: center;
}
.level-card.global > small { grid-column: 1 / -1; font-weight: 800; color: var(--muted); }
.level-card.global .level-num { grid-row: span 3; }
.level-card.global .meter > span { background: linear-gradient(90deg, var(--accent), #ff7ac6); }
.level-num { font-family: var(--font-title); font-size: 3.6rem; font-weight: 700; line-height: 1.1; color: var(--ink); }
.level-num span { font-size: 1.1rem; color: var(--muted); margin-left: 6px; }
.level-num.small { font-size: 2.2rem; }
.equiv { font-weight: 800; }
.note { color: var(--muted); font-size: .95rem; }
.disc-head { display: flex; gap: 8px; align-items: center; }
.disc-icon { font-size: 1.4rem; }

.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.class-tile { background: #fff; border-radius: 18px; padding: 14px; text-align: center; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s; }
.class-tile:hover { transform: translateY(-3px); }
.class-tile b { font-family: var(--font-title); font-size: 1.3rem; display: block; }
.class-tile small { color: var(--muted); font-weight: 700; }
.class-tile.complete { background: var(--ok-bg); }
.class-tile.locked { opacity: .7; }
.class-tile.soon { background: transparent; box-shadow: none; border: 2px dashed var(--line); opacity: .6; }

/* ---------- Parcours ---------- */
.level-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.level-tabs a { text-decoration: none; padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 800; box-shadow: 0 0 0 2px var(--line); }
.level-tabs a.active { background: var(--primary); color: #fff; box-shadow: none; }
.level-tabs a.locked::after { content: ' 🔒'; font-size: .75em; }
.level-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.level-head > div { flex: 1; min-width: 240px; }
.level-head h1 { margin: 10px 0 6px; font-size: 2.2rem; }
.level-head h1 small { font-size: 1rem; color: var(--muted); font-family: var(--font); font-weight: 700; }
.path { display: flex; flex-direction: column; gap: 6px; margin: 30px auto; max-width: 560px; position: relative; }
.path::before { content: ''; position: absolute; left: 50%; top: 40px; bottom: 40px; width: 8px; margin-left: -4px; background: repeating-linear-gradient(#e2dcff 0 14px, transparent 14px 24px); border-radius: 9px; }
.node { --c: var(--primary); display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); position: relative; width: 62%; }
.node:nth-child(odd) { align-self: flex-start; }
.node:nth-child(even) { align-self: flex-end; flex-direction: row-reverse; text-align: right; }
.bubble {
  position: relative; flex: none; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 2.3rem;
  background: #fff; border: 5px solid var(--c); box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 55%, black); transition: transform .15s;
}
.node:hover .bubble { transform: scale(1.08) rotate(-4deg); }
.bubble i { position: absolute; bottom: -4px; right: -4px; width: 30px; height: 30px; border-radius: 50%; background: var(--ok); color: #fff; font-style: normal; font-size: 1rem; display: grid; place-items: center; border: 3px solid #fff; }
.bubble i.sk { background: #8d99ae; font-size: .8rem; }
.node.mastered .bubble { background: color-mix(in srgb, var(--c) 18%, white); }
.node.locked .bubble { border-color: #c9c6d9; box-shadow: 0 6px 0 #a9a5bf; background: #f1f0f7; filter: grayscale(1); }
.node-label { background: #fff; border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); display: grid; }
.node-label small { color: var(--muted); }
.node.locked .node-label { opacity: .7; }
.stars { letter-spacing: 2px; color: #ddd8ee; font-size: 1.1rem; }
.stars .on { color: var(--accent); }

/* ---------- Notion ---------- */
.notion-head { --c: var(--primary); display: flex; gap: 20px; align-items: center; flex-wrap: wrap; background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border-left: 10px solid var(--c); }
.notion-icon { font-size: 3.4rem; }
.notion-head h1 { margin: 6px 0 2px; font-size: 2rem; }
.notion-head p { margin: 0; color: var(--muted); }
.notion-status { display: grid; gap: 6px; justify-items: end; }
.status { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 800; font-size: .8rem; background: #eeebf8; white-space: nowrap; }
.status.mastered { background: var(--ok-bg); color: var(--ok); }
.status.skipped { background: #eceff4; color: #5e677d; }
.status.progress { background: #fff3cd; color: #9a6b00; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0; }
.step { display: grid; justify-items: center; text-align: center; gap: 4px; background: #fff; border-radius: var(--radius); padding: 24px 16px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .15s; border: 3px solid transparent; }
.step:hover { transform: translateY(-4px); border-color: var(--primary-2); }
.step > span:first-child { font-size: 2.6rem; }
.step b { font-family: var(--font-title); font-size: 1.25rem; }
.step small { color: var(--muted); }
.step.done { background: var(--ok-bg); }
.skip-zone { text-align: center; color: var(--muted); margin-top: 10px; }

/* ---------- Leçon ---------- */
.lesson { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; max-width: 760px; margin: 0 auto; }
.lesson h2 { font-size: 1.8rem; margin: 10px 0 16px; }
.lesson-body { font-size: 1.15rem; min-height: 200px; }
.lesson-body ul, .lesson-body ol { padding-left: 1.3em; }
.lesson-body li { margin: 6px 0; }
.dots { display: flex; gap: 6px; }
.dots span { width: 28px; height: 8px; border-radius: 9px; background: #eeebf8; }
.dots span.on { background: var(--primary); }

/* ---------- Visuels ---------- */
.v-svg { max-width: 100%; height: auto; display: inline-block; vertical-align: middle; }
.v-label { font-family: var(--font); font-weight: 700; font-size: 15px; fill: var(--ink); }
.v-row { display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; }
.v-op { font-size: 2rem; font-weight: 800; }
.v-objects { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 2rem; justify-content: center; max-width: 520px; margin: 0 auto; }
.v-group { background: #fff8e6; border-radius: 12px; padding: 2px 8px; letter-spacing: 2px; }
.v-blocks { display: flex; gap: 10px; align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.v-plate { width: 100px; height: 100px; background: #4cc9f0; border: 2px solid #1b6f8a; background-image: linear-gradient(#1b6f8a 1px, transparent 1px), linear-gradient(90deg, #1b6f8a 1px, transparent 1px); background-size: 10px 10px; }
.v-bar { width: 12px; height: 120px; background: #ff9f1c; border: 2px solid #9a5b00; background-image: linear-gradient(#9a5b00 1.5px, transparent 1.5px); background-size: 100% 12px; border-radius: 2px; }
.v-cubes { display: grid; grid-template-columns: repeat(3, 14px); gap: 4px; align-content: end; }
.v-cube { width: 14px; height: 14px; background: #06d6a0; border: 2px solid #047857; border-radius: 2px; }
.v-money { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.v-coin { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .95rem; border: 4px solid; }
.v-coin-euro { background: radial-gradient(circle, #f9e7a1 45%, #c9ccd6 47%); border-color: #a9944a; }
.v-coin-cent { background: #f2c46d; border-color: #b8862b; width: 50px; height: 50px; }
.v-bill { padding: 16px 20px; border-radius: 8px; font-weight: 800; color: #fff; border: 3px solid rgba(0, 0, 0, .2); min-width: 92px; text-align: center; }
.v-bill-5 { background: #9aa5b1; } .v-bill-10 { background: #e07a5f; } .v-bill-20 { background: #4895ef; } .v-bill-50 { background: #f4a261; }
.v-posed { font-family: ui-monospace, Consolas, monospace; font-size: 1.7rem; border-collapse: collapse; margin: 0 auto; }
.v-posed td { width: 1.1em; text-align: center; padding: 0 2px; }
.v-posed .v-posed-op { color: var(--primary); font-weight: 800; }
.v-posed-line td { border-top: 3px solid var(--ink); height: 1.4em; }
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.1; margin: 0 3px; font-weight: 800; }
.frac span:first-child { border-bottom: 2.5px solid currentColor; padding: 0 4px; }
.place { border-collapse: collapse; margin: 12px auto; }
.place th, .place td { border: 2px solid var(--line); padding: 6px 12px; text-align: center; }
.place th { background: #f4f2fb; font-size: .85rem; }
.place td { font-size: 1.3rem; font-weight: 800; min-width: 42px; }
.blank { display: inline-block; min-width: 1.6em; border-bottom: 3px dashed var(--primary); color: var(--primary); text-align: center; }

/* ---------- Exercices ---------- */
.quiz-top { display: flex; align-items: center; gap: 14px; max-width: 760px; margin: 0 auto 14px; }
.quiz-top .link { font-size: 1.4rem; }
.quiz-meter { flex: 1; height: 16px; margin: 0; }
.quiz-count { font-weight: 800; color: var(--muted); }
.streak { font-weight: 800; background: #fff; border-radius: 999px; padding: 2px 10px; box-shadow: 0 0 0 2px var(--line); }
.streak.hot { background: #ffe0cc; animation: pulse 1s infinite; }
.question { max-width: 760px; margin: 0 auto; text-align: center; }
.quiz-title { color: var(--muted); font-weight: 700; }
.prompt { font-size: 1.35rem; font-weight: 700; margin: 14px 0; }
.prompt .big { font-size: 2.4rem; margin-top: 8px; }
.visual { margin: 16px 0; overflow-x: auto; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.choices.short { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.choice { border: 0; cursor: pointer; background: #f4f2fb; border-radius: 16px; padding: 16px; font-size: 1.25rem; font-weight: 800; color: var(--ink); box-shadow: 0 4px 0 #dcd6f2; transition: transform .08s; }
.choice:hover:not(:disabled) { background: #e9e3ff; }
.choice:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #dcd6f2; }
.choice.ok { background: var(--ok-bg); box-shadow: 0 0 0 3px var(--ok); color: var(--ok); }
.choice.ko { background: var(--ko-bg); box-shadow: 0 0 0 3px var(--ko); color: var(--ko); animation: shake .3s; }
.choice:disabled { cursor: default; }
.answer-row { display: flex; gap: 12px; justify-content: center; align-items: flex-end; flex-wrap: wrap; margin-top: 18px; }
.answer-field { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.answer-field span { color: var(--muted); }
.answer-field em { font-style: normal; font-weight: 800; color: var(--muted); }
.answer { font: inherit; font-size: 1.6rem; font-weight: 800; width: 170px; text-align: center; padding: 10px; border-radius: 14px; border: 3px solid var(--line); outline: none; }
.answer:focus { border-color: var(--primary); }
.answer.ok { border-color: var(--ok); background: var(--ok-bg); }
.answer.ko { border-color: var(--ko); background: var(--ko-bg); animation: shake .3s; }
.warn { color: #9a6b00; font-weight: 700; margin-top: 8px; }
.lesson-top, .question-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.question-head { justify-content: center; }
.row.tight { margin-top: 0; gap: 10px; }
.listen.on { background: var(--primary); color: #fff; animation: pulse 1.2s infinite; }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--primary); }
.mat { display: inline-grid; vertical-align: middle; margin: 0 4px; padding: 2px 4px; border-left: 2.5px solid currentColor; border-right: 2.5px solid currentColor; border-radius: 6px; }
.mat > span { padding: 2px 10px; text-align: center; font-weight: 800; }
.math { font-family: 'Cambria Math', 'STIX Two Math', Cambria, Georgia, serif; font-size: 1.1em; }
.lesson-body .formula { background: #f4f2fb; border-radius: 12px; padding: 10px 16px; text-align: center; font-size: 1.2rem; }
.keypad { display: grid; grid-template-columns: repeat(4, minmax(0, 72px)); gap: 8px; justify-content: center; margin-top: 16px; }
.keypad button { border: 0; background: #f4f2fb; border-radius: 14px; padding: 12px; font-size: 1.4rem; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 #dcd6f2; }
.keypad button:active { transform: translateY(2px); box-shadow: none; }
.feedback { margin-top: 20px; border-radius: 18px; padding: 16px 20px; text-align: left; animation: pop .25s; }
.feedback.ok { background: var(--ok-bg); border: 2px solid var(--ok); }
.feedback.ko { background: var(--ko-bg); border: 2px solid var(--ko); }
.feedback p { margin: 6px 0; }
.fb-head { display: flex; justify-content: space-between; align-items: center; font-size: 1.25rem; font-family: var(--font-title); }
.feedback.ok .fb-head { color: var(--ok); }
.feedback.ko .fb-head { color: var(--ko); }
.xp-pop { background: var(--accent); color: var(--ink); border-radius: 999px; padding: 2px 12px; font-size: 1rem; animation: float 1s; }
.feedback .btn { margin-top: 10px; }
.quiz-intro p { font-size: 1.15rem; }
.results-emoji { font-size: 4.5rem; animation: pop .4s; }
.score-big { font-family: var(--font-title); font-size: 3.6rem; color: var(--primary); font-weight: 700; }
.xp-line { color: #9a6b00; font-weight: 800; }

/* ---------- Progrès ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 2px solid var(--line); }
.table td { padding: 8px; border-bottom: 1px solid var(--line); }
.table a { text-decoration: none; color: var(--ink); font-weight: 700; }
.table tr.total td { border-top: 2px solid var(--line); font-weight: 800; }
.xp-chart { display: flex; gap: 10px; align-items: flex-end; height: 180px; padding-top: 10px; }
.xp-chart > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.xp-chart span { width: 100%; max-width: 34px; background: linear-gradient(var(--primary-2), var(--primary)); border-radius: 8px 8px 3px 3px; min-height: 3px; }
.xp-chart small { color: var(--muted); font-size: .75rem; }
.xp-chart b { font-size: .75rem; min-height: 1em; }

/* ---------- Progression par discipline ---------- */
.seg { display: inline-flex; background: #fff; border-radius: 999px; padding: 4px; box-shadow: 0 0 0 2px var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.seg a { text-decoration: none; color: var(--ink); font-weight: 800; padding: 8px 16px; border-radius: 999px; }
.seg a.active { background: var(--primary); color: #fff; }
.disc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.disc-tabs a { --c: var(--primary); text-decoration: none; color: var(--ink); font-weight: 800; padding: 8px 14px; border-radius: 14px; background: #fff; box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--c) 30%, white); }
.disc-tabs a.active { background: var(--c); color: #fff; box-shadow: none; }
.disc-summary { --c: var(--primary); display: flex; gap: 20px; align-items: center; flex-wrap: wrap; border-left: 10px solid var(--c); }
.disc-summary h2 { margin: 0; }
.disc-summary p { margin: 4px 0 0; }
.disc-big { font-size: 3.4rem; }
.disc-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.disc-stats div { display: grid; }
.disc-stats small { color: var(--muted); font-weight: 700; }
.disc-stats b { font-family: var(--font-title); font-size: 1.7rem; }
.disc-stats b.eq { font-size: 1.05rem; font-family: var(--font); max-width: 180px; }
.disc-stats span { color: var(--muted); font-size: .85rem; }
.frise { --c: var(--primary); display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 6px; align-items: end; }
.frise-cell { position: relative; height: 130px; background: #f1eff9; border-radius: 10px 10px 6px 6px; overflow: hidden; text-decoration: none; display: flex; align-items: flex-end; justify-content: center; }
.frise-cell.none { background: repeating-linear-gradient(45deg, #f1eff9 0 6px, #e6e2f3 6px 12px); }
.frise-fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--c); opacity: .85; }
.frise-cell small { position: relative; font-weight: 800; color: var(--ink); font-size: .72rem; padding-bottom: 4px; background: rgba(255,255,255,.75); border-radius: 6px; padding: 0 4px; margin-bottom: 4px; }
.cycle { margin: 22px 0 8px; color: var(--muted); font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; }
.disc-level { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.disc-level-name b { font-family: var(--font-title); font-size: 1.2rem; }
.disc-notions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 8px; }
.disc-notion { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); background: #faf9ff; border-radius: 14px; padding: 8px 12px; border: 2px solid transparent; }
.disc-notion:hover { border-color: var(--primary-2); }
.disc-notion small { display: block; color: var(--muted); font-size: .8rem; }
.disc-notion .stars { font-size: .9rem; }
.dn-icon { font-size: 1.6rem; }
.disc-notion.mastered { background: var(--ok-bg); }

/* ---------- Confettis & animations ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 100; }
.confetti span { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes float { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .confetti { display: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .topbar nav a span { display: none; }
  .logo { font-size: 0; }
  .logo span { font-size: 1.6rem; }
  .topbar nav a { font-size: 1.3rem; padding: 6px 10px; }
  .steps { grid-template-columns: 1fr; }
  .level-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .level-card.global { grid-template-columns: 1fr; }
  .level-card.global .level-num { grid-row: auto; }
  .continue { flex-wrap: wrap; }
  .continue .btn { width: 100%; }
  .node { width: 88%; }
  .bubble { width: 68px; height: 68px; font-size: 1.9rem; }
  .avatar-grid { grid-template-columns: repeat(4, 1fr); }
  .choices { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .disc-level { grid-template-columns: 1fr; gap: 6px; }
  .frise { grid-template-columns: repeat(6, 1fr); }
  .table.notions th:nth-child(5), .table.notions td:nth-child(5) { display: none; }
  .card { padding: 18px; }
  .hero-text h1 { font-size: 1.6rem; }
  .avatar.xl { width: 64px; height: 64px; font-size: 2.1rem; }
}
.disc-notion .status { margin-top: 4px; }
.disc-notion .grow { display: grid; justify-items: start; }

/* ---------- Schémas interactifs ---------- */
.w { background: #fbfaff; border: 2px solid var(--line); border-radius: 18px; padding: 14px; margin: 14px 0; }
.w-view { text-align: center; }
.w-svg { width: 100%; max-width: 480px; height: auto; display: inline-block; }
.w-pie { max-width: 150px; }
.w-info { margin: 10px 0 4px; font-size: .98rem; line-height: 1.5; min-height: 1.5em; }
.w-ctrl { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px 18px; margin-top: 8px; }
.w-sl { display: grid; gap: 2px; font-size: .9rem; font-weight: 700; color: var(--muted); }
.w-sl b { color: var(--primary); }
.w-sl input { width: 100%; accent-color: var(--primary); }
.w-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.w-seg { display: flex; gap: 6px; flex-wrap: wrap; grid-column: 1 / -1; margin-bottom: 6px; }
.w-seg button { border: 0; background: #fff; box-shadow: 0 0 0 2px var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 800; cursor: pointer; }
.w-seg button.on { background: var(--primary); color: #fff; box-shadow: none; }
.w-grid { stroke: #e6e3f3; stroke-width: 1; }
.w-grid2 { stroke: #c9c1f3; stroke-width: 1; }
.w-axis { stroke: #2b2d42; stroke-width: 1.6; }
.w-tick { font-size: 11px; fill: #6c7086; font-family: var(--font); }
.w-lbl { font-size: 15px; font-weight: 800; fill: #2b2d42; font-family: var(--font); }
.w-curve { fill: none; stroke: #4361ee; stroke-width: 3; }
.w-curve2 { fill: none; stroke: #ff9f1c; stroke-width: 3; }
.w-line { stroke: #2b2d42; stroke-width: 2.5; fill: none; }
.w-dash { stroke: #8d99ae; stroke-width: 1.6; stroke-dasharray: 5 4; fill: none; }
.w-pt { fill: #ef476f; stroke: #fff; stroke-width: 2; }
.w-pt2 { fill: #ff9f1c; stroke: #fff; stroke-width: 2; }
.w-rect { fill: rgba(6, 214, 160, .35); stroke: #06a77d; stroke-width: 1.2; transition: all .2s; }
.w-area { fill: rgba(6, 214, 160, .35); stroke: #06a77d; stroke-width: 2; }
.w-band { fill: rgba(6, 214, 160, .18); }
.w-circle { fill: none; stroke: #2b2d42; stroke-width: 2; }
.w-cos { stroke: #4361ee; stroke-width: 4; }
.w-sin { stroke: #ef476f; stroke-width: 4; }
.w-cos-t { fill: #4361ee; color: #4361ee; }
.w-sin-t { fill: #ef476f; color: #ef476f; }
.w-vec { stroke: #4361ee; stroke-width: 3.5; color: #4361ee; }
.w-vec2 { stroke: #ff9f1c; stroke-width: 3.5; color: #ff9f1c; }
.w-vec3 { stroke: #06a77d; stroke-width: 3.5; color: #06a77d; }
.w-eig { stroke: #7b2cbf; stroke-width: 2; stroke-dasharray: 6 5; }
.w-ghost { fill: rgba(141, 153, 174, .15); stroke: #8d99ae; stroke-dasharray: 4 3; }
.w-universe { fill: #fff; stroke: #2b2d42; stroke-width: 2; }
.w-soft { fill: rgba(108, 76, 245, .08); }
.w-soft-o { fill: none; }
.w-white { fill: #fff; }
.w-hl { fill: rgba(255, 159, 28, .55); }
.w-ring { fill: none; stroke: #2b2d42; stroke-width: 2.5; }
.w-true { color: var(--ok); font-weight: 800; }
.w-false { color: var(--ko); font-weight: 800; }
.w-truth td, .w-truth th { min-width: 70px; }
.w-bar { fill: #8f74ff; transition: all .3s; }
.w-sqA { fill: rgba(67, 97, 238, .3); stroke: #4361ee; stroke-width: 2; }
.w-sqB { fill: rgba(255, 159, 28, .35); stroke: #ff9f1c; stroke-width: 2; }
.w-sqC { fill: rgba(6, 214, 160, .3); stroke: #06a77d; stroke-width: 2; }
.w-a { color: #4361ee; } .w-b { color: #d97f00; } .w-c { color: #06a77d; }
.w-tri { fill: #fff3c4; stroke: #2b2d42; stroke-width: 2.5; stroke-linejoin: round; }
.w-jump { fill: none; stroke: #06a77d; stroke-width: 3; stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw .5s forwards; }
.w-jump2 { fill: none; stroke: #ef476f; stroke-width: 3; stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw .5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.w-clock { fill: #fff; stroke: #2b2d42; stroke-width: 5; }
.w-clocksvg { max-width: 240px; }
.w-hour { stroke: #ef476f; stroke-width: 8; stroke-linecap: round; }
.w-min { stroke: #118ab2; stroke-width: 5; stroke-linecap: round; }
.w-dotc { fill: #2b2d42; }
.w-digital { font-family: var(--font-title); font-size: 1.8rem; color: var(--primary); }
.w-proto { fill: #fff8e6; stroke: #2b2d42; stroke-width: 2; }
.w-cell { fill: #cdeffd; stroke: #4cc9f0; stroke-width: 1.5; animation: pop .25s both; }
.w-perim { fill: none; stroke: #ef476f; stroke-width: 4; }
.w-walk { fill: none; stroke-width: 1.6; opacity: .85; }
.w-stateA { fill: rgba(67, 97, 238, .3); stroke: #4361ee; stroke-width: 3; transition: r .3s; }
.w-stateB { fill: rgba(255, 159, 28, .35); stroke: #ff9f1c; stroke-width: 3; transition: r .3s; }
.w-mean { stroke: #4361ee; stroke-width: 3; } .w-med { stroke: #06a77d; stroke-width: 3; stroke-dasharray: 5 3; }
.w-mean-t { fill: #4361ee; color: #4361ee; } .w-med-t { fill: #06a77d; color: #06a77d; }
.w-steps .w-step { background: #fff; border-left: 4px solid var(--primary-2); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.w-step-new { animation: pop .3s; }

/* ---------- Leçon enrichie et fiche ---------- */
.why { background: linear-gradient(120deg, #efeaff, #fff4e0); border-radius: 16px; padding: 14px 18px; margin: 6px 0 14px; }
.why b:first-child { display: block; font-family: var(--font-title); color: var(--primary); margin-bottom: 4px; }
.box { border-radius: 16px; padding: 14px 18px; margin: 14px 0; }
.box h3 { margin: 0 0 6px; font-size: 1.1rem; }
.box ul { margin: 0; padding-left: 1.2em; }
.box li { margin: 4px 0; }
.box.keys { background: var(--ok-bg); border: 2px solid #9fe3c9; }
.box.traps { background: #fff4e5; border: 2px solid #ffd08a; }
.box.example { background: #f1f4ff; border: 2px solid #c8d2ff; }
.box.try { background: #fdf0ff; border: 2px solid #e8c2f2; }
.mini-q .answer { width: 140px; font-size: 1.2rem; }
.mini-q .choices { margin-top: 10px; }
.mini-q .prompt { font-size: 1.1rem; margin: 6px 0; }
.mini-q .feedback { margin-top: 10px; }
.lesson-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.lesson-nav span { font-size: .8rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #f1eff9; color: var(--muted); }
.lesson-nav span.on { background: var(--primary); color: #fff; }
.fiche { max-width: 860px; margin: 0 auto; }
.fiche-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.fiche-head h1 { margin: 0; }
.fiche-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fiche section.part { border-top: 2px solid var(--line); padding-top: 6px; }
.fiche section.part h3 { margin: 10px 0 4px; color: var(--primary); }
.fiche .w { break-inside: avoid; }
.fiche-link { text-decoration: none; font-size: 1.1rem; }
@media (max-width: 640px) { .fiche-grid { grid-template-columns: 1fr; } }
@media print {
  .topbar, .no-print, .w-ctrl, .w-btns { display: none !important; }
  body { background: #fff; }
  .card, .lesson { box-shadow: none; }
}
.disc-notion a { color: var(--ink); text-decoration: none; }
.disc-notion .fiche-link { font-size: .8rem; font-weight: 800; color: var(--primary); margin-left: 6px; }
.jump-card { display: flex; gap: 16px; align-items: center; margin: 16px 0; padding: 16px 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border: 3px dashed #ffd166; flex-wrap: wrap; }
.jump-card > span:first-child { font-size: 2.4rem; }
.jump-card b { display: block; font-family: var(--font-title); font-size: 1.2rem; }
.jump-card small { color: var(--muted); }
.placement-bars { display: flex; gap: 6px; justify-content: center; align-items: flex-end; height: 110px; margin-top: 8px; }
.placement-bars > span { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; width: 34px; }
.placement-bars i { display: block; width: 22px; border-radius: 6px 6px 2px 2px; background: var(--ok); min-height: 3px; }
.placement-bars span.ko i { background: #ffb3a7; }
.placement-bars small { font-size: .65rem; font-weight: 800; color: var(--muted); }

/* ---------- Calculatrice ---------- */
.calc-zone { margin-top: 14px; }
.calc { margin: 10px auto 0; max-width: 340px; background: #2b2d42; border-radius: 22px; padding: 14px; box-shadow: 0 10px 24px rgba(43, 45, 66, .25); animation: pop .2s; text-align: left; }
.calc-sci { max-width: 380px; }
.calc-screen { position: relative; background: #e9f7ef; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-family: ui-monospace, Consolas, monospace; min-height: 64px; }
.calc-expr { font-size: 1.05rem; color: #3d4a43; word-break: break-all; min-height: 1.3em; }
.calc-res { font-size: 1.5rem; font-weight: 800; text-align: right; color: #1b2a22; min-height: 1.3em; word-break: break-all; }
.calc-res.err { font-size: .95rem; color: var(--ko); }
.calc-mode { position: absolute; top: 6px; right: 10px; font-size: .7rem; font-weight: 800; color: #5e7a6b; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 7px; }
.calc-keys button { border: 0; border-radius: 10px; padding: 11px 0; font-size: 1.1rem; font-weight: 800; background: #4a4e69; color: #fff; cursor: pointer; box-shadow: 0 3px 0 #1d1f2e; }
.calc-keys button:active { transform: translateY(2px); box-shadow: none; }
.calc-keys button.op { background: #8f74ff; }
.calc-keys button.fn { background: #9a8c98; }
.calc-keys button.eq { background: #ffb703; color: #2b2d42; }
.calc-keys.sci button { background: #3a3d56; font-size: .92rem; padding: 8px 0; }
.calc-use { width: 100%; margin-top: 4px; }
.calc-input { width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 0; font: inherit; font-size: .9rem; }
.calc-chip { margin-top: 8px; background: #fff3cd; }

/* ---------- Brouillon ---------- */
.sketch { margin: 10px auto 0; max-width: 680px; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 10px; text-align: left; animation: pop .2s; }
.sketch-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-bottom: 8px; }
.sketch-group { display: flex; gap: 4px; flex-wrap: wrap; }
.sketch-bar button { border: 0; background: #f4f2fb; border-radius: 10px; min-width: 38px; height: 38px; font-size: 1.1rem; cursor: pointer; }
.sketch-bar button.on { background: #e3dcff; box-shadow: inset 0 0 0 2px var(--primary); }
.sketch-bar button.sw { min-width: 30px; width: 30px; height: 30px; margin-top: 4px; border-radius: 50%; background: var(--sw); }
.sketch-bar button.sw.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--sw); }
.sketch-area { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: #fffef8; border: 1px solid var(--line); }
.sketch-area canvas { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }
.sketch-area canvas[data-tool="eraser"] { cursor: cell; }
.sketch-bg { position: absolute; inset: 0; display: grid; place-items: center; opacity: .55; pointer-events: none; }
.sketch-bg svg, .sketch-bg .v-svg { max-height: 100%; max-width: 100%; }
.sketch-hint { font-size: .8rem; color: var(--muted); margin: 6px 2px 0; }

/* ---------- Mise en page adaptative des questions ---------- */
.tool-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.tool-btns .btn.on { background: var(--primary); color: #fff; }
.q-tools > div { margin-top: 12px; }
.q-tools .calc { margin-top: 0; }
.q-tools .sketch { margin-top: 0; max-width: none; }
@media (min-width: 1000px) {
  .page.wide { max-width: min(1700px, 100%); }
  .page.wide .quiz-top { max-width: none; }
  .question.tools-open { max-width: none; display: grid; grid-template-columns: minmax(360px, 1fr) minmax(400px, 1.35fr); gap: 24px; align-items: start; text-align: center; }
  .question.tools-open:not(.two-tools):has(#draw-box[hidden]) { grid-template-columns: minmax(0, 1fr) 380px; }
  .question.tools-open .q-tools { position: sticky; top: 76px; }
  .question.tools-open .q-tools > div { margin-top: 0; }
  .question.tools-open .q-tools > div + div:not([hidden]) { margin-top: 14px; }
  .question.tools-open .visual .v-svg { max-height: 46vh; }
}
@media (min-width: 1400px) {
  .question.two-tools { grid-template-columns: minmax(340px, 0.9fr) minmax(560px, 2fr); }
  .question.two-tools .q-tools { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; }
  .question.two-tools .q-tools > div + div:not([hidden]) { margin-top: 0; }
}
@media (max-width: 640px) {
  .calc { max-width: none; }
  .sketch-bar button { min-width: 34px; height: 34px; }
}
.calc-field { width: 100%; border: 0; background: transparent; font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; color: #1b2a22; outline: none; padding: 2px 0; }
.calc-field::placeholder { color: #8aa596; }
.calc-screen:focus-within { box-shadow: 0 0 0 3px #ffb703; }
.calc-res small { font-size: .8rem; font-weight: 600; color: #5e7a6b; }
.calc-res.preview { color: #8aa596; font-weight: 700; }
.calc-help { color: #c9c6dc; font-size: .72rem; margin: 8px 2px 0; line-height: 1.6; }
.calc-help kbd { background: #4a4e69; color: #fff; border-radius: 4px; padding: 0 4px; font-size: .7rem; }
.sketch-text { position: absolute; z-index: 2; min-width: 120px; font: 700 17px Nunito, sans-serif; border: 2px dashed var(--primary-2); border-radius: 8px; background: rgba(255, 255, 255, .9); padding: 2px 6px; outline: none; }
.sketch-area canvas[data-tool="text"] { cursor: text; }
.jump-card.finder { border-color: #b9a8ff; }
.study-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 18px; }
.study-card { display: grid; gap: 4px; justify-items: start; padding: 18px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border: 3px solid transparent; transition: transform .15s; }
.study-card:hover { transform: translateY(-3px); border-color: var(--primary-2); }
.study-card > span { font-size: 2.2rem; }
.study-card b { font-family: var(--font-title); font-size: 1.15rem; }
.study-card small { color: var(--muted); }
.study-card.mine { background: #f3efff; border-color: #c9bbff; }

/* ---------- Compte parent ---------- */
.account-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; text-align: left; max-width: 760px; margin: 10px auto 18px; padding: 16px 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); border: 2px dashed #c9bbff; }
.account-card.on { border-style: solid; border-color: #9fe3c9; background: #f4fffa; }
.account-card > span { font-size: 2rem; }
.account-card b { display: block; }
.account-card small { color: var(--muted); }
.acct-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.acct-form input { font: inherit; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line); min-width: 220px; }
.acct-form input#acct-code { min-width: 110px; letter-spacing: 3px; font-weight: 800; }
.acct-msg { margin: 8px 0 0; font-size: .9rem; color: #9a6b00; }
.danger-text { color: var(--ko) !important; }
.privacy li { margin: 6px 0; }
.account-card .grow { flex: 1 1 280px; min-width: 0; }
.profiles > .profile-card.add { width: 190px; }
