.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}

.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(17, 24, 39, 0.06);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.05);
}

.header-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: none;
  padding-left: 22px;
  padding-right: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  grid-column: 1;
  justify-self: start;
  line-height: 0;
  text-decoration: none;
  min-width: 0;
}

.brand img {
  display: block;
  width: 172px;
  height: 46px;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
}

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  grid-column: 2;
  justify-self: center;
  gap: 8px;
  margin: 0;
  min-width: max-content;
}

.nav-line {
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}

html.nav-settled .nav-line {
  transition: left 0.34s cubic-bezier(0.22, 1, 0.36, 1), width 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

html.js .menu-link.is-active::after { content: none; }

.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 8px 8px;
  white-space: nowrap;
  border-radius: 8px;
  position: relative;
}

button.menu-link {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-link > i:not(.nav-chev) { display: none; }

.menu-link > .nav-chev {
  font-size: 0.62rem;
  color: #9ca3af;
}

.menu-link > i {
  font-size: 1.05rem;
  color: #6b7280;
}

.menu-link:hover,
.nav-drop.is-open .nav-drop-btn:not(.is-active) {
  color: var(--ink);
  background: transparent;
}

.menu-link:hover > i,
.nav-drop.is-open .nav-drop-btn:not(.is-active) > i {
  color: var(--navy);
}

.menu-link.is-active,
.menu-link.is-active:hover {
  color: var(--ink);
  background: #f3f4f6;
  font-weight: 700;
}

.menu-link.is-active > i,
.menu-link.is-active:hover > i {
  color: var(--navy);
}

.menu-link.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}

.nav-drop { position: relative; }

.nav-chev {
  font-size: 0.62rem;
  color: #9ca3af;
  transition: transform 0.2s ease;
}

.nav-drop.is-open .nav-chev,
.nav-drop:hover .nav-chev,
.nav-drop:focus-within .nav-chev { transform: rotate(180deg); }

.nav-drop-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 228px;
  padding: 8px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
  z-index: 60;
}

.nav-drop-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.nav-drop:hover .nav-drop-panel,
.nav-drop:focus-within .nav-drop-panel,
.nav-drop.is-open .nav-drop-panel { display: grid; }

.nav-drop.is-dismissed .nav-drop-panel { display: none; }

.nav-drop.is-dismissed .nav-chev { transform: none; }

.nav-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #1f2937;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-sub > i {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 9px;
  background: #f3f5f8;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
}

.nav-sub:hover,
.nav-sub.is-active { background: #f4f7fb; color: var(--navy); }

.nav-sub.is-active > i {
  background: var(--navy);
  color: #fff;
}

.header-tools {
  grid-column: 3;
  justify-self: end;
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.header-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  background: #111827;
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.92rem;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-login:hover {
  background: #000;
  color: #fff;
  transform: translateY(-2px);
}

.header-tools .btn-signup {
  padding: 10px 16px;
  font-size: 0.92rem;
}

.header-tools .btn-login,
.header-tools .btn-signup,
.header-tools .account-trigger {
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-toggle { display: none; }

.locale-menu { position: relative; }

.locale-btn {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  border: 0;
  background: transparent;
  color: #4b5563;
  border-radius: 999px;
  padding: 8px 8px;
  cursor: pointer;
}

.locale-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.locale-btn .slash { opacity: 0.6; }

.locale-btn .chev {
  width: 16px;
  height: 16px;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.locale-menu.is-open .chev { transform: rotate(180deg); }

.locale-btn:hover,
.locale-menu.is-open .locale-btn {
  color: var(--ink);
  background: #f3f4f6;
}

.locale-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(380px, calc(100vw - 32px));
  background: #fff;
  border-radius: 24px;
  padding: 22px 22px 16px;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.14);
  border: 1px solid rgba(17, 24, 39, 0.06);
  z-index: 60;
}

.locale-tabs {
  display: flex;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 4px;
}

.locale-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}

.locale-tabs button.is-on {
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
}

.locale-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-top: 18px;
}

.locale-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  color: inherit;
  opacity: 0.8;
}

.locale-opt.is-on {
  background: #f5f5f5;
  opacity: 1;
}

.locale-opt:hover { background: #f5f5f5; opacity: 1; }

.locale-opt strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.locale-opt small {
  display: block;
  color: #6b7280;
  font-size: 0.75rem;
  line-height: 1.3;
}

.cur-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
  line-height: 1;
}

.note-menu { position: relative; }

.note-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4b5563;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.note-btn:hover,
.note-menu.is-open .note-btn {
  background: #f3f4f6;
  color: var(--ink);
}

.note-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 2px #fff;
}

.note-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(380px, calc(100vw - 32px));
  background: #fff;
  border-radius: 24px;
  padding: 22px 18px 14px;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.14);
  border: 1px solid rgba(17, 24, 39, 0.06);
  z-index: 60;
}

.note-panel h2 {
  margin: 0 8px 12px;
  font-size: 1.15rem;
  font-weight: 700;
}

.note-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 28px 10px 8px;
  margin: 0 -4px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
}

.note-item:hover { background: #f5f5f5; }

.note-item img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.note-item img.is-logo {
  width: 72px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e7ebf2;
  padding: 3px;
  box-sizing: border-box;
  flex: 0 0 72px;
}

.note-item strong,
.note-item em,
.note-item time { display: block; }

.note-item strong {
  font-size: 0.9rem;
  font-weight: 600;
  font-style: normal;
}

.note-item em {
  margin-top: 2px;
  color: #6b7280;
  font-size: 0.84rem;
  font-style: normal;
  line-height: 1.4;
}

.note-item time {
  margin-top: 2px;
  color: #9ca3af;
  font-size: 0.75rem;
}

.note-empty { margin: 0 8px 8px; color: #6b7280; font-size: 0.9rem; }

.note-item.is-unread::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  transform: translateY(-50%);
}

.nav-toggle {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.25s ease;
}

.site-drawer {
  --bs-offcanvas-width: min(400px, 100%);
  --bs-offcanvas-bg: #fff;
  --bs-offcanvas-color: var(--ink);
  --bs-offcanvas-border-width: 0;
  --bs-offcanvas-padding-x: 0;
  --bs-offcanvas-padding-y: 0;
  --bs-offcanvas-transition: transform 0.52s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -22px 0 50px rgba(11, 47, 107, 0.18);
}

.offcanvas-backdrop.fade {
  transition: opacity 0.45s ease;
}

.offcanvas-backdrop.show {
  background: #07152f;
  opacity: 0.46;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 16px 18px;
  background: linear-gradient(180deg, #0b2f6b 0%, #12367a 100%);
  border-bottom: 3px solid var(--gold);
}

.drawer-head .brand img {
  width: 150px;
  height: 40px;
  background: #fff;
  border-radius: 8px;
}

.drawer-close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
}

.drawer-close:hover { background: rgba(255, 255, 255, 0.18); }

.site-drawer .offcanvas-body {
  display: flex;
  flex-direction: column;
  padding: 18px 14px 12px;
}

.drawer-label {
  margin: 0 8px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8b93a1;
}

.drawer-account {
  margin: 0 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: #1f2937;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.drawer-link > i {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  background: #f3f5f8;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}

.drawer-link span { flex: 1; min-width: 0; }

.drawer-group-btn { width: 100%; }

.drawer-group-btn .fa-chevron-down {
  width: auto;
  height: auto;
  flex: 0 0 auto;
  margin-left: auto;
  border-radius: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.drawer-group.is-open > .drawer-group-btn .fa-chevron-down { transform: rotate(180deg); }

.drawer-sub {
  display: grid;
  gap: 2px;
  padding: 2px 0 6px 14px;
}

.drawer-sub[hidden] { display: none; }

.drawer-sub .drawer-link { min-height: 46px; }

.drawer-sub .drawer-link > i {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  font-size: 0.8rem;
}

.drawer-link:hover {
  background: #f4f6f9;
  color: var(--navy);
}

.drawer-link.is-active {
  background: #f4f7fb;
  color: var(--navy);
}

.drawer-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: var(--gold);
}

.drawer-link.is-active > i {
  background: var(--navy);
  color: #fff;
}

.drawer-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.drawer-auth .btn-line,
.drawer-auth .btn-login,
.drawer-auth .btn-signup {
  width: 100%;
  padding: 12px 10px;
  font-size: 0.9rem;
}

.drawer-foot {
  display: grid;
  gap: 8px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
  background: #f7f8fb;
}

.drawer-foot a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #374151;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
}

.drawer-foot a:hover { color: var(--navy); }

.drawer-foot i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border: 1px solid var(--line);
}

.drawer-head .brand,
.drawer-close,
.site-drawer .offcanvas-body > .drawer-label,
.drawer-link,
.drawer-account,
.drawer-foot a {
  opacity: 0;
  transform: translateX(36px);
}

.site-drawer.showing .drawer-head .brand,
.site-drawer.show .drawer-head .brand,
.site-drawer.showing .drawer-close,
.site-drawer.show .drawer-close,
.site-drawer.showing .offcanvas-body > .drawer-label,
.site-drawer.show .offcanvas-body > .drawer-label,
.site-drawer.showing .drawer-link,
.site-drawer.show .drawer-link,
.site-drawer.showing .drawer-account,
.site-drawer.show .drawer-account,
.site-drawer.showing .drawer-foot a,
.site-drawer.show .drawer-foot a {
  animation: drawer-item-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.site-drawer.showing .drawer-head .brand,
.site-drawer.show .drawer-head .brand { animation-delay: 0.08s; }

.site-drawer.showing .drawer-close,
.site-drawer.show .drawer-close { animation-delay: 0.14s; }

.site-drawer.showing .offcanvas-body > .drawer-label,
.site-drawer.show .offcanvas-body > .drawer-label { animation-delay: 0.2s; }

.site-drawer.showing .drawer-nav > .drawer-link:nth-child(1),
.site-drawer.show .drawer-nav > .drawer-link:nth-child(1) { animation-delay: 0.26s; }

.site-drawer.showing .drawer-nav > .drawer-link:nth-child(2),
.site-drawer.show .drawer-nav > .drawer-link:nth-child(2) { animation-delay: 0.34s; }

.site-drawer.showing .drawer-nav > .drawer-link:nth-child(3),
.site-drawer.show .drawer-nav > .drawer-link:nth-child(3) { animation-delay: 0.42s; }

.site-drawer.showing .drawer-nav > .drawer-link:nth-child(4),
.site-drawer.show .drawer-nav > .drawer-link:nth-child(4) { animation-delay: 0.5s; }

.site-drawer.showing .drawer-nav > .drawer-link:nth-child(5),
.site-drawer.show .drawer-nav > .drawer-link:nth-child(5) { animation-delay: 0.58s; }

.site-drawer.showing .drawer-nav > .drawer-link:nth-child(6),
.site-drawer.show .drawer-nav > .drawer-link:nth-child(6) { animation-delay: 0.66s; }

.site-drawer.showing .drawer-nav > .drawer-link:nth-child(7),
.site-drawer.show .drawer-nav > .drawer-link:nth-child(7) { animation-delay: 0.74s; }

.site-drawer.showing .drawer-nav > .drawer-link:nth-child(8),
.site-drawer.show .drawer-nav > .drawer-link:nth-child(8) { animation-delay: 0.82s; }

.site-drawer.showing .drawer-nav > .drawer-group > .drawer-link,
.site-drawer.show .drawer-nav > .drawer-group > .drawer-link { animation-delay: 0.9s; }

.site-drawer.showing .drawer-sub .drawer-link,
.site-drawer.show .drawer-sub .drawer-link { animation-delay: 0.74s; }

.site-drawer.showing .drawer-account,
.site-drawer.show .drawer-account { animation-delay: 0.16s; }

.site-drawer.showing .drawer-foot a:nth-child(1),
.site-drawer.show .drawer-foot a:nth-child(1) { animation-delay: 1.02s; }

.site-drawer.showing .drawer-foot a:nth-child(2),
.site-drawer.show .drawer-foot a:nth-child(2) { animation-delay: 1.1s; }

.site-drawer.hiding .drawer-head .brand,
.site-drawer.hiding .drawer-close,
.site-drawer.hiding .offcanvas-body > .drawer-label,
.site-drawer.hiding .drawer-link,
.site-drawer.hiding .drawer-account,
.site-drawer.hiding .drawer-foot a {
  opacity: 1;
  transform: none;
  animation: none;
}

@keyframes drawer-item-in {
  from {
    opacity: 0;
    transform: translateX(36px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .offcanvas-backdrop.fade { transition: none; }

  .drawer-head .brand,
  .drawer-close,
  .site-drawer .offcanvas-body > .drawer-label,
  .drawer-link,
  .drawer-account,
  .drawer-foot a {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.account-menu { position: relative; }

.account-trigger {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: #111827;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.account-trigger:hover { background: #000; }

.account-trigger:has(.account-photo) {
  background: transparent;
  overflow: hidden;
}

.account-trigger:has(.account-photo):hover { background: transparent; }

html.auth-pending .header-tools .btn-signup,
html.auth-pending .header-tools .btn-login,
html.auth-pending .nav-auth-mobile {
  visibility: hidden;
}

html.auth-in .header-auth {
  display: flex;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
}

html.auth-in .header-auth .btn-signup,
html.auth-in .header-auth .login-anchor,
html.auth-in .header-auth .btn-login {
  display: none;
}

@media (min-width: 1200px) {
  html.auth-pending.auth-unknown .header-tools .locale-menu,
  html.auth-pending.auth-unknown .header-tools .note-menu,
  html.auth-pending.auth-unknown .header-tools .header-auth {
    visibility: hidden;
  }
}

.account-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.account-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.account-trigger .account-mark { width: 44px; height: 44px; background: transparent; }

.account-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 280px;
  z-index: 70;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #eceff3;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.14);
}

.account-pop[hidden] { display: none !important; }

.account-pop-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.account-pop-user .account-mark,
.account-pop-user .account-photo { width: 48px; height: 48px; flex: 0 0 48px;display: flex;align-items: center;justify-content: center; }

.account-pop-user > div { min-width: 0; flex: 1; }

.account-pop-user strong,
.account-pop-user span { display: block; overflow-wrap: anywhere; }

.account-pop-user strong { font-size: 0.98rem; line-height: 1.2; }

.account-pop-user span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
}

.account-pop-links { display: grid; padding: 6px 0; }

.account-pop-links a,
.account-pop-links button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-pop-links a:hover,
.account-pop-links button:hover { background: #f6f7f9; }

.account-pop-links i { width: 18px; text-align: center; color: #4b5563; }

.account-pop-links .js-logout { color: #b42318; }
.account-pop-links .js-logout i { color: inherit; }

.account-pop-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px;
  padding: 10px 8px;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  font-weight: 600;
}

.account-pop-theme > span { display: inline-flex; align-items: center; gap: 12px; }

.theme-switch {
  width: 44px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #e5e7eb;
  padding: 0;
  position: relative;
  cursor: pointer;
  flex: 0 0 44px;
}

.theme-switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.25);
  transition: transform 0.2s ease;
}

.theme-switch[aria-checked="true"] { background: #111827; }
.theme-switch[aria-checked="true"] span { transform: translateX(18px); }

html[data-theme="dark"] body { background: #0c1220; color: #e8edf5; }
html[data-theme="dark"] .site-header { background: rgba(12, 18, 32, 0.94); }
html[data-theme="dark"] .author-page,
html[data-theme="dark"] .account-pop,
html[data-theme="dark"] .author-card,
html[data-theme="dark"] .stay-tile { background: #121a2b; color: #e8edf5; }
html[data-theme="dark"] .account-pop,
html[data-theme="dark"] .author-card,
html[data-theme="dark"] .stay-tile { border-color: #243044; }
html[data-theme="dark"] .account-pop-user,
html[data-theme="dark"] .account-pop-theme,
html[data-theme="dark"] .review-row { border-color: #243044; }
html[data-theme="dark"] .account-pop-links a:hover,
html[data-theme="dark"] .account-pop-links button:hover { background: #1c2740; }
html[data-theme="dark"] .author-rate,
html[data-theme="dark"] .author-lead,
html[data-theme="dark"] .stay-kicker,
html[data-theme="dark"] .stay-where,
html[data-theme="dark"] .account-pop-user div span { color: #9aa6bd; }

@media (min-width: 1200px) and (max-width: 1359.98px) {
  .brand img { width: 120px; height: 38px; }
  .header-bar { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .site-nav { gap: 5px; }
  .site-nav > .menu-link,
  .nav-drop-btn { font-size: 0.78rem; padding: 8px 4px; letter-spacing: 0.015em; }
  .header-tools { min-width: 0; }
  .header-tools .btn-login,
  .header-tools .btn-signup { padding: 6px 8px; font-size: 0.8rem; }
}

@media (min-width: 1360px) and (max-width: 1599.98px) {
  .brand img { width: 132px; height: 38px; }
  .header-bar { gap: 8px; }
  .site-nav { gap: 8px; }
  .site-nav > .menu-link,
  .nav-drop-btn { font-size: 0.84rem; padding: 8px 6px; letter-spacing: 0.02em; }
  .header-tools { min-width: 0; gap: 6px; }
  .header-tools .btn-login,
  .header-tools .btn-signup { padding: 6px 8px; font-size: 0.8rem; }
}

@media (min-width: 1600px) {
  .brand img { width: 156px; height: 42px; }
  .site-nav { gap: 10px; }
  .site-nav > .menu-link,
  .nav-drop-btn { font-size: 0.9rem; padding: 8px 8px; letter-spacing: 0.03em; }
  .header-tools { min-width: 0; }
}

@media (max-width: 1199.98px) {
  .header-bar { display: flex; justify-content: space-between; gap: 8px; }
  .nav-toggle { display: flex; }
  .site-nav { display: none; }
  .header-tools .btn-login,
  .header-tools .btn-signup { display: none; }
  .header-auth:not(:has(.account-menu)) { display: none; }
  .header-tools .account-menu { display: block; }

  .locale-panel,
  .note-panel {
    position: fixed;
    top: calc(var(--header) + 8px);
    right: 16px;
  }
}

@media (max-width: 480px) {
  .header-bar { padding-left: 12px; padding-right: 12px; gap: 6px; }
  .brand { flex-shrink: 0; min-width: auto; }
  .brand img { width: 124px; height: 36px; }
  .header-tools { min-width: 0; gap: 2px; }
  .locale-btn { padding: 6px 2px; }
  .note-btn,
  .nav-toggle,
  .account-menu { flex-shrink: 0; }
}

@media (max-width: 380px) {
  .header-bar { padding-left: 10px; padding-right: 10px; }
  .brand img { width: 108px; height: 32px; }
  .locale-btn .slash,
  .locale-btn .chev { display: none; }
  .nav-toggle { width: 42px; height: 42px; }
}

.site-header,
.header-bar { overflow: visible; }

.login-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.login-nudge {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  z-index: 80;
  width: min(332px, calc(100vw - 28px));
  padding: 16px 16px 14px;
  background: #fff;
  color: #1f2937;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(17, 24, 39, 0.16);
  animation: loginNudgeDrop 0.42s cubic-bezier(0.16, 0.84, 0.3, 1);
}

.login-nudge[hidden] { display: none !important; }

.login-nudge-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}

.login-nudge-x:hover { background: #f3f4f6; color: #111827; }

.login-nudge-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-right: 16px;
}

.login-nudge-mark {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
}

.login-nudge-mark svg { display: block; width: 46px; height: 46px; }

.login-nudge p {
  margin: 2px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1f2937;
}

.login-nudge-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px solid #d5d9e0;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-weight: 700;
  text-decoration: none;
}

.login-nudge-cta:hover {
  background: #f8fafc;
  color: #111827;
}

@keyframes loginNudgeDrop {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes loginBlink {
  0% { box-shadow: 0 0 0 0 rgba(17, 24, 39, 0.55); }
  14% { box-shadow: 0 0 0 10px rgba(17, 24, 39, 0); }
  28%, 100% { box-shadow: 0 0 0 0 rgba(17, 24, 39, 0); }
}

a.btn-login.is-attention { animation: loginBlink 3s ease-out infinite; }

.login-nudge--drawer { display: none !important; }

@media (max-width: 1199.98px) {
  .header-tools .login-nudge { display: none !important; }
}

html.is-framed .login-nudge { display: none !important; }
html.is-framed a.btn-login.is-attention { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .login-nudge,
  a.btn-login.is-attention { animation: none; }
}
