:root {
  --bg: #fff8f6;
  --bg-2: #fbeef0;
  --card: #ffffff;
  --ink: #3a2328;
  --ink-2: #7a5d64;
  --line: #efdde0;
  --rose: #d9467a;
  --rose-2: #b8325f;
  --rose-soft: #fbe3ea;
  --art: #f9ecee;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(80, 30, 40, .06), 0 8px 24px rgba(80, 30, 40, .06);
  --serif: Fraunces, Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
h2 { font-size: 1.45rem; margin-top: 2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
a { color: var(--rose-2); }
button { font: inherit; color: inherit; cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }

.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 600; color: var(--rose-2); margin-bottom: .4rem; }
.lead { color: var(--ink-2); font-size: 1.05rem; max-width: 38rem; }
.small { color: var(--ink-2); font-size: .85rem; margin-top: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.row.center { justify-content: center; margin-top: 2rem; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .45rem; justify-content: center;
  min-height: 44px; padding: .6rem 1.15rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card);
  font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--ink);
  transition: transform .12s, background .15s, border-color .15s;
}
.btn:hover { border-color: #e3c3ca; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--rose); border-color: var(--rose); color: #fff; }
.btn.primary:hover { background: var(--rose-2); border-color: var(--rose-2); }
.btn.ghost { background: transparent; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn[aria-pressed="true"] svg { fill: var(--rose); stroke: var(--rose); }
.link { background: none; border: 0; padding: .3rem 0; color: var(--rose-2); font-weight: 600; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: #a33; }
:focus-visible { outline: 2.5px solid var(--rose); outline-offset: 2px; }

/* ---------- en-tête ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .7rem max(1rem, calc((100vw - 1180px) / 2));
  background: rgba(255, 248, 246, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { font: 600 1.6rem var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--rose); font-style: italic; }
.tabs { display: flex; gap: .25rem; margin-right: auto; }
.tabs a {
  position: relative; display: flex; align-items: center; gap: .4rem;
  padding: .5rem .85rem; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem;
}
.tabs a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tabs a[aria-current="page"] { background: var(--rose-soft); color: var(--rose-2); }
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rose); color: #fff;
  font-size: .7rem; line-height: 18px; text-align: center;
}
.skin-pick { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--ink-2); }
.skin { display: flex; gap: 4px; }
.skin button {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: var(--c);
  box-shadow: 0 0 0 1px var(--line); padding: 0;
}
.skin button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--rose); }

.lang {
  display: inline-grid; place-items: center; text-decoration: none; color: var(--ink);
  border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  min-width: 44px; height: 34px; padding: 0 .7rem; font-weight: 600; font-size: .8rem; letter-spacing: .04em;
}
.lang:hover { border-color: var(--rose); color: var(--rose-2); }

main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 6rem; }

/* ---------- accueil ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem; align-items: center;
  background: linear-gradient(135deg, #fbe3ea, #fdf1e8); border-radius: 28px; padding: clamp(1.5rem, 4vw, 3rem);
}
.hero h1 em { font-style: italic; color: var(--rose-2); }
.hero-art { display: block; color: var(--ink); text-decoration: none; position: relative; border: 0; background: rgba(255, 255, 255, .55); border-radius: 24px; padding: 1rem 1rem 2.6rem; }
.hero-art .hand { width: 100%; max-width: 360px; margin: 0 auto; animation: fade .6s ease; }
.hero-name {
  position: absolute; left: 50%; bottom: .9rem; transform: translateX(-50%);
  font-family: var(--serif); font-size: 1.05rem; white-space: nowrap;
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- mood ---------- */
.answer .big { font-size: 1.6rem; line-height: 1; }
.answers.moods-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.answers.moods-grid .answer { flex-direction: column; text-align: center; justify-content: center; padding: 1rem .5rem; }
.shortcut { display: block; margin: 1.5rem auto 0; }
.mood-banner {
  display: flex; align-items: center; gap: 1rem; margin: .4rem 0 1.4rem;
  background: linear-gradient(135deg, #fbe3ea, #fdf1e8); border-radius: var(--radius); padding: 1rem 1.3rem;
}
.mood-banner .big { font-size: 2.6rem; line-height: 1; }
.mood-banner h2 { margin: 0 0 .15rem; font-size: 1.3rem; }
.mood-banner p { margin: 0; color: var(--ink-2); }
.featured { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2rem; align-items: center; background: var(--card); border-radius: 24px; padding: 1.4rem; box-shadow: var(--shadow); }
.featured-art { display: block; position: relative; border: 0; background: var(--art); border-radius: 20px; padding: 1.2rem; }
.featured-art .hand { max-width: 380px; margin: 0 auto; }
.featured h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }

.gallery-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin: 2.5rem 0 1rem; }
.gallery-head h2 { margin: 0; }
.search, .text, textarea {
  font: inherit; color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: 14px; padding: .65rem 1rem; min-height: 44px;
}
.search { flex: 1; max-width: 380px; border-radius: 999px; }
.text { width: 100%; }

.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1rem; }
.filters summary { cursor: pointer; font-weight: 600; padding: .5rem 0; display: flex; align-items: center; gap: .5rem; }
.filters[open] summary { margin-bottom: .3rem; }
.pill { background: var(--rose); color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 .5rem; }
.filter-row { display: flex; align-items: baseline; gap: .8rem; padding: .35rem 0; }
.filter-label { width: 82px; flex: none; font-size: .82rem; color: var(--ink-2); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: .35rem .8rem; font-size: .88rem;
  min-height: 36px;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); display: inline-block; }
.filters .link { margin: .4rem 0 .5rem; }
.count { color: var(--ink-2); font-size: .9rem; margin: 1rem 0 .6rem; }

/* ---------- cartes ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.card { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card-art { display: block; border: 0; background: var(--art); padding: 1rem 1rem .2rem; transition: background .2s; }
.card-art:hover { background: #f6e2e6; }
.card-art .hand { width: 100%; transition: transform .25s; }
.card-art:hover .hand { transform: translateY(-3px); }
.card-body { padding: .8rem 1rem 1rem; }
.card-body h3 { margin: 0 0 .15rem; }
.card-body h3 a, .guide-card h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover, .guide-card h3 a:hover { color: var(--rose-2); }
.meta { color: var(--ink-2); font-size: .85rem; margin: 0; }
.fav {
  position: absolute; top: .6rem; right: .6rem; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .9); display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
.fav svg { width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 2; transition: transform .2s; }
.fav[aria-pressed="true"] svg { fill: var(--rose); stroke: var(--rose); transform: scale(1.1); }
.match {
  position: absolute; top: .7rem; left: .7rem; background: var(--ink); color: #fff; font-weight: 600; font-size: .8rem;
  border-radius: 999px; padding: .2rem .65rem;
}
.why { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.why li { background: var(--rose-soft); color: var(--rose-2); font-size: .75rem; border-radius: 999px; padding: .15rem .55rem; }
.card-actions { display: flex; gap: 1rem; margin-top: .4rem; }
.empty { text-align: center; padding: 2rem 1rem; background: var(--card); border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); }

/* ---------- fenêtre ---------- */
dialog {
  width: min(920px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem);
  border: 0; border-radius: 26px; padding: 0; background: var(--bg); color: var(--ink);
  box-shadow: 0 30px 80px rgba(60, 20, 30, .3);
}
dialog.narrow { width: min(560px, calc(100vw - 2rem)); }
dialog::backdrop { background: rgba(50, 25, 32, .45); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
#modal-body { padding: clamp(1.2rem, 4vw, 2rem); overflow: auto; max-height: calc(100dvh - 2rem); }
.close {
  position: absolute; top: .8rem; right: .8rem; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow);
}
.close svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; align-items: start; }
.detail-art, .fiche-art { background: var(--art); border-radius: 20px; padding: 1.2rem; }
.detail-info h2 { font-size: 1.9rem; margin-top: 0; }
.tags { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.tags li { background: var(--rose-soft); color: var(--rose-2); border-radius: 999px; font-size: .78rem; padding: .15rem .6rem; font-weight: 500; }
.tags a { color: inherit; text-decoration: none; }
.tags a:hover { text-decoration: underline; }
.specs { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 100px 1fr; gap: .8rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.specs dt { color: var(--ink-2); font-weight: 600; }
.specs dd { margin: 0; }
.fiche h2, .duel h2, .duel-win h2 { margin-top: 0; padding-right: 2.5rem; }
.fiche-art { margin: 1rem 0; }
.fiche-art .hand { max-width: 380px; margin: 0 auto; }
.field { display: grid; gap: .4rem; margin-top: 1.2rem; font-weight: 600; font-size: .9rem; }
.field textarea { font-weight: 400; font-size: .92rem; resize: vertical; width: 100%; }

/* ---------- page d'un modèle, pages d'idées ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: var(--ink-2); margin: 0 0 1rem; }
.crumbs a { color: var(--ink-2); }
.detail.page { background: var(--card); border-radius: 24px; padding: clamp(1rem, 3vw, 1.6rem); box-shadow: var(--shadow); }
.detail-art img { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto; }
.detail-info h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.ideas { max-width: 1180px; }
.chips.links .chip { text-decoration: none; color: var(--ink); }
.chips.links .chip:hover { border-color: var(--rose); color: var(--rose-2); }
.notfound { max-width: 560px; margin: 3rem auto; }
.about { max-width: 760px; margin: 3rem auto 0; }
.about > p { color: var(--ink-2); }
.about h3 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 1.2rem 0 .5rem; }
.faq { display: grid; gap: .5rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .2rem 1rem; }
.faq summary { cursor: pointer; font-weight: 600; padding: .65rem 0; }
.faq p { color: var(--ink-2); margin: 0 0 .8rem; }

/* ---------- pied de page ---------- */
.foot { max-width: 1180px; margin: 0 auto; padding: 2rem 1rem 3rem; border-top: 1px solid var(--line); }
.foot h2 { margin-top: 0; font-size: 1.2rem; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem 1.5rem; }
.foot h3 { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 0 0 .4rem; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; font-size: .9rem; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { color: var(--rose-2); text-decoration: underline; }

/* ---------- quiz ---------- */
.quiz, .results, .favs, .guide { max-width: 900px; margin: 0 auto; }
.quiz { max-width: 720px; text-align: center; }
.quiz .lead { margin: 0 auto 1rem; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: .5rem 0 2rem; }
.progress span { display: block; height: 100%; background: var(--rose); border-radius: 3px; transition: width .3s; }
.answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem; margin-top: 1.5rem; }
.answers.shapes { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }
.answer {
  display: flex; align-items: center; gap: .7rem; text-align: left;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 16px; padding: .9rem 1rem; min-height: 60px;
  font-weight: 500; transition: border-color .15s, transform .12s;
}
.answer:hover { border-color: #e3b5c2; }
.answer:active { transform: scale(.98); }
.answer[aria-pressed="true"] { border-color: var(--rose); background: var(--rose-soft); }
.answers.shapes .answer { flex-direction: column; justify-content: end; text-align: center; padding: 1rem .5rem .8rem; }
.answer .nail { width: 26px; height: auto; }
.answer .big { font-size: 1.5rem; line-height: 1; }
.big-dot { width: 26px; height: 26px; flex: none; }
.quiz-nav { justify-content: center; margin-top: 1.5rem; }

/* ---------- créateur ---------- */
.creator { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2rem; align-items: start; }
.creator-preview { position: sticky; top: 84px; }
.stage { background: linear-gradient(160deg, #fbe3ea, #fdf1e8); border-radius: 26px; padding: 1.5rem 1.5rem .5rem; }
.stage .hand { max-width: 460px; margin: 0 auto; }
.est { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; justify-content: center; }
.est span { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .7rem; font-size: .82rem; color: var(--ink-2); }
.ctl { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.ctl h3 { font-family: var(--sans); font-size: .9rem; font-weight: 600; margin-bottom: .6rem; }
.ctl h3 small { font-weight: 400; color: var(--ink-2); margin-left: .3rem; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: .45rem; }
.opt {
  display: flex; flex-direction: column; align-items: center; justify-content: end; gap: .3rem;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: .55rem .3rem .45rem; font-size: .78rem;
  min-height: 84px;
}
.opt[aria-pressed="true"] { border-color: var(--rose); background: var(--rose-soft); }
.opt .ico .nail { width: 24px; height: auto; max-height: 52px; }
.seg { display: inline-flex; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: .45rem 1rem; min-height: 38px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.swatches { display: flex; flex-wrap: wrap; gap: .4rem; }
.sw {
  width: 34px; height: 34px; border-radius: 50%; padding: 0; border: 2px solid #fff; background: var(--c);
  box-shadow: 0 0 0 1px rgba(60, 30, 40, .16); position: relative;
}
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--rose); }
.sw.custom { background: conic-gradient(#ff6b6b, #ffd93d, #6bcb77, #4d96ff, #c77dff, #ff6b6b); cursor: pointer; overflow: hidden; }
.sw.custom input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.switch { display: flex; align-items: center; gap: .7rem; font-weight: 600; font-size: .95rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + span { background: var(--rose); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--rose); outline-offset: 2px; }
.ring-ctl { margin-top: 1rem; padding: 1rem; background: var(--card); border-radius: 16px; border: 1px solid var(--line); }
.ring-ctl h3 + * { margin-bottom: 1rem; }
.actions { padding-top: .5rem; }

/* ---------- favoris & duel ---------- */
.duel-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: linear-gradient(135deg, #fbe3ea, #fdf1e8); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-top: 1rem;
}
.duel-cta h2 { margin: 0 0 .2rem; }
.duel-cta p { margin: 0; color: var(--ink-2); }
.duel { text-align: center; }
.duel-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; margin-top: 1rem; }
.duel-pick {
  border: 2px solid var(--line); background: var(--art); border-radius: 20px; padding: 1rem .8rem .8rem;
  display: grid; gap: .5rem; font-family: var(--serif); font-size: 1.05rem; transition: border-color .15s, transform .15s;
}
.duel-pick:hover { border-color: var(--rose); transform: translateY(-2px); }
.vs { font-family: var(--serif); font-style: italic; color: var(--ink-2); }
.duel-win { text-align: center; }

/* ---------- guide ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.guide-card { display: flex; gap: 1rem; background: var(--card); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.guide-card p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.guide-ico { flex: none; width: 54px; display: grid; place-items: center; background: var(--art); border-radius: 14px; padding: .6rem 0; }
.guide-ico .nail { width: 26px; height: auto; }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
td:first-child { font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .8rem; }
.tips > div { background: var(--card); border-radius: var(--radius); padding: 1rem 1.1rem; border-left: 4px solid var(--rose); box-shadow: var(--shadow); }
.tips p { margin: 0; color: var(--ink-2); font-size: .92rem; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 20px); z-index: 50;
  background: var(--ink); color: #fff; border-radius: 999px; padding: .6rem 1.2rem; font-weight: 500; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- téléphone ---------- */
@media (max-width: 799px) {
  /* pas de backdrop-filter ici : il ferait de l'en-tête le repère de la barre d'onglets fixée en bas */
  .top { gap: .8rem; justify-content: space-between; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0;
    justify-content: space-around; gap: 0;
    background: rgba(255, 255, 255, .95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
  }
  .tabs a { flex-direction: column; gap: .1rem; font-size: .7rem; padding: .35rem .5rem; border-radius: 12px; flex: 1; }
  .tabs a svg { width: 22px; height: 22px; }
  .badge { position: absolute; top: 2px; left: calc(50% + 6px); }
  .skin-pick > span { display: none; }
  .skin button { width: 20px; height: 20px; }
  main { padding-bottom: 2rem; }
  .foot { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toast { bottom: calc(5.5rem + env(safe-area-inset-bottom)); }

  .lang { height: 30px; min-width: 38px; padding: 0 .5rem; }
  .skin { gap: 3px; }
  .answers.moods-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .answers.moods-grid .answer { font-size: .82rem; padding: .8rem .3rem; min-height: 0; }
  .featured { grid-template-columns: 1fr; gap: 1rem; padding: 1rem; }
  .featured-art .hand { max-width: 260px; }

  .hero { grid-template-columns: 1fr; gap: 1rem; border-radius: 22px; }
  .hero-art { order: -1; padding-bottom: 2.4rem; }
  .hero-art .hand { max-width: 260px; }
  .gallery-head { margin-top: 2rem; }
  .search { max-width: none; width: 100%; }
  .filter-row { flex-direction: column; align-items: stretch; gap: .3rem; }
  .filter-row .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -1rem; padding: 0 1rem .2rem; scrollbar-width: none; }
  .filter-row .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .card-art { padding: .6rem .6rem 0; }
  .card-body { padding: .6rem .75rem .8rem; }
  .card-body h3 { font-size: .95rem; }
  .meta { font-size: .78rem; }
  .fav { width: 34px; height: 34px; top: .4rem; right: .4rem; }
  .fav svg { width: 17px; height: 17px; }
  .card-actions { gap: .7rem; flex-wrap: wrap; }

  dialog, dialog.narrow { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  #modal-body { max-height: 92dvh; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
  .detail { grid-template-columns: 1fr; gap: 1rem; }
  .detail-art .hand, .detail-art img { max-width: 300px; margin: 0 auto; }
  .specs div { grid-template-columns: 88px 1fr; }

  .creator { grid-template-columns: 1fr; gap: .5rem; }
  .creator-preview { top: 58px; z-index: 5; background: var(--bg); padding-bottom: .4rem; margin: 0 -1rem; padding: 0 1rem .4rem; }
  .stage { padding: .6rem 1rem 0; border-radius: 20px; }
  .stage .hand { max-width: 230px; }
  .est { margin-top: .4rem; }
  .est span { font-size: .72rem; }
  .opts { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); }
  .sw { width: 32px; height: 32px; }

  .duel-pair { grid-template-columns: 1fr 1fr; }
  .vs { display: none; }
}

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