.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  --sidebar-header-h: 66px;
  --sidebar-footer-h: 42px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 210;
  display: flex;
  width: min(390px, 94vw);
  color: var(--gold-cream);
  background:
    radial-gradient(circle at 20% 0%, rgba(93, 202, 165, 0.2), transparent 34%),
    linear-gradient(165deg, #0c3b31 0%, #06251f 42%, #020e0c 100%);
  border-right: 1px solid rgba(93, 202, 165, 0.28);
  box-shadow: none;
  transform: translateX(-100%);
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar.is-open {
  box-shadow: 16px 0 52px rgba(0, 0, 0, 0.78);
  transform: translateX(0);
}

.sidebar-nav {
  width: 66px;
  flex: 0 0 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.28);
  border-right: 1px solid rgba(245, 233, 196, 0.08);
}

.sidebar-nav-top {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.sidebar-nav-brand {
  width: 48px;
  height: var(--sidebar-header-h);
  min-height: var(--sidebar-header-h);
  display: grid;
  place-items: center;
  margin-bottom: 7px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  box-shadow: none;
  text-align: center;
}

.sb-btn {
  width: 54px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(245, 233, 196, 0.48);
  cursor: pointer;
  transition:
    color 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.sb-btn i {
  font-size: 17px;
  line-height: 1;
}

.sb-btn-label {
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sb-btn:hover,
.sb-btn.active {
  color: var(--gold-light);
  background:
    linear-gradient(180deg, rgba(245, 192, 74, 0.14), rgba(93, 202, 165, 0.08));
  border-color: rgba(245, 192, 74, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 14px rgba(245, 192, 74, 0.14);
}

.sb-btn.active {
  transform: translateX(2px);
}

.sidebar-nav-spacer {
  flex: 1;
}

.sidebar-nav-foot {
  width: 100%;
  height: var(--sidebar-footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(245, 233, 196, 0.08);
}

.nav-close-btn {
  width: 42px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 192, 74, 0.3);
  border-radius: 8px;
  background: rgba(245, 192, 74, 0.08);
  color: var(--gold-mid);
  cursor: pointer;
}

.nav-close-btn:hover {
  color: var(--gold-light);
  border-color: rgba(245, 192, 74, 0.62);
}

.sidebar-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-panel {
  flex: 1;
  display: none;
  min-height: 0;
  flex-direction: column;
}

.sidebar-panel.active {
  display: flex;
}

.sidebar-panel-header {
  min-height: var(--sidebar-header-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(245, 233, 196, 0.1);
}

.sidebar-kicker {
  margin: 0 0 5px;
  color: var(--green-light);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar-panel-title {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-panel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px 22px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 192, 74, 0.34) transparent;
}

.sidebar-panel-body::-webkit-scrollbar {
  width: 4px;
}

.sidebar-panel-body::-webkit-scrollbar-thumb {
  background: rgba(245, 192, 74, 0.34);
  border-radius: 4px;
}

.menu-hero,
.menu-card,
.menu-stat {
  border: 1px solid rgba(245, 233, 196, 0.1);
  background: rgba(0, 0, 0, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.menu-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
}

.menu-hero div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-hero-label,
.menu-stat span {
  color: rgba(245, 233, 196, 0.58);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.menu-hero strong,
.menu-stat strong {
  color: var(--gold-cream);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
}

.menu-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.menu-stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border-radius: 7px;
}

.menu-card {
  padding: 12px;
  border-radius: 8px;
}

.menu-card h3 {
  margin: 0 0 8px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.menu-card p {
  margin: 0;
  color: rgba(245, 233, 196, 0.76);
  font-size: 12px;
  line-height: 1.45;
}

.menu-list {
  margin: 0;
  padding-left: 16px;
  color: rgba(245, 233, 196, 0.76);
  font-size: 12px;
  line-height: 1.45;
}

.menu-list li + li {
  margin-top: 6px;
}

.menu-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 2px;
}

.wind-east { background: var(--gold-light); }
.wind-south { background: var(--green-light); }
.wind-west { background: #85B7EB; }
.wind-north { background: #D3D1C7; }

.menu-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-badge.green {
  background: rgba(93, 202, 165, 0.14);
  border: 1px solid rgba(93, 202, 165, 0.72);
  color: var(--green-light);
}

.menu-badge.gold {
  background: rgba(245, 192, 74, 0.14);
  border: 1px solid rgba(245, 192, 74, 0.72);
  color: var(--gold-light);
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(245, 233, 196, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.menu-toggle span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.menu-toggle strong {
  color: var(--gold-cream);
  font-size: 12px;
  line-height: 1;
}

.menu-toggle small {
  color: rgba(245, 233, 196, 0.58);
  font-size: 10px;
  line-height: 1.35;
}

.menu-toggle input {
  accent-color: var(--green-light);
}

.sidebar-footer {
  min-height: var(--sidebar-footer-h);
  height: var(--sidebar-footer-h);
  display: flex;
  align-items: center;
  padding: 5px 12px;
  border-top: 1px solid rgba(245, 233, 196, 0.1);
}

.sidebar-exit-btn {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(226, 75, 74, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(226, 75, 74, 0.14), rgba(0, 0, 0, 0.18));
  color: #ff8f8a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 10px rgba(226, 75, 74, 0.1);
}

.sidebar-exit-btn:hover {
  border-color: rgba(226, 75, 74, 0.76);
  background:
    linear-gradient(180deg, rgba(226, 75, 74, 0.22), rgba(0, 0, 0, 0.2));
  color: #ffb0aa;
}

.sidebar-exit-btn i {
  font-size: 14px;
  line-height: 1;
}

.entry-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.entry-actions #entryQuick {
  grid-column: 1 / -1;
}

.entry-code-field {
  margin-top: 12px;
}

.entry-code-field input {
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lobby-room {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 6px 6px 12px;
  border: 1px solid rgba(93, 202, 165, 0.5);
  border-radius: 8px;
  background: rgba(93, 202, 165, 0.08);
}

.lobby-room[hidden] {
  display: none;
}

.lobby-room > span,
.lobby-bot-field > span {
  color: rgba(245, 233, 196, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lobby-room strong {
  color: var(--green-pale);
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0.12em;
}

.lobby-copy {
  min-width: 64px;
  min-height: 36px;
  padding: 0 10px;
}

.lobby-bot-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lobby-bot-field select {
  min-width: 76px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(245, 192, 74, 0.48);
  border-radius: 8px;
  background: var(--green-dark);
  color: var(--gold-cream);
  font: 800 14px/1 var(--font-mono);
}

.lobby-bot-field select:disabled {
  border-color: rgba(245, 233, 196, 0.18);
  color: rgba(245, 233, 196, 0.62);
  opacity: 1;
}

.lobby-start {
  width: 100%;
  min-height: 56px;
}

.lobby-start:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.5;
}

.lobby-start-hint {
  margin: -5px 0 0;
  color: rgba(245, 233, 196, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.lobby-start-hint:empty {
  display: none;
}
