/* 67 shared top bar */
html {
  height: 100%;
  background-color: #0a0204;
}

.nav-wrap {
  padding: 12px 16px 0;
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px 8px 12px;
  background: var(--nav, #f7b0b8);
  color: var(--nav-text, #2a1f20);
  border-radius: var(--radius-bar, 28px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  min-height: 56px;
  width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

.nav-left {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
  flex-shrink: 1;
  overflow: visible;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 16px;
  font-weight: 500;
  font-size: 0.92rem;
  flex-shrink: 1;
  min-width: 0;
}

.nav a,
.nav-links a,
.nav-left a {
  color: inherit !important;
  text-decoration: none !important;
}

.nav-links a:hover {
  opacity: 0.75;
}

.btn-add {
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 16px;
  background: var(--btn, #5b4dff);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  text-decoration: none !important;
  flex-shrink: 0;
  line-height: 1;
}

body.is-logged-in .btn-add {
  display: none !important;
}

.account-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  overflow: visible;
}

.nav-account {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--nav-text, #2a1f20);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 0;
}

.nav-account:hover {
  background: rgba(0, 0, 0, 0.08);
}

.nav-account .user-icon {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.nav-account .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: none;
}

body.is-logged-in .nav-account .user-icon {
  display: none;
}

body.is-logged-in .nav-account .user-avatar {
  display: block;
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 268px;
  background: #fff;
  color: #1a1a1a;
  border-radius: 22px;
  padding: 16px 18px 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.2s;
  z-index: 60;
}

.account-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e6e6e6;
  margin-bottom: 6px;
}

.menu-name {
  font-family: Chillax, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  color: #3a1f1f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

.menu-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  color: #111 !important;
  font-weight: 600;
  font-size: 1.02rem;
  border-radius: 10px;
  text-decoration: none !important;
}

.menu-item:hover {
  background: #f3f3f3;
}

.menu-item .material-symbols-outlined {
  font-size: 22px;
  color: #111;
  line-height: 1;
}

.menu-logout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 6px;
  margin-top: 4px;
  color: #e53935 !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none !important;
}

.menu-logout .material-symbols-outlined {
  color: #e53935;
  font-size: 24px;
  line-height: 1;
}

.nav-crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-sep {
  opacity: 0.5;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}

.nav-page-title {
  font-family: Chillax, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.nav-guild-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.nav-logo,
.nav-guild-icon,
.nav-account,
.btn-add {
  flex-shrink: 0;
}

.nav-mobile {
  display: none;
}

.mob-icon-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border: none;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--nav-text, #2a1f20);
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
}

.mob-icon-btn .material-symbols-outlined {
  font-size: 26px;
  line-height: 1;
}

.mob-icon-btn:active {
  background: rgba(0, 0, 0, 0.08);
}

.mob-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mob-logo-link .nav-logo {
  width: 36px;
  height: 36px;
}

.mob-top-spacer {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.mob-sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fff;
  color: #111;
  display: flex;
  flex-direction: column;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    visibility 0.28s;
}

.mob-sheet.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mob-sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  flex-shrink: 0;
  min-height: 64px;
}

.mob-sheet-top .mob-icon-btn {
  color: #111;
}

.mob-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 28px 24px;
  -webkit-overflow-scrolling: touch;
}

.mob-nav-link {
  display: block;
  font-family: Chillax, system-ui, sans-serif;
  font-weight: 700;
  font-size: 2.35rem;
  line-height: 1.25;
  color: #111 !important;
  text-decoration: none !important;
  letter-spacing: -0.02em;
  padding: 4px 0;
}

.mob-divider {
  height: 1px;
  background: #d0d0d0;
  margin: 22px 0 18px;
}

.mob-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  font-weight: 600;
  font-size: 1.15rem;
  color: #111 !important;
  text-decoration: none !important;
}

.mob-row .material-symbols-outlined {
  font-size: 26px;
  line-height: 1;
  color: inherit;
}

.mob-row.is-disabled {
  color: #b0b0b0 !important;
  opacity: 0.85;
}

.mob-row.is-disabled .material-symbols-outlined {
  color: #b0b0b0;
}

.mob-sheet-foot {
  flex-shrink: 0;
  padding: 16px 24px calc(18px + env(safe-area-inset-bottom, 0px));
}

.mob-foot-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mob-foot-in[hidden],
.mob-foot-out[hidden] {
  display: none !important;
}

.mob-foot-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mob-foot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
}

.mob-foot-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: #3a1f1f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mob-foot-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e53935 !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.mob-foot-logout .material-symbols-outlined {
  font-size: 22px;
  color: #e53935;
}

.mob-foot-out {
  display: flex;
  justify-content: flex-end;
}

.mob-foot-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #111 !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none !important;
}

.mob-foot-login .material-symbols-outlined {
  font-size: 22px;
}

body.mob-menu-open {
  overflow: hidden;
}

@media (max-width: 899px) {
  .nav-desktop {
    display: none !important;
  }

  .nav-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-mobile .nav-account .user-avatar {
    width: 28px;
    height: 28px;
  }
}

@media (min-width: 900px) {
  .nav-mobile {
    display: none !important;
  }

  .nav-desktop {
    display: flex;
  }

  .nav-links {
    display: flex;
  }

  body:not(.is-logged-in) .btn-add {
    display: inline-flex;
  }

  .mob-sheet {
    display: none !important;
  }
}
