/* room-mod.css — the pad page's Manage panel + its dialogs (public/js/room-mod.js, 1.99co) */
.pm[hidden], .pm .hide, .pm-dlg .hide { display: none !important; }
.pm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pm { border-color: #5a4a1a !important; background: linear-gradient(180deg, #17140b 0%, #111 120px) !important; }
/* 1.99ec: one header row - title · role chip · Open toggle; chip + toggle wrap together (.pm-hr), never one per line */
/* title + Open/Close toggle on the first row, the role chips (any number) left-aligned on their own row below -
   two or more chips used to wrap as a right-aligned block under the title */
.pm h2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; letter-spacing: .04em; }
.pm .pm-ht { grid-column: 1; grid-row: 1; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pm h2 > .pm-tog { grid-column: 2; grid-row: 1; }
.pm .pm-hr { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; gap: 5px; min-width: 0; }
.pm .pm-hr:has(.pm-badges:empty) { display: none; }
.pm-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.pm-badge { font-family: var(--ds-font); font-size: 11px; letter-spacing: 0; text-transform: none; padding: 1px 8px; border-radius: 999px;
            border: 1px solid var(--ds-line-strong); background: #1a1a1a; color: #bbb; white-space: nowrap; }
.pm-badge.role { border-color: #6b5a20; background: #1d1a0f; color: #f3e3a3; }
.pm-badge.red { border-color: #7a2222; background: #2a1010; color: #ffb4b4; }
.pm-badge.own { border-color: #2f6b3a; background: #12301a; color: #c8efcf; }
.pm-badge.warn { border-color: #6b3a1a; background: #24160c; color: #f4c08a; }
.pm-body { display: grid; gap: 12px; }
.pm-body.pm-off .pm-sec:not(.pm-settings) .pm-btn:not(.keep) { opacity: .5; }
.pm-sec { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid #222; min-width: 0; }
.pm-k { font-size: 11px; color: var(--ds-text-muted); text-transform: uppercase; letter-spacing: .08em; }
.pm-note { margin: 0; font-size: 13px; color: #cfd8cf; background: #12161d; border: 1px solid #2a3442; border-radius: 8px; padding: 7px 10px; overflow-wrap: anywhere; }
.pm-note.warn { background: #24160c; border-color: #6b3a1a; color: #f4c08a; }
.pm-note.ok { background: #0f1a10; border-color: #2f6b3a; color: #b9e8c0; }
.pm-note.bad { background: #2a1010; border-color: #7a2222; color: #ffb4b4; }
.pm > .pm-note { margin-bottom: 10px; }
.pm-hint { margin: 0; font-size: 12px; color: var(--ds-text-faint); line-height: 1.45; }
.pm-btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 6px 11px;
          border-radius: 8px; border: 1px solid #2f2f2f; background: #1a1a1a; color: #e2e2e2 !important; font: inherit; font-size: 13px;
          cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.pm-btn:hover, .pm-btn:focus-visible { border-color: #c6a83f; color: #fff !important; }
.pm-btn:focus-visible, .pm-dlg input:focus-visible, .pm-dlg select:focus-visible, .pm textarea:focus-visible, .pm input:focus-visible, .pm select:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }
.pm-btn[disabled] { opacity: .45; cursor: not-allowed; }
.pm-btn.go { background: var(--ds-green); border-color: var(--ds-green); color: var(--ds-on-ac) !important; font-weight: bold; }
.pm-btn.danger { border-color: #5a2222; background: #221010; color: #ffcdcd !important; }
.pm-btn.danger.go { background: #c62828; border-color: var(--ds-badge); color: #fff !important; }
.pm-btn.chip { min-height: 28px; padding: 3px 10px; border-radius: 999px; font-size: 12px; }
.pm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pm-topic-cur { font-size: 14px; color: var(--ds-text); background: #0d0d0d; border: 1px solid #222; border-radius: 8px; padding: 7px 10px; overflow-wrap: anywhere; }
.pm-topic-form { display: grid; gap: 6px; }
.pm textarea, .pm input[type=text], .pm-dlg input, .pm-dlg select, .pm select { background: #0d0d0d; color: #eee; border: 1px solid var(--ds-line-strong); border-radius: 8px;
          padding: 8px 10px; font: inherit; font-size: 14px; min-width: 0; width: 100%; box-sizing: border-box; }
.pm textarea { resize: vertical; min-height: 56px; }
.pm-count { font-size: 11.5px; color: var(--ds-text-faint); text-align: right; }
.pm-preview { display: grid; gap: 3px; }
.pm-topic-line { color: #c9b46a; font-size: 12.5px; background: #0d0d0d; border: 1px dashed #3a3420; border-radius: 6px; padding: 5px 8px; overflow-wrap: anywhere; }
.pm-find { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.pm-set-grid { display: grid; gap: 6px; }
.pm-set { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 8px; align-items: center; font-size: 13px; color: #ccc; }
.pm-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.pm-results:empty { display: none; }
.pm-res { background: #0d0d0d; border: 1px solid #222; border-radius: 8px; padding: 6px 8px; font-size: 12.5px; color: #bbb; overflow-wrap: anywhere; }
.pm-res.ok { border-color: #2f6b3a; } .pm-res.bad { border-color: #7a2222; }
.pm-res-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }
.pm-res-t { font-family: ui-monospace, Consolas, monospace; color: #e8d9a0; min-width: 0; }
.pm-res-s { color: var(--ds-text-muted); } .pm-res.bad .pm-res-s { color: #ff8a80; } .pm-res.ok .pm-res-s { color: #9be3a6; }
.pm-res-r { color: #ddd; margin-top: 3px; }

/* the roster's manage button (views/room.ejs) */
.rm .people li.pm-can { cursor: pointer; }
.rm .people li.pm-can:hover { background: #1b1910; }
.rm .people .pm-mg, .rm .mic .pm-mg { appearance: none; background: none; border: 1px solid #3a3420; color: #e8d9a0; border-radius: 6px; font: inherit; font-size: 13px;
                     cursor: pointer; display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; margin: 0; line-height: 1; box-sizing: border-box; }
.rm .people .pm-mg:hover, .rm .people .pm-mg:focus-visible, .rm .mic .pm-mg:hover, .rm .mic .pm-mg:focus-visible { border-color: #c6a83f; background: #1d1a0f; }

/* dialogs (appended to <body>, outside .rm) */
.pm-dlg { padding: 0; border: 1px solid #3a3420; border-radius: 14px; background: #131313; color: var(--ds-text); width: min(520px, calc(100vw - 32px));
          max-height: calc(100vh - 48px); font-family: var(--ds-font); box-shadow: 0 18px 60px rgba(0,0,0,.7); }
.pm-dlg::backdrop { background: rgba(0, 0, 0, .62); }
/* 1.99il: the 💸 tip modal (pad-tip.js) */
.tipm .tipm-f, .tipm .tipm-c, .tipm .tipm-d { display: grid; gap: 8px; }
.tipm [hidden] { display: none !important; }
.tipm .tipm-l { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-text-muted); }
.tipm input[type=text] { width: 100%; box-sizing: border-box; padding: 9px 10px; font-size: 16px; }
.tipm .tipm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tipm .tipm-chips [aria-pressed="true"] { border-color: #c6a83f; background: #1d1a0f; }
.tipm .tipm-bal, .tipm .tipm-hint { margin: 0; font-size: 13px; color: var(--ds-text-muted); }
.tipm .tipm-hint.bad, .tipm .tipm-err { color: #ff9e9e; }
.tipm .tipm-sum { margin: 0; font-size: 17px; color: #fff; }
.tipm .tipm-note { margin: 0; color: #ccc; font-style: italic; overflow-wrap: anywhere; }
.tipm .tipm-ok { margin: 0; color: #a5d6a7; font-size: 15px; }
.tipm .tipm-go { background: #2e7d32; border-color: #2e7d32; color: var(--ds-on-ac); font-weight: bold; }
.pm-dlg-in { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: calc(100vh - 48px); }
.pm-dlg-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 14px 16px 10px; border-bottom: 1px solid #242424; }
.pm-dlg-h h3 { margin: 0; font-size: 18px; overflow-wrap: anywhere; min-width: 0; }
.pm-dlg-h .pm-x { grid-column: 2; grid-row: 1; min-height: 30px; padding: 2px 10px; font-size: 18px; }
.pm-who { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--ds-text-muted); }
.pm-login { font-family: ui-monospace, Consolas, monospace; }
.pm-dlg-b { overflow-y: auto; padding: 12px 16px 16px; display: grid; gap: 12px; align-content: start; }
.pm-menu { display: grid; gap: 12px; }
.pm-grp { display: grid; gap: 6px; }
.pm-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-hist .pm-hlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 180px; overflow-y: auto; font-size: 12.5px; }
.pm-hlist li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 8px; align-items: baseline; color: #bbb; }
.pm-hlist time { color: var(--ds-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-hlist b { color: #f4c08a; text-transform: capitalize; white-space: nowrap; }
.pm-hlist span { overflow-wrap: anywhere; min-width: 0; }
.pm-cform { display: grid; gap: 8px; }
.pm-q { margin: 0; font-size: 15px; color: #fff; }
.pm-lab { font-size: 12.5px; color: #aaa; }
.pm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-cmd { display: grid; gap: 3px; }
.pm-cmd code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: #0b0b0b; border: 1px solid #2a2a2a; border-radius: 6px; padding: 6px 8px; color: #e8d9a0; overflow-wrap: anywhere; }
.pm-out:empty { display: none; }
.pm-blist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pm-blist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #0d0d0d; border: 1px solid #222; border-radius: 8px; padding: 7px 9px; }
.pm-blist li.done { opacity: .55; }
.pm-bwho { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; min-width: 0; font-size: 13px; }
.pm-bwho b { overflow-wrap: anywhere; }
.pm-bwho small { color: var(--ds-text-muted); width: 100%; }

@media (max-width: 520px) {
  .pm-dlg { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
  .pm-dlg-in { max-height: 92vh; }
  .pm-acts .pm-btn { flex: 1 1 calc(50% - 6px); }
  .pm-set { grid-template-columns: minmax(0, 1fr) 110px; }
}

/* 1.99dx: the pad page's Manage card collapses to the topic line (room-mod.js opts.collapsible) */
.pm-tog { appearance: none; margin-left: 0; white-space: nowrap; font-family: var(--ds-font); letter-spacing: 0; text-transform: none; font-size: 12px; font-weight: bold;
          padding: 3px 8px; border-radius: 999px; border: 1px solid #6b5a20; background: #1d1a0f; color: #f3e3a3; cursor: pointer; }
.pm-tog:hover, .pm-tog:focus-visible { border-color: #c6a83f; }
.pm-tog:focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }
.pm.pm-collapsed h2 { margin-bottom: 6px; }
.pm-sum { margin: 0; font-size: 13.5px; color: #c9b46a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-sum[hidden], .pm-body[hidden] { display: none !important; }
.pm.pm-collapsed > .pm-note { margin: 8px 0 0; }

/* the roster's ⋯ popover menu (appended to <body>) */
.pm-pop { position: absolute; z-index: 70; width: min(280px, calc(100vw - 16px)); max-height: min(70vh, 520px); overflow-y: auto; box-sizing: border-box;
          background: #151515; border: 1px solid #3a3420; border-radius: 12px; box-shadow: 0 14px 44px rgba(0,0,0,.7); padding: 8px;
          display: grid; gap: 6px; font-family: var(--ds-font); color: var(--ds-text); font-size: 14px; }
.pm-pop *, .pm-pop *::before, .pm-pop *::after { box-sizing: border-box; }
.pm-pop .hide { display: none !important; }
.pm-pop-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 2px 2px 6px 6px; border-bottom: 1px solid #242424; }
.pm-pop-n { min-width: 0; display: grid; }
.pm-pop-n b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-pop-n small { color: var(--ds-text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-pop .pm-x { min-height: 30px; padding: 2px 10px; font-size: 16px; }
.pm-pop-l { display: grid; gap: 2px; }
.pm-pop-i { appearance: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 10px; border-radius: 8px; border: 1px solid transparent;
            background: none; color: #e2e2e2 !important; font: inherit; font-size: 14px; text-align: left; cursor: pointer; text-decoration: none; }
.pm-pop-i:hover, .pm-pop-i:focus-visible { background: #1d1a0f; border-color: #6b5a20; color: #fff !important; outline: none; }
.pm-pop-i.danger { color: #ffcdcd !important; }
.pm-pop-i.danger:hover, .pm-pop-i.danger:focus-visible { background: #2a1010; border-color: #7a2222; }
.pm-pop-i[disabled] { opacity: .45; cursor: not-allowed; }
/* 1.99fu: a greyed-out item that says why (💸 Tip: "not linked to PATV yet") - readable, not faded to nothing */
.pm-pop-i.off[disabled] { opacity: .75; }
.pm-pop-i .pm-pop-why { color: #a9a9a9; font-size: 12px; font-weight: normal; }
.pm-pop-sep { height: 1px; background: #242424; margin: 3px 4px; }
.pm-pop .pm-note { font-size: 12.5px; }
.pm-pop .pm-cform input, .pm-pop .pm-cform select { background: #0d0d0d; color: #eee; border: 1px solid var(--ds-line-strong); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; width: 100%; }
.pm-pop .pm-q { font-size: 14px; }
.rm .people .pm-mg, .rm .mic .pm-mg { min-width: 26px; }
@media (max-width: 520px) {
  /* a bottom sheet on phones */
  .pm-pop { position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100vw; max-height: 80vh; border-radius: 14px 14px 0 0; padding: 10px 12px 16px; }
  .pm-pop-i { min-height: 42px; }
}

/* 1.99qr: the 🐸 Pepe submenu (pad-pepe.js) - the price + confirm step in the ⋯ popover and the cam preview's Pepe row */
.pp-confirm { display: grid; gap: var(--ds-sp-2); padding: var(--ds-sp-2) var(--ds-sp-1); }
.pp-confirm .pp-q { margin: 0; color: var(--ds-text); font-size: 14px; line-height: 1.45; }
.pp-confirm .pp-cost { margin: 0; color: var(--ds-text-muted); font-size: 13px; line-height: 1.45; }
.pp-confirm .pp-row { display: flex; gap: var(--ds-sp-2); justify-content: flex-end; flex-wrap: wrap; }
.pp-out { font-size: 13px; color: var(--ds-text-muted); overflow-wrap: anywhere; min-height: 1em; }
.pp-out.ok { color: var(--ds-ok); }
.pp-out.bad { color: var(--ds-danger); }
.pm-pepe-c:empty { display: none; }
.pp-cam { display: grid; gap: var(--ds-sp-2); border-top: 1px solid var(--ds-line-soft); padding-top: var(--ds-sp-2); margin-top: var(--ds-sp-1); }
.pp-cam-l { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-text-muted); }
.pp-cam-a { display: flex; flex-wrap: wrap; gap: var(--ds-sp-2); }
.pp-cam-a[hidden] { display: none; }
.rm .snap .pp-cam .ds-btn { background: transparent; color: var(--ds-text); border: 1px solid var(--ds-line-strong); border-radius: var(--ds-r-pill); padding: 0 12px; font-size: 13px; }
.rm .snap .pp-cam .ds-btn.gold { background: var(--ds-gold-grad); color: var(--ds-on-gold); border-color: transparent; }
.rm .snap .pp-cam .ds-btn:disabled { opacity: .5; }
