:root {
  color-scheme: dark;
  --newbie-bg: #050c1a;
  --newbie-bg-soft: #071223;
  --newbie-panel: rgba(12, 24, 48, 0.92);
  --newbie-panel-strong: rgba(23, 40, 78, 0.96);
  --newbie-card: linear-gradient(140deg, rgba(31, 55, 116, 0.96), rgba(20, 38, 83, 0.98));
  --newbie-line: rgba(117, 151, 229, 0.44);
  --newbie-line-strong: rgba(143, 172, 246, 0.68);
  --newbie-ink: #f8fbff;
  --newbie-muted: #aebde5;
  --newbie-dim: #6e7da7;
  --newbie-cyan: #43ddff;
  --newbie-blue: #5e86ff;
  --newbie-violet: #9a7cff;
  --newbie-rose: #ff6678;
  --newbie-gold: #ffcf46;
  --newbie-mint: #69f0d2;
  --newbie-green: #22bd7a;
  --newbie-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  font-family: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body.lobbies-app {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 100%, rgba(78, 112, 242, 0.24), transparent 28%),
    #020713;
  color: var(--newbie-ink);
}

body.lobbies-app > .lobbies-shell {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

[hidden] {
  display: none !important;
}

.lobbies-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(135deg, transparent 0 31%, rgba(76, 115, 208, 0.2) 31.15%, transparent 31.7% 74%, rgba(76, 115, 208, 0.16) 74.15%, transparent 74.7%),
    radial-gradient(circle at 52% 92%, rgba(78, 112, 242, 0.26), transparent 18%),
    var(--newbie-bg);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.56);
}

.lobbies-pane {
  min-height: 100dvh;
}

.lobbies-newbie-pane {
  position: relative;
}

.lobbies-newbie-pane > .newbie-shell {
  width: 100%;
  margin: 0;
  padding-bottom: calc(118px + env(safe-area-inset-bottom));
  box-shadow: none;
}

.lobbies-profile-modal {
  --lobbies-profile-nav-offset: 66px;
  position: fixed;
  z-index: 240;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding:
    max(12px, env(safe-area-inset-top, 0px))
    8px
    calc(var(--lobbies-profile-nav-offset) + env(safe-area-inset-bottom, 0px));
  background: rgba(1, 5, 14, 0.76);
  backdrop-filter: blur(12px);
}

.lobbies-profile-dialog {
  display: grid;
  width: min(414px, 100%);
  height: clamp(360px, 68dvh, 560px);
  max-height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(221, 178, 95, 0.58);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(36, 31, 20, 0.99), rgba(9, 10, 7, 0.99));
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 241, 200, 0.12);
}

.lobbies-profile-dialog h2 {
  margin: 0;
}

.lobbies-profile-header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  border-bottom: 1px solid rgba(190, 145, 72, 0.34);
  padding: 8px 12px 0;
  background:
    linear-gradient(180deg, rgba(68, 49, 23, 0.74), rgba(24, 17, 8, 0.68));
}

.lobbies-profile-header h2 {
  color: #ffe8af;
  font-size: 18px;
  font-weight: 1000;
  letter-spacing: -0.02em;
}

.lobbies-account-tabs {
  display: flex;
  align-items: end;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
}

.lobbies-account-tab {
  min-width: 86px;
  min-height: 44px;
  border: 1px solid rgba(190, 145, 72, 0.38);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 0 18px;
  background: rgba(19, 16, 10, 0.72);
  color: #b9ac8c;
  font: inherit;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.lobbies-account-tab:hover,
.lobbies-account-tab:focus-visible {
  border-color: rgba(242, 205, 121, 0.72);
  color: #fff0c8;
  outline: none;
}

.lobbies-account-tab.is-active,
.lobbies-account-tab[aria-selected="true"] {
  border-color: rgba(239, 201, 111, 0.76);
  background: linear-gradient(180deg, rgba(89, 63, 25, 0.96), rgba(42, 29, 13, 0.98));
  color: #fff2c8;
  box-shadow: inset 0 1px 0 rgba(255, 241, 196, 0.18);
}

.newbie-nickname-modal > .lobbies-account-tabs {
  margin: -18px -18px 0;
  border-bottom: 1px solid rgba(190, 145, 72, 0.34);
  padding: 8px 12px 0;
  background: linear-gradient(180deg, rgba(68, 49, 23, 0.74), rgba(24, 17, 8, 0.68));
}

.lobbies-account-tab-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.lobbies-profile-scroll {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
  scrollbar-gutter: stable;
}

.lobbies-profile-modal.lobbies-newbie-pane .newbie-profile-view {
  min-height: 0;
  outline: none;
}

.lobbies-profile-close {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(221, 178, 95, 0.46);
  border-radius: 8px;
  padding: 0;
  background: rgba(11, 9, 5, 0.62);
  color: #ffe8af;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.lobbies-profile-close:hover,
.lobbies-profile-close:focus-visible {
  border-color: rgba(255, 226, 139, 0.82);
  background: rgba(85, 58, 20, 0.72);
}

.lobbies-profile-close:focus-visible {
  outline: 2px solid rgba(255, 226, 139, 0.72);
  outline-offset: 2px;
}

body.lobbies-profile-open {
  overflow: hidden;
}

@media (max-width: 430px) {
  .lobbies-profile-scroll {
    scrollbar-gutter: auto;
  }
}

@media (max-width: 380px) {
  .lobbies-profile-modal {
    --lobbies-profile-nav-offset: 64px;
    padding-inline: 5px;
  }

  .lobbies-profile-scroll {
    padding: 10px;
  }
}

@media (min-width: 431px) {
  body.lobbies-app {
    padding-inline: 0;
  }
}
