@import url("/css/game-invitations.css");
@import url("/css/user-profile.css");
:root {
  --bg: #e7eef5;
  --surface: #fff;
  --fg: #15283b;
  --accent: #126b85;
  --line: #cbd7e2;
  --muted: #617487;
  --soft: #f2f6fa;
  --radius: 14px;
  font-family:
    Segoe UI,
    Tahoma,
    Arial,
    sans-serif;
  color: var(--fg);
  background: var(--bg);
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
.skip-link { position: fixed; inset-block-start: -100px; inset-inline-start: 12px; z-index: 1000; padding: 12px; background: #fff; color: #123e66; }
.skip-link:focus { inset-block-start: 8px; }
.content.color-blue { color: #174d94; background: #fff; }
.content.color-green { color: #246435; background: #fff; }
.content.color-purple { color: #703699; background: #fff; }
.content.color-red { color: #a22d37; background: #fff; }
.content.text-large { font-size: 1.2rem; }
.role-badge { border: 1px solid currentColor; border-radius: 4px; padding: 1px 4px; font-size: .75rem; }
.retention-panel { margin-block-start: 24px; padding: 16px; overflow-wrap: anywhere; }
.pool, .playing-card, .tile { direction: ltr; }
[dir=ltr] { unicode-bidi: isolate; }
summary:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid #126b85; outline-offset: 2px; }
body {
  font-family: var(--chat-font, system-ui, sans-serif);
  margin: 0;
  min-width: 280px;
}
.presentation-moderator strong {
  color: #944415;
  background: #fff;
}
.presentation-speaker strong {
  color: #6d38a8;
  background: #fff;
}
a {
  color: var(--accent);
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 9px 13px;
  cursor: pointer;
  transition: background 0.15s;
}
button:hover {
  background: var(--soft);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary,
.primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
button.danger {
  color: #b83244;
}
button.quiet {
  background: transparent;
  border-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #c09136;
  outline-offset: 2px;
}
input,
select,
textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: var(--surface);
  width: 100%;
}
input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--accent);
}
input[type="color"] {
  height: 44px;
}
textarea {
  resize: vertical;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h2 {
  font-size: 1.3rem;
}
h3 {
  font-size: 1rem;
}
.muted,
small {
  color: var(--muted);
}
.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}
.topbar {
  background: var(--surface);
  min-height: 82px;
  padding: 14px 3vw;
  display: flex;
  align-items: center;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  white-space: nowrap;
}
.brand-mark {
  background: var(--accent);
  color: #fff;
  border-radius: 11px;
  padding: 8px 12px;
  font-size: 1.4rem;
  font-weight: 800;
}
.brand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.13em;
}
.brand small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  margin-top: 2px;
}
.topbar nav {
  display: flex;
  gap: 8px;
}
.topbar nav a {
  padding: 9px 13px;
  color: var(--muted);
  font-weight: 600;
  border-radius: 8px;
}
.topbar nav a.active {
  color: var(--accent);
  background: var(--soft);
}
.top-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}
.connection {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  margin-inline-end: 10px;
}
.connection::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #b8c0cb;
  border-radius: 50%;
  margin-inline-end: 6px;
}
.connection.online::before {
  background: #18956e;
}
.signed-out #settings-top,
.signed-out #signout,
.signed-out #connection {
  display: none;
}
.login-layout {
  max-width: 1110px;
  margin: 7vh auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 15px 50px #182d4210;
}
.welcome {
  background: #123d51;
  color: #fff;
  padding: 48px;
  position: relative;
}
.welcome .eyebrow {
  color: #91c4d1;
  margin-top: 38px;
}
.welcome h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.13;
  letter-spacing: -0.045em;
  max-width: 400px;
}
.welcome p:not(.eyebrow) {
  color: #bdceda;
  line-height: 1.75;
  max-width: 350px;
}
.heritage {
  display: inline-flex;
  padding: 7px 11px;
  background: white;
  border-radius: 8px;
}
.heritage img {
  width: 150px;
  height: auto;
}
.icon-mosaic {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 280px;
  margin: 32px 0;
}
.icon-mosaic img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  background: #ffffffee;
  padding: 4px;
  border-radius: 7px;
  box-shadow: 4px 4px 0 #081c2870;
}
.welcome-links {
  display: flex;
  gap: 26px;
}
.welcome-links a {
  color: #a3dfdf;
  font-size: 0.85rem;
}
.login-form {
  padding: 48px;
  display: grid;
  gap: 18px;
}
.login-form h2 {
  font-size: 1.7rem;
  margin: 0;
}
.login-form p {
  margin: 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 0;
}
.check-field {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.field input,
.field textarea,
.field select {
  font-weight: 400;
  font-size: 0.94rem;
}
.field:has(textarea) {
  grid-column: 1/-1;
}
.page {
  padding: 22px 3vw;
  max-width: 1800px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.page-heading h1 {
  font-size: 1.65rem;
  letter-spacing: -0.025em;
  margin-bottom: 5px;
}
.page-heading p {
  margin: 0;
}
.badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 0.7rem;
  background: var(--soft);
  color: var(--muted);
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  overflow: hidden;
}
.panel-heading {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel-heading h2 {
  margin: 0;
  font-size: 0.95rem;
}
.chat-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 220px;
  gap: 16px;
  min-height: 650px;
  height: calc(100vh - 205px);
}
.room-sidebar,
.people-sidebar {
  display: flex;
  flex-direction: column;
}
.list {
  overflow-y: auto;
  min-height: 0;
  padding: 8px;
}
.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  text-align: start;
  border-radius: 8px;
  margin-bottom: 3px;
  padding: 12px 9px;
  background: transparent;
  min-width: 0;
}
.list-item.active {
  background: var(--soft);
  color: var(--accent);
}
.list-item .item-main {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.list-item small {
  display: block;
  margin-top: 4px;
  font-size: 0.7rem;
}
.list-item img.avatar {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.list-item img.rank {
  max-width: 25px;
  max-height: 15px;
  object-fit: contain;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.chat-room-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.room-symbol {
  font-size: 1.8rem;
  color: var(--accent);
  font-weight: 300;
}
.chat-room-heading h2 {
  font-size: 1.08rem;
  margin: 0 0 4px;
}
.chat-room-heading p {
  font-size: 0.75rem;
  margin: 0;
  color: var(--muted);
}
.messages {
  overflow: auto;
  padding: 20px;
  flex: 1;
  min-height: 100px;
  scroll-behavior: smooth;
}
.message {
  display: flex;
  /* Physical message layout is independent of UI and text language. */
  direction: ltr;
  flex-direction: row;
  text-align: left;
  gap: 10px;
  padding: 9px 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.message img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-top: 2px;
}
.message .body {
  flex: 1;
  min-width: 0;
  direction: ltr;
  text-align: left;
}
.message .byline {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 10px;
  font-size: 0.82rem;
}
.message time {
  font-size: 0.66rem;
  color: var(--muted);
}
.message .content {
  white-space: pre-wrap;
  text-align: left;
  unicode-bidi: plaintext;
}
.message.system,
.message.digicast,
.message.bot {
  font-size: 0.85rem;
  border-inline-start: 3px solid var(--line);
  padding-inline-start: 12px;
  margin: 6px 0;
  color: var(--muted);
}
.message .emoticon {
  display: inline;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin: 0;
}
.composer {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
  background: var(--soft);
}
.composer form {
  display: flex;
  gap: 8px;
}
.composer :is(input, textarea) {
  background: var(--surface);
}
.composer-hint {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 8px;
}
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tabs button {
  font-size: 0.77rem;
  padding: 7px 9px;
}
.tabs button.active {
  background: var(--soft);
  color: var(--accent);
}
.empty {
  padding: 30px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.banner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.banner img {
  max-width: 300px;
  max-height: 45px;
  object-fit: contain;
}
.events-strip {
  font-size: 0.8rem;
  padding: 12px 0;
  display: flex;
  gap: 20px;
  overflow: auto;
}
.modal {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--fg);
  padding: 0;
  width: min(580px, calc(100vw - 30px));
  max-height: 88vh;
  box-shadow: 0 20px 80px #142f4455;
}
.modal::backdrop {
  background: #0b213888;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  gap: 12px;
}
.dialog-head h2 {
  margin: 0;
}
.modal > form,
.modal > .dialog-content {
  padding: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.wide {
  grid-column: 1/-1;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 12px 20px;
}
.form-grid .actions {
  padding: 5px 0 0;
}
.dialog-content p {
  overflow-wrap: anywhere;
}
.icon-picker {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.icon-picker button {
  padding: 6px;
}
.icon-picker img {
  width: 24px;
  height: 24px;
}
.icon-picker .selected {
  outline: 2px solid var(--accent);
}
#toasts {
  position: fixed;
  bottom: 22px;
  inset-inline-end: 20px;
  z-index: 10000;
  display: grid;
  gap: 10px;
  max-width: min(440px, calc(100vw - 40px));
}
.toast {
  padding: 14px 18px;
  border-radius: 9px;
  background: #163a4d;
  color: white;
  box-shadow: 0 5px 25px #0003;
  overflow-wrap: anywhere;
}
.toast.error {
  background: #912d43;
}
.pm-dock {
  position: fixed;
  bottom: 0;
  inset-inline-end: 20px;
  display: flex;
  gap: 10px;
  z-index: 10;
  max-width: calc(100vw - 40px);
  align-items: flex-end;
}
.pm-window {
  width: 300px;
  max-width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 0 35px #1b344629;
  overflow: hidden;
}
.pm-window header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--accent);
  color: white;
}
.pm-window header button {
  color: inherit;
  padding: 5px 8px;
}
.pm-window .pm-history {
  height: 180px;
  overflow: auto;
  padding: 12px;
  font-size: 0.83rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.pm-history .pm-message {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 6px;
  margin: 0;
  padding: 3px 0;
  direction: ltr;
  text-align: left;
}
.pm-message .pm-avatar {
  grid-column: 1;
  grid-row: 1 / 3;
}
.pm-message .byline,
.pm-message .content {
  grid-column: 2;
  display: block;
  text-align: left;
}
.pm-message .content {
  unicode-bidi: plaintext;
}
.pm-window form {
  display: flex;
  gap: 5px;
  padding: 8px;
}
.pm-window.minimized .pm-history,
.pm-window.minimized form {
  display: none;
}
.admin-layout {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  gap: 20px;
}
.admin-nav {
  padding: 10px;
  max-height: calc(100vh - 190px);
  overflow: auto;
}
.admin-nav button {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  font-size: 0.85rem;
  padding: 10px 12px;
}
.admin-nav button.active {
  color: var(--accent);
  background: var(--soft);
  font-weight: 650;
}
.admin-content {
  padding: 22px;
  min-height: 650px;
}
.content-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}
.content-toolbar input {
  width: 220px;
}
.table-wrap {
  overflow: auto;
  width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: start;
}
th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: start;
  max-width: 340px;
  overflow-wrap: anywhere;
}
th {
  font-weight: 600;
  color: var(--muted);
  background: var(--soft);
}
td button {
  padding: 5px 8px;
  font-size: 0.76rem;
  margin: 2px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.metric-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.metric-card strong {
  display: block;
  font-size: 1.8rem;
  margin: 7px 0;
}
.metric-card span {
  font-size: 0.8rem;
  color: var(--muted);
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.game-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.game-card h3 {
  margin: 0;
  font-size: 1.1rem;
}
.game-card p {
  margin: 0;
  font-size: 0.8rem;
}
.game-symbol {
  font-size: 2.2rem;
  color: var(--accent);
}
.game-card .actions {
  padding: 10px 0 0;
  justify-content: flex-start;
}
.game-stage {
  padding: 24px;
  margin: 20px 0;
}
.table-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 25px;
}
.game-controls {
  display: grid;
  gap: 13px;
  align-content: start;
}
.board-wrap {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 15px;
}
.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(100%, 540px);
  aspect-ratio: 1;
  border: 5px solid #526b76;
  border-radius: 4px;
  direction: ltr;
}
.chess-square {
  border: 0;
  border-radius: 0;
  padding: 0;
  aspect-ratio: 1;
  background: #edf1e4;
  position: relative;
  font-size: clamp(24px, 3.5vw, 49px);
  font-family: Georgia, serif;
  color: #0f1c29;
}
.chess-square.dark {
  background: #829ca6;
}
.chess-square:disabled {
  opacity: 1;
}
.pm-dock {
  overflow-x: auto;
}
.status-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: middle;
  margin-inline-end: 4px;
}
.chess-square.light-piece {
  color: #fff;
  text-shadow:
    1px 1px #182734,
    -1px -1px #182734,
    1px -1px #182734,
    -1px 1px #182734;
}
.chess-square.selected {
  box-shadow: inset 0 0 0 4px #c99838;
}
.chess-square.legal::after {
  content: "";
  position: absolute;
  width: 18%;
  height: 18%;
  border-radius: 50%;
  background: #173e66aa;
  left: 41%;
  top: 41%;
}
.cards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 12px 0;
  direction: ltr;
}
.playing-card {
  min-width: 49px;
  height: 72px;
  border: 1px solid #a7b8c2;
  border-radius: 7px;
  background: #fff;
  color: #183242;
  display: grid;
  place-content: center;
  font-size: 1.3rem;
  box-shadow: 1px 3px 0 #294d6520;
}
.playing-card.red {
  color: #ad3852;
}
.playing-card.back {
  background: repeating-linear-gradient(
    45deg,
    #315b76 0px,
    #315b76 4px,
    #3b6c8e 4px,
    #3b6c8e 8px
  );
  color: white;
}
.felt {
  background: #1b5e50;
  border: 8px solid #526b76;
  border-radius: 80px;
  min-height: 210px;
  width: 100%;
  display: grid;
  place-content: center;
  padding: 22px;
  color: #fff;
}
.seats {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 15px 0;
}
.seat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  text-align: center;
  min-width: 125px;
}
.seat.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
canvas.pool {
  width: 100%;
  max-width: 850px;
  border: 10px solid #786044;
  border-radius: 16px;
  background: #19614f;
  direction: ltr;
}
.backgammon-board {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  width: 100%;
  gap: 3px;
  background: #b68c58;
  padding: 10px;
  direction: ltr;
  border: 7px solid #6c5036;
  border-radius: 9px;
}
.point {
  height: 150px;
  position: relative;
  background: linear-gradient(
    80deg,
    transparent 45%,
    #e6d2a2 46%,
    #e6d2a2 55%,
    transparent 56%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.72rem;
  color: #2e2213;
}
.point:nth-child(even) {
  background: linear-gradient(
    80deg,
    transparent 45%,
    #714831 46%,
    #714831 55%,
    transparent 56%
  );
}
.checker {
  width: clamp(12px, 2.1vw, 27px);
  height: clamp(12px, 2.1vw, 27px);
  border: 1px solid #6b5639;
  border-radius: 50%;
  background: #f8efd8;
}
.checker.black {
  background: #32291f;
  border-color: #100d09;
}
.tile {
  font-size: 1.4rem;
  padding: 10px;
  background: #fffdf2;
  color: #292b22;
  border: 1px solid #a2a89a;
  border-radius: 6px;
  display: inline-block;
  direction: ltr;
}
.bowling-lane {
  height: 280px;
  width: min(260px, 100%);
  background: repeating-linear-gradient(
    90deg,
    #ddbc87 0px,
    #ddbc87 22px,
    #c5a574 23px,
    #ddbc87 24px
  );
  border-inline: 20px solid #716253;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 30px;
}
.pins {
  font-size: 1.8rem;
  line-height: 1.3;
  text-align: center;
  color: #fff;
  text-shadow: 1px 1px #333;
}
.bowling-ball {
  font-size: 3rem;
}
.roulette-wheel {
  border-radius: 50%;
  border: 12px solid #ac8753;
  width: 210px;
  height: 210px;
  background: repeating-conic-gradient(
    #963d41 0deg 9.7deg,
    #1a2732 9.7deg 19.4deg
  );
  display: grid;
  place-items: center;
  margin: auto;
}
.roulette-wheel strong {
  background: #20604e;
  color: white;
  padding: 20px;
  border-radius: 50%;
  font-size: 2rem;
}
.bracket {
  display: flex;
  gap: 20px;
  overflow: auto;
  padding: 15px 0;
}
.bracket-round {
  min-width: 200px;
}
.match {
  padding: 14px;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.8rem;
}
.match strong {
  display: block;
  margin: 4px 0;
}
.footer-note {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 15px 0;
  text-align: center;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
}
.permission-grid {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
  align-items: center;
}
.lite .room-sidebar {
  display: none;
}
.lite .chat-layout {
  grid-template-columns: minmax(0, 1fr) 190px;
}
.lite .banner,
.lite .avatar,
.lite .rank {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .topbar {
    gap: 16px;
    padding: 12px 20px;
    flex-wrap: wrap;
  }
  .top-actions {
    margin-inline-start: auto;
  }
  .connection {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .chat-layout {
    grid-template-columns: 170px minmax(0, 1fr) 180px;
    gap: 10px;
  }
  .page {
    padding: 18px;
  }
  .topbar nav a {
    padding: 8px;
  }
  .login-layout {
    margin: 35px 25px;
  }
  .table-layout {
    grid-template-columns: minmax(0, 1fr) 230px;
  }
  .admin-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .topbar {
    gap: 12px;
    padding: 12px 16px;
  }
  .brand strong {
    font-size: 0.83rem;
  }
  .brand-mark {
    padding: 6px 10px;
  }
  .topbar nav {
    order: 3;
    width: 100%;
    border-top: 1px solid var(--line);
    padding-top: 9px;
    justify-content: space-between;
  }
  .topbar nav a {
    font-size: 0.85rem;
  }
  .top-actions {
    font-size: 0.72rem;
  }
  .top-actions button {
    padding: 7px;
  }
  .login-layout {
    margin: 20px 15px;
    display: block;
  }
  .welcome {
    padding: 28px;
  }
  .welcome h1 {
    font-size: 2rem;
    max-width: 100%;
  }
  .welcome .eyebrow {
    margin-top: 22px;
  }
  .welcome p:not(.eyebrow) {
    max-width: 100%;
    margin-bottom: 0;
  }
  .welcome .icon-mosaic,
  .welcome-links {
    display: none;
  }
  .login-form {
    padding: 28px;
  }
  .page {
    padding: 16px 12px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
  }
  .page-heading h1 {
    font-size: 1.3rem;
  }
  .page-heading p {
    font-size: 0.78rem;
  }
  .banner {
    display: none;
  }
  .chat-layout,
  .lite .chat-layout {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 0;
    gap: 12px;
  }
  .room-sidebar {
    display: block;
  }
  .room-sidebar .panel-heading,
  .room-sidebar .sidebar-bottom {
    display: none;
  }
  .room-sidebar .list {
    display: flex;
    overflow-x: auto;
    padding: 6px;
    gap: 6px;
  }
  .room-sidebar .list-item {
    width: auto;
    white-space: nowrap;
    padding: 8px 12px;
    flex-shrink: 0;
  }
  .room-sidebar .list-item small {
    display: none;
  }
  .chat-main {
    height: 58vh;
    min-height: 340px;
  }
  .people-sidebar .list {
    display: flex;
    overflow-x: auto;
    max-height: 120px;
  }
  .people-sidebar .list-item {
    width: 160px;
    flex-shrink: 0;
  }
  .people-sidebar .sidebar-bottom {
    display: none;
  }
  .messages {
    padding: 12px;
  }
  .chat-room-heading {
    padding: 13px;
  }
  .composer {
    padding: 10px;
  }
  .events-strip {
    display: block;
  }
  .events-strip > * {
    margin-bottom: 7px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .pm-dock {
    inset-inline-end: 10px;
    max-width: calc(100vw - 20px);
    gap: 4px;
  }
  .pm-window {
    width: 280px;
  }
  .pm-window.minimized {
    width: 75px;
  }
  .pm-window.minimized header {
    overflow: hidden;
  }
  .pm-window.minimized header button:not(:first-child) {
    display: none;
  }
  .pm-window.minimized header button:first-child {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .admin-nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    max-height: none;
  }
  .admin-nav button {
    width: auto;
    white-space: nowrap;
    padding: 8px 10px;
  }
  .admin-content {
    padding: 14px;
    min-height: 500px;
  }
  .content-toolbar input {
    width: 100%;
  }
  .table-layout {
    grid-template-columns: 1fr;
  }
  .game-stage {
    padding: 14px;
  }
  .game-controls {
    grid-template-columns: 1fr 1fr;
  }
  .game-controls .actions {
    grid-column: 1/-1;
  }
  .chess-square {
    font-size: 34px;
  }
  .chess-board {
    width: 100%;
  }
  .felt {
    border-radius: 40px;
    padding: 15px;
  }
  .playing-card {
    min-width: 38px;
    height: 58px;
    font-size: 1rem;
  }
  .point {
    height: 105px;
  }
  .checker {
    width: 17px;
    height: 17px;
  }
  .icon-picker {
    grid-template-columns: repeat(6, 1fr);
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .game-grid {
    grid-template-columns: 1fr;
  }
  .game-controls > p {
    grid-column: 1/-1;
  }
  .page-heading .actions {
    padding: 0;
    justify-content: flex-start;
  }
  .modal .actions {
    padding: 12px;
  }
  .footer-note {
    line-height: 1.6;
  }
}
