.rust-root {
  min-height: 100dvh;
}
.rust-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 5vw;
  border-bottom: 1px solid #d8d8ce;
  gap: 16px;
}
.rust-header nav {
  display: flex;
  gap: 12px;
  align-items: center;
}
.rust-brand {
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -1.5px;
  color: inherit;
  text-decoration: none;
}
.rust-root button,
.rust-root select,
.rust-root input {
  font: inherit;
}
.rust-root button {
  cursor: pointer;
}
.rust-root button:disabled {
  cursor: default;
  opacity: 0.55;
}
.rust-root :focus-visible {
  outline: 3px solid #5159bd;
  outline-offset: 4px;
}
.rust-home {
  max-width: 1440px;
  margin: auto;
}
.rust-room {
  max-width: 1440px;
  margin: auto;
  padding: 20px;
}
.rust-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 0;
}
.rust-roster span {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 15px;
  border: 1px solid #d9d8cf;
  border-radius: 50px;
}
.rust-roster i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.rust-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px;
  background: #f8f6ef;
  border-radius: 12px;
}
.rust-room-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
}
.rust-room-tools button {
  border: 1px solid #c9c7bc;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fffdf7;
  color: #24312d;
}
.rust-room-tools button[aria-pressed="true"] {
  background: #2a4240;
  color: #fffdf7;
}
.rust-toolbar button,
.rust-action {
  border: 1px solid #c9c7bc;
  background: #fffdf7;
  color: #24312d;
  padding: 10px 16px;
  border-radius: 8px;
}
.rust-toolbar button[aria-pressed="true"] {
  background: #2a4240;
  color: white;
}
.rust-canvas {
  height: min(72dvh, 850px);
  min-height: 400px;
  position: relative;
  background: #07111f;
  overflow: hidden;
  margin-top: 16px;
}
.rust-canvas > canvas {
  display: block;
  max-width: 100%;
}
.rust-hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 14px;
  background: #263e3b;
  color: #f9f6ed;
  border-radius: 9px;
  margin-top: 12px;
  gap: 16px;
}
.rust-panel {
  padding: 24px;
  background: #fffcf5;
  border: 1px solid #d2d2c7;
  border-radius: 14px;
}
.rust-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: #14252299;
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 500;
}
.rust-dialog {
  background: #fffdf5;
  border-radius: 18px;
  padding: 28px;
  width: min(100%, 570px);
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 30px 90px #0c262955;
}
.rust-dialog h2 {
  margin-top: 0;
}
.rust-dialog label {
  display: block;
  margin: 16px 0 6px;
}
.rust-dialog input,
.rust-dialog select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  background: white;
  border: 1px solid #b0b9b2;
  border-radius: 8px;
}
.rust-dialog-close {
  float: right;
  background: none;
  border: 0;
  font-size: 24px;
}
.rust-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rust-colors button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
}
.rust-colors button[aria-pressed="true"] {
  outline: 3px solid #233932;
  outline-offset: 3px;
}
.rust-error {
  color: #9c2c38;
  padding: 12px;
  white-space: pre-wrap;
}
.rust-status {
  padding: 12px;
  color: #365754;
}
.rust-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 28px;
}
.rust-stats strong {
  display: block;
  font-size: 30px;
}
.rust-videos {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  overflow: auto;
}
.rust-video {
  flex: 0 0 180px;
  background: #203936;
  border-radius: 12px;
  overflow: hidden;
  color: white;
}
.rust-video video {
  width: 180px;
  height: 130px;
  object-fit: cover;
}
.rust-video span {
  display: block;
  padding: 8px;
}
.rust-speaking {
  outline: 3px solid #6ecf82;
}
.rust-chat {
  position: fixed;
  bottom: 12px;
  right: 12px;
  width: min(380px, calc(100% - 24px));
  z-index: 100;
  background: white;
  box-shadow: 0 5px 50px #163c3c66;
  border-radius: 16px;
  padding: 16px;
}
.rust-chat-log {
  max-height: 40dvh;
  overflow: auto;
}
.rust-chat input {
  padding: 10px;
  width: 70%;
}
.rust-memory-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(50px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.rust-memory-card {
  aspect-ratio: 0.8;
  max-height: 160px;
  font-size: clamp(24px, 5vw, 50px);
  border-radius: 15px;
  border: 2px solid #c8ad7c;
  background: #f6dba6;
}
.rust-memory-card.is-hidden {
  background: #334d67;
  color: #f8dba7;
}
.rust-memory-card.is-matched {
  background: #d3ead6;
}
.rust-alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 800px;
  margin: 25px auto;
}
.rust-alphabet button {
  width: 44px;
  height: 44px;
  background: white;
  border: 1px solid #c2c3b5;
  border-radius: 8px;
}
.rust-word {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: clamp(22px, 4vw, 42px);
  letter-spacing: 0.1em;
  padding: 24px;
}
.rust-password-word {
  text-align: center;
  font-size: clamp(40px, 6vw, 80px);
  padding: 30px;
  overflow-wrap: anywhere;
}
.rust-scarlet-art {
  width: 100%;
  max-height: 330px;
  object-fit: cover;
  border-radius: 12px;
}
.rust-game-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 0;
}
.rust-game-options button {
  padding: 12px 18px;
  border: 1px solid #b4bcae;
  background: white;
  border-radius: 8px;
}
.rust-saved {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.rust-qr svg {
  width: 180px;
  height: 180px;
}
.rust-room .deck-game-grid {
  grid-template-columns: repeat(4, 1fr);
}
.rust-proposal {
  padding: 16px;
  background: #f2deaf;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.rust-unavailable {
  margin-top: 20px;
  padding: 24px;
  background: #f8f5e9;
}
.is-visual-fullscreen {
  position: fixed !important;
  inset: 0;
  z-index: 200;
  background: #142925;
  padding: 12px;
  overflow: auto;
}
body.has-visual-fullscreen {
  overflow: hidden;
}
.rust-home .pd-cover-copy {
  display: block;
}
.rust-home .pd-cover {
  min-height: 210px;
}
.rust-home .deck-stage {
  min-height: 500px;
}
.rust-home .deck-game-grid {
  padding: 16px 5vw;
}
.rust-home .pd-cover .pd-art {
  height: 220px;
}
.rust-select {
  padding: 8px;
  border: 1px solid #c7cbc0;
  border-radius: 8px;
  background: #fffef7;
}
.rust-game-title {
  font-size: clamp(27px, 4vw, 48px);
  letter-spacing: -1px;
  margin: 15px 0;
}
.rust-summary {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.rust-summary strong {
  display: block;
}
.rust-content {
  max-width: 1000px;
  margin: auto;
  padding: 24px;
}
.rust-content h2 {
  font-size: 32px;
}
.rust-content p {
  line-height: 1.7;
}
.rust-footer {
  padding: 30px 5vw;
  color: #68766a;
}
.rust-card-art {
  background: linear-gradient(135deg, #385c73, #0d2638);
  height: 190px;
  display: grid;
  place-items: center;
  font-size: 80px;
  color: #f8ebcb;
}
.rust-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rust-board {
  padding: 24px;
  border-radius: 16px;
  background: #f7f2e7;
  margin-top: 18px;
}
.rust-board nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rust-board button {
  padding: 12px 16px;
  border: 1px solid #a6b5a5;
  border-radius: 8px;
  background: #fffdf7;
}
.rust-board select {
  padding: 10px;
}
.rust-progress {
  height: 8px;
  background: #d5ded1;
  margin: 15px 0;
}
.rust-progress span {
  height: 100%;
  display: block;
  background: #477363;
}
.rust-game-switch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rust-game-switch-grid button {
  padding: 15px;
  background: #f6f0df;
  border: 1px solid #b8bba8;
  border-radius: 8px;
}
.rust-turn {
  border-left: 4px solid #cf7e3b;
  padding: 12px;
}
.rust-chat-message strong {
  display: block;
}
.rust-chat-message {
  padding: 8px 0;
  border-bottom: 1px solid #eceee8;
}
@media (max-width: 650px) {
  .rust-header {
    padding: 15px;
  }
  .rust-header nav {
    gap: 6px;
  }
  .rust-room {
    padding: 10px;
  }
  .rust-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .rust-home .deck-stage {
    min-height: 650px;
  }
  .rust-home .deck-game-grid,
  .rust-room .deck-game-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rust-memory-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .rust-canvas {
    height: 65dvh;
    min-height: 340px;
  }
  .rust-toolbar {
    gap: 5px;
  }
  .rust-toolbar button {
    padding: 9px;
  }
  .rust-home .pd-cover .pd-art {
    height: 170px;
  }
}

.deck-stage-art > .rust-art {
  height: 100%;
}

.rust-room .road-survival {height: min(900px, calc(100dvh - 160px)); min-height: 480px;}

.rust-engine-host {position:relative;height: min(900px, calc(100dvh - 160px));min-height:480px;}
