.dr-page {min-width:0}
.dr-page h1,.dr-page h2,.dr-page p,.dr-dialog h2 {overflow-wrap:anywhere}
.dr-page h1 {font-size:clamp(26px,3vw,40px);line-height:1.2}
.dr-toolbar,.dr-tags,.dr-compose-actions,.dr-pagination,.dr-search {display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.dr-toolbar {justify-content:space-between;margin-bottom:20px}
.dr-search {margin:20px 0}.dr-search input {flex:1;min-width:140px}
.dr-page input,.dr-page textarea,.dr-dialog input:not([type=checkbox]),.dr-dialog textarea,.dr-dialog select {width:100%;border:1px solid var(--line);border-radius:12px;background:var(--bg-2);color:var(--text);padding:12px;min-width:0}
.dr-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.dr-card,.dr-entry {padding:24px}.dr-card {display:flex;flex-direction:column;gap:12px}.dr-card h2,.dr-card p {margin:0}.dr-card>.btn {margin-top:auto;align-self:flex-start}
.dr-card .dr-description {display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.dr-description {white-space:pre-wrap;overflow-wrap:anywhere;color:var(--muted)}
.dr-tags span {font-size:12px;padding:5px 9px;border:1px solid var(--line);border-radius:20px;color:var(--muted)}
.dr-heading {margin-bottom:22px}.dr-heading h1 {margin:10px 0}.dr-heading .dr-description {max-height:180px;overflow:auto}
.dr-layout {display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:18px;align-items:start}
.dr-chat {min-width:0;overflow:hidden}.dr-chat-heading {padding:16px 20px;border-bottom:1px solid var(--line)}
.dr-chat-heading h2 {font-size:18px;margin:0 0 4px}
.dr-scroll {height:clamp(280px,48dvh,600px);overflow-y:auto;overscroll-behavior:contain;padding:18px;scroll-behavior:auto}
.dr-message {max-width:92%;width:fit-content;min-width:120px;padding:12px 14px;background:var(--surface-2);border-radius:14px;margin:0 0 12px;overflow-wrap:anywhere}
.dr-message.is-own {margin-left:auto;background:var(--wine);border:1px solid var(--line-hot)}
.dr-message header {display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;font-size:13px}.dr-message time {font-size:10px;color:var(--muted)}
.dr-message p {white-space:pre-wrap;margin:6px 0 0}.dr-message img,.dr-message video {max-width:100%;max-height:340px;border-radius:10px;margin-top:8px;object-fit:contain}
.dr-message video {width:320px;background:#080508}.dr-message img {width:280px}
.dr-composer {padding:16px;border-top:1px solid var(--line)}.dr-composer textarea {resize:vertical;max-height:220px;min-height:70px}.dr-composer .tiny {margin:8px 0 0}
.dr-compose-actions {justify-content:space-between;margin-top:10px}.dr-file {position:relative;overflow:hidden;cursor:pointer;font-size:13px}.dr-file input {position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;padding:0}
.dr-attachment {display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;padding-top:10px;overflow-wrap:anywhere}.dr-attachment span {min-width:0}
.dr-members {padding:18px;min-width:0}.dr-members h2 {font-size:17px;margin:0 0 15px}.dr-members h3 {font-size:14px;margin:24px 0 8px}
.dr-member-list {list-style:none;margin:0;padding:0}.dr-member-list li {display:flex;gap:8px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:10px 0;overflow-wrap:anywhere}.dr-member-list li>span {min-width:0}.dr-member-list small {display:block;color:var(--muted);font-size:11px}.dr-members .btn {min-height:32px;font-size:11px;padding:5px 8px}
.dr-request {padding:12px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.dr-request>div {display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.dr-entry {max-width:700px;margin:20px auto}.dr-entry form {max-width:420px;margin-top:24px}.dr-pagination {justify-content:center;margin-top:24px}
.dr-dialog {max-width:min(600px,calc(100vw - 24px));width:600px;max-height:88dvh;overflow:auto;padding:24px;border:1px solid var(--line-hot);border-radius:22px;color:var(--text);background:var(--surface);box-shadow:var(--shadow)}
.dr-dialog::backdrop {background:rgba(0,0,0,.75)}.dr-dialog header {display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:18px}.dr-dialog header h2 {margin:0;font-size:24px}.dr-dialog .field {display:grid;gap:7px;margin:15px 0}.dr-dialog .field[hidden] {display:none}.dr-dialog small {font-size:12px;line-height:1.5;color:var(--muted)}
.dr-dialog fieldset {border:1px solid var(--line);border-radius:12px;padding:14px;margin:18px 0}.dr-role-options {display:flex;gap:18px;flex-wrap:wrap;margin-bottom:8px}.dr-role-options label,.dr-password-toggle {display:flex;align-items:center;gap:8px;cursor:pointer}.dr-dialog input[type=checkbox] {width:18px;height:18px;accent-color:var(--pink)}.dr-dialog footer {display:flex;gap:10px;justify-content:space-between;flex-wrap:wrap;margin-top:20px}.dr-dialog select:disabled {opacity:.6}.dr-error:empty {display:none}
@media(min-width:1600px){.dr-grid {grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1000px){.dr-layout {grid-template-columns:minmax(0,1fr)}.dr-members {max-height:400px;overflow:auto}}
@media(max-width:600px){.dr-grid {grid-template-columns:minmax(0,1fr)}.dr-card,.dr-entry {padding:18px}.dr-dialog {padding:18px}.dr-dialog header h2 {font-size:21px}.dr-scroll {padding:12px;height:45dvh;min-height:240px}.dr-composer {padding:12px}.dr-compose-actions {gap:8px}.dr-compose-actions .btn {padding:0 10px;font-size:12px}.dr-message {max-width:96%}.dr-toolbar .btn {font-size:12px;padding:0 10px}.dr-dialog footer .btn {flex:1;font-size:12px;padding:8px}.dr-search {flex-wrap:nowrap}.dr-search input {width:0}.dr-chat-heading {padding:14px}}

/* A room is its own mobile screen; only the message history scrolls. */
.dr-mobile-header {display:none}
.dr-info-dialog #drInfoMembers {margin-top:24px}
@media(max-width:760px){
  body.dating-room-open {overflow:hidden;overscroll-behavior:none}
  .dating-room-open .topbar,.dating-room-open .sidebar,.dating-room-open .mobile-tabbar {display:none!important}
  .dating-room-open .app-shell,.dating-room-open .workspace {min-height:0;margin:0}
  .dating-room-open .app-view {padding:0;min-height:0}
  .dating-room-open .dr-room-page {position:fixed;z-index:1000;left:0;right:0;top:var(--dr-viewport-top,0px);width:100%;height:var(--dr-viewport-height,100dvh);margin:0;display:flex;flex-direction:column;background:var(--bg);overflow:hidden;animation:none}
  .dating-room-open .dr-mobile-header {display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;align-items:center;flex:0 0 auto;padding:calc(8px + env(safe-area-inset-top)) 10px 8px;border-bottom:1px solid var(--line);background:var(--surface)}
  .dr-mobile-header>div {min-width:0}
  .dr-mobile-header h1 {font-size:16px;line-height:1.25;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .dr-mobile-header p {font-size:11px;line-height:1.3;margin:4px 0 0;color:var(--muted)}
  .dr-mobile-header .btn {width:44px;height:44px;min-height:44px;padding:0;font-size:24px}
  .dating-room-open .dr-toolbar,.dating-room-open .dr-heading,.dating-room-open .dr-chat-heading,.dating-room-open .dr-layout>.dr-members {display:none}
  .dating-room-open .dr-layout {display:flex;align-items:stretch;flex:1 1 0;min-height:0;gap:0;overflow:hidden}
  .dating-room-open .dr-chat {display:flex;height:100%;flex-direction:column;flex:1 1 0;min-height:0;max-width:100%;border:0;border-radius:0;background:var(--bg)}
  .dating-room-open .dr-scroll {flex:1 1 0;min-height:0;height:auto;padding:14px 10px;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;scrollbar-width:thin}
  .dating-room-open .dr-composer {flex:0 0 auto;max-height:55%;overflow:auto;padding:10px 10px calc(8px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--line)}
  .dating-room-open .dr-composer textarea {font-size:16px;line-height:22px;height:46px;min-height:46px;max-height:120px;padding:11px 12px;resize:none}
  .dating-room-open .dr-compose-actions {margin-top:8px;gap:10px}
  .dating-room-open .dr-compose-actions .btn {min-height:42px;padding:0 15px;font-size:13px}
  .dating-room-open .dr-composer>.tiny {font-size:10px;margin-top:5px}
  .dating-room-open .dr-message img,.dating-room-open .dr-message video {max-height:260px}
  .dating-room-open .dr-dialog {max-height:calc(var(--dr-viewport-height,100dvh) - 24px);margin:12px auto;top:var(--dr-viewport-top,0px)}
  .dr-info-dialog #drInfoMembers h2 {font-size:18px}
}

.dr-message-author {border:0;background:transparent;color:inherit;font:inherit;font-weight:800;text-align:left;padding:4px 0;margin:-4px 0;cursor:pointer;min-height:28px;overflow-wrap:anywhere}
.dr-message-author:hover {text-decoration:underline;text-underline-offset:3px}
