/*EM MEMÓRIA DE JOSÉ PINTO DE CARVALHO FILHO (★ 1925 † 2011)\\*/

/*
 * Chrome follows the SELECTED Tema, never the OS (Thiago's ruling,
 * 2026-08-20): js/ui/chrome_theme.js buckets the theme's background into
 * light/dark and js/ui/game_window.js sets data-theme plus --wc-bg/--wc-fg/
 * --wc-accent/--ru-peg on <html>. The attribute selector outranks the
 * vendor's `prefers-color-scheme` block in both directions; the bare
 * `color-scheme` below only covers the flash before the first paint.
 */
:root {
  color-scheme: light dark;
  --ru-accent-ink: #ffffff;
  --ru-peg: #8090cd;
  --ru-radius: 16px;
  --ru-font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --wc-muted: #636b7a;
  --wc-border: rgba(20, 24, 40, 0.1);
  --wc-panel: rgba(20, 24, 40, 0.035);
  --ru-strong: #171a22;
  --ru-raised: #ffffff;
  --ru-shadow: 0 1px 2px rgba(20, 24, 40, 0.06), 0 8px 24px rgba(20, 24, 40, 0.07);
  --ru-ok: #17753a;
  --ru-danger: #b3261e;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --wc-muted: #a3a3ad;
  --wc-border: rgba(255, 255, 255, 0.1);
  --wc-panel: rgba(255, 255, 255, 0.045);
  --ru-strong: #f1f1f4;
  --ru-raised: #1d1d21;
  --ru-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.45);
  --ru-ok: #5fd68d;
  --ru-danger: #ff8a80;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--ru-font);
  background:
    radial-gradient(1100px 520px at 50% -180px, color-mix(in srgb, var(--ru-peg) 18%, transparent), transparent 70%),
    var(--wc-bg, #fff);
  background-attachment: fixed;
  color: var(--ru-strong, #171a22);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

#app {
  flex: 1;
}

#memorial {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--wc-muted);
  text-align: center;
  padding: 1.25rem 1rem 1rem;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--wc-accent) 60%, transparent);
  outline-offset: 2px;
}

/* ---- shell ------------------------------------------------------------ */

.ru-app {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 28px);
}

.ru-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 18px;
}

.ru-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.ru-brand h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ru-brand > span:last-child {
  color: var(--wc-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.ru-logo {
  align-self: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 55%),
    radial-gradient(circle at 50% 55%, transparent 55%, rgba(0, 0, 0, 0.28)),
    var(--ru-peg);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.ru-top__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ru-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
}

.ru-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ru-stage > * {
  width: min(100%, 640px, max(300px, 100dvh - 318px));
}

.ru-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---- buttons (on top of the vendor's .wc-btn) -------------------------- */

.wc-btn {
  font: inherit;
  font-weight: 600;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--wc-border);
  background: var(--ru-raised);
  color: var(--ru-strong);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.wc-btn:hover:not([disabled]) {
  background: color-mix(in srgb, var(--wc-accent) 9%, var(--ru-raised));
}

.wc-btn:active:not([disabled]) {
  transform: scale(0.97);
}

.wc-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.wc-btn--primary {
  background: var(--wc-accent);
  border-color: transparent;
  color: var(--ru-accent-ink);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--wc-accent) 35%, transparent);
}

.wc-btn--primary:hover:not([disabled]) {
  background: color-mix(in srgb, var(--wc-accent) 88%, var(--ru-strong));
}

.wc-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ru-strong);
}

:root[data-theme="light"] .wc-btn--ghost {
  color: var(--wc-accent);
}

/* ---- stats ------------------------------------------------------------- */

.ru-stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
}

.ru-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--wc-panel);
  border: 1px solid var(--wc-border);
  min-width: 0;
}

.ru-stat__label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--wc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ru-stat__value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
}

.ru-stat__extra {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wc-muted);
}

.ru-stat__extra .ru-stat__label {
  letter-spacing: 0.03em;
  text-transform: none;
  font-size: inherit;
}

/* ---- board ------------------------------------------------------------- */

.ru-board {
  position: relative;
  aspect-ratio: 1;
}

.ru-board canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  touch-action: manipulation;
  user-select: none;
}

.ru-board canvas:focus-visible {
  outline-offset: 4px;
}

.ru-result {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(86%, 340px);
  padding: 22px 20px 18px;
  border-radius: 22px;
  text-align: center;
  background: color-mix(in srgb, var(--ru-raised) 86%, transparent);
  border: 1px solid var(--wc-border);
  box-shadow: var(--ru-shadow);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  animation: ru-pop 0.38s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

.ru-result__title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ru-ok);
}

.ru-result__summary {
  margin-top: 4px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ru-result__record {
  margin-top: 4px;
  min-height: 1.2em;
  font-size: 0.86rem;
  color: var(--wc-muted);
}

.ru-result__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

@keyframes ru-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.9);
  }
}

.ru-message {
  min-height: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  border-radius: 999px;
  text-align: center;
  font-weight: 650;
  font-size: 0.95rem;
  color: var(--wc-muted);
}

.ru-message[data-tone="ok"] {
  color: var(--ru-ok);
  background: color-mix(in srgb, var(--ru-ok) 12%, transparent);
}

.ru-message[data-tone="danger"] {
  color: var(--ru-danger);
  background: color-mix(in srgb, var(--ru-danger) 12%, transparent);
}

/* ---- toolbar ----------------------------------------------------------- */

.ru-toolbar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.ru-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 58px;
  padding: 8px 4px;
  font-size: 0.78rem;
  line-height: 1.1;
  border-radius: 14px;
}

.ru-tool::before {
  content: "";
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: var(--ru-icon) center / contain no-repeat;
  mask: var(--ru-icon) center / contain no-repeat;
}

.ru-tool[aria-disabled="true"] {
  opacity: 0.45;
}

[data-field="undo"] {
  --ru-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5'/%3E%3Cpath d='M4 9h10a6 6 0 0 1 0 12h-3'/%3E%3C/svg%3E");
}

[data-field="redo"] {
  --ru-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 14 5-5-5-5'/%3E%3Cpath d='M20 9H10a6 6 0 0 0 0 12h3'/%3E%3C/svg%3E");
}

[data-field="hint"] {
  --ru-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4'/%3E%3Cpath d='M12 3a6 6 0 0 0-4 10.5c.8.8 1.2 1.5 1.3 2.5h5.4c.1-1 .5-1.7 1.3-2.5A6 6 0 0 0 12 3Z'/%3E%3C/svg%3E");
}

[data-field="solve"] {
  --ru-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9Z'/%3E%3Cpath d='M19 16v4M17 18h4'/%3E%3C/svg%3E");
}

[data-field="cancel"] {
  --ru-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 9 6 6M15 9l-6 6'/%3E%3C/svg%3E");
}

[data-field="new"] {
  --ru-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.3-5.6'/%3E%3Cpath d='M20 4v4h-4'/%3E%3C/svg%3E");
}

.ru-shortcuts {
  margin: 0;
  text-align: center;
  font-size: 0.76rem;
  color: var(--wc-muted);
}

@media (hover: none) {
  .ru-shortcuts {
    display: none;
  }
}

/* ---- side cards -------------------------------------------------------- */

.ru-card {
  padding: 16px;
  border-radius: var(--ru-radius);
  background: var(--wc-panel);
  border: 1px solid var(--wc-border);
}

.ru-card__title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--wc-muted);
}

.ru-card .wc-field {
  margin-bottom: 12px;
}

.ru-card .wc-field:last-child {
  margin-bottom: 0;
}

.wc-field__label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ru-strong);
}

.ru-app select,
.ru-app input[type="text"] {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  font: inherit;
  color: var(--ru-strong);
  background-color: var(--ru-raised);
  border: 1px solid var(--wc-border);
  border-radius: 12px;
}

.ru-app select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888c99' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.ru-app select[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.ru-help {
  margin: -4px 0 14px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--wc-muted);
}

[data-field="gallery"] {
  min-height: 32px;
  margin: -6px 0 6px -10px;
  padding: 4px 10px;
  font-size: 0.84rem;
}

.ru-goal {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--wc-border);
  font-size: 0.88rem;
}

.ru-goal__label {
  color: var(--wc-muted);
}

.ru-goal > :last-child {
  font-weight: 600;
  text-align: right;
}

.rugw-about h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.rugw-about h4 {
  margin: 14px 0 6px;
  font-size: 0.9rem;
}

.rugw-about ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--wc-muted);
}

.rugw-about li + li {
  margin-top: 4px;
}

/* ---- dialogs ----------------------------------------------------------- */

.ru-dialog {
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--wc-border);
  border-radius: 22px;
  background: var(--wc-bg);
  color: var(--ru-strong);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.ru-dialog[data-wide] {
  width: min(760px, calc(100vw - 24px));
}

.ru-dialog[open] {
  animation: ru-rise 0.22s ease both;
}

.ru-dialog::backdrop {
  background: rgba(10, 12, 18, 0.5);
  backdrop-filter: blur(3px);
}

@keyframes ru-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.ru-dialog__panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 26px);
  padding: 20px;
}

.ru-dialog__title {
  margin: 0 0 12px;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.ru-dialog__body {
  overflow: auto;
  line-height: 1.5;
}

.ru-dialog__body p {
  margin: 0;
}

.ru-dialog__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.ru-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.ru-gallery__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ru-strong);
  background: var(--wc-panel);
  border: 1px solid var(--wc-border);
  border-radius: 14px;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    border-color 0.15s ease;
}

.ru-gallery__item:hover {
  transform: translateY(-2px);
  border-color: var(--wc-accent);
}

.ru-gallery__item[aria-current="true"] {
  border-color: var(--wc-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--wc-accent) 35%, transparent);
}

.ru-gallery__item canvas {
  width: 100%;
  max-width: 132px;
  height: auto;
  border-radius: 10px;
}

/* ---- online ------------------------------------------------------------ */

.ru-online__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.ru-online__head h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.ru-back::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -2px;
  background: currentColor;
  -webkit-mask: var(--ru-icon) center / contain no-repeat;
  mask: var(--ru-icon) center / contain no-repeat;
  --ru-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m14 6-6 6 6 6'/%3E%3C/svg%3E");
}

.ru-online__home {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ru-online__home > .ru-card:first-child {
  max-width: 360px;
}

.ru-online__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
}

.ru-online__cards .ru-help {
  margin: 0 0 12px;
}

.ru-online__cards .wc-btn {
  margin-top: 4px;
}

.ru-online__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ru-online__wait {
  max-width: 460px;
  margin: 24px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.ru-online__wait .ru-help {
  margin: 0;
}

.ru-code {
  padding: 14px 18px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(1.3rem, 5.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 14px;
  background: var(--ru-raised);
  border: 1px dashed color-mix(in srgb, var(--wc-accent) 60%, var(--wc-border));
  user-select: all;
}

.ru-waiting {
  margin: 4px 0;
  font-weight: 600;
  color: var(--wc-muted);
  animation: ru-pulse 1.6s ease-in-out infinite;
}

@keyframes ru-pulse {
  50% {
    opacity: 0.45;
  }
}

.ru-players {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ru-players li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border-radius: 12px;
  background: var(--ru-raised);
  border: 1px solid var(--wc-border);
  font-weight: 600;
}

.ru-players li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ru-players .wc-btn {
  min-height: 34px;
  margin: 0;
  padding: 4px 12px;
}

.ru-invite {
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--wc-accent) 10%, var(--ru-raised));
  border: 1px solid color-mix(in srgb, var(--wc-accent) 45%, transparent);
}

.ru-invite p {
  margin: 0 0 10px;
  font-weight: 600;
}

.ru-invite__actions {
  display: flex;
  gap: 8px;
}

.ru-match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(16px, 3vw, 28px);
  align-items: start;
}

.ru-match__main,
.ru-match__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ru-online__mode {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.05rem;
}

.ru-online__mode span {
  color: var(--wc-muted);
  font-size: 0.88rem;
}

.ru-duel {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(10px, 2vw, 20px);
  align-items: start;
}

.ru-duel--shared {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

.ru-duel--shared .ru-duel__mine {
  width: min(100%, 560px, max(300px, 100dvh - 300px));
}

.ru-duel--shared > .ru-seat {
  width: min(100%, 560px);
}

.ru-seat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--wc-border);
  background: var(--wc-panel);
}

.ru-seat[data-active="true"] {
  border-color: var(--wc-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--wc-accent) 30%, transparent);
}

.ru-seat__name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ru-seat__stats {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--wc-muted);
  white-space: nowrap;
}

.ru-result--inline {
  position: static;
  transform: none;
  width: auto;
  animation: ru-rise 0.25s ease both;
}

.ru-result__title[data-outcome="loss"] {
  color: var(--ru-danger);
}

.ru-result__title[data-outcome="draw"] {
  color: var(--ru-strong);
}

.ru-chat__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 220px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding-right: 2px;
}

.ru-chat__line {
  align-self: flex-start;
  max-width: 88%;
  padding: 6px 10px;
  border-radius: 12px 12px 12px 4px;
  background: var(--ru-raised);
  border: 1px solid var(--wc-border);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.ru-chat__line[data-mine="true"] {
  align-self: flex-end;
  border-radius: 12px 12px 4px 12px;
  background: color-mix(in srgb, var(--wc-accent) 16%, var(--ru-raised));
}

.ru-chat__row {
  display: flex;
  gap: 8px;
}

.ru-chat__row input {
  flex: 1;
  min-width: 0;
}

/* ---- narrow screens ---------------------------------------------------- */

@media (max-width: 860px) {
  .ru-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .ru-stage > * {
    width: min(100%, 560px);
  }

  .ru-side {
    width: min(100%, 560px);
    margin: 0 auto;
  }

  .ru-match {
    grid-template-columns: minmax(0, 1fr);
  }

  .ru-chat__list {
    height: 140px;
  }
}

@media (max-width: 420px) {
  .ru-top {
    padding: 10px 0 12px;
  }

  .ru-brand > span:last-child {
    display: none;
  }

  .ru-stat {
    padding: 7px 9px;
  }

  .ru-stat__value {
    font-size: 1.12rem;
  }

  .ru-toolbar {
    gap: 6px;
  }

  .ru-tool {
    font-size: 0.7rem;
    min-height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
