:root {
  --page: #dfe6ee;
  --panel: #ffffff;
  --panel-alt: #f2f6fa;
  --line: #9db2c8;
  --line-soft: #c9d7e5;
  --navy: #1b4c8c;
  --navy-dark: #123a6b;
  --ink: #1a1a1a;
  --muted: #5b6b7c;
  --link: #003399;
  --accent: #003399;
  --danger: #b00020;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 1.45;
  background-image:
    radial-gradient(circle at 1.5px 1.5px, rgba(27, 76, 140, 0.16) 1.1px, transparent 1.3px),
    radial-gradient(circle at 0.5px 0.5px, rgba(255, 255, 255, 0.85) 1px, transparent 1.2px);
  background-size: 13px 13px;
  background-position: 0 0, 7px 7px;
}

a { color: var(--link); text-decoration: underline; }
a:visited { color: #551a8b; }
a:hover { color: #cc0000; }

img { border: 0; }

hr {
  height: 1px;
  margin: 8px 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid #ffffff;
}

tt, code, pre {
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
}

input, select, textarea, button {
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  font-size: 11px;
  color: var(--ink);
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 2px 4px;
  background: #ffffff;
  border: 1px solid #7f9db9;
  border-top-color: #5b6b7c;
  border-left-color: #5b6b7c;
}

input:focus, textarea:focus, select:focus {
  outline: 1px dotted #003399;
  outline-offset: 0;
}

textarea { resize: vertical; }

select.rank-select { width: auto; }

.btn {
  display: inline-block;
  padding: 2px 8px;
  background: #e9eef4;
  border: 1px solid #6f8aa6;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}

.btn:hover { background: #f7fafd; }
.btn:active { border-color: #6f8aa6; border-top-color: #6f8aa6; border-left-color: #6f8aa6; background: #dde6ef; }
.btn.primary {
  background: #2b5c9e;
  background: linear-gradient(#6b97c9 0, #3e74b8 40%, #1b4c8c 100%);
  border-color: #123a6b;
  color: #ffffff;
  font-weight: bold;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.btn.primary:hover { background: #3e74b8; }
.btn.danger { color: var(--danger); }
.btn.tiny { padding: 1px 6px; font-size: 10px; }
.btn.micro { padding: 0 4px; font-size: 9.5px; }
.btn.wide { display: block; width: 100%; }
.btn:disabled { color: #8a97a5; cursor: default; background: #eef1f4; }

.linkbtn {
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
  text-align: left;
}
.linkbtn:hover { color: #cc0000; }

.page {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  background: transparent;
  table-layout: fixed;
}

.top-banner {
  padding: 12px 14px;
  background: #1b4c8c;
  background: linear-gradient(#4a7fbd 0, #2b5c9e 38%, #1b4c8c 75%, #123a6b 100%);
  border-bottom: 1px solid #123a6b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.brand-cell { vertical-align: middle; }

.brand {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 25px;
  font-weight: bold;
  letter-spacing: 1px;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 1px 1px 0 #123a6b;
}

.tagline {
  margin-top: 2px;
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #d7e5f5;
}

.top-right {
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.header-me {
  display: inline-block;
  margin: 0 6px;
  color: #ffffff;
  font-size: 10.5px;
  line-height: 1.2;
  vertical-align: middle;
  text-align: left;
}
.header-me .me-text strong { font-size: 11px; }
.header-me .me-text small { color: #d7e5f5; font-size: 9.5px; }

.nav-bar {
  padding: 4px 12px 0;
  background: #2b5c9e;
  border-bottom: 1px solid #123a6b;
  color: #ffffff;
  font-size: 10px;
  overflow-x: auto;
  white-space: nowrap;
}

.nav-tabs { display: inline-block; white-space: nowrap; }

.nav-link {
  display: inline-block;
  margin-right: 2px;
  padding: 3px 10px;
  background: #24528f;
  border: 1px solid #123a6b;
  border-bottom: 0;
  color: #d7e5f5;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.4px;
}
.nav-link:hover { background: #3e74b8; color: #ffffff; text-decoration: none; }
.nav-link.active { background: #dfe6ee; color: #123a6b; }

.room-tabs-bar {
  margin-bottom: 8px;
  padding: 3px 4px 0;
  background: #c9d7e5;
  border: 1px solid #9db2c8;
  border-bottom: 0;
}

.room-tabs { overflow-x: auto; white-space: nowrap; }

.room-tab {
  display: inline-block;
  margin-right: 3px;
  background: #eef3f8;
  border: 1px solid #9db2c8;
  border-bottom: 0;
}
.room-tab.active { background: #ffffff; }

.room-tab-name {
  padding: 3px 8px;
  border: 0;
  background: none;
  color: #003399;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.room-tab.active .room-tab-name { color: #123a6b; font-weight: bold; }

.room-tab-close {
  padding: 3px 6px;
  border: 0;
  border-left: 1px solid #c9d7e5;
  background: none;
  color: #7a8a9a;
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}
.room-tab-close:hover { color: #cc0000; }

.home-panel-body { padding: 14px; }

.home-hero {
  padding: 12px;
  background: #eef4fb;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--navy);
}
.home-hero-title {
  color: var(--navy);
  font-size: 15px;
  font-weight: bold;
}
.home-hero p { margin: 4px 0 0; font-size: 11px; }

.home-grid { margin-top: 12px; border-collapse: separate; border-spacing: 8px 0; table-layout: fixed; }
.home-tile {
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  vertical-align: top;
}
.home-tile-head {
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.8px;
}
.home-tile p { margin: 0 0 7px; color: var(--muted); font-size: 10px; }

.home-note {
  margin-top: 12px;
  padding-top: 7px;
  border-top: 1px dotted var(--line-soft);
  color: var(--muted);
  font-size: 10px;
}

.panel-intro {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dotted var(--line-soft);
  color: var(--muted);
  font-size: 10.5px;
}

.panel-actions { margin-top: 10px; }
.panel-actions .btn { margin-right: 4px; }

.directory { border-collapse: collapse; table-layout: fixed; width: 100%; }
.directory th {
  padding: 3px 6px;
  background: #eef3f8;
  border: 1px solid var(--line-soft);
  color: var(--navy);
  font-size: 9.5px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.directory td {
  padding: 4px 6px;
  border-bottom: 1px dotted var(--line-soft);
  font-size: 10.5px;
  vertical-align: middle;
  overflow: hidden;
  word-wrap: break-word;
  white-space: normal;
}
.directory tr:hover td { background: #f7fafd; }
.directory .num { text-align: right; white-space: nowrap; }
.directory th:nth-child(3), .directory td:nth-child(3) { width: 54px; text-align: right; }
.directory th:last-child, .directory td:last-child { width: 66px; text-align: right; }

.directory-row {
  display: table;
  width: 100%;
  padding: 4px 5px;
  border-bottom: 1px dotted var(--line-soft);
  font-size: 10.5px;
}
.directory-row > * { display: table-cell; vertical-align: middle; }
.directory-row .grow { width: 100%; padding-left: 4px; }
.directory-row .dot { width: 10px; }
.directory-row .btn { white-space: nowrap; }
.directory-row > .muted { width: 1%; padding-left: 8px; white-space: nowrap; text-align: right; }

.my-card .btn { margin: 6px; width: calc(100% - 12px); }

.page-body { padding: 10px 12px 0; vertical-align: top; }

.layout { border-collapse: collapse; }
.layout td { vertical-align: top; }

.col-left {
  width: 190px;
  padding-right: 8px;
}

.col-mid { padding: 0; }

.col-right {
  width: 200px;
  padding-left: 8px;
}

.box {
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-collapse: collapse;
  background: var(--panel);
}
.box td { padding: 0; }

.box-head {
  padding: 3px 7px;
  background: #2b5c9e;
  background: linear-gradient(#ffffff 0, #7ca9db 3%, #3e74b8 45%, #2b5c9e 100%);
  border-bottom: 1px solid var(--navy-dark);
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.box-body {
  padding: 5px 6px;
  background: var(--panel);
}

.title-count { color: #ffff99; font-weight: normal; }

.side-list { margin: 0 0 4px; }

.side-item {
  display: table;
  width: 100%;
  padding: 2px 4px;
  border: 1px solid transparent;
  background: none;
  color: var(--link);
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.side-item:hover { background: #eef4fb; text-decoration: underline; }
.side-item.active {
  background: #dbe7f5;
  border-color: var(--line);
  font-weight: bold;
}
.side-item > span { display: table-cell; vertical-align: middle; }
.side-item .room-mark { width: 14px; color: #7a8a9a; }
.side-item .room-mark.has-icon { width: 18px; }
.side-item .label { padding-left: 2px; overflow: hidden; }
.side-item .count {
  width: 1%;
  padding-left: 4px;
  color: #7a8a9a;
  font-size: 9.5px;
  text-align: right;
  white-space: nowrap;
}
.side-item .badge {
  width: 1%;
  margin-left: 4px;
  padding: 0 3px;
  background: #cc0000;
  border: 1px solid #800000;
  color: #ffffff;
  font-size: 9px;
  font-weight: bold;
  text-align: center;
}

.side-actions {
  padding: 4px 4px 0;
  font-size: 10px;
  line-height: 1.6;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 3px;
  background: #9aa7b4;
  border: 1px solid #4b5b6b;
  vertical-align: middle;
}
.dot.on { background: #00a000; }

.find-form { margin-top: 6px; border-top: 1px dotted var(--line-soft); padding-top: 5px; }
.find-form label {
  display: block;
  margin-bottom: 2px;
  color: var(--navy);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.row-cell { display: table-cell; vertical-align: middle; }
.row-cell.grow { width: auto; }
.row-cell.fit { width: 1%; white-space: nowrap; }
.row-cell.grow input { width: 100%; }
.row-cell .btn { width: auto; }

.find-row { display: table; width: 100%; border-spacing: 3px 0; }

.invite-line {
  display: table;
  width: 100%;
  border-spacing: 5px 0;
  margin: 2px 0 4px;
}
.invite-line > * { display: table-cell; vertical-align: middle; }
.invite-line .invite-code {
  width: 100%;
  padding: 2px 5px;
  background: #ffffcc;
  border: 1px solid #d8c96a;
  font-size: 11px;
  letter-spacing: 1px;
}

.requests {
  margin: 4px 0;
  padding: 4px 5px;
  background: #ffffcc;
  border: 1px solid #d8c96a;
  font-size: 10px;
}
.requests .muted { text-transform: uppercase; font-size: 9px; letter-spacing: 0.6px; }
.request { margin: 2px 0; }
.request .label { font-weight: bold; }
.request-actions { float: right; }
.outgoing { padding: 2px 4px; color: #7a8a9a; font-size: 9.5px; }

.chat { --room-accent: #1b4c8c; --room-font: "Courier New", Courier, monospace; }

.chat-box { border-top: 2px solid var(--room-accent); }

.chat-head { white-space: normal; }
.chat-head-line { overflow: hidden; }
#channel-name {
  float: left;
  color: #ffffff;
  font-family: Verdana, Geneva, Arial, sans-serif;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
}
#channel-actions { float: right; font-weight: normal; text-transform: none; letter-spacing: 0; }
#channel-topic {
  clear: both;
  padding-top: 2px;
  color: #d7e5f5;
  font-size: 10px;
  font-weight: normal;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
}

.chat-body { padding: 0; background: #ffffff; }

.messages {
  height: calc(100vh - 320px);
  min-height: 300px;
  max-height: 760px;
  padding: 6px 8px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  font-family: var(--room-font);
  font-size: 12px;
  line-height: 1.5;
}

.empty {
  padding: 20px 8px;
  color: #7a8a9a;
  font-style: italic;
  text-align: center;
}

.msg {
  display: flex;
  width: 100%;
  align-items: flex-start;
  padding: 3px 2px;
  border-bottom: 1px dotted #e2e9f1;
}
.msg:hover { background: #f7fafd; }
.msg.mine { background: #f1f6fc; }
.msg.system { background: #fff4f4; }

.msg-avatar {
  flex: 0 0 26px;
  padding-right: 4px;
}

.msg-main { flex: 1; min-width: 0; }

.msg-line { word-wrap: break-word; overflow-wrap: break-word; }

.ts { color: #7a8a9a; font-size: 10px; }
.nick { font-weight: bold; }
.body { color: var(--ink); }
.body a { color: #003399; }
.body .mention {
  padding: 0 1px;
  background: #ffff99;
  color: #003399;
  font-weight: bold;
}

.msg.system .system-body { color: #a8001e; font-weight: bold; }

.reply-quote {
  margin: 1px 0 2px 14px;
  padding-left: 5px;
  border-left: 2px solid var(--line);
  color: #7a8a9a;
  font-size: 10px;
  font-style: italic;
}

.msg-tools { display: none; margin-top: 1px; }
.msg:hover .msg-tools { display: block; }
@media (hover: none) {
  .msg-tools { display: block; }
}
.msg-tool {
  padding: 0;
  margin-right: 6px;
  border: 0;
  background: none;
  color: #5b6b7c;
  font-family: Verdana, sans-serif;
  font-size: 9.5px;
  text-decoration: underline;
  cursor: pointer;
}
.msg-tool:hover { color: var(--navy); }
.msg-tool.danger { color: #b00020; }

.embed-gate {
  margin: 3px 0;
  padding: 5px;
  background: #fffbe6;
  border: 1px solid #d8c96a;
  font-size: 10.5px;
}
.embed-warn { color: #6b4b00; }
.embed-actions { margin-top: 3px; }
.embed-img { max-width: 100%; border: 1px solid var(--line); }
.embed-broken { color: #b00020; }

.chat-foot {
  padding: 5px 6px;
  background: var(--panel-alt);
  border-top: 1px solid var(--line-soft);
}

.ban-notice {
  margin-bottom: 4px;
  padding: 4px 6px;
  background: #ffe6e6;
  border: 1px solid #cc6666;
  color: #8a0000;
  font-size: 10.5px;
}

.reply-bar {
  margin-bottom: 4px;
  padding: 3px 5px;
  background: #ffffcc;
  border: 1px solid #d8c96a;
  font-size: 10px;
}
.reply-text { margin-right: 6px; }

.composer-row { display: table; width: 100%; border-spacing: 4px 0; }

.member-list { margin: 0; }

.member {
  display: table;
  width: 100%;
  padding: 2px 4px;
  cursor: pointer;
}
.member:hover { background: #eef4fb; text-decoration: underline; }
.member > * { display: table-cell; vertical-align: middle; }
.member .dot { width: 10px; }
.member .avatar.tiny { margin-right: 3px; }
.member .label { padding-left: 2px; overflow: hidden; }

.avatar {
  display: inline-block;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border: 1px solid #6f8aa6;
  background: #555555;
  color: #ffffff;
  font-family: Verdana, sans-serif;
  font-size: 11px;
  font-weight: bold;
  line-height: 22px;
  text-align: center;
  vertical-align: middle;
}
.avatar.avatar-img { object-fit: cover; }
.avatar.small { width: 20px; height: 20px; font-size: 10px; line-height: 18px; }
.avatar.tiny { width: 16px; height: 16px; font-size: 9px; line-height: 14px; }
.avatar.big { width: 42px; height: 42px; font-size: 18px; line-height: 40px; }
.avatar.msg-avatar { width: 22px; height: 22px; font-size: 10px; line-height: 20px; }

.rank { margin-left: 3px; font-size: 9px; font-weight: bold; letter-spacing: 0.2px; }
.rank-owner { color: #b8860b; }
.rank-co-owner { color: #7a2fbf; }
.rank-admin { color: #c0392b; }
.rank-mod { color: #0a7d32; }

.side-name { font-size: 11px; }

.verified-badge {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin: 0 2px 1px 2px;
  vertical-align: -2px;
}

.name-style-gold, .name-style-gold-sweep, .name-style-sunset, .name-style-ocean, .name-style-fire,
.name-style-candy, .name-style-mint, .name-style-violet, .name-style-chrome, .name-style-blood,
.name-style-rainbow, .name-style-rainbow-sweep, .name-style-aurora, .name-style-neon,
.name-style-comet, .name-style-trans, .name-style-trans-sweep, .name-style-gay, .name-style-lesbian,
.name-style-bi, .name-style-pan, .name-style-ace, .name-style-aro, .name-style-nonbinary,
.name-style-genderfluid, .name-style-genderqueer, .name-style-agender, .name-style-intersex,
.name-style-progress, .name-style-bigender {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: normal;
}

.name-style-gold-sweep, .name-style-rainbow-sweep, .name-style-aurora, .name-style-neon,
.name-style-comet, .name-style-trans-sweep, .name-style-progress {
  background-size: 220% 100%;
  animation: name-shine 2.6s linear infinite;
}

@keyframes name-shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

.name-style-gold {
  background-image: linear-gradient(#fff8cf 0, #ffe066 22%, #b8860b 48%, #7f5e00 56%, #e6c200 74%, #fff8cf 100%);
}

.name-style-gold-sweep {
  background-image: linear-gradient(100deg,
    #7f5e00 0, #ffe066 18%, #fff8cf 33%, #ffe066 48%,
    #7f5e00 62%, #ffe066 76%, #fff8cf 90%, #7f5e00 100%);
}

.name-style-sunset {
  background-image: linear-gradient(#ffe9c4 0, #ff9d6b 28%, #ff5b7e 55%, #c94dff 82%, #7a2fbf 100%);
}

.name-style-ocean {
  background-image: linear-gradient(#cff5ff 0, #5ad0f0 25%, #1f9bf0 52%, #123a6b 90%);
}

.name-style-fire {
  background-image: linear-gradient(#fff6b8 0, #ffd03d 25%, #ff8534 48%, #f03d1c 72%, #7f1200 100%);
}

.name-style-candy {
  background-image: linear-gradient(#ffc7e3 0, #ff8ac9 30%, #e04fa3 55%, #ff8ac9 78%, #ffc7e3 100%);
}

.name-style-mint {
  background-image: linear-gradient(#effff4 0, #8af7b6 25%, #2fd673 55%, #0a7d32 92%);
}

.name-style-violet {
  background-image: linear-gradient(#f2d8ff 0, #c97dff 28%, #8a3df0 58%, #4c1d95 92%);
}

.name-style-chrome {
  background-image: linear-gradient(#ffffff 0, #c9d4e4 18%, #8a97a8 34%, #dfe6ef 47%, #f5f8ff 52%, #6f7a8a 66%, #c9d4e4 84%, #ffffff 100%);
}

.name-style-blood {
  background-image: linear-gradient(#ffb3b3 0, #f04f4f 28%, #b3121c 58%, #5c0000 94%);
}

.name-style-rainbow {
  background-image: linear-gradient(90deg, #ff5f5f, #ffb84d, #fff44d, #6bec7d, #4dd2ff, #7d7dff, #e05fff, #ff5f5f);
}

.name-style-rainbow-sweep {
  background-image: linear-gradient(100deg,
    #ff5f5f 0, #ffb84d 14%, #fff44d 28%, #6bec7d 42%,
    #4dd2ff 56%, #7d7dff 70%, #e05fff 84%, #ff5f5f 100%);
}

.name-style-aurora {
  background-image: linear-gradient(100deg,
    #0ff0c4 0, #38f08a 18%, #c3ff5f 33%, #5ff0ff 50%,
    #5f9df0 66%, #b05fff 82%, #0ff0c4 100%);
}

.name-style-neon {
  background-image: linear-gradient(100deg,
    #ff00ff 0, #00f0ff 22%, #ff00ff 44%, #00f0ff 66%, #ff00ff 88%, #00f0ff 100%);
}

.name-style-comet {
  background-image: linear-gradient(100deg,
    #4aa8ff 0, #9fd7ff 18%, #2d7fd6 32%, #9fd7ff 48%,
    #4aa8ff 66%, #ffffff 82%, #7fd4ff 100%);
}

.name-style-trans {
  background-image: linear-gradient(90deg,
    #5bcefa 0, #f5a9b8 28%, #d8d8d8 50%, #f5a9b8 72%, #5bcefa 100%);
}

.name-style-trans-sweep {
  background-image: linear-gradient(100deg,
    #5bcefa 0, #f5a9b8 17%, #d8d8d8 33%, #f5a9b8 50%,
    #5bcefa 67%, #f5a9b8 84%, #5bcefa 100%);
}

.name-style-gay {
  background-image: linear-gradient(90deg,
    #ff0018 0, #ffa52c 19%, #ffff41 37%, #008018 55%, #0000f9 74%, #86007d 92%);
}

.name-style-lesbian {
  background-image: linear-gradient(90deg,
    #d52d00 0, #ef7627 18%, #ff9a56 36%, #d8d8d8 50%,
    #d162a4 64%, #b55694 81%, #a30262 100%);
}

.name-style-bi {
  background-image: linear-gradient(90deg, #d60270 0, #9b4f96 50%, #0038a8 100%);
}

.name-style-pan {
  background-image: linear-gradient(90deg, #ff218c 0, #ffd800 50%, #21b1ff 100%);
}

.name-style-ace {
  background-image: linear-gradient(90deg, #000000 0, #a3a3a3 35%, #d8d8d8 55%, #800080 100%);
}

.name-style-aro {
  background-image: linear-gradient(90deg,
    #3da542 0, #a8d5a8 22%, #d8d8d8 42%, #aaaaaa 62%, #3a3a3a 100%);
}

.name-style-nonbinary {
  background-image: linear-gradient(90deg,
    #fff433 0, #d8d8d8 33%, #9c59d1 66%, #2c2c2c 100%);
}

.name-style-genderfluid {
  background-image: linear-gradient(90deg,
    #ff75a2 0, #d8d8d8 19%, #be18d6 38%, #000000 57%, #303ffe 78%, #ff75a2 100%);
}

.name-style-genderqueer {
  background-image: linear-gradient(90deg, #b07dd6 0, #d8d8d8 50%, #4a8120 100%);
}

.name-style-agender {
  background-image: linear-gradient(90deg,
    #000000 0, #7e7e7e 25%, #d8d8d8 50%, #7e7e7e 75%, #000000 100%);
}

.name-style-intersex {
  background-image: linear-gradient(90deg, #ffd800 0, #ffd800 42%, #ae54d9 68%, #ffd800 100%);
}

.name-style-progress {
  background-image: linear-gradient(100deg,
    #784f17 0, #000000 17%, #ff0018 28%, #ffa52c 36%, #ffff41 44%,
    #008018 53%, #0000f9 62%, #86007d 71%, #d60270 82%, #784f17 100%);
}

.name-style-bigender {
  background-image: linear-gradient(90deg,
    #c479a2 0, #eda5cd 17%, #d5c7e8 33%, #d8d8d8 50%, #d5c7e8 67%, #9ac7e8 83%, #6d82d1 100%);
}

.name-preview {
  margin-bottom: 6px;
  padding: 6px 8px;
  background-color: #14161a;
  border: 1px solid var(--navy-dark);
  color: #ffffff;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 0.4px;
  text-align: center;
}

.name-style-select { width: 100%; max-width: none; }

.profile-card {
  border: 1px solid var(--line-soft);
  background: #ffffff;
}

.profile-banner {
  height: 54px;
  background: #c9d7e5 center / cover no-repeat;
  border-bottom: 1px solid var(--line-soft);
}

.profile-head {
  padding: 6px;
  background: var(--panel-alt);
  overflow: hidden;
}
.profile-head.has-grad { color: #ffffff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.profile-head .avatar.big { float: left; margin-right: 7px; }
.profile-head-text { overflow: hidden; }
.profile-name { font-size: 13px; font-weight: bold; line-height: 1.25; }
.profile-sub { color: var(--muted); font-size: 10px; }
.profile-head.has-grad .profile-sub { color: #eaf2fb; }
.presence { font-size: 9.5px; }
.presence.on { color: #0a7d32; }
.profile-head.has-grad .presence.on { color: #b6f0c4; }

.profile-bio {
  padding: 6px;
  font-size: 10.5px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  border-top: 1px solid var(--line-soft);
}
.profile-card .btn { margin: 0 6px 6px; width: calc(100% - 12px); }

.my-card .profile-banner { height: 46px; }

.statusbar {
  margin-top: 4px;
  padding: 3px 6px;
  background: #eef3f8;
  border: 1px solid var(--line);
  color: #333333;
  font-size: 10px;
}
.statusbar td { padding: 0; }
.status-left { text-align: left; }
.status-right { text-align: right; }
.status-sep { color: #8a97a5; padding: 0 3px; }
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 3px;
  background: #8a97a5;
  border: 1px solid #333333;
  vertical-align: middle;
}
.status-dot.connected { background: #00a000; }
.status-dot.offline { background: #cc0000; }

.site-footer {
  padding: 16px 12px 22px;
  background: linear-gradient(#eef3f8, #dfe6ee);
  border-top: 1px solid var(--line-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.auth-wrap {
  position: fixed;
  inset: 0;
  z-index: 900;
  padding: 60px 12px 24px;
  overflow-y: auto;
  background: #dfe6ee;
  text-align: center;
}

.auth-card {
  display: inline-table;
  width: 380px;
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--navy-dark);
  box-shadow: 5px 5px 0 rgba(18, 58, 107, 0.25);
  text-align: left;
  border-collapse: collapse;
}

.auth-head {
  padding: 4px 8px;
  background: #1b4c8c;
  background: linear-gradient(#4f86c6, #1b4c8c);
  border-bottom: 1px solid var(--navy-dark);
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.auth-body { padding: 12px; }

.auth-tabs { margin-bottom: 4px; }
.auth-tab {
  padding: 2px 8px;
  background: #e9eef4;
  border: 1px solid #6f8aa6;
  color: var(--ink);
  cursor: pointer;
}
.auth-tab.active {
  background: #ffffff;
  border-bottom-color: #ffffff;
  font-weight: bold;
  color: var(--navy);
}
.tab-sep { color: #9db2c8; padding: 0 3px; }

.form-table { border-collapse: collapse; }
.form-label {
  width: 92px;
  padding: 3px 6px 3px 0;
  text-align: right;
  vertical-align: middle;
  color: var(--navy);
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.form-input { padding: 3px 0; }

.form-actions { margin: 10px 0 0; text-align: right; }

.hint { color: #6b7a89; font-size: 9.5px; line-height: 1.5; }
.hint.right { text-align: right; }
.auth-foot { margin-top: 10px; padding-top: 6px; border-top: 1px dotted var(--line-soft); }

.auth-error {
  margin-top: 8px;
  padding: 5px 6px;
  background: #ffe6e6;
  border: 1px solid #cc6666;
  color: #8a0000;
  font-size: 10.5px;
}
.auth-error.ok {
  background: #e6f5e6;
  border-color: #66aa66;
  color: #0a5d2a;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 30px 10px;
  overflow-y: auto;
  background: rgba(20, 40, 70, 0.55);
  text-align: center;
}

.modal-box {
  display: inline-block;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--navy-dark);
  box-shadow: 5px 5px 0 rgba(18, 58, 107, 0.3);
  text-align: left;
}
.modal-box.wide { max-width: 780px; }
.modal-box.small { max-width: 440px; }

.modal-head {
  padding: 4px 8px;
  background: #1b4c8c;
  background: linear-gradient(#ffffff 0, #4f86c6 3%, #1b4c8c 100%);
  border-bottom: 1px solid var(--navy-dark);
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.modal-head span { float: left; }
.modal-head .linkbtn { float: right; color: #d7e5f5; font-size: 9.5px; font-weight: normal; text-transform: none; letter-spacing: 0; }
.modal-head .linkbtn:hover { color: #ffffff; }

.modal-body { padding: 12px; }
.modal-foot {
  padding: 8px 12px;
  background: var(--panel-alt);
  border-top: 1px solid var(--line-soft);
  text-align: right;
}
.modal-foot .btn { margin-left: 5px; }

.dialog-message {
  margin: 0 0 10px;
  font-size: 11.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.rules-box { max-width: 480px; }

.rules-room {
  margin-bottom: 8px;
  padding: 3px 7px;
  background: #eef3f8;
  border: 1px solid var(--line-soft);
  color: var(--navy);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.rules-text {
  max-height: 260px;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--line-soft);
  box-shadow: inset 1px 1px 2px rgba(18, 58, 107, 0.12);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow-y: auto;
}

.check-row {
  color: var(--ink);
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}
.check-row input { width: auto; margin-right: 5px; vertical-align: middle; }

.pinned-bar {
  display: table;
  width: 100%;
  padding: 4px 8px;
  background: #fdf6d8;
  background: linear-gradient(#fffdf2, #fdf6d8);
  border-bottom: 1px solid #d8c96a;
  box-shadow: inset 0 1px 0 #ffffff;
  font-size: 10.5px;
}
.pinned-bar > * { display: table-cell; vertical-align: middle; }

.pinned-label {
  width: 1%;
  padding-right: 7px;
  color: #7a5a00;
  font-weight: bold;
  font-size: 8.5px;
  letter-spacing: 1.1px;
  white-space: nowrap;
}

.pinned-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #4a3a00;
}

.pinned-bar .linkbtn { padding-left: 8px; width: 1%; white-space: nowrap; }

.pinned-flash { animation: pinned-flash 1.5s ease-in-out; }
@keyframes pinned-flash {
  0% { background: #fdf6d8; }
  50% { background: #ffe98a; }
  100% { background: transparent; }
}

#dialog-confirm.danger {
  background: #c0392b;
  background: linear-gradient(#e07a6a, #c0392b);
  border-color: #800000;
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.field-row { margin: 6px 0; overflow: hidden; }
.field-row label {
  display: block;
  margin-bottom: 2px;
  color: var(--navy);
  font-size: 9.5px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field-block { margin: 9px 0; }
.field-block > label {
  display: block;
  margin-bottom: 3px;
  color: var(--navy);
  font-size: 9.5px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.editor-top-fields { padding-left: 8px; vertical-align: top; }
.short-input,
input.short-input { width: 70px; }

.banner-preview {
  height: 96px;
  margin-bottom: 8px;
  background: #c9d7e5 center / cover no-repeat;
  border: 1px solid var(--line);
}
.banner-grid { margin: 4px 0; }
.banner-tile {
  display: inline-block;
  width: 88px;
  height: 42px;
  margin: 0 4px 4px 0;
  padding: 0;
  background: #c9d7e5 center / cover no-repeat;
  border: 1px solid #6f8aa6;
  color: #333333;
  font-size: 9px;
  cursor: pointer;
  vertical-align: top;
}
.banner-tile.active { outline: 2px solid var(--navy); outline-offset: 0; }

.avatar-preview { width: 58px; height: 58px; }

.swatches { margin: 3px 0; }
.swatch {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin: 0 3px 3px 0;
  padding: 0;
  border: 1px solid #4b5b6b;
  cursor: pointer;
  vertical-align: middle;
}
.swatch.active { outline: 2px solid var(--navy); outline-offset: 0; }

.grad-preview {
  height: 34px;
  margin-bottom: 5px;
  background: #c9d7e5;
  border: 1px solid var(--line);
}
.grad-row { margin: 4px 0; }
.grad-label {
  display: inline-block;
  width: 34px;
  color: var(--navy);
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
}
.grad-row .swatches { display: inline-block; margin: 0; }

.room-icon-row { margin-bottom: 8px; }
.room-icon-preview {
  width: 64px;
  height: 64px;
  background: #c9d7e5 center / cover no-repeat;
  border: 1px solid var(--line);
  color: #6b7a89;
  font-size: 9px;
  line-height: 62px;
  text-align: center;
}

.room-icon {
  width: 14px;
  height: 14px;
  border: 1px solid #6f8aa6;
  object-fit: cover;
  vertical-align: -2px;
}
.channel-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  border: 1px solid #6f8aa6;
  object-fit: cover;
  vertical-align: -3px;
}

.invite-code {
  padding: 0 3px;
  background: #ffffcc;
  border: 1px solid #d8c96a;
  color: #333333;
  font-family: "Courier New", monospace;
  font-size: 9.5px;
}

.admin-section { margin-bottom: 14px; }
.admin-section:last-child { margin-bottom: 0; }
.admin-title {
  margin-bottom: 4px;
  padding: 2px 5px;
  background: #eef3f8;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--navy);
  color: var(--navy);
  font-size: 9.5px;
  font-weight: bold;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.admin-list {
  max-height: 230px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--line-soft);
}

.admin-user, .admin-room {
  padding: 3px 5px;
  border-bottom: 1px dotted var(--line-soft);
  overflow: hidden;
}
.admin-user:last-child, .admin-room:last-child { border-bottom: 0; }
.admin-user .avatar.tiny { margin-right: 3px; }
.admin-name { font-weight: bold; }
.admin-user .rank-select { float: right; width: auto; margin-left: 4px; }
.admin-user .btn, .admin-room .btn { float: right; margin-left: 4px; }
.admin-user .room-role { margin-left: 5px; color: #6b7a89; font-size: 9px; text-transform: uppercase; letter-spacing: 0.4px; }
.admin-room .muted {
  display: block;
  color: #6b7a89;
  font-size: 9.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ban-mark {
  padding: 0 3px;
  margin-left: 4px;
  background: #cc0000;
  color: #ffffff;
  font-size: 8.5px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.admin-row { display: table; width: 100%; margin: 4px 0; border-spacing: 4px 0; }

.muted { color: var(--muted); }
.tiny-pad { padding: 5px 6px; }
.right { text-align: right; }

.bell-wrap { position: relative; display: inline-block; vertical-align: middle; }

.bell-btn {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  padding: 0;
  background: #e9eef4;
  border: 1px solid #123a6b;
  color: #123a6b;
  line-height: 18px;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
}
.bell-btn:hover { background: #ffffff; }
.bell-btn.has-unread { color: #cc0000; }

.bell-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  padding: 0 2px;
  background: #cc0000;
  border: 1px solid #800000;
  color: #ffffff;
  font-family: Verdana, sans-serif;
  font-size: 8.5px;
  font-weight: bold;
  line-height: 12px;
  text-align: center;
}

.bell-panel {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1200;
  width: 310px;
  margin-top: 3px;
  background: #ffffff;
  border: 1px solid var(--navy-dark);
  box-shadow: 4px 4px 0 rgba(18, 58, 107, 0.3);
  text-align: left;
  white-space: normal;
}

.bell-head {
  padding: 3px 6px;
  background: #1b4c8c;
  background: linear-gradient(#4f86c6, #1b4c8c);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: bold;
  letter-spacing: 0.8px;
  overflow: hidden;
}
.bell-head span { float: left; }
.bell-head .linkbtn { float: right; color: #d7e5f5; font-size: 9px; font-weight: normal; letter-spacing: 0; }
.bell-head .linkbtn:hover { color: #ffffff; }

.bell-list { max-height: 300px; overflow-y: auto; }

.bell-item {
  display: block;
  width: 100%;
  padding: 5px 7px;
  border: 0;
  border-bottom: 1px dotted var(--line-soft);
  background: #ffffff;
  color: #333333;
  font: inherit;
  font-size: 10.5px;
  text-align: left;
  cursor: pointer;
}
.bell-item:hover { background: #eef4fb; }
.bell-item.unread { background: #fffbe0; }
.bell-item:last-child { border-bottom: 0; }

.bell-kind {
  display: inline-block;
  margin-right: 4px;
  padding: 0 3px;
  background: #eef3f8;
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 8.5px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.bell-body { display: block; margin-top: 1px; }
.bell-time { display: block; margin-top: 1px; color: #7a8a9a; font-size: 9px; }
.bell-empty { padding: 9px; color: #7a8a9a; font-size: 10.5px; font-style: italic; }

#mobile-nav { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 2000;
  width: 440px;
  max-width: 92vw;
  margin-left: -220px;
  padding: 6px 10px;
  background: #ffffcc;
  border: 1px solid #333333;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
  color: #1a1a1a;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 1040px) {
  .col-right { display: none; }
  .col-left { width: 175px; }
}

@media (max-width: 760px) {
  body { font-size: 12px; }
  .top-banner { padding: 8px 10px; }
  .top-banner table, .top-banner tbody, .top-banner tr, .top-banner td { display: block; width: auto; }
  .brand { font-size: 19px; }
  .tagline { display: none; }
  .top-right { margin-top: 6px; text-align: left; white-space: normal; }
  .top-right .btn { margin: 2px 2px 2px 0; }
  .header-me { display: none; }

  .page-body { padding: 8px 8px 0; }

  .layout, .layout > tbody, .layout > tbody > tr, .layout > tbody > tr > td { display: block; width: auto; }
  .col-left, .col-mid, .col-right { display: block; width: auto; padding: 0; }
  .layout .sidebar { display: none; }

  .messages { height: calc(100vh - 292px); min-height: 280px; }
  .modal { padding: 12px 6px; }
  .modal-box { display: block; }
  .banner-grid .banner-tile { width: 31%; }
  .form-label { width: 78px; }
  .toast { left: 8px; right: 8px; width: auto; margin-left: 0; max-width: none; bottom: 66px; }
  .bell-panel { position: fixed; top: 52px; right: 8px; left: 8px; width: auto; }

  #mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    display: flex;
    padding-bottom: env(safe-area-inset-bottom);
    background: linear-gradient(#3e74b8, #1b4c8c);
    border-top: 1px solid #123a6b;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.35);
  }

  .mobile-nav-item {
    flex: 1 1 0;
    min-height: 54px;
    padding: 6px 2px;
    background: transparent;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    color: #d7e5f5;
    font: inherit;
    font-size: 10.5px;
    font-weight: bold;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
  }
  .mobile-nav-item:first-child { border-left: 0; }
  .mobile-nav-item:hover,
  .mobile-nav-item:focus { background: rgba(255, 255, 255, 0.12); color: #ffffff; outline: none; }
  .mobile-nav-item.active {
    background: #123a6b;
    color: #ffffff;
    box-shadow: inset 0 3px 0 #ffd700;
  }

  .page-body { padding-bottom: 66px; }
  .site-footer { padding-bottom: 78px; }
  #message-input {
    font-size: 16px;
    padding: 7px 8px;
  }
  input[type="text"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px;
  }
  .btn,
  .linkbtn { font-size: 12px; }
  .btn.tiny { padding: 3px 8px; font-size: 11px; }
  .msg { font-size: 13px; }
  .side-item,
  .directory-row,
  .admin-user { padding-top: 5px; padding-bottom: 5px; }
}

::selection { background: #2b5c9e; color: #ffffff; }
::-moz-selection { background: #2b5c9e; color: #ffffff; }

.box { box-shadow: 0 2px 3px rgba(18, 58, 107, 0.14), 0 1px 0 #ffffff; }

.box-body { box-shadow: inset 0 1px 0 #ffffff; }

.side-item.active { box-shadow: inset 3px 0 0 var(--navy); }

.msg:nth-child(even):not(.mine):not(.system) { background: #fcfdff; }

.composer-row .row-cell input,
.find-row input,
.field-row input,
textarea,
select,
.auth-card input {
  box-shadow: inset 1px 1px 2px rgba(18, 58, 107, 0.18);
}

.avatar {
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, 0.4),
    inset -1px -1px 2px rgba(0, 0, 0, 0.35),
    0 1px 1px rgba(0, 0, 0, 0.18);
}

.statusbar {
  background: linear-gradient(#fbfdff, #d9e3ee);
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 1px rgba(18, 58, 107, 0.12);
}

.site-footer { position: relative; }
.site-footer::before {
  content: '';
  display: block;
  width: 148px;
  height: 2px;
  margin: 0 auto 12px;
  background: linear-gradient(90deg, transparent, var(--navy), transparent);
}

.btn.primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3); }

.brand {
  text-shadow:
    1px 1px 0 #0c2c53,
    2px 2px 0 #123a6b,
    3px 3px 3px rgba(0, 0, 0, 0.35);
}

.admin-signed-in {
  margin-bottom: 8px;
  padding: 5px 8px;
  background: #eef3f8;
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10px;
}

#admin-modal .modal-box { max-width: 640px; }

.admin-tabs {
  overflow: hidden;
  margin: -12px -12px 12px;
  padding: 7px 10px 0;
  background: linear-gradient(#fbfdff, #dfe8f2);
  border-bottom: 1px solid var(--navy-dark);
}

.admin-tab {
  float: left;
  margin-right: 3px;
  padding: 4px 11px;
  background: #dfe8f2;
  border: 1px solid #9db2c8;
  border-bottom: 0;
  color: var(--navy);
  font: inherit;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  cursor: pointer;
}
.admin-tab:hover { background: #eef4fb; color: var(--navy-dark); }
.admin-tab.active {
  background: #ffffff;
  border-bottom: 1px solid #ffffff;
  margin-bottom: -1px;
  color: var(--navy-dark);
}

.rank-admin, .rank-owner { border-bottom: 1px dotted currentColor; }
