/* v3.81 chat rooms: /rooms (the list) and /rooms/<slug> (a room).
   Loaded per page through $styles. Each room has a hue (--hue, from its
   address) that tints its tile, card glow and room header. */

/* ---- Shared ------------------------------------------------------------ */
.rm-live { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-size: var(--fs-xs); font-weight: 600; color: var(--color-success); }
.rm-live i { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); animation: rm-pulse 2s ease-in-out infinite; flex: none; }
.rm-chip { display: inline-block; padding: .12rem .55rem; border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .01em; background: var(--color-surface-3); color: var(--color-text-dim); white-space: nowrap; }
.rm-tile { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; flex: none; border-radius: var(--radius-md); font-size: 1.3rem; line-height: 1;
    background: linear-gradient(135deg, hsl(var(--hue, 330) 70% 55% / .32), hsl(calc(var(--hue, 330) + 50) 70% 50% / .14));
    box-shadow: inset 0 0 0 1px hsl(var(--hue, 330) 70% 60% / .35); }
.rm-tile--lg { width: 3.2rem; height: 3.2rem; font-size: 1.6rem; border-radius: var(--radius-lg); }
.rm-stack { display: inline-flex; align-items: center; }
.rm-stack-face { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; margin-left: -.45rem; border-radius: 50%; overflow: hidden; font-size: .7rem; font-weight: 700; color: #fff; background: hsl(var(--hue, 280) 45% 42%); box-shadow: 0 0 0 2px var(--color-surface-1); }
.rm-stack-face:first-child { margin-left: 0; }
.rm-stack-face img { width: 100%; height: 100%; object-fit: cover; }
.rm-badge { padding: .02rem .4rem; border-radius: var(--radius-pill); font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rm-badge--creator { background: color-mix(in srgb, var(--color-pop-pink) 20%, transparent); color: var(--color-pop-pink); }
.rm-badge--team { background: color-mix(in srgb, var(--color-accent) 22%, transparent); color: var(--color-accent-text); }
.rm-crumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 var(--space-sm); font-size: var(--fs-xs); color: var(--color-text-faint); }
.rm-crumbs a { color: var(--color-text-dim); text-decoration: none; }
.rm-crumbs a:hover { color: var(--color-text); text-decoration: underline; }
@keyframes rm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes rm-shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes rm-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rm-live i, .rm-msg, .rm-peek-item, .rm-peek-skel i, .rm-peek-skel span { animation: none; } }

/* ---- List page ---------------------------------------------------------- */
.rm-hub { padding: var(--space-md) 0 var(--space-xl); }
.rm-hub-hero { display: grid; gap: var(--space-lg); align-items: center; margin-bottom: var(--space-xl); }
@media (min-width: 960px) { .rm-hub-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.rm-hub-intro h1 { margin: .35rem 0 var(--space-sm); font-family: var(--font-serif); font-size: var(--fs-2xl); line-height: 1.02; letter-spacing: -.01em; }
.rm-hub-intro h1 em { font-style: italic; background: var(--color-accent-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rm-hub-lead { max-width: 34rem; margin: 0 0 var(--space-md); font-size: var(--fs-md); color: var(--color-text-dim); }
.rm-hub-stats { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: 0 0 var(--space-md); padding: 0; }
.rm-hub-stats li { display: grid; gap: .1rem; min-width: 7.5rem; padding: .6rem .9rem; border-radius: var(--radius-md); background: var(--color-surface-1); border: 1px solid var(--color-border); }
.rm-hub-stats strong { font-size: var(--fs-lg); line-height: 1.1; color: var(--color-text); }
.rm-hub-stats strong.rm-live { font-size: var(--fs-lg); color: var(--color-text); }
.rm-hub-stats strong.rm-live i { color: var(--color-success); }
.rm-hub-stats span { font-size: var(--fs-xs); color: var(--color-text-dim); }
.rm-hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }

.rm-peek { position: relative; padding: var(--space-sm); border-radius: var(--radius-xl); background: var(--color-surface-1); border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg), 0 0 70px -24px color-mix(in srgb, var(--color-accent) 70%, transparent), 30px 30px 80px -40px color-mix(in srgb, var(--color-pop-pink) 60%, transparent); }
.rm-peek-head { display: flex; align-items: center; gap: .7rem; padding-bottom: .7rem; margin-bottom: .4rem; border-bottom: 1px solid var(--color-border); }
.rm-peek-head div { display: grid; gap: .1rem; }
.rm-peek-list { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; gap: .1rem; min-height: 13.5rem; }
.rm-peek-item { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .6rem; padding: .5rem .2rem; animation: rm-in .35s var(--ease-out) both; }
.rm-peek-item .rm-stack-face { width: 2rem; height: 2rem; margin: 0; box-shadow: none; }
.rm-peek-who { display: flex; align-items: baseline; gap: .4rem; margin: 0; font-size: var(--fs-xs); }
.rm-peek-who strong { font-size: var(--fs-sm); }
.rm-peek-who time { margin-left: auto; color: var(--color-text-faint); }
.rm-peek-text { margin: .05rem 0 0; font-size: var(--fs-sm); color: var(--color-text-dim); overflow-wrap: anywhere; }
.rm-peek-empty { align-self: center; padding: var(--space-md) 0; text-align: center; font-size: var(--fs-sm); color: var(--color-text-faint); }
.rm-peek-skel { display: grid; grid-template-columns: 2rem 1fr; gap: .6rem; align-items: center; padding: .6rem .2rem; }
.rm-peek-skel i, .rm-peek-skel span { display: block; height: 2rem; border-radius: 50%; background: linear-gradient(90deg, var(--color-surface-2), var(--color-surface-3), var(--color-surface-2)); background-size: 200% 100%; animation: rm-shimmer 1.4s linear infinite; }
.rm-peek-skel span { height: .9rem; border-radius: var(--radius-pill); width: 80%; }
.rm-peek-open { display: inline-block; margin-top: .5rem; font-size: var(--fs-sm); font-weight: 600; color: var(--color-text); text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: .2em; }

.rm-section { margin: 0 0 var(--space-xl); scroll-margin-top: 6rem; }
.rm-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem var(--space-sm); margin-bottom: var(--space-sm); }
.rm-section-head h2 { margin: 0; font-size: var(--fs-xl); font-family: var(--font-serif); }
.rm-section-head p { margin: 0; font-size: var(--fs-sm); color: var(--color-text-dim); }
.rm-grid { display: grid; gap: var(--space-sm); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.rm-grid--cities { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); }
.rm-card { position: relative; display: flex; flex-direction: column; gap: .45rem; min-height: 11rem; padding: var(--space-sm); border-radius: var(--radius-lg); overflow: hidden; isolation: isolate;
    background: var(--color-surface-1); border: 1px solid var(--color-border); color: inherit; text-decoration: none;
    transition: border-color .25s var(--ease-out), transform .25s var(--ease-out), box-shadow .25s var(--ease-out); }
.rm-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 80% at 0% 0%, hsl(var(--hue) 70% 55% / .16), transparent 60%); opacity: .8; transition: opacity .25s; }
.rm-card:hover, .rm-card:focus-visible { transform: translateY(-3px); border-color: hsl(var(--hue) 65% 60% / .55); box-shadow: 0 14px 34px -18px hsl(var(--hue) 70% 50% / .6); }
.rm-card:hover::before { opacity: 1; }
.rm-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .2rem; }
.rm-card-name { font-family: var(--font-serif); font-size: var(--fs-md); line-height: 1.15; }
.rm-card-desc { font-size: var(--fs-sm); color: var(--color-text-dim); }
.rm-card-sub { font-size: var(--fs-xs); color: var(--color-text-faint); margin-top: -.25rem; }
.rm-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; margin-top: auto; padding: .35rem 1.4rem 0 0; font-size: var(--fs-xs); color: var(--color-text-faint); }
.rm-card-go { position: absolute; right: var(--space-sm); bottom: var(--space-sm); font-size: 1.05rem; color: var(--color-text-faint); transition: transform .25s var(--ease-out), color .25s; }
.rm-card:hover .rm-card-go { transform: translateX(3px); color: hsl(var(--hue) 70% 65%); }
.rm-card--city { min-height: 8.5rem; }
.rm-card--city .rm-tile { width: 2.2rem; height: 2.2rem; font-size: 1.05rem; }
.rm-card--creators { border-color: color-mix(in srgb, var(--color-pop-orange) 30%, var(--color-border)); }

.rm-how { display: grid; gap: var(--space-sm); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); margin: 0 0 var(--space-lg); padding: var(--space-md); border-radius: var(--radius-xl); background: linear-gradient(135deg, color-mix(in srgb, var(--color-accent) 10%, var(--color-surface-1)), var(--color-surface-1)); border: 1px solid var(--color-border); }
.rm-how h3 { margin: .4rem 0 .2rem; font-size: var(--fs-md); }
.rm-how p { margin: 0; font-size: var(--fs-sm); color: var(--color-text-dim); }
.rm-how-n { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; font-weight: 700; font-size: var(--fs-sm); background: var(--color-accent-gradient); color: #fff; }

.rm-info { display: grid; gap: var(--space-sm); }
@media (min-width: 900px) { .rm-info { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; } }
.rm-rules, .rm-faq { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-lg); background: var(--color-surface-1); border: 1px solid var(--color-border); font-size: var(--fs-sm); }
.rm-rules h2, .rm-faq h2 { margin: 0 0 .5rem; font-size: var(--fs-md); }
.rm-rules ul { margin: 0 0 .6rem; padding-left: 1.1rem; display: grid; gap: .3rem; }
.rm-rules p { margin: 0; color: var(--color-text-dim); }
.rm-faq details { border-top: 1px solid var(--color-border); }
.rm-faq details:first-of-type { border-top: 0; }
.rm-faq summary { padding: .6rem 0; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.rm-faq summary::-webkit-details-marker { display: none; }
.rm-faq summary::after { content: "+"; color: var(--color-text-faint); font-weight: 400; }
.rm-faq details[open] summary::after { content: "–"; }
.rm-faq details p { margin: 0 0 .7rem; color: var(--color-text-dim); }

/* ---- Room page ---------------------------------------------------------- */
/* A quiet, fixed type scale here (not the fluid display sizes the landing
   pages use): the chat is a working surface, so it reads like an app. */
.rm-page { padding: var(--space-xs) 0 var(--space-lg); font-size: .875rem; }
.rm-page .rm-crumbs { font-size: .75rem; margin-bottom: .75rem; }
.rm-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .rm-layout { grid-template-columns: 12.5rem minmax(0, 1fr); align-items: start; } .rm-aside { grid-column: 2; } }
@media (min-width: 1280px) { .rm-layout { grid-template-columns: 12.5rem minmax(0, 1fr) 17rem; } .rm-aside { grid-column: 3; grid-row: 1; position: sticky; top: 5.5rem; } }

.rm-side { min-width: 0; display: flex; align-items: center; gap: .35rem; font-size: .8125rem; }
.rm-side-all { display: inline-block; color: var(--color-text-faint); text-decoration: none; white-space: nowrap; font-size: .75rem; }
.rm-side-all:hover { color: var(--color-text); }
.rm-side-head { display: none; margin: 1.1rem .6rem .35rem; font-size: .625rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-faint); }
.rm-side ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .3rem; }
.rm-side li a { display: flex; align-items: center; gap: .55rem; padding: .38rem .7rem; border-radius: var(--radius-pill); background: var(--color-surface-1); border: 1px solid var(--color-border); color: var(--color-text-dim); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.rm-side-icon { display: inline-grid; place-items: center; color: var(--color-text-faint); }
.rm-side-icon .rm-icon { width: 15px; height: 15px; }
.rm-side li a.is-active .rm-side-icon { color: hsl(var(--hue, 330) 70% 70%); }
.rm-side li a .rm-live { margin-left: auto; font-size: .6875rem; }
.rm-side li a .rm-live i { width: .375rem; height: .375rem; box-shadow: none; }
.rm-side li a.is-active { color: var(--color-text); border-color: hsl(var(--hue) 65% 60% / .45); background: hsl(var(--hue) 65% 55% / .1); }
@media (max-width: 959px) {
    .rm-side { overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--space-sm) * -1); padding: 0 var(--space-sm); }
    .rm-side::-webkit-scrollbar { display: none; }
}
@media (min-width: 960px) {
    .rm-side { position: sticky; top: 5.5rem; display: block; }
    .rm-side-all { margin: 0 0 .1rem .6rem; }
    .rm-side-head { display: block; }
    .rm-side ul { flex-direction: column; gap: 1px; }
    .rm-side li a { border-radius: var(--radius-sm); background: none; border-color: transparent; padding: .42rem .6rem; }
    .rm-side li a:hover { background: color-mix(in srgb, var(--color-surface-1) 80%, transparent); color: var(--color-text); }
    .rm-side li a.is-active { box-shadow: inset 2px 0 0 hsl(var(--hue) 70% 62%); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-color: transparent; }
}

.rm-main { display: flex; flex-direction: column; min-width: 0; height: calc(100dvh - 9rem); min-height: 26rem; border-radius: 18px; overflow: hidden; position: relative;
    background: var(--color-surface-1);
    border: 1px solid var(--color-border); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 24px 60px -36px rgba(0, 0, 0, .7); }
.rm-head { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--color-border);
    background: radial-gradient(80% 160% at 0% 0%, hsl(var(--hue) 70% 55% / .09), transparent 70%); }
.rm-head .rm-tile { width: 2.25rem; height: 2.25rem; border-radius: 10px; }
.rm-head-text { min-width: 0; flex: 1; }
.rm-head h1 { margin: 0; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.rm-h1-sub { margin-left: .25rem; font-family: var(--font-sans); font-size: .75rem; font-weight: 500; letter-spacing: 0; color: var(--color-text-faint); }
.rm-head .rm-head-desc { margin: .1rem 0 0; font-size: .8125rem; color: var(--color-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-head .rm-head-chips { display: flex; flex-wrap: wrap; gap: .25rem; margin: .35rem 0 0; }
.rm-head .rm-head-chips:not(:has(span)) { display: none; }
.rm-head .rm-chip { padding: .08rem .45rem; font-size: .6875rem; font-weight: 500; background: transparent; border: 1px solid var(--color-border); color: var(--color-text-faint); }
.rm-head-side { display: flex; align-items: center; gap: .6rem; flex: none; }
.rm-here { display: inline-flex; align-items: center; gap: .4rem; margin: 0; padding: .22rem .6rem; border-radius: var(--radius-pill); border: 1px solid color-mix(in srgb, var(--color-success) 30%, var(--color-border)); background: color-mix(in srgb, var(--color-success) 8%, transparent); font-size: .75rem; font-weight: 500; color: var(--color-text-dim); white-space: nowrap; }
.rm-here span { color: var(--color-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rm-here i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-success) 22%, transparent); animation: rm-pulse 2s ease-in-out infinite; }
.rm-head-side .rm-stack-face { width: 1.5rem; height: 1.5rem; font-size: .625rem; }
@media (max-width: 599px) { .rm-head { padding: .7rem .85rem; } .rm-head .rm-head-desc { display: none; } .rm-head-side .rm-stack { display: none; } }

.rm-note { margin: 0; padding: .45rem 1.1rem; font-size: .75rem; background: var(--color-surface-2); border-bottom: 1px solid var(--color-border); color: var(--color-text-dim); }
.rm-linkbtn { border: 0; padding: 0; background: none; color: var(--color-text); font: inherit; text-decoration: underline; cursor: pointer; }

.rm-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: .5rem .85rem 1rem; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--color-surface-3) transparent; }
.rm-log:focus-visible { outline: 1px solid var(--color-border-strong); outline-offset: -1px; }
.rm-loading { margin: auto; font-size: .75rem; letter-spacing: .04em; color: var(--color-text-faint); }
.rm-empty { margin: auto; display: grid; justify-items: center; gap: .3rem; text-align: center; color: var(--color-text-faint); font-size: .8125rem; }
.rm-empty[hidden] { display: none; }
.rm-empty-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: .35rem; border-radius: 50%; border: 1px solid var(--color-border); color: var(--color-text-faint); background: color-mix(in srgb, var(--color-surface-2) 60%, transparent); }
.rm-empty strong { color: var(--color-text); font-size: .9375rem; font-weight: 600; }
.rm-day { display: flex; align-items: center; gap: .8rem; margin: 1rem 0 .3rem; font-size: .625rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--color-text-faint); }
.rm-day::before, .rm-day::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--color-border), transparent); }
.rm-day:first-of-type { margin-top: auto; }
.rm-jump { position: absolute; left: 50%; bottom: 5.4rem; transform: translateX(-50%); padding: .3rem .8rem; border-radius: var(--radius-pill); border: 1px solid var(--color-border-strong); background: var(--color-surface-2); color: var(--color-text); font-size: .75rem; font-weight: 500; box-shadow: var(--shadow-md); cursor: pointer; }

.rm-msg { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .65rem; padding: .45rem .5rem .15rem; border-radius: 10px; animation: rm-in .25s var(--ease-out) both; }
.rm-msg:hover { background: color-mix(in srgb, var(--color-surface-2) 45%, transparent); }
.rm-msg.is-cont { padding-top: 0; }
.rm-msg.is-cont .rm-avatar { visibility: hidden; height: 0; }
.rm-msg.is-cont .rm-msg-head > :not(.rm-more):not(.rm-menu) { display: none; }
.rm-msg.is-cont .rm-msg-head { position: absolute; right: .1rem; top: -.25rem; min-height: 0; }
.rm-msg.is-cont .rm-msg-body { position: relative; }
.rm-avatar { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-weight: 600; font-size: .75rem; color: #fff; background: hsl(var(--hue, 280) 38% 40%); text-decoration: none; }
.rm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rm-msg.is-creator .rm-avatar { box-shadow: 0 0 0 1.5px var(--color-surface-1), 0 0 0 3px var(--color-pop-pink); }
.rm-msg.is-team .rm-avatar { box-shadow: 0 0 0 1.5px var(--color-surface-1), 0 0 0 3px var(--color-accent); }
.rm-msg-body { min-width: 0; }
.rm-msg-head { display: flex; align-items: baseline; gap: .45rem; position: relative; min-height: 1.25rem; }
.rm-name { font-weight: 600; font-size: .8125rem; color: var(--color-text); text-decoration: none; }
a.rm-name:hover { text-decoration: underline; text-underline-offset: .15em; }
.rm-msg .rm-badge { font-size: .5625rem; padding: .05rem .35rem; letter-spacing: .08em; }
.rm-msg-head time { font-size: .6875rem; color: var(--color-text-faint); font-variant-numeric: tabular-nums; }
.rm-text { margin: .05rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.5; color: color-mix(in srgb, var(--color-text) 92%, transparent); }
.rm-msg-note { margin: .2rem 0 0; font-size: .6875rem; color: var(--color-success); }

.rm-more { margin-left: auto; width: 1.7rem; height: 1.4rem; border: 0; border-radius: 6px; background: none; color: var(--color-text-faint); cursor: pointer; opacity: 0; transition: opacity .15s; }
.rm-msg:hover .rm-more, .rm-more:focus-visible, .rm-more[aria-expanded="true"] { opacity: 1; }
@media (hover: none) { .rm-more { opacity: .6; } }
.rm-more:hover { background: var(--color-surface-2); color: var(--color-text); }
.rm-menu { position: absolute; right: 0; top: 1.6rem; z-index: 5; min-width: 12rem; padding: .25rem; border-radius: 12px; background: var(--color-surface-2); border: 1px solid var(--color-border-strong); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); display: grid; }
.rm-menu.is-up { top: auto; bottom: 1.6rem; }
.rm-menu-group { display: grid; padding-top: .2rem; margin-top: .2rem; border-top: 1px solid var(--color-border); }
.rm-menu-group:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.rm-menu-label { margin: .25rem .55rem .15rem; font-size: .625rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--color-text-faint); }
.rm-menu-item { padding: .38rem .55rem; border: 0; border-radius: 8px; background: none; color: var(--color-text); font: inherit; font-size: .8125rem; text-align: left; cursor: pointer; }
.rm-menu-item:hover, .rm-menu-item:focus-visible { background: var(--color-surface-3); outline: none; }
.rm-menu-item.is-danger { color: var(--color-danger); }

.rm-compose-wrap { border-top: 1px solid var(--color-border); padding: .7rem .85rem .6rem; background: var(--color-surface-1); }
.rm-compose { display: flex; gap: .45rem; align-items: flex-end; padding: .3rem .3rem .3rem .2rem; border-radius: 14px; border: 1px solid var(--color-border-strong); background: var(--color-bg); transition: border-color .15s, box-shadow .15s; }
.rm-compose:focus-within { border-color: hsl(var(--hue) 60% 60% / .55); box-shadow: 0 0 0 3px hsl(var(--hue) 70% 60% / .12); }
.rm-compose textarea { flex: 1; min-width: 0; resize: none; max-height: 9rem; padding: .45rem .6rem; border: 0; background: transparent; color: var(--color-text); font: inherit; font-size: .9rem; line-height: 1.45; }
.rm-compose textarea:focus { outline: none; }
.rm-compose textarea::placeholder { color: var(--color-text-faint); }
.rm-send { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.1rem; padding: .35rem .85rem; border-radius: 10px; font-size: .8125rem; }
@media (max-width: 599px) { .rm-send span { display: none; } .rm-send { padding-inline: .6rem; } .rm-compose-hint { display: none; } }
.rm-compose-hint { margin: .4rem .2rem 0; font-size: .6875rem; color: var(--color-text-faint); letter-spacing: .01em; }
.rm-error { margin: 0 0 .5rem; padding: .4rem .65rem; border-radius: 8px; font-size: .8125rem; background: color-mix(in srgb, var(--color-danger) 12%, transparent); border: 1px solid color-mix(in srgb, var(--color-danger) 30%, transparent); color: var(--color-text); }
.rm-gate { margin: 0; text-align: center; font-size: .8125rem; color: var(--color-text-dim); }
.rm-gate p { margin: .15rem 0; }
.rm-gate strong { color: var(--color-text); font-weight: 600; }
.rm-gate .btn { margin: .25rem .15rem 0; }
.rm-gate--row { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; text-align: left; }
.rm-gate--row p { display: grid; gap: .05rem; margin: 0; }
.rm-gate--row p strong { font-size: .875rem; }
.rm-gate--row p span { font-size: .75rem; color: var(--color-text-faint); }
.rm-gate-actions { display: flex; gap: .4rem; }
.rm-gate-actions .btn { margin: 0; }
@media (max-width: 479px) { .rm-gate--row { justify-content: center; text-align: center; } .rm-gate--row p { justify-items: center; } }
.rm-closed { margin: 0; padding: .5rem; text-align: center; font-size: .8125rem; color: var(--color-text-dim); }

.rm-locked { margin: auto; padding: 2rem 1.5rem; display: grid; justify-items: center; text-align: center; max-width: 26rem; }
.rm-locked h2 { margin: .7rem 0 .35rem; font-size: 1.05rem; font-weight: 600; }
.rm-locked p { margin: 0 0 .8rem; font-size: .8125rem; color: var(--color-text-dim); }
.rm-locked .btn { margin: .15rem; }

.rm-aside { display: grid; gap: .75rem; align-content: start; min-width: 0; }
.rm-panel { padding: 1rem 1.05rem; border-radius: 14px; background: var(--color-surface-1); border: 1px solid var(--color-border); font-size: .8125rem; }
.rm-panel h2 { margin: 0 0 .6rem; font-family: var(--font-sans); font-size: .625rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-faint); }
.rm-panel p { margin: 0 0 .6rem; color: var(--color-text-dim); line-height: 1.6; }
.rm-panel p:last-child { margin-bottom: 0; }
.rm-links { list-style: none; margin: 0; padding: 0; display: grid; }
.rm-links a { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .42rem .5rem; margin: 0 -.5rem; border-radius: 8px; color: var(--color-text); text-decoration: none; font-size: .8125rem; line-height: 1.35; }
.rm-links a:hover { background: var(--color-surface-2); }
.rm-links a > span:last-child { color: var(--color-text-faint); flex: none; }
.rm-panel--rules ul { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; gap: .35rem; color: var(--color-text-dim); }
.rm-panel--rules li { position: relative; padding-left: .85rem; line-height: 1.5; }
.rm-panel--rules li::before { content: ""; position: absolute; left: .1rem; top: .6em; width: 4px; height: 4px; border-radius: 50%; background: var(--color-text-faint); }
.rm-panel--rules a { color: var(--color-text); font-size: .75rem; }

/* ---- Phones: denser list page ------------------------------------------- */
@media (max-width: 599px) {
    .rm-hub-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rm-hub-stats li { min-width: 0; padding: .5rem .6rem; }
    .rm-card { min-height: 0; }
    .rm-grid--cities { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xs); }
    .rm-card--city { min-height: 7.5rem; padding: .8rem; }
    .rm-card--city .rm-stack { display: none; }
    .rm-section-head h2 { font-size: var(--fs-lg); }
}
.rm-msg.has-menu { position: relative; z-index: 10; }

/* ---- Icons (App\Services\Rooms\RoomIcons) ------------------------------- */
.rm-tile { color: hsl(var(--hue, 330) 75% 72%); }
:root[data-theme="light"] .rm-tile { color: hsl(var(--hue, 330) 60% 38%); }
.rm-icon { display: block; flex: none; }
.rm-section-head h2 { display: flex; align-items: center; gap: .6rem; }
.rm-h-icon { display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem; flex: none; border-radius: var(--radius-md); background: color-mix(in srgb, var(--color-accent) 16%, var(--color-surface-1)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 40%, transparent); color: var(--color-accent); }
.rm-meta-icon { display: inline-flex; align-items: center; gap: .3rem; }
.rm-link-label { display: inline-flex; align-items: center; gap: .5rem; }
.rm-link-label .rm-icon { color: var(--color-text-faint); }
.rm-more { display: inline-grid; place-items: center; }

/* v3.82: the city room preview on city directory pages. */
.city-room-grid { display: grid; gap: var(--space-md); align-items: center; }
@media (min-width: 900px) { .city-room-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--space-xl); } }
.city-room-copy .section-title { margin-top: .3rem; }
.city-room-copy .btn { margin-top: var(--space-xs); }
