
*{box-sizing:border-box}html{min-height:100%;background:#151122;color:#f9f5ff;font-family:"Avenir Next","Segoe UI",Arial,"DejaVu Sans",sans-serif}body{margin:0;min-height:100svh;background:radial-gradient(ellipse at 50% 10%,#312346 0%,transparent 66%)}button,input,textarea{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #f9c786;outline-offset:3px}.wrap{max-width:940px;margin:0 auto;padding:0 20px 30px}header{height:54px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #ffffff20;justify-content:space-between}.brand{font-weight:800;letter-spacing:.2em;color:#ffdaae;font-size:11px}.small{background:transparent;border:1px solid #ffffff35;border-radius:20px;padding:6px 11px;font-size:12px}.tools{display:flex;gap:6px}.mast{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:20px 0 15px}h1{font-family:Georgia,serif;font-weight:500;letter-spacing:-.047em;font-size:clamp(32px,5vw,54px);margin:0;line-height:1}.mode{font-size:12px;color:#decede;text-align:right}.grid{display:grid;grid-template-columns:1fr .94fr;gap:16px}.panel{border:1px solid #ffffff29;border-radius:22px;background:#211a30;min-width:0;overflow:hidden}.stage{background:#453951;--accent:#c4acde;position:relative;display:flex;align-items:center;justify-content:center;height:235px;background:radial-gradient(ellipse at 50% 85%,color-mix(in srgb,var(--accent) 48%,#312949),transparent 72%),linear-gradient(#31294a,#4c4063);isolation:isolate}.avatar{width:49%;height:90%;position:relative;display:grid;place-items:center;align-content:center;justify-items:center}.avatar img,.avatar canvas{width:100%;height:auto;object-fit:contain;max-height:83%;grid-area:1/1;aspect-ratio:1}.avatar canvas{display:none}.avatar.playing img{visibility:hidden}.avatar.playing canvas{display:block}.avatar .label{position:absolute;bottom:6px;background:#181221c9;border-radius:20px;padding:3px 10px;color:#fff;font-weight:650;font-size:11px;letter-spacing:.03em}.avatar[data-ton="drole"] img{filter:hue-rotate(160deg) saturate(1.1) brightness(1.22)}.avatar[data-ton="dejante"] img{filter:hue-rotate(243deg) saturate(1.15) brightness(1.22)}.avatar[data-ton="mysterieux"] img{filter:hue-rotate(45deg) saturate(1.2) brightness(1.12)}.avatar.nod img{animation:nod .55s ease-in-out}@keyframes nod{45%{transform:translateY(-10px) rotate(-7deg)}}.actions{padding:18px}.kicker{font-size:11px;letter-spacing:.13em;text-transform:uppercase;font-weight:650;color:#e2bd9d}.actions h2{margin:3px 0 10px;font-family:Georgia,serif;font-size:27px;font-weight:500}.options{display:grid;grid-template-columns:1fr 1fr;gap:7px}.tone{background:#302739;border:1px solid #ffffff30;border-radius:12px;padding:10px;text-align:left;font-size:14px;font-weight:650;display:flex;align-items:center;gap:8px}.dot{background:var(--tone);width:11px;height:11px;border-radius:50%;display:inline-block;box-shadow:inset 1px 1px 2px #ffffff50}.tone[aria-pressed=true]{border-color:var(--tone);box-shadow:inset 0 0 0 1px var(--tone);background:#413446}.tone:disabled{opacity:.46}.send{border:0;border-radius:12px;width:100%;padding:12px;margin-top:10px;background:#ffd6ac;color:#291b26;font-weight:750}.send:disabled{background:#514556;color:#d7cbd7}.note{color:#d3c4d9;font-size:12px;line-height:1.45;margin:9px 0 0}.thread{padding:18px;display:flex;flex-direction:column}.log{overflow-y:auto;max-height:400px;min-height:130px;scrollbar-width:thin;flex:1}.empty{color:#d7c8dd;font-size:15px;line-height:1.55;margin:12px 4px}.bubble{margin:8px 0 12px;background:#30283d;border-radius:3px 14px 14px 14px;padding:10px 13px;width:92%;line-height:1.48;font-size:15px;overflow-wrap:anywhere}.bubble.b{margin-left:auto;background:#382d42;border-radius:14px 3px 14px 14px}.meta{font-size:11px;font-weight:700;color:var(--tone);display:block;margin-bottom:3px}.error{color:#ffca93;font-size:13px;line-height:1.45}dialog{background:#292238;color:#fff;border:1px solid #ffffff38;border-radius:20px;padding:20px;width:min(420px,90%)}dialog::backdrop{background:#100c18bf}dialog h2{font:28px Georgia,serif;margin:0 0 8px}dialog input{width:100%;padding:10px;font-size:13px;margin:10px 0;color:#221728}dialog p{font-size:14px;line-height:1.5}
@media(max-width:680px){.wrap{max-width:510px;padding:0 12px 16px}header{height:41px}.mast{margin:12px 2px}.grid{display:flex;flex-direction:column;gap:10px}.panel{border-radius:17px}.stage{height:133px;height:clamp(105px,21svh,169px)}.actions,.thread{padding:12px}.actions h2{font-size:22px;margin:3px 0 8px}.tone{padding:8px 10px}.send{padding:10px}.log{min-height:55px;max-height:140px;max-height:clamp(98px,21svh,190px)}.empty{font-size:14px;margin:0}.avatar img,.avatar canvas{max-height:88%;max-width:180px}.avatar .label{bottom:0}.bubble{font-size:14px}.tools{gap:4px}.small{padding:5px 8px}.note{margin-top:5px}}
@media(prefers-reduced-motion:reduce){.avatar.nod img{animation:none}}[hidden]{display:none!important}

.stage{background-color:#403452;background-image:radial-gradient(ellipse at 50% 100%,var(--accent),transparent 85%);background-image:radial-gradient(ellipse at 50% 85%,color-mix(in srgb,var(--accent) 48%,#312949),transparent 72%),linear-gradient(#31294a,#4c4063)}
.avatar{display:flex;align-items:flex-start;justify-content:center;height:98%;min-height:0}
.avatar img,.avatar canvas{height:calc(100% - 21px);width:auto;max-height:none;max-width:100%;object-fit:contain}
.avatar .label{bottom:1px;white-space:nowrap}
@media(max-width:680px){
.wrap{height:100vh;height:100svh;min-height:535px;display:flex;flex-direction:column}
header,.mast{flex-shrink:0}.grid{flex:1;min-height:0}.grid>.panel:first-child{flex-shrink:0}
.thread{flex:1;min-height:0}.log{min-height:0;max-height:none;overflow-y:auto}
.stage{height:clamp(110px,20vh,169px)}.mast{margin:10px 0}.mast h1{font-size:32px;white-space:nowrap}
.mode{max-width:43%;font-size:11px}.avatar img,.avatar canvas{max-height:none;max-width:100%}
}
@media(max-width:680px) and (max-height:650px){
.wrap{padding:0 9px 7px}header{height:34px}.mast{margin:6px 0}.mast h1{font-size:28px}.grid{gap:6px}.stage{height:99px}
.actions,.thread{padding:8px 10px}.actions h2{font-size:19px;margin:2px 0 5px}.kicker{font-size:10px}
.options{gap:5px}.tone{padding:6px 8px;font-size:13px}.send{margin-top:6px;padding:7px}
.note:empty{display:none}.note{font-size:11px;margin:3px 0 0}.bubble{margin:4px 0 6px;padding:6px 9px;font-size:13px}
}

.stage{overflow:hidden;--orb-size:345px;height:220px}
#partner{position:absolute;top:0;right:0;bottom:0;left:0}
.orb-stack{position:absolute;left:50%;top:50%;width:var(--orb-size);height:var(--orb-size);transform:translate(-50%,-50%)}
#portrait,#motion{position:absolute;top:0;right:0;bottom:0;left:0;height:100%;width:100%;object-fit:contain;display:block}
#motion{visibility:hidden}#partner.playing #motion{visibility:visible}#partner.playing #portrait{visibility:hidden}
#partnerLabel{position:absolute;bottom:5px;left:50%;transform:translateX(-50%);padding:2px 9px;border-radius:12px;font-size:11px;background:#21182bd4;color:#fff;white-space:nowrap}
#partner[data-ton=drole] #portrait{filter:hue-rotate(160deg) saturate(1.2) brightness(1.22)}
#partner[data-ton=dejante] #portrait{filter:hue-rotate(243deg) saturate(1.2) brightness(1.22)}
#partner[data-ton=mysterieux] #portrait{filter:hue-rotate(45deg) saturate(1.2) brightness(1.12)}
#writing{display:flex;gap:8px;align-items:center;color:#ffdeb9;font-size:13px;min-height:30px;flex-shrink:0}
.pencil{display:inline-block;position:relative;font:25px/1 Georgia,serif;padding:0 3px;animation:pen-write .72s ease-in-out infinite alternate}
.pencil:after{content:"";position:absolute;bottom:0;left:2px;width:12px;border-bottom:1px solid #ffca99}
@keyframes pen-write{0%,65%{transform:translateX(0) rotate(-14deg)}35%,100%{transform:translateX(4px) rotate(-2deg)}}
@media(max-width:680px){.stage{height:clamp(120px,20vh,172px);--orb-size:clamp(200px,34vh,300px)}}
@media(max-width:680px) and (max-height:650px){.stage{height:105px;--orb-size:174px}.tools .small{font-size:11px;padding:4px 7px}}
@media(prefers-reduced-motion:reduce){.pencil{animation:none}}

.chat-footer{flex:0 0 auto;padding:4px 2px 0;text-align:right;font-size:11px;line-height:14px;color:#b9acbf;font-variant-numeric:tabular-nums}
@media(min-width:681px){.wrap{display:flex;flex-direction:column;min-height:100vh;min-height:100svh;padding-bottom:10px}.chat-footer{margin-top:auto;padding-top:8px}}

.gestures{display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin-top:5px}
.gesture{display:grid;place-items:center;min-width:40px;min-height:36px;padding:2px 8px;font:19px/1 "Apple Color Emoji","Segoe UI Emoji",sans-serif;color:inherit;border-radius:12px;border:1px solid #ffffff30;background:#231c2c80;touch-action:manipulation}
button.gesture:hover,button.gesture:focus-visible{border-color:#d4b9d6}
.gesture[data-sent],.gesture.stamp{background:#483244;border-color:#cf9bb7}
.gesture.stamp{min-width:30px;min-height:24px;font-size:15px}
.gesture[data-sent]::after{content:"✓";font:9px/1 system-ui;color:#ffe0e8;margin-left:3px}
.gesture[data-sent]{display:inline-flex;align-items:center;justify-content:center}
@media(pointer:coarse){button.gesture{min-width:44px;min-height:44px}}
.gesture-sky{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:1}
.gesture-particle{position:absolute;left:var(--start);bottom:8%;font:clamp(23px,4.7vmin,36px)/1 "Apple Color Emoji","Segoe UI Emoji",sans-serif;opacity:0;animation:gesture-float 1.35s ease-out var(--delay) both;filter:drop-shadow(0 2px 3px #22102e80)}
@keyframes gesture-float{0%{opacity:0;transform:translate(-50%,0) scale(.45)}15%{opacity:1}65%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--drift)),var(--rise)) rotate(var(--tilt)) scale(1.15)}}
@media(prefers-reduced-motion:reduce){.gesture-particle{display:none}.gesture-particle:first-child{display:block;left:78%;bottom:38%;opacity:1;animation:none}}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
[hidden]{display:none!important}
.mast{align-items:center}.mast .mode{display:block;text-align:left}.mast .invite-primary{flex-shrink:0}.invite-primary{min-height:40px;padding:8px 16px;background:#ffcf96;color:#341b13;font-weight:750;border:0;border-radius:12px}.invite-primary:disabled{opacity:.72}
dialog .invite-options{display:flex;gap:8px;flex-wrap:wrap}dialog .invite-options a{color:#ffdfb1;text-decoration:none}dialog .invite-options>*{min-height:38px;display:inline-flex;align-items:center}
@media(max-width:680px){.invite-primary{min-height:40px}.mast{margin-bottom:3px}}
.action-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:3px 0 7px}
.actions .action-heading h2{min-width:0;margin:0;line-height:1.12}
#pickMessage{max-width:48%;min-height:40px;padding:4px 9px;color:#fcecb9;line-height:1.15}
#manualMessage{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:6px 0}
#pickedText{flex:1 1 15ch;line-height:1.35}
#randomMessage,#trialOffer a{color:#fcecb9}
@media(max-width:680px){
 .actions .action-heading h2{font-size:clamp(17px,4.8vw,22px)}
 #pickMessage{min-height:44px}
}
#messagePicker{max-height:86dvh;width:min(520px,94vw);padding:16px}
.reply-shell{display:flex;flex-direction:column;max-height:calc(84dvh - 34px)}.reply-head,.reply-tones{display:flex;align-items:center;gap:7px}.reply-head{justify-content:space-between}.reply-head h2{margin:0}.reply-tones{display:grid;grid-template-columns:repeat(4,1fr);margin-top:12px}.reply-tones button{padding:7px 2px;min-height:38px}.reply-tones [aria-pressed=true]{color:#34210a;background:#f7c369}.reply-shell #pickerFilter{margin-bottom:0;min-height:40px}.reply-shell #pickerStatus{margin:5px 0;font-size:13px}.reply-shell #pickerList{overflow:auto;overscroll-behavior:contain}.reply-line{display:block;width:100%;text-align:left;background:transparent;color:inherit;border:0;border-bottom:1px solid #ffffff30;padding:12px 5px;line-height:1.45;font-size:15px}.reply-line:hover,.reply-line:focus-visible{background:#453951}
/* L’ouverture couvre le jeu dès le premier rendu. */
#bouleOpening:not([hidden]) ~ .wrap {display:none!important}
.bo-screen{position:fixed;top:0;left:0;right:0;bottom:0;z-index:80;display:flex;align-items:center;justify-content:center;overflow:auto;padding:16px;color:#fbf5fb;background:#171222;background-image:radial-gradient(ellipse at 50% 59%,#3c3154 0%,#272035 34%,#171222 73%);font-family:"Avenir Next","Segoe UI",Arial,sans-serif;text-align:center;overscroll-behavior:contain}
.bo-shell{width:100%;max-width:560px;margin:auto;position:relative}
.bo-brand{font-size:11px;letter-spacing:.25em;color:#ffdab2;font-weight:750}
.bo-title{position:relative;margin:12px 0 26px;font-family:Georgia,"Times New Roman",serif;font-weight:500;font-size:clamp(40px,8vw,68px);letter-spacing:-.055em;line-height:1.02;color:#faf3f8}
.bo-cast{display:flex;position:relative;justify-content:center;margin:0 auto;padding:0;max-width:475px}
.bo-choice{position:relative;isolation:isolate;min-width:0;flex:1 1 0;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;margin:0 5px;padding:12px 4px 13px;appearance:none;color:#fff4e8;border:1px solid transparent;border-radius:22px;background:transparent;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.bo-choice::before{content:"";position:absolute;inset:0;top:0;left:0;right:0;bottom:0;z-index:-1;opacity:0;border-radius:inherit;background:linear-gradient(145deg,rgba(224,211,251,.10),rgba(21,14,36,.34));box-shadow:inset 0 0 0 1px rgba(236,222,251,.28);transition:opacity 160ms ease}
.bo-face{display:block;width:100%;position:relative}
.bo-face img{display:block;height:auto;width:100%;max-width:196px;max-height:196px;object-fit:contain;margin:0 auto;user-select:none;-webkit-user-drag:none}
.bo-label{position:relative;color:#fff4e8;font:650 clamp(13px,3.8vw,17px)/1.35 "Avenir Next","Segoe UI",Arial,sans-serif;margin:8px 0 0;white-space:nowrap;visibility:visible}
.bo-prompt{font-size:15px;line-height:1.45;margin:18px 0 0;color:#dbcbdf;min-height:1.45em;visibility:visible}
.bo-ping{position:absolute;left:50%;top:51%;line-height:1;font-size:clamp(20px,5vw,31px);color:#ffdab0;transform:translate(-50%,-50%) scale(0);pointer-events:none}
.bo-screen[data-phase="ready"] .bo-choice::before,.bo-screen[data-phase="waiting"] .bo-choice::before{opacity:1}
.bo-screen[data-phase="ready"] .bo-label,.bo-screen[data-phase="waiting"] .bo-label,.bo-screen[data-phase="ready"] .bo-prompt,.bo-screen[data-phase="waiting"] .bo-prompt{visibility:visible}
.bo-screen[data-phase="ready"] .bo-choice:focus-visible{outline:3px solid #f8c990;outline-offset:2px}
@media(hover:hover){.bo-screen[data-phase="ready"] .bo-choice:hover::before{box-shadow:inset 0 0 0 2px #e9bd94;background:linear-gradient(145deg,#51405c,#30243c)}}
.bo-screen[data-phase="ready"] .bo-choice:active{transform:translateY(1px)}
.bo-screen[data-phase="ready"] .bo-choice:first-child .bo-face{animation:boMeetLeft 1200ms both}
.bo-screen[data-phase="ready"] .bo-choice:nth-child(2) .bo-face{animation:boMeetRight 1200ms both}
.bo-screen[data-phase="ready"] .bo-ping{animation:boBump 1200ms both}
.bo-error{font-size:13px;color:#ffceae;line-height:1.4;margin:10px 0}
@keyframes boMeetLeft{0%{opacity:1;transform:translateX(-35%) rotate(-23deg)}19%{opacity:1}46%{transform:translateX(15%) rotate(9deg)}56%{transform:translateX(10%) translateY(-3%) rotate(-4deg)}79%{transform:translateX(-2%) rotate(2deg)}100%{transform:translateX(0) rotate(0)}}
@keyframes boMeetRight{0%{opacity:1;transform:translateX(35%) rotate(23deg)}19%{opacity:1}46%{transform:translateX(-15%) rotate(-9deg)}56%{transform:translateX(-10%) translateY(-3%) rotate(4deg)}79%{transform:translateX(2%) rotate(-2deg)}100%{transform:translateX(0) rotate(0)}}
@keyframes boBump{0%,40%{opacity:1;transform:translate(-50%,-50%) scale(0)}50%{opacity:1;transform:translate(-50%,-85%) scale(1) rotate(12deg)}68%,100%{opacity:1;transform:translate(-50%,-150%) scale(.55) rotate(30deg)}}
@media(max-width:394px){.bo-screen{padding:11px}.bo-choice{margin:0 3px;padding:8px 2px 10px;border-radius:17px}.bo-title{margin-bottom:20px}.bo-prompt{font-size:14px}}
@media(max-height:390px){.bo-screen{padding:8px}.bo-title{margin:4px 0 8px;font-size:34px}.bo-face img{max-height:116px}.bo-cast{max-width:360px}.bo-prompt{margin-top:7px}}
@media(prefers-reduced-motion:reduce){.bo-screen *,.bo-screen *::before{animation:none!important;transition:none!important}}

.bo-recovery{font-size:.95rem}.bo-recovery a{color:#fcecb9}
.bo-screen[data-phase="ready"] .bo-recovery,.bo-screen[data-phase="waiting"] .bo-recovery{display:none}
.bo-cast img{aspect-ratio:1}

.send-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  margin-top: 8px;
}

.send-bar:has(#adultMode:not([hidden])) { grid-template-columns: minmax(0, 1fr) auto }

.send-bar .send {
  margin-top: 0;
  min-height: 44px;
}

#adultMode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 67px;
  max-width: 8rem;
  min-height: 44px;
  padding: 0 7px;
  border: 1px solid #b67082;
  border-radius: 12px;
  background: #40243b;
  color: #ffe2ec;
  font: 700 12px/1 system-ui, sans-serif;
}

#adultMode img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}

#adultMode:hover, #adultMode:focus-visible {
  border-color: #ffe1aa;
}

#adultMode[aria-pressed="true"] {
  border-color: #ffbd83;
  background: #73233e;
  color: #fff1cc;
}

#adultMode:disabled {
  opacity: .66;
}

#adultGate {
  width: min(440px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 18px;
  background: radial-gradient(ellipse at 50% 0%, #62334c, #2d1b30 74%);
  border-color: #a66678;
  color: #fff5f8;
}

.gate-mascots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}

.gate-mascots img {
  width: min(86px, 24vw);
  height: min(86px, 24vw);
  object-fit: contain;
}

#adultGate h2 {
  margin: 0;
  text-align: center;
  color: #ffe7bd;
}

#adultGate p {
  margin: 8px 0;
}

#adultGate label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font: 600 14px/1.35 system-ui, sans-serif;
}

#adultGate input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: #ed96ae;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 9px;
}

.gate-actions button {
  min-height: 44px;
}

#confirmAdult:not(:disabled) {
  background: #ffe0a8;
  border-color: #ffe0a8;
  color: #3a1928;
  font-weight: 750;
}

#confirmAdult:disabled {
  opacity: .6;
}

body[data-diablotins] {
  background: radial-gradient(ellipse at 50% 12%, #52243d, #1a1225 68%);
}

body[data-diablotins] .mast h1 { color: #ffe6bd }
body[data-diablotins] .mast .mode { color: #f5bac9 }
body[data-diablotins] .stage {
  background:
    radial-gradient(ellipse at 50% 70%, color-mix(in srgb, #a74354 80%, var(--accent)), transparent 74%),
    linear-gradient(120deg, #351d30, #281830);
}
body[data-diablotins] .orb-stack {
  top: calc((100% - 18px) / 2);
  width: auto;
  height: calc(100% - 25px);
  aspect-ratio: 1;
}
body[data-diablotins] #partner[data-ton] #portrait {
  filter: drop-shadow(0 0 16px #ff946d77);
  animation: diablotin-react 620ms ease-out both;
}
@keyframes diablotin-react {
  0%, 100% { transform: translateY(0) scale(1) }
  40% { transform: translateY(-4%) scale(1.055) }
}
@media (prefers-reduced-motion: reduce) {
  body[data-diablotins] #partner[data-ton] #portrait { animation: none }
}
body[data-diablotins] .mast .mode { max-width: none }
body[data-diablotins] .log { scrollbar-width: thin; scrollbar-color: #875272 #2d1c30 }

.thread-tools { display:flex; justify-content:space-between; gap:6px; flex:0 0 auto; padding-top:5px }
#eraseChat { margin-left:auto; color:#f1c6cb }
#inboxBadge { border-radius:99px; background:#ffcf8b; color:#351e21; padding:1px 5px; margin-left:2px }
#conversationDialog, #eraseDialog { max-height:calc(100dvh - 24px); overflow:auto }
#conversationDialog h2 { color:#ffe6bd }
#conversationsList { max-height:40dvh; overflow:auto; margin:10px 0; display:grid; gap:5px }
#conversationsList .small { text-align:left; min-height:38px }
#conversationDialog details { border-top:1px solid #ffffff25; padding-top:9px }
#conversationDialog summary { cursor:pointer; font-weight:700 }
#myFriendCode { color:#ffe2a6; overflow-wrap:anywhere }
.invite-code { display:flex; gap:6px; align-items:center }
.invite-code input { width:0; flex:1 1 auto }
.dialog-buttons, .picker-controls { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:6px }
.dialog-buttons { margin-top:9px }
.dialog-buttons button { min-height:40px }
.dialog-status:empty { display:none }
.dialog-status, .danger { color:#f6b7c2 }
.bubble[data-adult] { border-color:#975567; background:#542b43 }
#pickedText[data-adult] { color:#ffd6e1 }
#adultInvite { border:1px solid #a96871; border-radius:11px; padding:7px 9px; margin-bottom:7px; background:#3b2537; }
#adultInvite p { margin:0; font-size:13px; color:#ffdeb9; }
#adultInviteButtons { margin-top:5px; }
#reviewAdult { background:#f7c369; color:#34210a; }
.reply-line .reply-label { display:block; font-size:12px; font-weight:650; color:#ffcc9b; margin-bottom:3px; }
#pickerQuestion { margin:9px 0 0; padding:6px 9px; border-left:2px solid #d09879; color:#fce0cd; overflow-wrap:anywhere; }
#pickerSurprise { align-self:flex-start; margin-top:8px; }
#localPartners { max-height:85dvh; overflow:auto; }
#localPartnerList { display:grid; gap:6px; margin-block:12px; }
#localPartnerList button { text-align:left; overflow-wrap:anywhere; }
#localPartnerForm label { display:block; margin-bottom:5px; }
#localPartnerForm input { min-width:0; min-height:40px; }
#soloSwitch { margin-top:12px; }
@media(max-width:480px){
 #messagePicker[data-plus] .reply-tones { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:355px){
 #conversationInbox { padding-inline:5px;font-size:10px }
 #conversationInbox + #sound { padding-inline:5px }
}

.mast-actions,#activitiesShortcuts{display:flex;align-items:center;justify-content:flex-end;gap:7px}
.mast-actions{margin-inline-start:auto}
.mast-actions a.small{display:inline-flex;align-items:center;justify-content:center;min-height:40px;color:#ffe2a6;text-decoration:none;text-align:center}
#activitiesShortcuts button.small{display:inline-grid;place-items:center;flex:none;width:42px;height:42px;padding:0;background:#382634;color:#ffe9ba;border:1px solid #bd9051;border-radius:50%}
@media (max-width:680px){
  .mast:has(#activitiesShortcuts:not([hidden])){gap:5px}
  .mast:has(#activitiesShortcuts:not([hidden])) > div{min-width:0}
  .mast:has(#activitiesShortcuts:not([hidden])) h1{font-size:clamp(1.28rem,5.6vw,1.94rem);white-space:normal;line-height:1.05}
  .mast:has(#activitiesShortcuts:not([hidden])) .mode{max-width:none}
  .mast-actions:has(#activitiesShortcuts:not([hidden])){gap:4px;flex:none}
  .mast-actions:has(#activitiesShortcuts:not([hidden])) > :is(a.small,.invite-primary){max-width:7.4em;padding:4px 7px;line-height:1.15;font-size:.8rem}
  #activitiesShortcuts{gap:3px}
}
.activity-symbol{display:inline-block;width:1.4em;height:1.4em;flex:none;color:#f5c473}
.activity-mask{background:currentColor;clip-path:path(evenodd,'M 0 5 Q 4 1 10 6 Q 16 1 20 5 L 19 10 Q 17 17 10 12 Q 3 17 1 10 Z M 3 7 Q 4 11 8 10 Q 8 7 3 7 Z M 17 7 Q 12 7 12 10 Q 16 11 17 7 Z');width:20px;height:16px}
.activity-die{width:17px;height:17px;border:1px solid #f5c473;border-radius:4px;background:radial-gradient(circle at 27% 27%,currentColor 1px,transparent 1.6px),radial-gradient(circle at 50% 50%,currentColor 1px,transparent 1.6px),radial-gradient(circle at 73% 73%,currentColor 1px,transparent 1.6px),#77354c}
.activity-choice{display:flex;gap:10px;align-items:center}
#activitiesAnimation{display:grid;justify-items:center;gap:9px;margin:9px auto 0;padding:5px;border-radius:14px;background:radial-gradient(ellipse at 50% 65%,#63414a,#261c2a 67%)}
#activitiesCanvas{display:block;object-fit:contain;width:100%;height:min(44dvh,310px)}
#activitiesAnimationFallback{margin-block:20px}
#activitiesAnimationTitle{margin:0;padding:0 8px 10px;color:#ffdda5;font-weight:700;text-align:center}
#activitiesDialog[data-intro] .activity-head{justify-content:center;text-align:center}
.activity-avatar{display:inline-block;width:74px;height:74px;flex:none;background:var(--activity-mascots) 0 0/200% 200% no-repeat}
.activity-avatar[data-avatar="1"]{background-position-x:100%}
.activity-avatar[data-style="truth"]{background-position-y:100%}
#activitiesDialog{width:min(550px,94vw);max-height:89dvh;overflow:auto;padding:clamp(13px,4vw,23px);background:#211926;color:#fff3de;border:1px solid #987447;border-radius:17px;box-shadow:0 20px 80px #07030baf}
#activitiesDialog::backdrop{background:#0f0814bd}
#roleReplyDialog{width:min(400px,90vw);max-height:85dvh;padding:clamp(16px,5vw,24px);overflow:auto;background:#302338;color:#fff3de;border:1px solid #987447;border-radius:16px;box-shadow:0 16px 55px #07030b99}
#roleReplyDialog::backdrop{background:#0f0814b3}
#roleReplyTitle{margin:0;color:#ffdb9e;font-size:1.15rem;line-height:1.25}
#roleReplyText{margin:12px 0 18px;font-size:1rem;line-height:1.5;white-space:pre-line}
#roleReplyDialog form{display:flex;justify-content:flex-end}
#roleReplyDialog button{min-height:44px;color:#ffe8b9}
.activity-head,.activity-footer{display:flex;align-items:center;justify-content:space-between;gap:10px}
.activity-head h2{width:100%;margin:3px 0;color:#ffe4b1}
.activity-footer p{margin:0}
.activity-head .small{flex:none;min-height:40px;color:#ffe8b9}
#activitiesDialog button:focus-visible{outline:2px solid #ffe39a;outline-offset:2px}
#activitiesContent{margin:12px 0}
.activity-mast{display:flex;align-items:center;justify-content:center;gap:9px;border-radius:13px;background:radial-gradient(ellipse at 50% 100%,#724849 1%,#332030 72%);margin-bottom:12px;padding:6px}
.activity-mast[data-style="truth"]{background:radial-gradient(ellipse at 50% 100%,#86314f 1%,#3d223f 74%)}
.activity-mast .activity-avatar[data-turn]{filter:drop-shadow(0 2px 8px #ffd08085);transform:translateY(-2px)}
.activity-tile{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;text-align:left;min-height:45px;padding:9px 12px;margin:6px 0;background:#342839;color:#fff3df;border:1px solid #756072;border-radius:9px}
.activity-tile[data-style="truth"]{color:#fff5ec;border-color:#ac667e;background:#4c2741}
.activity-tile[disabled]{opacity:.55}
.activity-tile:not(:disabled):hover{background:#483749}
.activity-tile strong,.activity-tile small{display:block}
.activity-tile small{font-size:.8rem;line-height:1.35;margin-top:2px;color:#f2d6be}
.activity-card-mascots{display:flex;flex:none;gap:3px}
.activity-tile .activity-avatar{width:44px;height:44px}
.activity-section{margin:12px 0 6px;font-size:1rem;color:#ffda99}
.activity-story,.activity-echo,.activity-question{font-size:.96rem;white-space:pre-line;line-height:1.54}
.activity-story{color:#ead7cb}
.activity-part{margin:14px 0 5px;font-size:1.04rem;color:#ffdb9e}
.activity-part small{font-size:.82rem;font-weight:400}
.activity-question{border-inline-start:2px solid #edbd74;padding:7px 10px;background:#3b293c;font-weight:700;border-radius:0 9px 9px 0}
.activity-echo{background:#312337;padding:8px 10px;border-radius:9px}
.activity-echo p{margin:3px 0}
.activity-echo summary{font-size:.85rem;color:#ffd8a0;cursor:pointer}
.activity-role{font-size:.85rem;margin:6px 0;color:#ffdb9e}
.activity-footer{flex-wrap:wrap}
.activity-footer p{color:#ffccac;font-size:.85rem}
@media (max-width:400px){.activity-tile .activity-avatar{width:34px;height:34px}}

#immersionToggle {display:inline-flex;align-items:center;gap:5px;white-space:nowrap;margin-left:auto}
#immersionToggle span:first-child {font-size:17px;line-height:1}
[data-immersion] #immersionToggle {color:#25182a;background:#fcecb9;border-color:#d9a047}
[data-immersion] .wrap {
  width:100%;max-width:none;height:100vh;height:100dvh;
  padding:env(safe-area-inset-top,0px) max(16px,env(safe-area-inset-right,0px))
    max(8px,env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))
}
[data-immersion] .wrap > header {
  position:sticky;top:env(safe-area-inset-top,0px);z-index:4;background:#191323;flex-shrink:0
}
[data-immersion] .grid {flex:1;min-height:0}
[data-immersion] .log {min-height:0;max-height:none}
[data-immersion] .chat-footer .install-boule {display:none}
@media(min-width:681px) {
  [data-immersion] .grid > .panel:first-child {overflow:auto}
  [data-immersion] .stage {height:clamp(195px,36dvh,440px);--orb-size:clamp(285px,54dvh,630px)}
}
@media(max-width:680px) {
  .wrap > header {
    display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;
    height:auto;gap:4px 8px;padding-block:3px
  }
  .wrap > header .brand {grid-column:1;grid-row:1}
  .wrap > header .brand img {display:block;width:34px;height:34px}
  .wrap > header #trialCount {grid-column:2;grid-row:1;line-height:1.15}
  #immersionToggle {grid-column:3;grid-row:1;min-height:32px}
  .wrap > header .tools {grid-column:1/-1;grid-row:2;justify-content:flex-end;flex-wrap:wrap}
  .mast .mode {max-width:none}
  [data-immersion] .wrap {
    padding-inline:max(6px,env(safe-area-inset-left,0px)) max(6px,env(safe-area-inset-right,0px))
  }
  [data-immersion] .grid > .panel:first-child {flex-shrink:1;overflow:auto}
  [data-immersion] .stage {height:clamp(78px,15dvh,132px);--orb-size:clamp(137px,27dvh,231px)}
  [data-immersion] .thread {min-height:140px}
  [data-immersion] .actions .boule-connect {font-size:.9rem}
}
@media(max-height:515px) {
  [data-immersion] .wrap {height:auto;min-height:100vh;min-height:100dvh}
  [data-immersion] .grid {min-height:auto}
  [data-immersion] .log {min-height:90px;max-height:42dvh}
}

/* Tons prélevés sur les pages et le cerclage du médaillon EVERLYS. */
:root {
  --or-everlys-clair: #fcecb9;
  --or-everlys-miel: #f7c369;
  --or-everlys-ombre: #d9a047;
  --or-everlys: linear-gradient(115deg,var(--or-everlys-miel),var(--or-everlys-clair) 34%,var(--or-everlys-miel) 62%,var(--or-everlys-ombre));
}
.bo-title, .mast h1, .compte-boule h1 {color:var(--or-everlys-clair)}
@supports (background-clip:text) or (-webkit-background-clip:text) {
  .bo-title, .mast h1, .compte-boule h1 {
    background:var(--or-everlys); background-clip:text; -webkit-background-clip:text; color:transparent;
  }
}
button.send:not(:disabled), .invite-primary:not(:disabled), .compte-boule :is(.button,form button) {
  color:#34210a; background:var(--or-everlys); border:1px solid var(--or-everlys-ombre)
}
.bo-screen[data-phase="ready"] .bo-choice::before {box-shadow:inset 0 0 0 1px #d9a04785}
.bo-label,.bo-ping,.bo-recovery a,.compte-boule a:not(.button){color:var(--or-everlys-clair)}

.install-boule {margin:12px auto 0}
.install-boule summary {
  display:inline-flex;align-items:center;gap:.45em;min-height:36px;padding:5px 10px;
  cursor:pointer;border:1px solid #d9a04786;border-radius:10px;
  font:600 14px/1.25 system-ui;color:var(--or-everlys-clair);background:#2d2031
}
.install-boule summary::-webkit-details-marker {display:none}
.install-boule summary::before {content:"+"}
.install-boule[open] summary::before {content:"−"}
.install-boule summary:focus-visible,.install-boule-panel select:focus-visible {
  outline:2px solid var(--or-everlys-clair);outline-offset:3px
}
.bo-screen .bo-title {margin-bottom:12px}
.bo-screen .install-boule {margin:0 auto 14px}
@media(max-width:680px) {
  .bo-screen .install-boule summary {min-height:44px}
}
@media(max-height:390px) {
  .bo-screen .install-boule {margin-bottom:8px}
}
.install-boule-panel {
  margin:8px auto 0;width:min(100%,370px);padding:14px 16px;text-align:left;
  border:1px solid #d9a04786;border-radius:13px;background:#2e2033;color:#fff5dd;
  font:400 .94rem/1.45 system-ui;box-shadow:0 10px 30px #140f1a94
}
.install-boule-panel label {display:block;font-weight:700}
.install-boule-panel select {
  display:block;width:100%;margin-top:5px;padding:7px 9px;border:1px solid #d9a04786;border-radius:8px;
  font:inherit;font-size:1rem;color:inherit;background:#211828
}
.install-boule-panel ol {padding-inline-start:1.3em;margin:10px 0}
.install-boule-panel li+li {margin-top:6px}
.install-boule-panel p {margin:8px 0 0;color:#eed9c1}
.install-boule-panel a {display:block;margin-top:10px;color:var(--or-everlys-clair)}
.install-boule-panel button,.compte-boule .install-boule-panel button {
  margin:10px 0 0;padding:8px 12px;min-height:40px;color:#34210a;
  border:1px solid var(--or-everlys-ombre);background:var(--or-everlys);font-weight:700
}
.chat-footer-install {display:flex;align-items:center;justify-content:space-between;gap:8px}
.chat-footer-install > span {margin-left:auto}
.chat-footer .install-boule {position:relative;margin:0;text-align:left}
.chat-footer .install-boule-panel {
  position:absolute;z-index:5;bottom:calc(100% + 6px);left:0;margin:0;
  width:min(360px,calc(100vw - 30px));max-height:55vh;overflow:auto
}

.boule-connect{display:inline-block;background:var(--or-everlys);color:#34210a;border-radius:12px;padding:.7em 1.1em;font-weight:700;text-decoration:none}
.boule-connect:focus-visible{outline:3px solid white;outline-offset:3px}
