:root{color-scheme:dark;--bg:#090611;--surface:#140e22;--raised:#211735;--stroke:#3c2a58;--purple:#ad78ff;--lav:#dec5ff;--text:#faf8ff;--muted:#b7a8cc;--red:#ff7695;--green:#7de8c7;--radius:22px;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% -10%,#271446 0%,#0b0614 50%,#07040d 100%);color:var(--text);min-height:100dvh}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.44;cursor:not-allowed}a{color:var(--lav)}h1,h2,h3,p{margin:0}.hidden{display:none!important}.app-frame{max-width:980px;min-height:100dvh;margin:auto;background:rgba(11,7,21,.95);box-shadow:0 0 100px #0008;position:relative}.topbar{position:sticky;top:0;z-index:10;background:#100b1bf0;backdrop-filter:blur(18px);border-bottom:1px solid var(--stroke);height:66px;padding:0 20px;display:flex;align-items:center;justify-content:space-between;gap:10px}.brand{display:flex;align-items:center;gap:10px;letter-spacing:.2em;font-weight:900;font-size:18px}.brand img{width:39px;height:39px;border-radius:12px}.top-title{font-size:20px;font-weight:800}.iconbtn{background:#251935;color:var(--lav);border:1px solid #53377b;width:38px;height:38px;border-radius:13px;display:inline-flex;align-items:center;justify-content:center;font-size:19px}.page{padding:22px 20px 100px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}.page-heading h2{font-size:25px;letter-spacing:-.035em}.sub{color:var(--muted);font-size:13px;line-height:1.5}.eyebrow{color:var(--purple);font-weight:800;letter-spacing:.14em;text-transform:uppercase;font-size:11px}.pane{border:1px solid var(--stroke);border-radius:var(--radius);background:linear-gradient(145deg,#1d1130,#110b1c);padding:18px;margin-bottom:16px}.pane h3{margin-bottom:12px}.button{border:0;background:linear-gradient(125deg,#a165ff,#7738d0);color:white;font-weight:750;border-radius:14px;padding:12px 16px;min-height:42px;transition:filter .2s}.button:hover{filter:brightness(1.12)}.button.alt{background:#281b3d;border:1px solid #4a326b;color:var(--lav)}.button.danger{background:#702542}.button.small{padding:8px 11px;min-height:33px;font-size:12px;border-radius:10px}.button.ghost{background:none;border:1px solid var(--stroke);color:var(--lav)}.field{margin:12px 0}.field label{display:block;color:var(--muted);font-size:13px;margin-bottom:7px}.field input,.field textarea,.field select,.compose input,.search{display:block;width:100%;padding:13px 14px;border:1px solid #4b356c;border-radius:13px;background:#110a1e;color:white;outline:none}.field input:focus,.field textarea:focus,.compose input:focus,.search:focus{border-color:var(--purple);box-shadow:0 0 0 3px #ab70ff1c}.field textarea{min-height:100px;resize:vertical}.hint{font-size:12px;color:var(--muted);line-height:1.55}.error{color:#ff9eb6}.success{color:var(--green)}.auth-wrap{max-width:460px;margin:0 auto;padding:8vh 22px 48px}.auth-hero{text-align:center;margin-bottom:32px}.auth-hero img{width:120px;height:120px;filter:drop-shadow(0 0 26px #692dbd66);border-radius:27px}.auth-hero h1{font-size:35px;letter-spacing:.2em;margin-top:15px}.auth-hero p{margin-top:9px;color:var(--muted)}.switch{display:flex;gap:10px}.switch button{flex:1}.nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(980px,100%);padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:#120b20f7;border-top:1px solid #3d2858;display:flex;justify-content:space-around;z-index:12}.nav button{color:#bda6d8;border:0;background:none;padding:5px 7px;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px}.nav button span{font-size:23px}.nav button.active{color:#c494ff}.stack{display:flex;flex-direction:column;gap:12px}.listrow{display:flex;align-items:center;gap:12px;border:1px solid var(--stroke);background:#180f27;border-radius:17px;padding:12px;min-height:68px}.listrow .details{flex:1;min-width:0}.listrow .details b{display:block;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.listrow .details small{color:var(--muted);font-size:12px}.avatar{flex:none;width:44px;height:44px;border-radius:15px;background:linear-gradient(130deg,#672ab6,#c78bff);display:flex;align-items:center;justify-content:center;color:white;font-size:18px;font-weight:800;object-fit:cover}.avatar.big{width:90px;height:90px;border-radius:28px;font-size:35px}.row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.between{justify-content:space-between}.right{margin-left:auto}.pill{padding:6px 10px;background:#382254;color:#d8afff;border-radius:25px;font-size:11px}.chat-layout{display:flex;flex-direction:column;height:calc(100dvh - 160px);min-height:380px}.messages{flex:1;overflow-y:auto;padding:20px 14px;display:flex;flex-direction:column;gap:12px}.bubble{max-width:82%;align-self:flex-start;background:#281a3b;padding:12px 14px;border-radius:18px 18px 18px 5px;overflow-wrap:anywhere}.bubble.mine{align-self:flex-end;background:linear-gradient(145deg,#803bd0,#582d9c);border-radius:18px 18px 5px 18px}.bubble small{display:block;opacity:.75;font-size:10px;margin-top:6px}.bubble .sender{font-size:11px;font-weight:750;color:#eccaff;margin-bottom:5px}.bubble img,.bubble video{max-width:100%;border-radius:12px;max-height:320px}.bubble audio{width:min(260px,65vw)}.compose{padding:10px 0 0;border-top:1px solid var(--stroke);display:flex;gap:8px;align-items:center}.compose input{flex:1;min-width:60px}.compose button{flex:none}.recording{display:flex;align-items:center;gap:12px;background:#371530;border:1px solid #9d4a99;border-radius:14px;padding:10px;flex:1;color:#ffd0e9}.recording .pulse{width:13px;height:13px;background:#ff688f;border-radius:50%;animation:pulse 1.1s infinite}.wave{display:flex;align-items:center;gap:3px;height:24px}.wave i{width:3px;border-radius:6px;background:#e5abff;animation:wave .6s ease-in-out infinite alternate}.wave i:nth-child(2){animation-delay:.15s}.wave i:nth-child(3){animation-delay:.3s}.wave i:nth-child(4){animation-delay:.1s}.wave i:nth-child(5){animation-delay:.2s}@keyframes pulse{50%{transform:scale(1.4);opacity:.45}}@keyframes wave{from{height:4px}to{height:24px}}.chipset{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.chip{border-radius:22px;border:1px solid var(--stroke);padding:8px 12px;background:#241737;color:#eee}.chip.selected{background:#7143b6;border-color:#ad78ff}.cardgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}.mediacard{position:relative;min-height:170px;background:#221534;border:1px solid var(--stroke);border-radius:15px;overflow:hidden}.mediacard img,.mediacard video{width:100%;height:180px;object-fit:cover}.mediacard .meta{padding:10px;font-size:12px;color:var(--muted)}.mediacard .overlay{position:absolute;top:7px;right:7px}.divider{height:1px;background:#3e2d57;margin:18px 0}.toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #312045}.toggle input{accent-color:#aa79ff;width:20px;height:20px}.profile-head{display:flex;align-items:center;gap:17px;margin-bottom:18px}.profile-head h2{font-size:24px}.notice{border-left:3px solid #c088ff;background:#27193b;padding:12px 15px;border-radius:9px;font-size:13px;color:#e5d5f8;line-height:1.5}.toast-show{opacity:1!important;transform:translate(-50%,-20px)!important}#toast{position:fixed;bottom:83px;left:50%;transform:translate(-50%,0);background:#382352;border:1px solid #754ead;padding:12px 18px;border-radius:14px;z-index:100;color:white;max-width:90vw;min-width:180px;text-align:center;opacity:0;pointer-events:none;transition:.25s}.modal-backdrop{position:fixed;inset:0;background:#06030bbd;z-index:30;display:flex;justify-content:center;align-items:center;padding:16px}.modal{width:min(500px,100%);max-height:88dvh;overflow:auto;background:#1a1129;border:1px solid #7446a4;border-radius:23px;padding:22px;box-shadow:0 20px 80px #0008}.modal .close{float:right}.empty{text-align:center;padding:45px 16px;color:#b9a7ce}.empty .emoji{font-size:37px;display:block;margin-bottom:14px}.empty h3{color:white;margin-bottom:8px}.config{max-width:650px;margin:8vh auto;padding:24px}.admin-label{font-size:12px;padding:5px 8px;border-radius:20px;background:#44243d;color:#ffc1de}.callout{padding:12px 14px;border-radius:12px;border:1px solid #4b346a;background:#180f27}.layout-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px}@media(max-width:640px){.page{padding:16px 14px 95px}.layout-columns{grid-template-columns:1fr}.topbar{padding:0 13px}.auth-wrap{padding-top:5vh}.page-heading h2{font-size:23px}.chat-layout{height:calc(100dvh - 162px)}.button{padding:11px 13px}}
/* Full-size call control */
.walkie-screen,.walkie-intro{text-align:center;display:flex;flex-direction:column;align-items:center;gap:14px;padding:15px 0}
.walkie-rings{display:grid;place-items:center;width:96px;height:96px;border-radius:50%;font-size:44px;background:radial-gradient(circle at 35% 25%,#8a50de,#211034 75%);border:2px solid #bb8cff;box-shadow:0 0 0 10px #a86fff1a,0 0 0 20px #a86fff0c;animation:walkie-breathe 2s ease-in-out infinite}
@keyframes walkie-breathe{50%{transform:scale(1.045);box-shadow:0 0 0 16px #a86fff14,0 0 0 30px #a86fff08}}
.walkie-ptt{width:190px;height:190px;border-radius:50%;border:3px solid #b282ff;background:linear-gradient(140deg,#6435a5,#2b174c);color:white;font-weight:800;letter-spacing:.08em;font-size:16px;touch-action:none;user-select:none;-webkit-user-select:none;box-shadow:0 10px 40px #180b36;transition:background .2s,transform .1s}
.walkie-ptt:active,.walkie-ptt.talking{background:linear-gradient(135deg,#a74db5,#c14f81);transform:scale(1.05);box-shadow:0 0 0 12px #c666ff33}
.walkie-ptt:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.walkie-actions{justify-content:center}

/* Conversational navigation, fixed composer, hands-free calls */
.topbar-actions,.chat-call-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
.header-profile{border:0;background:none;padding:0;line-height:0}.header-profile .avatar{height:39px;width:39px;border-radius:50%}
.chat-topbar{height:68px;gap:9px;padding:0 11px}.chat-topbar .avatar{width:40px;height:40px;border-radius:50%}
.chat-title{display:flex;flex:1;flex-direction:column;min-width:0;line-height:1.25}
.chat-title strong{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-title small{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-call-actions .iconbtn{width:39px;height:39px;min-width:39px}.call-icon{background:#2f1c4b;border-color:#68478d}
.app-frame.is-chat{height:100dvh;min-height:0;display:flex;flex-direction:column}
.is-chat>.page{padding:0;flex:1;min-height:0;display:flex;flex-direction:column}
.is-chat .chat-layout{height:100%;min-height:0;width:100%;display:flex;flex-direction:column}
.is-chat .messages{border-radius:0!important;min-height:0;padding:16px 15px 25px;overscroll-behavior:contain}
.is-chat .compose{padding:9px 10px calc(10px + env(safe-area-inset-bottom));background:#120b1f;border-top:1px solid var(--stroke)}
.is-chat .compose input{border-radius:24px;min-height:42px}.is-chat .compose .iconbtn{border-radius:50%;width:39px;height:39px}
.is-chat .compose .send-icon{border-radius:50%;padding:0;width:42px;height:42px}
.story-heading{margin:26px 0 14px;color:var(--lav)}
.story-actions{display:flex;gap:6px;flex-wrap:wrap;padding:8px}
.call-screen{display:flex;flex-direction:column;align-items:center;text-align:center;gap:15px;padding:12px 0}
.call-symbol{display:grid;place-items:center;width:92px;height:92px;border:2px solid #b78bff;background:#3d2362;border-radius:50%;box-shadow:0 0 0 13px #a86fff19;animation:call-pulse 2s ease-in-out infinite}
.call-symbol svg{width:39px;height:39px}
@keyframes call-pulse{50%{box-shadow:0 0 0 24px #a86fff08}}
.call-buttons{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.call-video-wrap{height:min(47vh,340px);width:min(100%,380px);background:#080610;position:relative;border-radius:19px;overflow:hidden;border:1px solid #53377b}
.call-video-wrap #call-remote{width:100%;height:100%;object-fit:cover}
.call-video-wrap #call-local{position:absolute;right:8px;bottom:8px;width:30%;height:35%;object-fit:cover;border-radius:13px;border:2px solid #b78bff;background:#211335}
@media(max-width:400px){.chat-topbar{gap:6px}.chat-topbar .iconbtn{width:34px;min-width:34px}.chat-topbar .avatar{width:34px;height:34px}.chat-topbar .chat-call-actions{gap:4px}.chat-title strong{font-size:14px}}

/* Six independently interactive navigation icons. The existing bar colours and
   background remain unchanged; the bottom inset protects device home controls. */
.nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0;padding:7px 4px calc(7px + env(safe-area-inset-bottom))}
.nav button{position:relative;min-width:0;min-height:62px;padding:4px 1px 7px;gap:3px;justify-content:flex-start}
.nav button .nav-icon{display:grid;place-items:center;width:30px;height:30px;flex:none}
.haunted-nav-svg{display:block;width:28px;height:28px}
.topbar-actions .haunted-nav-svg{width:22px;height:22px}
.nav button .nav-label{display:block;max-width:100%;min-height:2.3em;font-size:clamp(.58rem,2.6vw,.7rem);line-height:1.15;text-align:center;white-space:normal;overflow-wrap:anywhere}
.nav button.active::after{content:"";position:absolute;bottom:1px;left:20%;right:20%;height:2px;border-radius:2px;background:#c494ff}
.nav button:focus-visible{outline:2px solid #dec5ff;outline-offset:-2px;border-radius:6px}
.app-frame:not(.is-chat)>.page{padding-bottom:calc(var(--haunted-nav-height, 96px) + 16px)}

/* HauntCam fills the space between the original header and navigation. */
.app-frame.is-camera{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.is-camera>.topbar{flex:none}
.app-frame.is-camera>.page{display:flex;flex:1;min-height:0;padding:0 0 var(--haunted-nav-height, 96px)}
.hauntcam{display:flex;flex:1;min-width:0;min-height:0}
.hauntcam-stage{position:relative;flex:1;min-width:0;min-height:0;overflow:hidden;background:#0d0815}
.hauntcam-media{display:block;width:100%;height:100%;object-fit:cover}
img.hauntcam-media{object-fit:contain}
.hauntcam-placeholder{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px 24px 110px;text-align:center;color:var(--lav)}
.hauntcam-placeholder .haunted-nav-svg{width:52px;height:52px}
.hauntcam-placeholder p{max-width:280px;color:var(--muted);line-height:1.45}
.hauntcam-flip,.hauntcam-off{position:absolute;top:14px;min-width:44px;min-height:44px;color:var(--lav);background:#170f27d9;border:1px solid #6a488a;border-radius:50%;display:grid;place-items:center}
.hauntcam-flip{right:14px}
.hauntcam-off{left:14px;border-radius:24px;padding:0 14px;font-size:12px}
.hauntcam-controls{position:absolute;left:0;right:0;bottom:14px;display:flex;align-items:center;justify-content:center;gap:clamp(20px,8vw,55px);padding:8px 10px}
.hauntcam-side{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:64px;min-height:56px;padding:4px;background:#170f27d9;color:var(--lav);border:1px solid #6a488a;border-radius:16px}
.hauntcam-side .haunted-nav-svg{width:27px;height:27px}
.hauntcam-side small{font-size:10px;line-height:1.1}
.hauntcam-shutter{display:grid;place-items:center;width:72px;height:72px;flex:none;padding:5px;border:3px solid #eee3ff;border-radius:50%;background:#120b20a6}
.hauntcam-shutter span{display:block;width:100%;height:100%;border-radius:50%;background:#c494ff}
.hauntcam-record-dot{display:block;width:21px;height:21px;border:2px solid #f2dfff;border-radius:50%;background:#b875ef}
.hauntcam-record-stop{display:block;width:21px;height:21px;border-radius:5px;background:#ff7695}
.hauntcam-unavailable{width:64px;font-size:10px;text-align:center;color:var(--lav)}
.hauntcam-status{position:absolute;top:20px;left:50%;transform:translateX(-50%);max-width:45%;color:#fff;font-size:12px;text-align:center}
.hauntcam-editor{position:absolute;left:0;right:0;bottom:0;max-height:75%;overflow:auto;padding:18px 16px;background:linear-gradient(0deg,#100a1df7 75%,#100a1dd9);border-top:1px solid #60417f}
.hauntcam-editor label{display:block;margin-bottom:6px;color:var(--lav);font-size:13px}
.hauntcam-editor input{width:100%;padding:11px 13px;border:1px solid #60417f;border-radius:12px;background:#110a1e;color:var(--text)}
.hauntcam-editor p{margin-top:10px;color:var(--muted);font-size:11px;line-height:1.4}
.hauntcam-share{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.hauntcam-share .button{flex:1 1 auto;font-size:12px}
.hauntcam button:focus-visible{outline:2px solid #dec5ff;outline-offset:3px}


/* HAUNTED video capture: red feedback only during a 10-second recording.
   One starting pulse, then a steady red ring. No overlays on the video file. */
@keyframes hauntcam-recording-start {
  0% { box-shadow: 0 0 0 0 rgba(255,64,97,.85), 0 0 14px 3px rgba(255,64,97,.45); }
  55% { box-shadow: 0 0 0 15px rgba(255,64,97,.22), 0 0 32px 7px rgba(255,64,97,.65); }
  100% { box-shadow: 0 0 0 0 rgba(255,64,97,0), 0 0 16px 3px rgba(255,64,97,.45); }
}
.hauntcam-controls.is-recording .hauntcam-shutter {
  border-color: #ff536f;
  box-shadow: 0 0 0 3px #ff536f66, 0 0 15px 3px #ff536f55;
  animation: hauntcam-recording-start 760ms ease-out 1;
}
.hauntcam-controls.is-recording .hauntcam-shutter span { background:#ff536f; }
.hauntcam-controls.is-recording [data-action="camera-video-stop"] {
  border-color:#ff536f;
  color:#fff2f5;
  background:#541628ed;
}
.hauntcam-status.is-recording {
  top:18px;
  max-width:75%;
  width:max-content;
  padding:6px 13px;
  border:1px solid #ff758b;
  border-radius:20px;
  background:#3b0d22de;
  color:#fff;
  font-weight:700;
  letter-spacing:.03em;
}
@media (prefers-reduced-motion: reduce) {
  .hauntcam-controls.is-recording .hauntcam-shutter { animation:none; }
}


/* HAUNTED visual polish — retains original sections, logo, brand and six-icon nav.
   Review only: 2026-10-30. No behavioural or backend schema changes. */
:root {
  --haunted-glass:rgba(29,17,46,.92);
  --haunted-card-line:rgba(164,114,218,.35);
  --haunted-lift:0 10px 32px rgba(14,5,27,.24);
}
body {
  background: radial-gradient(ellipse at 74% -12%, #291344 0%, transparent 49%),#080510;
  -webkit-font-smoothing:antialiased;
}
/* Very subtle atmospheric cloud effect, contained behind actual app content.
   The capture preview, photos and chosen chat wallpapers stay untouched. */
.app-frame:not(.is-camera):not(.is-chat) {
  isolation:isolate;
  background:
   radial-gradient(ellipse 180px 120px at 85% 25%,rgba(83,40,130,.085),transparent 83%),
   radial-gradient(ellipse 250px 140px at 23% 72%,rgba(100,49,151,.055),transparent 86%),
   linear-gradient(180deg,#0d0817 0%,#0a0612 60%,#090610 100%);
}
.topbar {
  height:74px;
  padding-inline:clamp(12px,3.7vw,21px);
  gap:clamp(5px,1.9vw,10px);
  background:rgba(17,10,29,.96);
  border-bottom:1px solid rgba(166,103,226,.28);
  box-shadow:0 4px 26px rgba(0,0,0,.14);
  -webkit-backdrop-filter:blur(20px);
  backdrop-filter:blur(20px);
}
.topbar .brand {
  font-size:clamp(13px,4.1vw,20px);
  letter-spacing:.14em;
  font-weight:900;
  gap:clamp(5px,1.7vw,9px);
  white-space:nowrap;
  min-width:0;
  text-shadow:0 0 16px rgba(184,125,255,.18);
}
.topbar .brand img {
  display:block;
  width:clamp(34px,10.3vw,44px);
  height:clamp(34px,10.3vw,44px);
  border-radius:12px;
  object-fit:contain;
  filter:drop-shadow(0 0 9px rgba(162,96,241,.27));
}
.topbar .topbar-actions{margin-left:auto;gap:6px;flex:none}
.topbar .iconbtn {
  flex:none;
  min-width:42px;
  width:42px;
  height:42px;
  border-radius:15px;
  color:#E5C5FF;
  border:1px solid rgba(182,123,246,.42);
  background:linear-gradient(145deg,rgba(51,30,74,.84),rgba(33,20,51,.84));
  box-shadow:inset 0 1px rgba(252,235,255,.045);
}
.topbar .header-profile .avatar {
  width:44px;
  height:44px;
  border-radius:50%;
  box-shadow:0 0 0 2px rgba(191,143,255,.16);
}
.page{padding:25px clamp(16px,4.5vw,25px) calc(var(--haunted-nav-height,96px) + 20px)}
.page-heading{align-items:center;gap:12px;margin-bottom:24px}
.page-heading>div{min-width:0}
.page-heading h2{font-size:clamp(28px,8vw,34px);font-weight:850;letter-spacing:-.055em;line-height:1.13;margin:5px 0 8px}
.eyebrow{letter-spacing:.17em;font-size:12px;color:#C58BFA}
.page-heading .sub{font-size:clamp(13px,3.7vw,15px);max-width:38ch;line-height:1.52;color:#C1AFD4}
.page-heading>.button{flex:none;min-width:60px;max-width:72px;min-height:66px;border-radius:17px;padding:10px 13px;box-shadow:0 6px 20px rgba(112,48,202,.16)}
.pane,.listrow {
  background:linear-gradient(145deg,rgba(34,20,53,.93),rgba(20,12,33,.96));
  border-color:var(--haunted-card-line);
  box-shadow:var(--haunted-lift),inset 0 1px rgba(237,209,255,.028);
}
.listrow{border-radius:20px;min-height:83px;padding:13px 15px;gap:12px;transition:transform .17s ease,border-color .17s ease,background .17s ease}
.listrow:active{transform:scale(.986);background:#241431}
.listrow .avatar{width:53px;height:53px;border-radius:18px}
.listrow .details b{font-size:clamp(15px,4.2vw,17px);letter-spacing:-.025em}
.listrow .details small{font-size:clamp(12px,3.5vw,14px);line-height:1.45;display:block;margin-top:4px}
.button:not(:disabled):active,.iconbtn:not(:disabled):active{transform:scale(.97)}
.button,.iconbtn,.chip{transition:transform .17s ease,box-shadow .17s ease,background-color .17s ease}
.button:focus-visible,.iconbtn:focus-visible,.chip:focus-visible,.listrow:focus-visible{outline:2px solid #e5c0ff;outline-offset:3px}
.profile-head{border-radius:22px;background:linear-gradient(145deg,#1c122c,#130b20);border:1px solid var(--haunted-card-line);padding:16px;box-shadow:var(--haunted-lift)}
.profile-head h2{font-size:clamp(19px,5vw,23px);letter-spacing:-.025em}
.profile-head .avatar.big{width:78px;height:78px;border-radius:25px}
.chipset{gap:9px;margin-block:16px}
.chip{padding:10px 16px;border-color:var(--haunted-card-line)}
.chip.selected{box-shadow:0 0 0 1px rgba(192,137,255,.2),0 6px 20px rgba(102,45,157,.15)}
.mediacard{background:#1c112d;border-color:var(--haunted-card-line);border-radius:17px}
@media(max-width:370px){
 .topbar{padding-inline:9px;gap:4px}
 .topbar .brand{letter-spacing:.1em;font-size:13px}
 .topbar .brand img{width:33px;height:33px}
 .topbar .iconbtn{width:37px;min-width:37px;height:39px;border-radius:13px}
 .topbar .header-profile .avatar{width:37px;height:37px}
 .page-heading>.button{max-width:66px;min-width:55px}
}
@media(prefers-reduced-motion:reduce){.button,.iconbtn,.chip,.listrow{transition:none}}

/* Safety controls: preserve original visual language, keep all friend actions on one panel. */
.friend-actions{display:flex;flex-wrap:wrap;align-items:center;gap:5px;justify-content:flex-end;max-width:58%}
.friend-actions .button{white-space:nowrap;min-width:0;padding:7px 9px;font-size:11px}
@media(max-width:520px){.friend-actions{max-width:55%}.friend-actions .button{padding:7px 8px;font-size:10px}.listrow:has(.friend-actions){gap:8px;padding:10px 9px}.listrow:has(.friend-actions) .avatar{width:39px;height:39px;border-radius:13px}}

/* Owner member directory and friends-only HauntFeed sharing. */
.feed-options{margin-left:auto;min-width:44px;min-height:44px;font-size:25px;color:var(--lav);background:rgba(93,65,129,.23);border:1px solid rgba(195,161,233,.2)}
.feed-options:focus-visible{outline:2px solid var(--lav);outline-offset:3px}
.shared-post-card{width:100%;display:flex;flex-direction:column;gap:9px;margin:8px 0;padding:13px;border-radius:16px;color:var(--text);text-align:left;background:linear-gradient(135deg,rgba(62,35,91,.7),rgba(18,13,31,.95));border:1px solid var(--stroke);white-space:normal}
.shared-post-card b{font-size:13px;color:var(--lav)}
.shared-post-card span{font-size:14px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.shared-post-card img{display:block;width:100%;max-height:180px;object-fit:cover;border-radius:12px}
.shared-post-card small{font-size:12px;color:var(--muted)}
.shared-post-card:focus-visible{outline:2px solid var(--lav);outline-offset:3px}
.owner-tabs .chip{min-height:42px}

/* Username availability and reserved identity indicators. */
#username-feedback{display:block;margin-top:7px;line-height:1.45;color:var(--muted)}
#username-feedback.invalid{color:var(--red);font-weight:600}
.owner-tabs{flex-wrap:wrap}


/* Spirits: compact single-row friend card with quick Whisper and an accessible options menu. */
.spirit-friend-row{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;column-gap:11px;min-height:76px;padding:12px}
.spirit-friend-row .avatar{width:46px;height:46px;min-width:46px;border-radius:15px;object-fit:cover}
.spirit-friend-details{min-width:0;overflow:hidden}
.spirit-friend-details b,.spirit-friend-details small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.spirit-friend-details b{font-size:clamp(13px,3.8vw,16px)}
.spirit-action-row{display:flex;align-items:center;flex-wrap:nowrap;justify-content:flex-end;gap:7px;max-width:none;width:auto;min-width:0}
.spirit-action-row .button{flex:0 0 auto;padding:9px 11px;min-height:42px;font-size:12px;font-weight:700;white-space:nowrap}
.spirit-action-row .spirit-more{flex:0 0 40px;min-width:40px;width:40px;height:42px;font-size:23px;font-weight:800}
@media(max-width:390px){
 .spirit-friend-row{grid-template-columns:40px minmax(0,1fr) auto;gap:8px;padding:10px 8px}
 .spirit-friend-row .avatar{width:40px;height:40px;min-width:40px;border-radius:12px}
 .spirit-action-row{gap:5px;max-width:none}
 .spirit-action-row .button{padding:8px 9px;min-height:40px;font-size:11px}
 .spirit-action-row .spirit-more{width:38px;min-width:38px;flex-basis:38px;height:40px}
}


/* Whispers: polished, fully operable voice notes and discreet lilac message actions. */
.whisper-message-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:23px}
.whisper-message-head .sender{min-width:0;margin-bottom:4px}
.whisper-message-more{appearance:none;border:0;background:transparent;box-shadow:none;color:#e3baff;border-radius:0;font-size:19px;font-weight:900;letter-spacing:2px;line-height:1;min-height:33px;min-width:33px;padding:3px 4px;flex:none}
.whisper-message-more:focus-visible,.voice-play:focus-visible,.voice-seek:focus-visible{outline:2px solid #f0d6ff;outline-offset:3px}
.whisper-message-more:active{color:#fff;background:transparent}
.bubble:has(.whisper-voice){width:min(320px,87vw);max-width:87%;padding:11px 12px}
.whisper-voice{position:relative;display:flex;align-items:center;gap:9px;min-height:58px;width:100%;padding:8px 9px;border:1px solid rgba(232,205,255,.23);border-radius:23px;background:linear-gradient(135deg,rgba(28,10,55,.52),rgba(57,29,95,.56));box-shadow:inset 0 1px 2px rgba(250,230,255,.08);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.voice-play{flex:0 0 42px;width:42px;height:42px;display:grid;place-items:center;border-radius:50%;border:1px solid rgba(237,209,255,.32);background:linear-gradient(160deg,#a36fea,#743bb9);color:white;font-size:18px;padding:0;box-shadow:0 3px 9px rgba(14,3,27,.28)}
.voice-track{position:relative;flex:1;min-width:48px;height:37px;display:flex;align-items:center}
.voice-waveform{width:100%;display:flex;align-items:center;justify-content:space-between;gap:2px;pointer-events:none}
.voice-waveform span{display:block;flex:1;max-width:4px;border-radius:5px;background:rgba(238,208,255,.75);box-shadow:0 0 3px rgba(235,204,255,.15)}
.voice-seek{position:absolute;inset:0;width:100%;height:37px;margin:0;appearance:none;-webkit-appearance:none;outline:none;background:transparent;cursor:pointer;opacity:.8;z-index:1}
.voice-seek::-webkit-slider-runnable-track{height:3px;border-radius:5px;background:linear-gradient(to right,#fff 0%,#fff var(--voice-progress,0%),transparent var(--voice-progress,0%),transparent 100%)}
.voice-seek::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:10px;height:10px;border-radius:50%;background:#fff;border:1px solid #9853dc;margin-top:-4px;box-shadow:0 0 0 2px rgba(166,105,227,.18)}
.voice-seek::-moz-range-track{height:3px;background:rgba(236,205,255,.12)}
.voice-seek::-moz-range-progress{height:3px;background:white}
.voice-seek::-moz-range-thumb{width:10px;height:10px;background:white;border:1px solid #9853dc;border-radius:50%}
.voice-clock{font-size:11px;color:#f0dcff;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;min-width:30px;text-align:right}
.bubble .voice-source{position:absolute!important;width:1px!important;height:1px!important;opacity:0;pointer-events:none;overflow:hidden}
.wallpaper-upload-panel{margin-top:15px;padding:14px}
.wallpaper-upload-panel .button{width:100%;margin-top:12px;min-height:46px}
.is-chat .messages{background-repeat:no-repeat}
@media(max-width:360px){.whisper-voice{gap:6px;padding:6px}.voice-play{flex-basis:38px;width:38px;height:38px}.voice-waveform{gap:1px}.bubble:has(.whisper-voice){max-width:91%;width:91%}}

/* Voice-note playback progress is filled across the waveform as audio plays. */
.voice-waveform span.voice-wave-played{background:#fff;box-shadow:0 0 6px rgba(242,211,255,.75)}
.voice-fallback{position:absolute;top:100%;left:0;width:min(300px,87vw);padding:10px;z-index:3;background:#211333;border:1px solid rgba(215,167,255,.45);border-radius:12px;box-shadow:0 8px 24px #0006;font-size:12px}
.voice-fallback p{margin:0 0 8px}
.voice-try-native{padding:8px 12px;border-radius:10px;color:#fff;background:#5b3786;border:1px solid #be91ed}
.bubble .voice-source.voice-native-visible{display:block!important;width:100%!important;height:44px!important;opacity:1!important;pointer-events:auto!important;position:relative!important;overflow:visible!important}
img.avatar{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;pointer-events:none}


/* Owner Control: two compact disclosure menus for protected usernames. */
.protected-handle-section{margin-top:12px}
.protected-handle-section summary{display:flex;align-items:center;gap:10px;cursor:pointer;font-weight:750;font-size:15px;color:var(--lav);list-style:none;min-height:46px;user-select:none}
.protected-handle-section summary::-webkit-details-marker{display:none}
.protected-handle-section summary::after{content:'⌄';font-size:23px;line-height:1;margin-left:auto;color:var(--purple);transition:transform .18s ease}
.protected-handle-section[open] summary::after{transform:rotate(180deg)}
.protected-handle-section summary:focus-visible{outline:2px solid var(--lav);outline-offset:4px;border-radius:8px}
.protected-handle-count{display:inline-flex;align-items:center;justify-content:center;min-width:30px;padding:3px 8px;border-radius:20px;background:rgba(148,85,208,.24);color:var(--lav);font-size:12px;font-weight:800}
.protected-handle-list{margin-top:12px;padding-top:12px;border-top:1px solid var(--stroke);max-height:48vh;overflow-y:auto}
@media(prefers-reduced-motion:reduce){.protected-handle-section summary::after{transition:none}}


/* The Crypt: public friend total, with an owner-only visibility menu. */
.profile-head .profile-summary{flex:1;min-width:0}
.profile-head .profile-summary h2{overflow-wrap:anywhere;line-height:1.2}
.profile-friend-side{display:flex;align-items:flex-start;justify-content:flex-end;gap:4px;margin-left:auto;flex:none}
.profile-friend-number{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:56px;padding:4px 1px;color:var(--lav);line-height:1.2;text-align:center}
.profile-friend-number strong{font-weight:850;font-size:21px;color:#fff;font-variant-numeric:tabular-nums}
.profile-friend-number span{font-size:11px;color:var(--lav);margin-top:3px}
.profile-friend-number small{font-size:10px;color:var(--muted);margin-top:4px}
.profile-friend-more{appearance:none;border:0;border-radius:0;box-shadow:none;background:transparent;color:#d8a6ff;padding:5px 2px;min-height:32px;min-width:26px;line-height:1;font-size:18px;font-weight:900;letter-spacing:1px}
.profile-friend-more:focus-visible,.spirit-name-link:focus-visible{outline:2px solid var(--lav);outline-offset:3px;border-radius:5px}
.spirit-name-link{display:inline-block;width:fit-content;max-width:100%;min-width:0;background:transparent;border:0;padding:0;color:inherit;font-size:14px;font-weight:750;line-height:1.3;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.spirit-name-link:active{color:var(--lav)}
.public-spirit-head{align-items:center;gap:10px;margin-bottom:16px}
.public-friend-count{margin-left:auto;align-self:center;min-width:65px}
@media(max-width:440px){
 .profile-head{gap:11px}
 .profile-head .avatar.big{width:67px;height:67px;min-width:67px;border-radius:20px}
 .profile-head .profile-summary h2{font-size:clamp(15px,4.3vw,20px)}
 .profile-friend-side{gap:0}
 .profile-friend-number{min-width:48px}
 .profile-friend-number strong{font-size:19px}
 .profile-friend-more{min-width:23px}
 .public-friend-count{min-width:60px}
}


/* Crypt profile: compact mobile header to keep the HAUNTED Owner badge and
   Spirit total on a single balanced row. The original bottom dock is unchanged. */
.crypt-profile.profile-head{
 display:grid;
 grid-template-columns:60px minmax(0,1fr) auto;
 align-items:center;
 column-gap:10px;
 padding:13px 14px;
 min-width:0;
}
.crypt-profile.profile-head .avatar.big{
 width:60px;height:60px;min-width:60px;border-radius:19px;
}
.crypt-profile .profile-summary{
 display:flex;flex-direction:column;align-items:flex-start;
 gap:4px;min-width:0;
}
.crypt-profile .profile-summary h2{
 font-size:clamp(16px,4.3vw,21px);line-height:1.15;
 max-width:100%;overflow:hidden;text-overflow:ellipsis;
 overflow-wrap:normal;white-space:nowrap;
}
.crypt-profile .profile-summary .sub{
 margin:0;max-width:100%;min-width:0;overflow:hidden;
 text-overflow:ellipsis;white-space:nowrap;
}
.crypt-profile .profile-summary .pill{
 display:inline-flex;align-items:center;max-width:100%;
 padding:5px 8px;font-size:10px;font-weight:750;line-height:1.15;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.crypt-profile .profile-friend-side{
 justify-self:end;margin-left:0;gap:3px;align-items:center;
 min-width:0;flex:none;
}
.crypt-profile .profile-friend-number{
 padding:2px 2px;min-width:40px;line-height:1.1;
}
.crypt-profile .profile-friend-number strong{font-size:17px;line-height:1.05}
.crypt-profile .profile-friend-number span{font-size:10px;margin-top:3px}
.crypt-profile .profile-friend-number small{font-size:9px;margin-top:3px}
.crypt-profile .profile-friend-more{
 min-width:26px;min-height:30px;padding:3px 1px;
 font-size:16px;letter-spacing:0;
}
.crypt-profile-tabs{flex-wrap:nowrap;gap:8px;margin-block:13px}
.crypt-profile-tabs .chip{white-space:nowrap;padding:9px 15px}
@media(max-width:360px){
 .crypt-profile.profile-head{
  grid-template-columns:52px minmax(0,1fr) auto;
  column-gap:8px;padding:12px 10px;
 }
 .crypt-profile.profile-head .avatar.big{
  width:52px;height:52px;min-width:52px;border-radius:16px;
 }
 .crypt-profile .profile-summary h2{font-size:16px}
 .crypt-profile .profile-summary .pill{font-size:9.5px;padding:4px 7px}
 .crypt-profile .profile-friend-number{min-width:36px}
 .crypt-profile .profile-friend-number strong{font-size:16px}
 .crypt-profile .profile-friend-more{min-width:24px}
}


/* Veil controls and HAUNTED Team owner broadcasts use existing dark styling. */
.veil-panel{margin:14px 0;padding:12px;border-radius:15px;border:1px solid var(--stroke);background:rgba(58,36,80,.3)}
.veil-panel summary{cursor:pointer;color:#ddbefa;font-size:13px;font-weight:750;line-height:1.4}
.veil-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:8px;max-height:170px;overflow-y:auto;margin-top:10px}
.veil-choice{display:flex;align-items:center;gap:9px;min-width:0;padding:8px 10px;border:1px solid var(--stroke);border-radius:12px;cursor:pointer;background:rgba(17,10,29,.55)}
.veil-choice input{accent-color:#b886ff;flex:none;width:16px;height:16px}
.veil-choice span{font-size:12px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.veil-choice small{font-size:10px;color:var(--muted)}
.team-broadcast-row{align-items:flex-start;flex-wrap:wrap}
.team-broadcast-row .details{min-width:180px}
.team-broadcast-row .details p{overflow-wrap:anywhere}
.team-broadcast-row .button{flex:none;max-width:100%}
@media(max-width:440px){.veil-choices{grid-template-columns:1fr}.team-broadcast-row .button{margin-left:auto}}

/* HAUNTED registration: tidy, consistent field spacing and iOS Safari safe widths. */
.auth-wrap{width:100%;min-width:0;max-width:460px;box-sizing:border-box}
.auth-wrap .auth-card{width:100%;max-width:100%;min-width:0}
.auth-card .switch{gap:10px;margin-bottom:18px}
.auth-card .switch .button{min-width:0;white-space:normal;line-height:1.2}
.auth-card .auth-form{display:block;width:100%;max-width:100%;min-width:0}
.auth-card .auth-form .field{margin:0 0 16px;min-width:0;max-width:100%}
.auth-card .auth-form .field label{margin-bottom:7px;font-size:13px;line-height:1.4}
.auth-card .auth-form .field input{
 display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;
 min-height:48px;padding:12px 13px;font-size:16px;
}
/* A plain iPhone-friendly date selector: only the selectable date is shown. */
.auth-card .auth-form .dob-field{
 width:100%;max-width:100%;min-width:0;overflow:hidden;
}
.auth-card .auth-form .dob-field #dob{
 display:block;width:100%;max-width:100%;min-width:0;
 min-height:38px;height:38px;box-sizing:border-box;
 padding:3px 0!important;margin:0;
 font-size:16px;line-height:1.5;
 border:0!important;border-radius:0!important;
 background:transparent!important;box-shadow:none!important;
 outline:0;color:var(--text);color-scheme:dark;
 -webkit-appearance:none;appearance:none;
}
.auth-card .auth-form .dob-field #dob::-webkit-date-and-time-value{
 display:block;min-width:0;max-width:100%;text-align:left;
}
.auth-card .auth-form .dob-field #dob::-webkit-datetime-edit{
 min-width:0;padding:0;
}
.auth-card .auth-form .dob-field #dob:focus-visible{
 outline:2px solid var(--purple);outline-offset:2px;
}
.auth-card .auth-form #username-feedback{display:block;margin-top:6px;line-height:1.4}
.auth-card .auth-form > .button{width:100%;min-height:46px;margin-top:4px}
@media(max-width:390px){
 .auth-wrap{padding-left:14px;padding-right:14px}
 .auth-card{padding:16px}
 .auth-card .auth-form .field input{padding-left:12px;padding-right:12px}
 .auth-hero h1{font-size:clamp(27px,8vw,35px);letter-spacing:.15em}
}


/* Owner Control spacing repair 2026-10-31.
   Keep action buttons, notices and their following cards visually separate. */
.owner-call-refresh-controls{
 display:flex;flex-wrap:wrap;align-items:center;
 gap:10px;margin:20px 0 24px;
}
.owner-call-refresh-controls .button{
 max-width:100%;white-space:normal;line-height:1.3;text-align:center;
}
.owner-call-review-card,.owner-call-appeals-card,.owner-review-card{
 min-width:0;max-width:100%;overflow-wrap:anywhere;
}
.owner-call-review-card > .sub,.owner-call-appeals-card > .sub{
 display:block;margin:0 0 18px;line-height:1.6;
}
.owner-call-review-card > .stack,.owner-call-appeals-card > .stack{
 margin-top:14px;
}
.owner-security-notice{
 margin:0 0 22px;
 overflow-wrap:anywhere;
 line-height:1.6;
}
.owner-security-notice + .pane{margin-top:0}
.owner-review-card > h3{margin-bottom:14px;line-height:1.3}
.owner-review-card > .sub{
 display:block;margin:0 0 20px;line-height:1.6;
}
.owner-review-card #security-published-form{
 width:100%;min-width:0;
 display:flex;flex-direction:column;gap:16px;
}
.owner-review-card #security-published-form .field{
 min-width:0;max-width:100%;margin:0;
}
.owner-review-card #security-published-form input,
.owner-review-card #security-published-form textarea{
 width:100%;max-width:100%;min-width:0;box-sizing:border-box;
}
.owner-review-card #security-published-form .button{
 align-self:flex-start;max-width:100%;
 line-height:1.4;white-space:normal;overflow-wrap:anywhere;
}
.owner-tabs{row-gap:10px}
.owner-tabs .chip{
 max-width:100%;min-width:0;white-space:normal;
 overflow-wrap:anywhere;text-align:center;line-height:1.3;
}
/* All Owner Control cards and action rows must reflow rather than run
   into adjacent text or beyond the phone viewport. */
.page:has(> .owner-tabs) > .pane,
.page:has(> .owner-tabs) > .notice{
 max-width:100%;min-width:0;overflow-wrap:anywhere;
}
.page:has(> .owner-tabs) > .notice + .pane{
 margin-top:20px;
}
.page:has(> .owner-tabs) .pane > .sub + form,
.page:has(> .owner-tabs) .pane > .sub + .stack{
 margin-top:16px;
}
.page:has(> .owner-tabs) .pane .row .button{
 flex:0 1 auto;max-width:100%;white-space:normal;
 line-height:1.3;overflow-wrap:anywhere;
}
@media(max-width:440px){
 .owner-call-refresh-controls{margin-bottom:26px}
 .owner-security-notice{margin-bottom:24px}
 .owner-review-card,.owner-call-review-card,.owner-call-appeals-card{
  padding:16px;
 }
 .owner-review-card #security-published-form .button{
  width:100%;
 }
}

/* Three date-of-birth selectors remain side by side on narrow iPhone screens. */
.auth-card .auth-form .dob-label{display:block;color:var(--muted);font-size:13px;margin-bottom:9px}
.auth-card .auth-form .dob-segments{
 display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.35fr);
 gap:8px;width:100%;min-width:0;max-width:100%;align-items:end;
}
.auth-card .auth-form .dob-part{
 display:block;min-width:0;width:100%;margin:0;
}
.auth-card .auth-form .dob-part span{
 display:block;font-size:11px;color:var(--muted);margin-bottom:5px;
}
.auth-card .auth-form .dob-part select{
 display:block;box-sizing:border-box;
 width:100%;max-width:100%;min-width:0;
 min-height:42px;margin:0;padding:8px 6px;
 border:1px solid #4b356c;border-radius:11px;
 background:#110a1e;color:var(--text);font-size:14px;
 appearance:auto;-webkit-appearance:menulist;
 text-overflow:clip;
}
.auth-card .auth-form .dob-part select:focus-visible{
 outline:2px solid var(--purple);outline-offset:2px;
}
@media(max-width:350px){
 .auth-card .auth-form .dob-segments{gap:5px}
 .auth-card .auth-form .dob-part select{padding:7px 3px;font-size:13px}
}


/* Registered member management controls remain separate and readable on phones. */
.owner-member-controls{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.owner-member-controls .button{min-width:0;max-width:100%;white-space:normal;line-height:1.4}
.owner-member-block-row{flex-wrap:wrap;align-items:flex-start;gap:12px}
.owner-member-block-row .details{flex:1 1 170px;min-width:0;overflow-wrap:anywhere}
.owner-member-block-row .details b,.owner-member-block-row .details small{
 overflow-wrap:anywhere;white-space:normal
}
.owner-member-block-row .button{margin-left:auto;flex:none;max-width:100%;white-space:normal}
.owner-blocked-email-list > .sub{line-height:1.6;margin-bottom:12px}
@media(max-width:440px){
 .owner-member-controls .button{flex:1 1 calc(50% - 6px)}
 .owner-member-block-row .button{margin-left:0}
}

/* HAUNTED Whispers: preserve the sender's paragraphs and enable safe, tappable URLs. */
.whisper-message-text{display:block;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal}
.whisper-message-text .whisper-link{color:#e2bcff;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;overflow-wrap:anywhere}
.whisper-message-text .whisper-link:focus-visible{outline:2px solid #f0dbff;outline-offset:3px;border-radius:3px}

/* A soft lilac frame alerts members only while an official Team message is unread. */
.listrow.team-unread{
 border-color:#d5a7ff;
 box-shadow:0 0 0 1px rgba(203,151,255,.55),0 0 11px rgba(189,120,255,.34),inset 0 1px rgba(255,255,255,.05);
 animation:haunted-team-unread-glow 2.8s ease-in-out infinite;
}
.team-unread-dot{display:inline-block;flex:none;width:8px;height:8px;border-radius:50%;background:#ddbdff;box-shadow:0 0 8px #c794ff}
@keyframes haunted-team-unread-glow{
 0%,100%{border-color:#ad77e8;box-shadow:0 0 0 1px rgba(193,130,255,.25),0 0 7px rgba(167,94,230,.2)}
 50%{border-color:#ebd4ff;box-shadow:0 0 0 1px rgba(231,205,255,.8),0 0 18px rgba(207,151,255,.56),0 0 28px rgba(174,98,245,.17)}
}
@media(prefers-reduced-motion:reduce){
 .listrow.team-unread{animation:none;border-color:#d5a7ff;box-shadow:0 0 0 1px rgba(203,151,255,.6),0 0 12px rgba(189,120,255,.32)}
}

/* HAUNTED 2.0 Coming Soon. No checkout is enabled. */
.premium-preview{position:relative;overflow:hidden;border-color:#7650a1;background:radial-gradient(ellipse at 100% 0%,rgba(128,75,202,.17),transparent 55%),linear-gradient(160deg,#1d1230,#100a1c 85%)}
.premium-preview-top{display:flex;align-items:start;justify-content:space-between;gap:10px;flex-wrap:wrap}
.premium-preview-identity{display:flex;align-items:center;gap:11px;min-width:0}
.premium-preview-identity h3{font-size:19px;font-weight:850;letter-spacing:.03em}
.premium-price-card{display:flex;align-items:baseline;gap:8px;margin:16px 0 7px}
.premium-price-card strong{font-size:clamp(35px,9vw,45px);line-height:1;letter-spacing:-.045em;font-weight:900;color:#f5eaff}
.premium-price-card span{font-size:14px;color:#d9c0f4}
.premium-benefits{margin-top:17px;border-top:1px solid rgba(188,146,226,.24);padding-top:15px}
.premium-benefits h4{margin:0 0 10px;color:#f1dfff;font-size:14px;font-weight:750}
.premium-benefits ul{margin:0;padding-left:20px;display:grid;gap:9px}
.premium-benefits li{color:#dccaea;font-size:13px;line-height:1.4;padding-left:2px}
.premium-benefits li::marker{color:#c29aeb}
.premium-soon-button{display:block;width:100%;margin-top:16px;min-height:44px;color:#fff!important;background:linear-gradient(125deg,#8757bf,#684092)!important;border:1px solid #a985d9!important;border-radius:14px!important;opacity:.77!important;cursor:not-allowed!important}

/* Blue unread alert for personal and group messages. Team remains lilac. */
.listrow.whisper-unread{
 border-color:#8cc4ff;
 box-shadow:0 0 0 1px rgba(132,194,255,.58),0 0 12px rgba(72,157,255,.37),inset 0 1px rgba(240,248,255,.06);
 animation:haunted-whisper-blue-glow 2.8s ease-in-out infinite;
}
.whisper-unread-dot{display:inline-block;flex:none;width:8px;height:8px;border-radius:50%;background:#a6d8ff;box-shadow:0 0 9px rgba(88,178,255,.8)}
@keyframes haunted-whisper-blue-glow{
 0%,100%{border-color:#598fd6;box-shadow:0 0 0 1px rgba(98,158,241,.28),0 0 7px rgba(57,135,233,.22)}
 50%{border-color:#d5eeff;box-shadow:0 0 0 1px rgba(193,226,255,.85),0 0 19px rgba(112,187,255,.57),0 0 28px rgba(73,156,248,.18)}
}
.nav button.nav-unread::before{
 content:"";position:absolute;top:1px;right:calc(50% - 22px);
 width:9px;height:9px;border-radius:50%;z-index:1;
 background:#94cdff;box-shadow:0 0 0 2px #170e27,0 0 9px rgba(94,181,255,.8);
}
@media(prefers-reduced-motion:reduce){
 .listrow.whisper-unread{animation:none;border-color:#8cc4ff;box-shadow:0 0 0 1px rgba(132,194,255,.6),0 0 12px rgba(72,157,255,.35)}
}
