[hidden], .pr-app [hidden] { display: none !important; }
body { margin: 0; }
#invite-help, #code-status { margin-bottom: .75rem; }
#request-code { margin-bottom: .45rem; }
.pr-avatar { overflow: hidden; flex-shrink: 0; }
.pr-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-button { padding: 0; border-radius: 50%; }
.profile-preview { width: 82px; height: 82px; margin-bottom: .75rem; font-size: 1.5rem; }
.muted, .retention { color: var(--p-muted); font-size: .875rem; }
.online-label { color: #7bd395; }
.offline-label { color: #ff9298; }
.auth { display: grid; grid-template-columns: 1.12fr 1fr; min-height: 100dvh; }
.intro { display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; padding: clamp(2rem, 6vw, 6rem); background: radial-gradient(ellipse at 16% 66%, #42230f74, transparent 68%), #111113; border-right: 1px solid var(--p-line); }
.brand-symbol { font: 700 1.5rem/1 'Segoe UI', sans-serif; }
.pitch h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1.05; letter-spacing: -.055em; }
.pitch em { color: var(--p-orange); font-style: normal; }
.pitch p { color: var(--p-muted); max-width: 33ch; margin-top: 1.3rem; line-height: 1.75; }
.auth-area { display: grid; place-items: center; padding: 2rem; background: radial-gradient(ellipse at 100% 0%, #25252b72, transparent 68%); }
.auth-card { width: min(100%, 24rem); }
.auth-card h2 { font-size: 1.8rem; letter-spacing: -.035em; margin-bottom: 1.45rem; }
.auth-card label { margin-bottom: 1rem; }
.auth-card .pr-primary { width: 100%; margin-top: .8rem; min-height: 48px; }
.text-button { width: 100%; padding: 1rem; color: var(--p-muted) !important; text-decoration: underline; }
.workspace { height: 100dvh; display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.workspace > .layout { grid-row: 3; }
.daily-greeting { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .4rem clamp(.7rem, 2vw, 1.6rem); background: #2b2018; color: #f6ddc9; border-bottom: 1px solid #65442c; }
.daily-greeting p { flex: 1; font-size: .875rem; }
.daily-greeting strong { color: #ffb782; }
.daily-greeting #dismiss-greeting { padding: 0; font-size: 1.2rem !important; min-width: 40px; min-height: 36px; }
.top, .thread-head { display: flex; align-items: center; padding: .9rem 1.6rem; border-bottom: 1px solid var(--p-line); background: #101013; gap: .8rem; }
.top { justify-content: space-between; }
.account { display: flex; align-items: center; gap: .65rem; }
#identity, .connection { color: var(--p-muted); font-size: .875rem; }
.connection::before { content: ''; display: inline-block; width: .5rem; height: .5rem; border-radius: 100%; background: #f0a663; margin-right: .4rem; }
.connection.online::before { background: #7bd395; }
.layout { display: grid; grid-template-columns: minmax(280px, 350px) minmax(0, 1fr); min-height: 0; }
.left { background: #141417; border-right: 1px solid var(--p-line); padding: 1.4rem; overflow: auto; }
.left-title { display: flex; justify-content: space-between; align-items: center; gap: .4rem; margin-bottom: 1rem; }
.left-title h1 { font-size: 1.22rem; }
.group-actions { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: .8rem; }
#group-form label + label { margin-top: .8rem; }
#group-form .muted, #permission-form .muted { margin-top: .45rem; }
#creator-list { display: grid; gap: .5rem; margin-top: 1rem; }
.creator-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; overflow-wrap: anywhere; }
.group-sender { display: block; color: #ffb277; margin-bottom: .25rem; font-size: .8125rem; }
#filter { width: 100%; margin-bottom: .8rem; }
.chats, #contacts { display: grid; gap: .25rem; }
.row { text-align: left; width: 100%; display: flex; align-items: center; gap: .7rem; min-height: 59px; padding: .55rem .65rem; border-radius: 10px; }
.row:hover { background: var(--p-panel2); }
.row[aria-current=true] { background: #2c2119; box-shadow: inset 3px 0 var(--p-orange); }
.row .info { display: grid; min-width: 0; }
.row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .pr-avatar { flex: 0 0 35px; }
.unread { margin-left: auto; background: var(--p-orange); color: #18100a; border-radius: 100px; padding: 0 .4rem; }
.contacts { border-top: 1px solid var(--p-line); margin-top: 1.2rem; padding-top: .9rem; }
.contacts summary { cursor: pointer; color: var(--p-muted); margin-bottom: .55rem; }
.conversation { min-height: 0; min-width: 0; }
.empty { height: 100%; display: grid; place-content: center; justify-items: center; text-align: center; gap: .8rem; padding: 2rem; }
.empty p { max-width: 32ch; color: var(--p-muted); }
.thread { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.thread-head h2 { font-size: 1rem; overflow-wrap: anywhere; }
#back { display: none; }
.history { overflow: auto; padding: 1.1rem clamp(.75rem, 4vw, 3rem); }
#older { display: flex; margin: 0 auto 1.1rem; }
#messages { display: grid; gap: .7rem; }
.bubble { background: var(--p-panel); border: 1px solid var(--p-line); justify-self: start; max-width: min(82%, 37rem); border-radius: 12px 12px 12px 3px; padding: .6rem .8rem; min-width: 0; }
.bubble.mine { justify-self: end; background: #392719; border-color: #614126; border-radius: 12px 12px 3px 12px; }
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble img { display: block; max-width: 100%; max-height: 340px; border-radius: 7px; }
.bubble small { display: block; color: #b6abb0; text-align: right; margin-top: .25rem; }
.compose { position: relative; padding: .85rem clamp(.6rem, 3vw, 1.6rem); border-top: 1px solid var(--p-line); background: #141417; }
.compose-row { display: flex; gap: .45rem; align-items: center; }
.compose textarea { flex: 1; resize: none; max-height: 8rem; }
.compose-row .compose-icon { width: 44px; height: 44px; flex: 0 0 44px; padding: 0; }
.mic-icon, .image-icon { position: relative; display: block; width: 21px; height: 21px; }
.mic-icon::before, .mic-icon::after, .mic-icon span, .image-icon::before, .image-icon::after { content: ''; position: absolute; }
.mic-icon::before { width: 5px; height: 9px; border: 1.5px solid currentColor; border-radius: 5px; top: 0; left: 7px; }
.mic-icon::after { left: 4px; top: 6px; width: 11px; height: 9px; border: 1.5px solid currentColor; border-top: 0; border-radius: 0 0 8px 8px; }
.mic-icon span { left: 10px; bottom: 0; height: 5px; border-left: 1.5px solid currentColor; }
.image-icon { width: 19px; height: 17px; border: 1.5px solid currentColor; border-radius: 3px; overflow: hidden; }
.image-icon::before { width: 3px; height: 3px; border-radius: 50%; background: currentColor; top: 3px; left: 3px; }
.image-icon::after { width: 11px; height: 11px; border: 1.5px solid currentColor; transform: rotate(45deg); right: -2px; bottom: -8px; }
.sticker-icon { position: relative; width: 17px; height: 17px; border: 1.5px solid currentColor; border-radius: 4px 4px 7px 4px; }
.sticker-icon::after { content: ''; position: absolute; width: 6px; height: 6px; right: 0; bottom: 0; border: 1.5px solid currentColor; border-right: 0; border-bottom: 0; border-radius: 3px 0 0; }
.sticker-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
#sticker-status:not(:empty) { margin-top: .5rem; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: .25rem; max-height: min(35dvh, 250px); overflow-y: auto; margin-top: .4rem; }
.sticker-tile { position: relative; min-width: 0; border-radius: 8px; background: var(--p-panel); }
.sticker-tile button:first-child { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: .6rem; }
.sticker-tile img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.sticker-tile .sticker-remove { position: absolute; right: 0; top: 0; background: var(--p-bg); border-radius: 50%; width: 22px; height: 22px; padding: 0; line-height: 1; }
.sticker-bubble { background: none !important; border-color: transparent !important; padding: .15rem; }
.sticker-bubble img { width: auto; max-width: min(145px, 100%); max-height: 145px; }
.emoji-button { font-size: 1.2rem !important; }
.picker { position: absolute; bottom: 100%; left: .65rem; z-index: 2; width: min(400px, calc(100% - 1.3rem)); background: var(--p-panel2); border: 1px solid var(--p-line); border-radius: 12px; padding: .6rem; box-shadow: 0 12px 32px #0007; }
.picker-filters { display: flex; gap: .4rem; }
#emoji-search { flex: 1; width: 100%; }
#emoji-tone { max-width: 110px; padding-inline: .4rem; }
.emoji-categories { display: flex; overflow-x: auto; margin: .4rem 0; }
.emoji-categories button { flex: 1 0 34px; min-height: 34px; }
.emoji-categories button[aria-pressed=true] { box-shadow: inset 0 -2px var(--p-orange); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); max-height: min(35dvh, 250px); overflow-y: auto; }
.emoji-grid button { min-height: 40px; padding: .15rem; border-radius: 7px; font-size: 1.35rem; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; }
.emoji-grid p { grid-column: 1/-1; padding: .5rem; }
.picker button:hover { background: var(--p-line); }
.voice-panel { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; margin-top: .65rem; padding: .65rem; border: 1px solid var(--p-line); border-radius: 9px; background: var(--p-panel); }
.voice-info { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .875rem; }
#voice-time { color: #ffad6a; font-variant-numeric: tabular-nums; }
.voice-actions { display: flex; gap: .4rem; margin-left: auto; flex-wrap: wrap; }
.voice-bubble { width: min(100%, 340px); max-width: min(95%, 340px); }
.voice-bubble p { font-size: .875rem; margin-bottom: .35rem; }
.voice-bubble audio { display: block; width: 100%; max-width: 100%; }
#voice-preview { width: min(100%, 280px); height: 42px; }
.composer-note { margin-top: .45rem !important; }
dialog { background: var(--p-panel); border: 1px solid var(--p-line); border-radius: 14px; color: var(--p-text); width: min(400px, calc(100% - 2rem)); padding: 1.4rem; }
dialog::backdrop { background: #000a; }
dialog h2 { margin-bottom: 1rem !important; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.2rem; }
.account-disclosure { margin-top: .9rem !important; }
#settings {
  width: 44px;
  height: 44px;
  padding: 0;
  flex: 0 0 44px;
  border-radius: 11px;
  color: #cbcad2;
  background: #1b1b20 !important;
  border-color: #37373f !important;
  transition: background .15s, border-color .15s, color .15s;
}
#settings:hover, #settings[aria-expanded=true] {
  color: #ffb37a;
  background: #312319 !important;
  border-color: #795033 !important;
}
.settings-gear {
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  mask-image: radial-gradient(circle, transparent 0 2.6px, #000 3px);
  clip-path: polygon(42% 0, 58% 0, 62% 15%, 72% 19%, 85% 11%, 95% 23%, 87% 36%, 91% 43%, 100% 45%, 100% 58%, 87% 62%, 83% 70%, 91% 83%, 79% 94%, 66% 86%, 59% 90%, 55% 100%, 42% 100%, 38% 87%, 29% 83%, 16% 91%, 5% 79%, 13% 66%, 9% 58%, 0 55%, 0 42%, 13% 38%, 17% 30%, 9% 17%, 21% 6%, 34% 14%, 41% 11%);
}
.settings-options { display: grid; gap: .55rem; margin: 1rem 0; }
.settings-options button { justify-content: flex-start; }
.settings-privacy p, #password-form .muted { margin-top: .5rem; }
#password-form label + label { margin-top: .75rem; }
#admin-dialog { width: min(700px, calc(100% - 2rem)); max-height: 88dvh; overflow: auto; }
.admin-nav, .admin-review-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.admin-nav button[aria-pressed=true] { border-color: #ff8f48 !important; color: #ffb277; }
.admin-form { display: flex; align-items: flex-end; gap: .5rem; margin: .8rem 0; }
.admin-form label { flex: 1; min-width: 0; }
.admin-list { display: grid; gap: .45rem; max-height: 37dvh; overflow: auto; margin: .65rem 0; }
.admin-row, .admin-message { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem; border: 1px solid var(--p-line); border-radius: 8px; overflow-wrap: anywhere; }
.admin-message { display: grid; justify-content: initial; white-space: pre-wrap; }
.admin-message img, .admin-message audio { max-width: 100%; max-height: 200px; }
.admin-review-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin: .8rem 0; }
#admin-status:not(:empty) { margin-top: .55rem; }
.feedback { position: fixed; left: 50%; bottom: 6rem; transform: translateX(-50%); width: max-content; max-width: 90%; background: #37251a; color: #ffe1c9; border: 1px solid #734627; padding: .6rem .9rem; border-radius: 8px; }
@media (max-width: 720px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .intro { padding: 1.4rem; gap: 1.5rem; border: 0; border-bottom: 1px solid var(--p-line); }
  .pitch h1 { font-size: 2rem; }
  .pitch p, .intro .retention { display: none; }
  .auth-area { align-items: start; padding: 2rem 1.4rem; }
  .top { padding: .6rem .75rem; gap: .35rem; }
  .top .pr-brand { gap: .45rem; }
  .top .pr-brand-icon { width: 34px; height: 34px; }
  .top .pr-brand strong { font-size: .95rem; }
  .account { gap: .3rem; }
  #identity, .connection { display: none; }
  .layout { grid-template-columns: 1fr; }
  .conversation, .layout.open .left { display: none; }
  .layout.open .conversation, #back { display: block; }
  .left { padding: .95rem; }
  .thread-head { padding: .7rem; }
  .compose-row .pr-primary, .compose-row .pr-secondary { padding-inline: .45rem; }
  .compose-row .compose-icon { width: 36px; flex-basis: 36px; padding: 0; }
}
