/* Chat extras shared by her mailbox and the admin chat: options under a tapped message, reactions, replies, swipe to reply,
   bunny stickers and the growing text box. Loaded after each page's own styles. */
.voice-message { position:relative; touch-action:pan-y; -webkit-tap-highlight-color:transparent; cursor:pointer; outline:0; }
.voice-message p { white-space:pre-wrap; }
.voice-message:focus-visible { box-shadow:0 0 0 2px #d97898; }
.voice-message.is-selected { box-shadow:0 0 0 2px rgba(217,120,152,.55); }
.voice-message.swipe-back { transition:transform .22s ease; }
.voice-message::before { content:"↩"; position:absolute; left:-26px; top:50%; translate:0 -50%; color:#c15375; font-size:16px; opacity:var(--swipe,0); pointer-events:none; }
.voice-message.flash { animation:voice-flash 1.2s ease-out; }
@keyframes voice-flash { 0%,40% { box-shadow:0 0 0 3px rgba(242,155,183,.9); } 100% { box-shadow:0 0 0 3px rgba(242,155,183,0); } }

/* An emoji reaction on a message, and the big heart when it is double-tapped */
.voice-message.has-reaction { margin-bottom:8px; }
.voice-reaction { position:absolute; bottom:-12px; display:grid; place-items:center; min-width:28px; height:28px; padding:0 3px; border:2px solid #fffaf8; border-radius:999px; background:#fff0f4; font-size:15px; line-height:1; box-shadow:0 3px 8px rgba(92,44,67,.18); }
.voice-message.theirs .voice-reaction { right:-10px; }.voice-message.mine .voice-reaction { left:-10px; }
.voice-sticker .voice-reaction,.voice-message.mine .voice-sticker .voice-reaction { bottom:4px; left:auto; right:-2px; }
.voice-reaction.pop { animation:voice-reaction-pop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes voice-reaction-pop { from { transform:scale(0); } }
.voice-heart-burst { position:absolute; left:50%; top:50%; color:#e0446f; font-size:44px; line-height:1; pointer-events:none; text-shadow:0 4px 14px rgba(224,68,111,.35); animation:voice-burst .8s ease-out forwards; }
@keyframes voice-burst { 0% { transform:translate(-50%,-50%) scale(.2); opacity:0; } 25% { transform:translate(-50%,-50%) scale(1.15); opacity:1; } 60% { transform:translate(-50%,-50%) scale(1); opacity:1; } 100% { transform:translate(-50%,-95%) scale(1); opacity:0; } }

/* Options under a tapped message: react (+), reply, and the trash can on its own at the far side */
.voice-message.is-selected { min-width:min(230px,100%); }
.voice-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:9px; cursor:default; }
.voice-actions button { min-height:32px; padding:5px 12px; border:1px solid rgba(166,76,105,.3); border-radius:999px; background:rgba(255,255,255,.78); color:#a3305a; font:600 11px "DM Mono",monospace; cursor:pointer; }
.voice-actions button:hover { background:#fff; }
.voice-actions .voice-react-open { width:34px; min-height:34px; padding:0; font:400 18px/1 "Plus Jakarta Sans",sans-serif; }
/* The trash can takes the bubble's own text colour, so it shows on every bubble in both themes. */
.voice-actions .voice-trash { display:inline-flex; align-items:center; gap:5px; margin-left:auto; padding:0 9px; border-color:transparent; background:none; color:inherit; opacity:.7; }
.voice-actions .voice-trash:hover { background:rgba(179,38,30,.1); opacity:1; }
.voice-actions .voice-trash.is-armed { border-color:#b3261e; background:#b3261e; color:#fff; opacity:1; }
.trash-icon { width:18px; height:18px; flex:none; }
.voice-actions.is-picking { gap:4px; }
.voice-actions .voice-react-choice { width:38px; min-height:38px; padding:0; border-color:transparent; background:rgba(255,255,255,.6); font:400 20px/1 "Plus Jakarta Sans",sans-serif; transition:transform .12s; }
.voice-actions .voice-react-choice:hover,.voice-actions .voice-react-choice:focus-visible { transform:scale(1.18); }
.voice-actions .voice-react-choice.is-current { border-color:#d97898; background:#fde3ec; }

/* The quote above a reply; tapping it jumps to the message it answers */
.voice-reply-quote { display:block; width:100%; margin:7px 0 2px; padding:6px 10px; border:0; border-left:3px solid #d97898; border-radius:4px 10px 10px 4px; background:rgba(122,40,72,.08); color:inherit; font:inherit; text-align:left; cursor:pointer; }
.voice-reply-quote small { display:block; margin-bottom:2px; font:600 9px "DM Mono",monospace; letter-spacing:.06em; opacity:.8; }
.voice-reply-quote span { display:-webkit-box; overflow:hidden; -webkit-line-clamp:2; -webkit-box-orient:vertical; font-size:13px; opacity:.85; }
.voice-reply-quote.is-gone { cursor:default; font-size:12px; font-style:italic; opacity:.7; }

/* Stickers sit in the chat without a bubble */
.voice-message.is-sticker { padding:2px 0; border:0; background:none; box-shadow:none; color:#8d6875; }
.voice-message.mine.is-sticker { text-align:right; }
.voice-message.is-sticker.is-selected { box-shadow:none; }
.voice-sticker { position:relative; width:112px; height:112px; margin-top:4px; }
.voice-message.mine .voice-sticker { margin-left:auto; }
.bunny-sticker { display:block; width:100%; height:100%; overflow:visible; }
.bunny-sticker .st-wave { transform-box:fill-box; transform-origin:15% 90%; animation:sticker-wave 1.1s ease-in-out 2; }
@keyframes sticker-wave { 25% { transform:rotate(-14deg); } 75% { transform:rotate(10deg); } }

/* A paper airplane: folded (and bobbing) until the one it was thrown to taps it, then a little lined note */
.voice-plane-fold { display:flex; align-items:center; gap:12px; margin-top:4px; padding:4px 8px 4px 2px; border:0; border-radius:12px; background:none; color:inherit; font:600 14px "Plus Jakarta Sans",sans-serif; text-align:left; cursor:pointer; }
.voice-plane-fold:disabled { opacity:.6; cursor:default; }
.voice-plane-fold small { display:block; margin-top:2px; font:500 10px "DM Mono",monospace; letter-spacing:.04em; opacity:.75; }
.voice-plane-art { flex:none; width:58px; height:40px; overflow:visible; filter:drop-shadow(0 4px 4px rgba(92,44,67,.2)); animation:voice-plane-bob 2.6s ease-in-out infinite; }
@keyframes voice-plane-bob { 0%,100% { transform:translateY(0) rotate(0); } 50% { transform:translateY(-3px) rotate(-3deg); } }
.voice-message .voice-plane-tag { display:flex; align-items:center; gap:5px; margin:4px 0 6px; font:600 10px "DM Mono",monospace; letter-spacing:.05em; opacity:.8; }
.voice-message .voice-plane-tag .plane-icon { width:14px; height:14px; }
.voice-message .voice-plane-note { margin:0; padding:5px 12px 6px; border-radius:3px; background:repeating-linear-gradient(180deg,transparent 0 23px,#f2ccd8 23px 24px),#fffaf8; color:#5a2a40; font:italic 500 15px/24px "Playfair Display",serif; box-shadow:0 2px 6px rgba(92,44,67,.12); }
.voice-plane-note.just-opened { animation:voice-plane-open .8s ease-out; }
@keyframes voice-plane-open { from { clip-path:polygon(50% 0,76% 100%,50% 88%,50% 88%,24% 100%); transform:scale(.6); } 60% { clip-path:polygon(50% 0,100% 39%,100% 100%,0 100%,0 39%); transform:scale(1); } to { clip-path:polygon(50% 0,100% 0,100% 100%,0 100%,0 0); } }
.voice-text-form .voice-plane-throw { flex:none; display:grid; place-items:center; width:44px; height:44px; padding:0; border:1px solid #e7cbd5; border-radius:12px; background:none; color:#c15375; }
.voice-text-form .voice-plane-throw:disabled { opacity:.5; }
.plane-icon { width:20px; height:20px; }

/* Tic-tac-toe: a little paper card (in either theme) with a hand-drawn board; her hearts are pink, his stars gold.
   A new piece pops in, and a win draws its line with a few sparkles. */
.voice-message.is-game:is(.mine,.theirs) { width:min(100%,300px); padding:10px 14px 12px; border:1px solid #f0d3de; background:#fffaf8; color:#5a2a40; box-shadow:0 1px 4px rgba(92,44,67,.08); }
.ttt { display:grid; justify-items:center; gap:8px; margin-top:6px; text-align:center; }
.voice-message .ttt-title { display:flex; align-items:baseline; gap:8px; margin:0; color:#b46e85; font:600 10px "DM Mono",monospace; letter-spacing:.12em; text-transform:uppercase; }
.ttt-title span { color:#d7537c; letter-spacing:.2em; }
/* Rows and columns are equal thirds, so every square lines up with the drawn lines (even a row with no pieces yet). */
.ttt-board { position:relative; display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(3,1fr); width:min(210px,62vw); aspect-ratio:1; }
.ttt-grid,.ttt-line { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.ttt-grid path { fill:none; stroke:#ecb3c6; stroke-width:5; stroke-linecap:round; }
.ttt-cell { position:relative; display:grid; place-items:center; min-width:0; min-height:0; margin:0; padding:18%; border:0; background:none; cursor:pointer; -webkit-tap-highlight-color:transparent; outline:0; }
.ttt-cell[aria-disabled="true"] { cursor:default; }
/* The "you can play here" glow is a soft dot inside the square, clear of the drawn lines (and only with a real mouse, so it
   doesn't stick after a tap on a phone). */
.ttt-cell::before { content:""; position:absolute; inset:20%; border-radius:50%; background:rgba(242,155,183,.25); opacity:0; transition:opacity .15s; }
@media (hover:hover) { .ttt.is-my-turn .ttt-cell:not([aria-disabled="true"]):hover::before { opacity:1; } }
.ttt.is-my-turn .ttt-cell:not([aria-disabled="true"]):focus-visible::before { opacity:1; }
.ttt-piece { position:relative; display:block; width:100%; height:100%; overflow:visible; }
.ttt-piece.is-heart path { fill:#e8577e; }
.ttt-piece.is-star path { fill:#f2b84b; }
.ttt-cell.is-new .ttt-piece { animation:ttt-pop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes ttt-pop { from { transform:scale(0) rotate(-25deg); } }
.ttt-cell.is-winning .ttt-piece { filter:drop-shadow(0 0 2px rgba(232,87,126,.4)); }
.ttt-line line { fill:none; stroke-width:9; stroke-linecap:round; stroke-dasharray:1; opacity:.85; }
.ttt-line.by-ayesha line { stroke:#e0446f; }
.ttt-line.by-zohaib line { stroke:#d9a530; }
.ttt-line.is-new line { animation:ttt-draw .55s ease-out .3s both; }
@keyframes ttt-draw { from { stroke-dashoffset:1; } to { stroke-dashoffset:0; } }
.ttt-sparkles { position:absolute; inset:0; pointer-events:none; }
.ttt-sparkles i { position:absolute; color:#f2b84b; font-size:15px; font-style:normal; opacity:0; animation:ttt-sparkle 1.1s ease-out .6s forwards; }
.ttt-sparkles i:nth-child(even) { color:#e8577e; }
.ttt-sparkles i:nth-child(1) { left:-8%; top:8%; }.ttt-sparkles i:nth-child(2) { right:-8%; top:4%; animation-delay:.7s; }.ttt-sparkles i:nth-child(3) { left:46%; top:-12%; animation-delay:.8s; }
.ttt-sparkles i:nth-child(4) { left:-6%; bottom:6%; animation-delay:.75s; }.ttt-sparkles i:nth-child(5) { right:-6%; bottom:10%; animation-delay:.65s; }.ttt-sparkles i:nth-child(6) { left:47%; bottom:-12%; animation-delay:.85s; }
@keyframes ttt-sparkle { 0% { opacity:0; transform:scale(.3); } 40% { opacity:1; transform:scale(1.25); } 100% { opacity:0; transform:translateY(-10px) scale(1); } }
.voice-message .ttt-status { margin:0; font:italic 600 16px/1.3 "Playfair Display",serif; }
.ttt-status.nudge { animation:ttt-nudge .4s ease-in-out; }
@keyframes ttt-nudge { 20%,60% { transform:translateX(-4px); } 40%,80% { transform:translateX(4px); } }
.voice-message .ttt-stake { margin:0; color:#8d5a6d; font:500 12px/1.5 "Plus Jakarta Sans",sans-serif; }
.ttt-stake b { color:#5a2a40; }
.ttt-stake s { opacity:.7; }
.ttt-claim,.ttt-rematch { padding:5px 12px; border-radius:999px; font:700 11px "Plus Jakarta Sans",sans-serif; cursor:pointer; }
.ttt-claim { margin-left:4px; border:0; background:#e0446f; color:#fff; }
.ttt-rematch { border:1px solid #edc9d6; background:#fff; color:#a3305a; }
.ttt-claim:disabled,.ttt-rematch:disabled { opacity:.6; cursor:default; }
.ttt-foot { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px 12px; width:100%; }
.ttt-score { color:#a37382; font:500 10px "DM Mono",monospace; letter-spacing:.04em; }

/* "Replying to" bar, the sticker tray, and the text box that grows */
.voice-replying { display:flex; align-items:center; gap:10px; margin-bottom:10px; padding:8px 8px 8px 12px; border-left:3px solid #d97898; border-radius:4px 12px 12px 4px; background:rgba(242,155,183,.16); text-align:left; }
.voice-replying[hidden] { display:none; }
.voice-replying p { flex:1; min-width:0; margin:0; }
.voice-replying small { display:block; font:500 10px "DM Mono",monospace; letter-spacing:.04em; opacity:.8; }
.voice-replying span { display:block; overflow:hidden; font-size:13px; white-space:nowrap; text-overflow:ellipsis; }
.voice-replying-cancel { flex:none; width:30px; height:30px; padding:0; border:0; border-radius:50%; background:none; color:inherit; font-size:20px; line-height:1; cursor:pointer; }
.voice-sticker-tray { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; margin-top:10px; padding:10px; border-radius:16px; background:rgba(242,155,183,.14); }
.voice-sticker-tray[hidden] { display:none; }
.voice-sticker-tray button { display:grid; justify-items:center; gap:2px; padding:4px 2px; border:0; border-radius:12px; background:none; color:inherit; cursor:pointer; transition:transform .15s,background .15s; }
.voice-sticker-tray button:hover,.voice-sticker-tray button:focus-visible { background:rgba(255,255,255,.65); transform:translateY(-2px); }
.voice-sticker-tray button:disabled { opacity:.5; }
.voice-sticker-tray .bunny-sticker { width:56px; height:56px; }
.voice-sticker-tray .bunny-sticker .st-wave { animation:none; }
.voice-sticker-tray small { font:500 9px "DM Mono",monospace; opacity:.75; }
.voice-game-tray { display:grid; gap:9px; margin-top:10px; padding:12px; border-radius:16px; background:rgba(242,155,183,.14); text-align:left; }
.voice-game-tray[hidden] { display:none; }
.voice-game-title { margin:0; color:#b46e85; font:600 11px "DM Mono",monospace; letter-spacing:.1em; text-transform:uppercase; }
.voice-game-stake { display:grid; gap:5px; margin:0; font-size:12px; }
.voice-game-stake span { opacity:.8; }
.voice-game-stake input { width:100%; min-height:40px; margin:0; padding:8px 12px; border:1px solid #e7cbd5; border-radius:12px; background:#fff; color:#422a38; font:inherit; font-size:14px; }
.voice-game-start { justify-self:start; min-height:40px; padding:8px 16px; border:0; border-radius:999px; background:#e0446f; color:#fff; font:700 12px "Plus Jakarta Sans",sans-serif; cursor:pointer; }
.voice-game-start:disabled { opacity:.6; }
.voice-text-form .voice-game-toggle { flex:none; display:grid; place-items:center; width:44px; height:44px; padding:0; border:1px solid #e7cbd5; border-radius:12px; background:none; color:#c15375; }
.voice-text-form .voice-game-toggle[aria-expanded="true"] { background:rgba(242,155,183,.2); }
.game-icon { width:22px; height:22px; }
.voice-text-form { align-items:flex-end; }
.voice-text-form > button[type="submit"] { min-height:44px; }
.voice-text-form textarea { resize:none; overflow-y:auto; max-height:140px; line-height:1.4; }
.voice-text-form .voice-sticker-toggle { flex:none; display:grid; place-items:center; width:44px; height:44px; padding:0; border:1px solid #e7cbd5; border-radius:12px; background:none; color:#c15375; }
.voice-text-form .voice-sticker-toggle[aria-expanded="true"] { background:rgba(242,155,183,.2); }
.sticker-icon { width:22px; height:22px; }
/* Phones: the mailbox fits the visible screen (not under Safari's toolbar), and the tray and text box stay compact. */
#voice-modal .modal-card { max-height:calc(100dvh - 24px); }
@media (max-width:520px) {
  .voice-sticker-tray { gap:2px; padding:6px; }
  .voice-sticker-tray .bunny-sticker { width:40px; height:40px; }
  .voice-sticker-tray small { display:none; }
  .voice-text-form textarea { max-height:96px; }
  #voice-modal .voice-thread { min-height:120px; }
}

[data-theme="night"] .voice-actions button { border-color:#4a3346; background:#21162a; color:#f29bb7; }
[data-theme="night"] .voice-reaction { border-color:#21162a; background:#3a2840; }
[data-theme="night"] .voice-actions .voice-trash { background:none; border-color:transparent; color:inherit; }
[data-theme="night"] .voice-actions .voice-trash.is-armed { border-color:#e0607a; background:#c0394f; color:#fff; }
[data-theme="night"] .voice-actions .voice-react-choice { background:rgba(255,255,255,.06); border-color:transparent; }
[data-theme="night"] .voice-actions .voice-react-choice.is-current { border-color:#f29bb7; background:rgba(242,155,183,.18); }
[data-theme="night"] .voice-message.is-sticker { color:#c3a3b3; }
[data-theme="night"] .voice-reply-quote { background:rgba(255,255,255,.07); }
[data-theme="night"] .voice-replying,[data-theme="night"] .voice-sticker-tray { background:rgba(242,155,183,.08); color:#f3dce7; }
[data-theme="night"] .voice-sticker-tray button:hover { background:rgba(255,255,255,.08); }
[data-theme="night"] .voice-text-form :is(.voice-sticker-toggle,.voice-plane-throw,.voice-game-toggle) { border-color:#4a3346; color:#f29bb7; }
[data-theme="night"] .voice-message.is-game:is(.mine,.theirs) { border-color:#f0d3de; background:#fff6f8; color:#5a2a40; box-shadow:0 1px 5px rgba(0,0,0,.25); }
[data-theme="night"] .voice-message.is-game .voice-meta { color:#8d6875; }
[data-theme="night"] .voice-game-tray { background:rgba(242,155,183,.08); color:#f3dce7; }
[data-theme="night"] .voice-game-stake input { border-color:#4a3346; background:#21162a; color:#f3dce7; }
@media (prefers-reduced-motion:reduce) { .voice-reaction.pop,.bunny-sticker .st-wave,.voice-message.flash,.voice-plane-art,.voice-plane-note.just-opened,.ttt-cell.is-new .ttt-piece,.ttt-line.is-new line,.ttt-status.nudge { animation:none; }.ttt-sparkles { display:none; }.voice-heart-burst { display:none; }.voice-message.swipe-back,.voice-sticker-tray button,.voice-actions .voice-react-choice { transition:none; } }
