:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel2: #0f141b;
  --line: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --blue: #58a6ff;
  --violet: #a371f7;
  --green: #3fb950;
  --orange: #d29922;
  --red: #ff7b72;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 70% -10%, #1f2f54aa, transparent), var(--bg);
  color: var(--text);
  font:
    14px ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    "PingFang SC",
    monospace;
}
button,
input {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.topbar {
  height: 46px;
  border-bottom: 1px solid var(--line);
  background: #010409cc;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand i {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  border-radius: 3px;
}
.brand span {
  color: var(--muted);
}
.connection {
  margin-left: auto;
  color: var(--orange);
  font-size: 12px;
}
.connection.connected {
  color: var(--green);
}
#shortcut {
  color: var(--muted);
  background: transparent;
  font-size: 20px;
}
.welcome {
  min-height: calc(100vh - 46px);
  display: grid;
  grid-template-columns: minmax(0, 540px) 430px;
  gap: 70px;
  align-content: center;
  justify-content: center;
  padding: 40px;
}
.eyebrow,
.comment {
  color: var(--green);
  font-size: 12px;
}
.hero h1 {
  font-size: 56px;
  letter-spacing: -4px;
  margin: 14px 0;
}
.hero h1 em {
  font-style: normal;
  color: var(--blue);
  font-size: 20px;
  letter-spacing: 0;
}
.hero p {
  color: var(--muted);
  font-size: 16px;
}
.launcher {
  background: linear-gradient(145deg, #161b22, #10151c);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 25px 80px #0008;
}
.launcher label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.launcher input,
.join input {
  background: #0d1117;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  color: var(--text);
  outline: none;
}
.name-input {
  display: flex;
  gap: 8px;
}
.name-input input {
  min-width: 0;
  flex: 1;
}
.name-input button {
  width: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #21262d;
  color: var(--blue);
  font-size: 20px;
}
.field-hint {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.launcher input:focus,
.join input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #58a6ff22;
}
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
}
.mode {
  background: #0d1117;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  padding: 13px;
  text-align: left;
}
.mode b,
.mode span {
  display: block;
}
.mode b {
  color: var(--text);
  margin-bottom: 6px;
}
.mode span {
  font-size: 11px;
}
.mode.selected {
  border-color: var(--blue);
  background: #58a6ff12;
}
.primary {
  background: linear-gradient(135deg, #238636, #2ea043);
  border-radius: 7px;
  color: white;
  font-weight: 700;
  padding: 12px 16px;
}
.launcher .primary {
  width: 100%;
}
.divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  margin: 20px 0;
}
.divider:before,
.divider:after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.join {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.join button,
.actions button,
.host-actions button {
  background: #21262d;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 13px;
}
.join button:hover,
.actions button:hover {
  border-color: var(--blue);
}
#error {
  height: 16px;
  color: var(--red);
  font-size: 12px;
}
.resume {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: #58a6ff12;
  color: var(--blue);
  padding: 10px;
  font-weight: 700;
}
.workspace {
  height: calc(100vh - 46px);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 280px;
}
.explorer,
.copilot {
  background: #0d1117;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.side-title,
.chat-head {
  padding: 14px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.5px;
}
.side-title span {
  float: right;
}
.tree-root,
.tree-item {
  padding: 7px 13px;
  color: var(--muted);
}
.tree-root {
  color: var(--text);
}
.tree-item {
  padding-left: 27px;
}
.tree-item.active {
  background: #161b22;
  color: var(--text);
  border-left: 2px solid var(--blue);
}
.tree-item small {
  float: right;
}
.side-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 12px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}
.identity > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1f6feb;
  color: #fff;
}
.identity b,
.identity small {
  display: block;
}
.identity small {
  color: var(--muted);
  font-size: 11px;
}
.side-bottom button {
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 12px;
}
.editor {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #0d1117;
}
.tabs {
  height: 40px;
  background: #161b22;
  display: flex;
  align-items: center;
}
.tab {
  height: 100%;
  padding: 11px 15px;
  background: #0d1117;
  border-top: 1px solid var(--blue);
  min-width: 180px;
}
.tab span:first-child {
  color: var(--violet);
}
.tab b {
  float: right;
  color: var(--muted);
}
.run-state {
  margin-left: auto;
  padding: 0 15px;
  color: var(--green);
  font-size: 11px;
}
.breadcrumb {
  padding: 9px 20px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid #21262d;
}
.breadcrumb i {
  font-style: normal;
  margin: 0 7px;
}
.arena {
  padding: 24px;
  overflow: auto;
  flex: 1;
  background: radial-gradient(ellipse at 50% 45%, #132238 0, transparent 65%);
}
.board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.board-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.room-badge {
  background: #161b22;
  border: 1px solid var(--blue);
  color: var(--blue);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 11px;
  white-space: nowrap;
}
.room-badge b {
  color: #fff;
  letter-spacing: 1px;
}
.room-badge:hover {
  background: #58a6ff1c;
}
.room-action {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #161b22;
  color: var(--muted);
  padding: 7px 9px;
  font-size: 11px;
  white-space: nowrap;
}
.room-action.danger {
  border-color: #da3633;
  color: #ff7b72;
}
.room-action:hover {
  border-color: var(--blue);
  color: var(--text);
}
.board-head h2 {
  font-size: 20px;
  margin: 8px 0 20px;
}
.pot {
  text-align: right;
}
.pot small,
.pot span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.pot strong {
  font-size: 27px;
  color: #f0b72f;
}
.community {
  text-align: center;
  border: 1px dashed #30363d;
  border-radius: 8px;
  padding: 10px;
  margin: 0 0 18px;
}
.community small,
.table-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
}
.table-label {
  margin: 12px 0;
}
.players {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.player {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #30363d;
  background: #161b22cc;
  border-radius: 8px;
  padding: 10px;
}
.player.turn {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px #d2992244;
}
.player.folded {
  opacity: 0.48;
}
.player.offline {
  border-style: dashed;
}
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: #30363d;
  font-weight: bold;
}
.player div:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.player b,
.player small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.player em {
  font-style: normal;
  color: var(--blue);
  font-size: 10px;
}
.crown {
  font-size: 9px;
  color: #f0b72f;
}
.dealer {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f0b72f;
  color: #0d1117;
  font-size: 9px;
}
.player strong {
  font-size: 12px;
  color: #f0b72f;
  white-space: nowrap;
}
.mine {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #01040966;
}
.mine.muted {
  opacity: 0.75;
}
.mine-head {
  display: flex;
  justify-content: space-between;
  color: var(--violet);
  margin-bottom: 10px;
}
.mine-head b {
  color: var(--blue);
}
.ghost {
  background: transparent;
  color: var(--blue);
  padding: 0;
}
.cards {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-height: 75px;
}
.card {
  position: relative;
  width: 54px;
  height: 76px;
  background: linear-gradient(135deg, #fff, #d8dee9);
  color: #19212b;
  border-radius: 6px;
  padding: 6px;
  box-shadow: 0 3px 10px #0008;
  text-align: left;
  font-family: Georgia, serif;
}
.card b,
.card span {
  display: block;
  font-size: 16px;
  line-height: 17px;
}
.card i {
  position: absolute;
  right: 6px;
  bottom: 4px;
  font-size: 24px;
  font-style: normal;
}
.card.red {
  color: #cf222e;
}
.card.back {
  background: repeating-linear-gradient(
    45deg,
    #1f6feb,
    #1f6feb 3px,
    #0d419d 3px,
    #0d419d 6px
  );
  border: 3px solid #d8dee9;
}
.empty-cards {
  padding: 23px;
  color: var(--muted);
  font-size: 12px;
}
.actions,
.host-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.action-sheet {
  width: min(430px, 100%);
  margin: 0 auto 18px;
  padding: 14px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #161b22;
  box-shadow: 0 14px 35px #0008;
}
.showdown-panel {
  margin: 0 auto 18px;
  padding: 14px;
  border: 1px solid #f0b72f;
  border-radius: 8px;
  background: #161b22;
}
.showdown-panel > b {
  color: #f0b72f;
}
.showdown-hands {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 9px;
  margin: 10px 0;
}
.showdown-hands > div {
  padding: 8px;
  background: #0d1117;
  border-radius: 6px;
}
.showdown-hands small {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}
.showdown-hands .cards {
  justify-content: flex-start;
  gap: 4px;
  min-height: 0;
}
.showdown-hands .card {
  width: 34px;
  height: 47px;
  padding: 3px;
}
.showdown-hands .card b,
.showdown-hands .card span {
  font-size: 11px;
  line-height: 12px;
}
.showdown-hands .card i {
  font-size: 15px;
  right: 3px;
  bottom: 2px;
}
.pot-results {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.sheet-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--violet);
}
.sheet-title button,
.sheet-cancel {
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}
.action-sheet p {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.action-sheet p strong {
  color: var(--text);
}
.amount-control {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
}
.amount-control button,
.amount-control input {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d1117;
  color: var(--text);
  padding: 9px;
  text-align: center;
}
.amount-control button {
  color: var(--blue);
  font-size: 18px;
}
.sheet-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.sheet-actions .primary {
  padding: 9px 12px;
}
.compare-options {
  display: grid;
  gap: 7px;
}
.compare-options button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d1117;
  color: var(--text);
  padding: 10px;
  text-align: left;
}
.compare-options button:hover {
  border-color: var(--blue);
}
.compare-options small {
  color: #f0b72f;
}
.actions .danger {
  border-color: #da3633;
  color: #ff7b72;
}
.host-actions .primary {
  border: 0;
}
.statusbar {
  height: 22px;
  background: #1f6feb;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 10px;
  font-size: 10px;
}
.statusbar span:nth-child(2) {
  margin-left: auto;
}
.copilot {
  border-left: 1px solid var(--line);
  border-right: 0;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.spark {
  color: var(--violet);
  font-size: 18px;
}
.online {
  margin-left: auto;
  color: var(--green);
  font-size: 10px;
}
.log {
  padding: 10px;
  overflow: auto;
  flex: 1;
}
.log div {
  padding: 8px 0;
  border-bottom: 1px solid #21262d;
  color: #c9d1d9;
  line-height: 1.45;
}
.log time {
  display: block;
  color: #6e7681;
  font-size: 10px;
  margin-bottom: 2px;
}
.empty-log {
  color: var(--muted) !important;
  border: 0 !important;
}
.hint {
  padding: 12px;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid var(--line);
}
.hint span {
  color: var(--violet);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 8;
  transform: translate(-50%, 12px);
  opacity: 0;
  background: #da3633;
  color: #fff;
  padding: 10px 14px;
  border-radius: 7px;
  transition: 0.2s;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.boss {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: #0d1117;
  color: #d4d4d4;
  padding: 10px 30px;
  font:
    16px ui-monospace,
    monospace;
}
.fake-top {
  height: 35px;
  color: #ccc;
}
.boss pre {
  line-height: 1.8;
  color: #9cdcfe;
}
.boss small {
  position: fixed;
  bottom: 15px;
  right: 20px;
  color: #888;
}
@media (max-width: 850px) {
  .welcome {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 18px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .workspace {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 46px);
  }
  .explorer {
    display: none;
  }
  .copilot {
    order: 3;
    height: 190px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .arena {
    padding: 15px;
  }
  .players {
    grid-template-columns: 1fr;
  }
  .board-head h2 {
    font-size: 16px;
  }
  .board-meta {
    gap: 9px;
  }
  .room-badge {
    padding: 6px;
    font-size: 10px;
  }
  .room-action {
    padding: 6px;
    font-size: 10px;
  }
  .card {
    width: 47px;
    height: 68px;
  }
  .topbar {
    padding: 0 10px;
  }
  .brand span {
    display: none;
  }
}
