:root { --rose: #e8568a; --ink: #5b3550; --soft: #fff6f9; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100dvh; display: flex; justify-content: center; align-items: center;
  padding: 16px; color: var(--ink);
  font: 16px/1.45 ui-rounded, "SF Pro Rounded", Nunito, system-ui, sans-serif;
  background: linear-gradient(160deg, #ffe3ec, #f3e4ff 55%, #ffeede) fixed;
}
.card {
  position: relative; z-index: 1; width: 100%; max-width: 440px; padding: 24px; text-align: center;
  background: rgba(255, 255, 255, .8); backdrop-filter: blur(10px);
  border-radius: 32px; box-shadow: 0 20px 50px rgba(190, 90, 140, .22);
}
#talk { display: flex; flex-direction: column; height: calc(100dvh - 32px); max-height: 820px; }
h1 { margin: 0 0 8px; font-size: 30px; color: var(--rose); }
.beat { display: inline-block; animation: beat 1.4s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } }
button, input { font: inherit; color: inherit; }
button { border: 2px solid #f6c5d8; background: #fff; border-radius: 999px; padding: 10px 18px; cursor: pointer; }
button.primary { background: linear-gradient(135deg, #ff7eaa, #c47be8); border: 0; color: #fff; font-weight: 700; padding: 14px 28px; }
button.on { background: #ffdbe8; border-color: var(--rose); font-weight: 700; }
button:disabled { opacity: .6; }
button:focus-visible, input:focus-visible { outline: 3px solid #a55bd0; outline-offset: 2px; }
.langs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0; }
.mode button { font-size: 14px; padding: 6px 14px; }
label { display: block; margin: 12px 0; }
#name { text-align: center; }
input { display: block; width: 100%; margin-top: 4px; padding: 10px 14px; border: 2px solid #f6c5d8; border-radius: 16px; }
.note { font-size: 13px; opacity: .8; }
.error { color: #b3123f; min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }
.rec { margin: 0; font-size: 12px; color: #d1305f; }
#status { margin: 4px 0; }
.hd { margin: 0; font-size: 12px; color: #2f8f5b; }
#chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 2px; text-align: start; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 20px; background: #f1e8ff; align-self: flex-start; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; background: #ffdbe8; }
.bubble b { display: block; font-size: 12px; color: var(--rose); }
.bubble p { margin: 2px 0 0; }
.bubble p.orig { opacity: .65; font-size: 14px; }
.controls { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.hearts i { position: fixed; bottom: -40px; font-style: normal; color: #ff8fb4; opacity: .5; animation: float 16s linear infinite; pointer-events: none; }
.hearts i:nth-child(1) { left: 6%; font-size: 22px; }
.hearts i:nth-child(2) { left: 19%; font-size: 16px; animation-delay: -5s; }
.hearts i:nth-child(3) { left: 33%; font-size: 20px; animation-delay: -11s; }
.hearts i:nth-child(4) { left: 50%; font-size: 28px; animation-delay: -2s; }
.hearts i:nth-child(5) { left: 66%; font-size: 18px; animation-delay: -9s; }
.hearts i:nth-child(6) { left: 80%; font-size: 24px; animation-delay: -14s; }
.hearts i:nth-child(7) { left: 92%; font-size: 20px; animation-delay: -7s; }
@keyframes float { to { transform: translateY(-110vh) rotate(40deg); } }
@media (prefers-reduced-motion: reduce) { .hearts { display: none; } .beat { animation: none; } }
body.records { display: block; max-width: 640px; margin: 0 auto; }
.records section { background: #fff; border-radius: 24px; padding: 16px 20px; margin-bottom: 16px; }
.records h2 { font-size: 18px; margin: 0 0 8px; }
.records ul { padding-left: 0; list-style: none; }
.records li { margin-bottom: 10px; overflow-wrap: anywhere; }
.records audio { display: block; width: 100%; margin-top: 4px; }
