* { box-sizing: border-box; }
body { margin: 0; font-family: "Trebuchet MS", sans-serif; background: url("images/fond.png") center / cover fixed, linear-gradient(#ffe3f1, #e4e6ff); color: #2b2250; min-height: 100vh; }
main { max-width: 760px; margin: 0 auto; padding: 16px; text-align: center; }
h1 { font-size: 2.2rem; margin: 8px 0; color: #c2308a; }
button, .btn { font: inherit; border: 0; border-radius: 12px; padding: 10px 16px; background: #fff; color: #2b2250; cursor: pointer; box-shadow: 0 2px 0 #b9b3dd; text-decoration: none; display: inline-block; }
button.big { background: #c2308a; color: #fff; font-size: 1.1rem; box-shadow: 0 3px 0 #86205f; }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.menu { display: flex; flex-direction: column; gap: 14px; max-width: 320px; margin: 24px auto; }
.menu button { font-size: 1.3rem; padding: 18px; }
.theme { font-size: 1.2rem; } .hint { color: #6a5fa0; }
.pad-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-bottom: 10px; }
.swatches { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.sw { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #888; }
.sw.on { box-shadow: 0 0 0 3px #c2308a; }
.eraser.on { background: #c2308a; color: #fff; }
.mannequin { width: 320px; max-width: 100%; margin: 0 auto; background: #fff; border-radius: 14px; overflow: hidden; }
.part { position: relative; border-bottom: 2px dashed #c9c3ee; }
.part:last-child { border-bottom: 0; }
.part.active { outline: 3px solid #c2308a; outline-offset: -3px; }
.part canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.label { position: absolute; left: 6px; top: 4px; font-size: .8rem; color: #b5afd8; pointer-events: none; }
.result { width: 280px; max-width: 100%; border-radius: 14px; background: #fff; box-shadow: 0 3px 10px #0002; }
.gallery { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.card { background: #fff; border-radius: 14px; padding: 8px; width: 170px; display: flex; flex-direction: column; gap: 6px; }
.card img { width: 100%; border-radius: 8px; }
.card button.on { background: #c2308a; color: #fff; }
.chrono { display: inline-block; font-size: 2rem; font-weight: bold; background: #2b2250; color: #fff; border-radius: 14px; padding: 4px 22px; margin: 6px 0 12px; min-width: 110px; }
.chrono.urgent { background: #e63946; }
.part canvas.base { position: absolute; inset: 0; width: 100%; height: 100%; cursor: default; pointer-events: none; }
.part canvas:not(.base) { position: relative; }
.part { overflow: hidden; }
#prev { width: 150px; max-width: 40vw; background: #fff; border-radius: 14px; margin: 6px 0 12px; }
.choices { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.big-sw { width: 44px; height: 44px; }
.opt.on { background: #c2308a; color: #fff; }
.card { background: rgba(255,255,255,.92); }
.stars, .emojis { display: flex; justify-content: center; gap: 2px; flex-wrap: wrap; }
.star { padding: 2px 6px; font-size: 1.3rem; color: #bbb; }
.star.on { color: #f5b301; }
.emojis button { padding: 4px 6px; font-size: 1.1rem; }
.reacts { font-size: 1.3rem; min-height: 1.4rem; word-break: break-all; }
.chat { position: fixed; right: 12px; bottom: 12px; width: 260px; background: #fff; border-radius: 14px; box-shadow: 0 3px 12px #0003; z-index: 50; }
.chat-head { width: 100%; background: #2b2250; color: #fff; border-radius: 14px; }
.chat.new .chat-head { background: #c2308a; }
.chat-body { display: none; padding: 8px; }
.chat.open .chat-body { display: block; }
.chat.open .chat-head { border-radius: 14px 14px 0 0; }
.chat-msgs { height: 150px; overflow-y: auto; text-align: left; font-size: .9rem; display: flex; flex-direction: column; gap: 3px; }
.msg.mine { color: #c2308a; }
.chat-tip { font-size: .7rem; color: #6a5fa0; margin: 4px 0; }
.chat form { display: flex; gap: 4px; }
.chat input { flex: 1; min-width: 0; padding: 6px; border-radius: 8px; border: 1px solid #b9b3dd; font: inherit; }
.stars-box { background: rgba(255,255,255,.9); border-radius: 14px; padding: 10px 14px; max-width: 420px; margin: 10px auto; display: flex; flex-direction: column; gap: 4px; }
.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: #c2308a; color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: bold; z-index: 100; box-shadow: 0 3px 12px #0004; }
.view3d { position: fixed; inset: 0; background: #000a; z-index: 200; display: flex; align-items: center; justify-content: center; }
.view3d-in { background: linear-gradient(#ffe3f1, #e4e6ff); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.v3-canvas canvas { display: block; border-radius: 12px; }
.opt:has(.thumb) { display: flex; flex-direction: column; align-items: center; width: 96px; padding: 6px; font-size: .8rem; }
.thumb { width: 80px; height: auto; background: #fff; border-radius: 8px; }
.play { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; align-items: flex-start; }
#stage { position: sticky; top: 8px; }
.stage3d canvas { display: block; border-radius: 14px; background: linear-gradient(#ffd6ec, #d9dcff); max-width: 100%; height: auto !important; touch-action: none; }
#prev3d { display: flex; justify-content: center; margin: 6px 0 12px; }
#menu3d { display: flex; justify-content: center; margin: 8px 0; }
.play #pad { flex: 0 1 360px; min-width: 0; } .play { flex-wrap: nowrap; } @media (max-width: 700px) { .play { flex-wrap: wrap; } }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.opt.on, .big-sw.on { animation: pop .35s ease-out; }
