:root {
  color-scheme: dark;
  --bg: #050505;
  --nav: #17171b;
  --panel: #0c0c0d;
  --gold: #e7b85d;
  --gold-2: #ffe2a4;
  --gold-3: #b67827;
  --text: #fff3dc;
  --muted: #8f8f96;
  --line: rgba(231, 184, 93, .34);
  --green: #064326;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #111;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  color: var(--text);
  background: #111;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  overflow-x: hidden;
}

button,
input,
select { font: inherit; }

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 2px;
}

#app {
  width: 100vw;
  max-width: 390px;
  margin: 0 auto;
  min-height: 100vh;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 24px 80px rgba(0,0,0,.55);
}

.app {
  position: relative;
  min-height: 100vh;
  padding-bottom: 74px;
  overflow-x: hidden;
  background: #000;
}

.topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  height: 76px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 14px 18px;
  pointer-events: none;
}

.icon-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--gold-2);
  background: transparent;
  pointer-events: auto;
}

.bell::before {
  content: "";
  width: 22px;
  height: 26px;
  border-radius: 14px 14px 7px 7px;
  background: currentColor;
  box-shadow: 0 22px 0 -9px currentColor;
}

.hero {
  position: relative;
  min-height: 292px;
  overflow: hidden;
  background: #0b0704;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14,7,3,.88), rgba(20,10,4,.35) 44%, rgba(0,0,0,.78)),
    radial-gradient(circle at 45% 34%, rgba(255,209,120,.26), transparent 14%),
    linear-gradient(115deg, transparent 0 43%, rgba(238,181,83,.25) 43.5% 45%, transparent 45.5% 47%, rgba(159,92,34,.35) 47.4% 48.1%, transparent 48.6%),
    repeating-linear-gradient(116deg, rgba(255,229,165,.16) 0 2px, transparent 2px 38px),
    linear-gradient(135deg, #0c0705 0, #1b1008 47%, #030303 100%);
  filter: saturate(1.05);
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 292px;
  display: grid;
  align-content: center;
  padding: 70px 24px 34px;
}

.hero-kicker {
  margin: 0 0 28px;
  color: rgba(231,184,93,.82);
  font-size: 15px;
  letter-spacing: 7px;
  white-space: nowrap;
}

.hero h1 {
  margin: 0;
  display: flex;
  justify-content: flex-start;
  align-items: end;
  gap: 58px;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 span {
  color: #ffd482;
  font-weight: 500;
}

.hero h1 strong {
  color: #fffaf2;
  font-weight: 500;
}

.verify-btn {
  justify-self: center;
  min-width: 214px;
  min-height: 38px;
  margin-top: 30px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #3a250b;
  background: linear-gradient(180deg, #ffe7ad, #e1b25a);
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0,0,0,.28);
}

.hero-dots {
  justify-self: center;
  display: flex;
  gap: 7px;
  width: 80px;
  margin-top: 12px;
}

.hero-dots i {
  width: 7px;
  height: 24px;
  border-radius: 8px;
  transform: rotate(25deg);
  background: #efdd60;
}

.hero-dots i:nth-child(2) { background: #111848; }
.hero-dots i:nth-child(3) { background: #7d4d12; }

.quick-actions {
  position: relative;
  z-index: 3;
  width: calc(100% - 34px);
  margin: -22px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.action-card {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border: 0;
  color: #754416;
  background: linear-gradient(90deg, #e0aa55, #f0c16a);
  font-size: 30px;
  font-weight: 500;
  overflow: hidden;
}

.action-card.create {
  border-radius: 17px 0 0 17px;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}

.action-card.join {
  margin-left: -10px;
  border-radius: 0 17px 17px 0;
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%);
}

.action-card b {
  width: 26px;
  height: 26px;
  border: 4px solid rgba(117,68,22,.62);
  border-left: 0;
  border-bottom: 0;
  border-radius: 3px;
  transform: rotate(45deg);
}

.content,
.table-page {
  padding: 26px 14px 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title h2 {
  margin: 0;
  color: #d8b06a;
  font-size: 23px;
  font-weight: 500;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar .icon-btn {
  width: 54px;
  height: 38px;
  border-radius: 999px;
  color: #7a531f;
  background: linear-gradient(180deg, #e5b95f, #ca9541);
}

.outline,
.ghost-btn,
.secondary,
.feature-grid button {
  min-height: 38px;
  padding: 0 10px;
  border: 2px solid rgba(150,150,160,.5);
  border-radius: 999px;
  color: #a8a8af;
  background: rgba(0,0,0,.2);
  white-space: nowrap;
}

.outline.active {
  color: #3a250b;
  border-color: var(--gold);
  background: linear-gradient(180deg, #ffe2a4, #c9933c);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: 22px;
  margin: 26px 0 0;
}

.tab {
  min-height: 36px;
  border: 0;
  color: #8c8c95;
  background: transparent;
  font-size: 18px;
  white-space: nowrap;
}

.tab.active {
  width: 68px;
  justify-self: start;
  border: 2px solid #c8a05f;
  border-radius: 999px;
  color: #e0c07e;
}

.empty-state {
  min-height: 470px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 13px;
  color: #85858d;
  text-align: center;
}

.empty-state strong {
  font-size: 24px;
  font-weight: 500;
}

.empty-figure {
  position: relative;
  width: 180px;
  height: 168px;
  filter: grayscale(1);
  opacity: .78;
}

.empty-person {
  position: absolute;
  left: 62px;
  top: 36px;
  width: 72px;
  height: 78px;
  border-radius: 50% 50% 40% 40%;
  background: #b8b8b8;
  box-shadow: -18px 12px 0 rgba(150,150,150,.55), 18px 14px 0 rgba(130,130,130,.45);
}

.empty-person::before {
  content: "";
  position: absolute;
  left: 11px;
  top: -24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #c6c6c6;
}

.empty-person::after {
  content: "";
  position: absolute;
  left: -35px;
  bottom: -30px;
  width: 150px;
  height: 42px;
  border: 8px solid #767676;
  border-radius: 50%;
  background: transparent;
}

.broken-heart {
  position: absolute;
  left: 22px;
  top: 12px;
  color: #b7b7b7;
  font-size: 30px;
  transform: rotate(-22deg);
}

.empty-coin {
  position: absolute;
  right: 25px;
  bottom: 34px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid #ddd;
}

.empty-coin.c2 { right: 40px; bottom: 24px; }
.empty-coin.c3 { right: 17px; bottom: 17px; }

.room-grid,
.room-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.room-card {
  min-height: 126px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(231,184,93,.28);
  border-radius: 8px;
  background: #111;
}

.room-card-top,
.room-meta,
.dock-info {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.room-badge,
.status-on,
.status-off,
.phase-pill {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.room-badge { color: #e5bd75; border: 1px solid rgba(231,184,93,.3); }
.status-on { color: #13210f; background: #a7e77d; }
.status-off { color: #eee; background: #606066; }

.room-card h3 {
  margin: 0;
  color: var(--gold-2);
}

.room-id,
.room-meta {
  color: var(--muted);
  font-size: 13px;
}

.room-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}

.room-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.enter,
.primary {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #261806;
  background: linear-gradient(180deg, #ffe2a4, #c9933c);
  font-weight: 800;
}

.table-toolbar {
  min-height: 62px;
  display: grid;
  grid-template-columns: 72px 1fr 72px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(231,184,93,.3);
  border-radius: 8px;
  background: #07130d;
}

.table-toolbar div {
  min-width: 0;
  text-align: center;
}

.table-toolbar strong,
.table-toolbar span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-toolbar strong { color: var(--gold-2); }
.table-toolbar span { color: var(--muted); font-size: 12px; }

.table-stage {
  position: relative;
  min-height: 554px;
  margin-top: 12px;
  border: 1px solid rgba(231,184,93,.22);
  border-radius: 8px;
  background: #020302;
  overflow: hidden;
}

.poker-table {
  position: absolute;
  left: 50%;
  top: 43%;
  width: 330px;
  height: 205px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 11px solid #2a170b;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #087044, #053820 72%);
  box-shadow: inset 0 0 0 2px rgba(255,226,164,.18), 0 18px 40px rgba(0,0,0,.55);
}

.pot-chip {
  position: absolute;
  top: 26px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--gold-2);
  background: rgba(0,0,0,.45);
}

.phase-pill {
  position: absolute;
  bottom: 23px;
  color: #153011;
  background: #b9ef91;
  font-weight: 800;
}

.board,
.hero-hand,
.mini-hand,
.chip-row,
.play-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.card {
  width: 44px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid #dbc9aa;
  border-radius: 7px;
  color: #111;
  background: #fff9ef;
  font-weight: 900;
}

.card.red { color: #b51f35; }
.empty-card { color: rgba(255,255,255,.3); border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.08); }

.table-seat {
  position: absolute;
  width: 108px;
  min-height: 78px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.48);
  text-align: center;
}

.table-seat b,
.table-seat span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.table-seat.top-left { left: 4%; top: 15%; }
.table-seat.top { left: 50%; top: 7%; transform: translateX(-50%); }
.table-seat.top-right { right: 4%; top: 15%; }
.table-seat.left { left: 2%; top: 45%; transform: translateY(-50%); }
.table-seat.right { right: 2%; top: 45%; transform: translateY(-50%); }

.table-seat.empty {
  border-style: dashed;
  color: #9d9da4;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #261806;
  background: linear-gradient(180deg, #ffe2a4, #c9933c);
  font-weight: 900;
}

.avatar.hollow {
  color: var(--gold);
  border: 1px dashed var(--line);
  background: transparent;
}

.mini-hand i {
  width: 24px;
  height: 34px;
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, #17275d, #17275d 6px, #2d4597 6px, #2d4597 12px);
}

.hero-seat {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: calc(100% - 34px);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
}

.hero-info {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  column-gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,.62);
}

.hero-info .avatar { grid-row: 1 / 3; }
.hero-info strong,
.hero-info small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-info strong { color: var(--gold-2); }
.hero-info small { color: var(--muted); }

.action-dock {
  position: sticky;
  bottom: 76px;
  z-index: 10;
  margin-top: 10px;
  padding: 10px;
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7,7,7,.9);
}

.dock-info { color: #ddd; font-size: 13px; }
.dock-info b { color: var(--gold-2); }

.chip-row button,
.play-row button {
  min-height: 42px;
  flex: 1;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: var(--gold-2);
  background: #141414;
  font-weight: 800;
}

.play-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.play-row button {
  color: #261806;
  border: 0;
  background: linear-gradient(180deg, #ffe2a4, #c9933c);
}

.play-row .danger {
  color: #fff;
  background: linear-gradient(180deg, #ee6969, #a72b2b);
}

.log-panel,
.feature-page {
  margin-top: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0c;
}

.log-panel strong,
.feature-page h2 { color: var(--gold-2); }

.log-panel p,
.feature-page p,
.notice-list p {
  margin: 8px 0 0;
  color: #c8c0b5;
  line-height: 1.55;
}

.feature-page {
  min-height: 520px;
  display: grid;
  align-content: center;
  gap: 12px;
}

.feature-page h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 500;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.feature-grid button {
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.72);
}

.modal {
  width: min(392px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151515;
}

.modal h3 {
  margin: 0;
  color: var(--gold-2);
  font-size: 22px;
  font-weight: 500;
}

.modal label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.modal input,
.modal select {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.42);
}

.check-row {
  grid-template-columns: 20px 1fr;
  align-items: center;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 76px;
  z-index: 50;
  max-width: min(392px, calc(100% - 28px));
  transform: translateX(-50%);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--gold-2);
  background: rgba(0,0,0,.9);
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: 100%;
  max-width: 390px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 2px;
  min-height: 64px;
  padding: 5px 7px max(5px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,.08);
  background: #17171b;
}

.nav-item {
  min-height: 52px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  border: 0;
  border-radius: 8px;
  color: #8a8a91;
  background: transparent;
  font-size: 13px;
}

.nav-item.active {
  min-height: 60px;
  margin-top: -18px;
  color: #1e1306;
  background: linear-gradient(180deg, #ffe8ad, #d49c43);
  border-radius: 50% 50% 18px 18px;
  font-weight: 700;
}

.nav-item.active .ico {
  width: 30px;
  height: 30px;
}

.ico {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-block;
  color: currentColor;
}

.ico.spade::before,
.ico.diamond::before {
  content: "";
  position: absolute;
  inset: 6px;
  background: currentColor;
  transform: rotate(45deg);
  border-radius: 3px;
}

.ico.club::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: -7px 7px 0 currentColor, 7px 7px 0 currentColor, 0 14px 0 -2px currentColor;
}

.ico.cards::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 21px;
  left: 3px;
  top: 4px;
  border: 2px solid currentColor;
  border-radius: 4px;
  transform: rotate(-12deg);
  box-shadow: 9px 2px 0 -1px var(--gold-2), 9px 2px 0 1px currentColor;
}

.ico.chips::before,
.ico.grid::before,
.ico.seat::before,
.ico.user::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 7px 5px 0 currentColor, -7px 5px 0 currentColor;
}

.ico.grid::before {
  inset: 4px;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  box-shadow: 14px 0 0 currentColor, 0 14px 0 currentColor, 14px 14px 0 currentColor;
}

.ico.seat::before {
  inset: 7px 5px 9px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: transparent;
  box-shadow: 0 10px 0 -2px currentColor;
}

.ico.user::before {
  inset: 4px 8px 14px;
  box-shadow: 0 17px 0 5px currentColor;
}

@media (max-width: 380px) {
  .hero h1 { font-size: 31px; gap: 46px; }
  .hero-kicker { letter-spacing: 6px; }
  .action-card { font-size: 27px; gap: 10px; }
  .tab { font-size: 16px; }
}
