@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=Sarabun:wght@400;500;600&display=swap");

html[lang="zh-CN"],
html[lang="zh-CN"] body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Sarabun", sans-serif;
}

html[lang="ko"],
html[lang="ko"] body {
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Sarabun", sans-serif;
}

html[lang="ja"],
html[lang="ja"] body {
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "Sarabun", sans-serif;
}

/* layout + chrome on top of theme tokens */
#site-header {
  position: sticky;
  top: 0;
  z-index: 55;
  overflow: visible;
  background: linear-gradient(
    180deg,
    rgba(11, 16, 38, 0.97) 0%,
    rgba(11, 16, 38, 0.92) 70%,
    rgba(11, 16, 38, 0.75) 100%
  );
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(200, 205, 214, 0.12);
}

.chrome-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 0;
  position: relative;
  overflow: visible;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
}

.brand-lockup:hover {
  text-decoration: none;
  color: var(--gold-soft);
}

.brand-lockup strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.brand-lockup small {
  color: var(--silver);
  letter-spacing: 0.06em;
}

.brand-mark {
  color: var(--gold);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 12px rgba(232, 197, 71, 0.35));
  flex-shrink: 0;
}

.brand-mark img {
  display: block;
  width: 36px;
  height: 36px;
}

.app-nav {
  display: none;
}

.app-nav a,
.nav-drawer a,
.app-nav-link {
  color: var(--silver-soft);
  font-family: var(--font-display);
  font-size: 0.92rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  text-decoration: none;
}

.app-nav a:hover,
.app-nav a.active,
.nav-drawer a:hover,
.nav-drawer a.active,
.app-nav-link:hover,
.app-nav-link.active {
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  text-decoration: none;
}

.nav-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin-left: 0.35rem;
  padding: 0;
  border: 1px solid var(--line-silver);
  border-radius: 12px;
  background: rgba(28, 37, 69, 0.75);
  color: var(--gold-soft);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  position: relative;
  z-index: 80;
}

.nav-menu-bars,
.nav-menu-bars::before,
.nav-menu-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}

.nav-menu-bars::before,
.nav-menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-menu-bars::before {
  top: -6px;
}

.nav-menu-bars::after {
  top: 6px;
}

.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 8, 18, 0.72);
}

.nav-drawer,
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: min(300px, 88vw);
  height: 100dvh;
  margin: 0;
  padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 0.75rem
    calc(1.25rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: linear-gradient(180deg, #1a2244 0%, #0b1026 100%);
  border-right: 1px solid rgba(232, 197, 71, 0.28);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
  overflow-x: hidden;
  overflow-y: hidden;
}

.nav-drawer[hidden],
.nav-drawer-backdrop[hidden] {
  display: none !important;
}

.nav-drawer-title {
  margin: 0.35rem 0.65rem 0.4rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.app-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.app-nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.app-nav-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0.4rem 0.65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(240, 216, 120, 0.9);
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.app-nav-section-toggle:hover,
.app-nav-section-toggle:focus-visible {
  background: rgba(232, 197, 71, 0.12);
  color: var(--gold-soft);
}

.app-nav-section-title {
  margin: 0;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
  color: inherit;
  user-select: none;
}

.app-nav-section-chevron {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--gold);
  transition: transform 0.18s ease;
}

.app-nav-section.is-collapsed .app-nav-section-chevron {
  transform: rotate(-90deg);
}

.app-nav-section-items {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.app-nav-section-items[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .app-nav-section-chevron {
    transition: none;
  }
}

.nav-drawer a,
.app-nav-link,
.admin-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  font-size: 1rem;
  border-radius: 12px;
  color: #f0efe8;
}

.nav-drawer a:hover,
.app-nav-link:hover,
.admin-drawer-link:hover {
  color: var(--bg-deep);
}

.nav-drawer a.active,
.app-nav-link.active,
.admin-drawer-link.active {
  color: #1a1404;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(232, 197, 71, 0.55);
}

.app-nav-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: inherit;
}

.app-nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 52px;
  padding: 0.15rem 0.2rem 0.55rem;
  flex-shrink: 0;
}

.app-sidebar-brand {
  min-width: 0;
  flex: 1;
}

.sidebar-collapse-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line-silver);
  border-radius: 12px;
  background: rgba(28, 37, 69, 0.75);
  color: var(--gold-soft);
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
}

.sidebar-collapse-btn:hover {
  background: rgba(232, 197, 71, 0.18);
}

#sidebar-lang-slot {
  flex-shrink: 0;
}

.app-sidebar-foot {
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(200, 205, 214, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(11, 16, 38, 0.92), #0b1026);
}

.app-sidebar-user {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.25rem 0.15rem;
}

.nav-drawer-logout {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.15rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-silver);
  border-radius: 12px;
  background: transparent;
  color: var(--silver-soft);
  font-family: var(--font-display);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.nav-drawer-logout:hover {
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
}

body.nav-drawer-open {
  overflow: hidden;
}

body.has-app-sidebar {
  --samta-sidebar-w: 16.75rem;
  --samta-sidebar-collapsed-w: 4.65rem;
}

@media (max-width: 899px) {
  body.has-app-sidebar #site-header {
    z-index: 80;
  }
}

body.has-app-sidebar main.page {
  box-sizing: border-box;
  min-height: 100dvh;
  min-height: 100svh;
  padding-top: 0.65rem;
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

.chrome-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 0;
}

@media (max-width: 899px) {
  /* Keep hamburger on-screen: drop header logout (lives in drawer) */
  .chrome-user .btn {
    display: none !important;
  }

  body[data-samta-gateway="1"].is-samta-member .chrome-user .btn-enter-app {
    display: inline-flex !important;
  }

  .chrome-user .user-chip {
    font-size: 0.78rem;
    max-width: 4.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-sidebar,
  .nav-drawer {
    transform: translateX(-105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.22s ease, visibility 0.22s ease;
  }

  body.nav-drawer-open .app-sidebar,
  body.nav-drawer-open .nav-drawer {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .sidebar-collapse-btn {
    display: none !important;
  }

  body.has-app-sidebar .app-sidebar-head {
    display: none;
  }

  body.has-app-sidebar main.page.page-wrap {
    width: calc(100% - 1.5rem);
    max-width: none;
  }

  body.has-app-sidebar main.page {
    min-height: calc(100dvh - 4.5rem);
    min-height: calc(100svh - 4.5rem);
  }
}

@media (min-width: 900px) {
  .app-nav-desktop {
    display: none !important;
  }

  .nav-menu-toggle,
  .nav-drawer-backdrop {
    display: none !important;
  }

  body.has-app-sidebar {
    --samta-sidebar-current: var(--samta-sidebar-w);
  }

  body.has-app-sidebar.sidebar-collapsed {
    --samta-sidebar-current: var(--samta-sidebar-collapsed-w);
  }

  body.has-app-sidebar .app-sidebar,
  body.has-app-sidebar .nav-drawer.app-sidebar {
    display: flex !important;
    width: var(--samta-sidebar-current);
    transform: none;
    visibility: visible;
    pointer-events: auto;
    transition: width 0.2s ease;
  }

  .sidebar-collapse-btn {
    display: inline-flex;
  }

  body.has-app-sidebar.sidebar-collapsed .app-sidebar-head {
    flex-direction: column;
    align-items: center;
  }

  body.has-app-sidebar.sidebar-collapsed .app-nav-label,
  body.has-app-sidebar.sidebar-collapsed .nav-drawer-title,
  body.has-app-sidebar.sidebar-collapsed .app-nav-section-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.has-app-sidebar.sidebar-collapsed .app-nav-section-toggle {
    justify-content: center;
    padding-inline: 0.35rem;
  }

  body.has-app-sidebar.sidebar-collapsed .app-nav-link,
  body.has-app-sidebar.sidebar-collapsed .admin-drawer-link {
    justify-content: center;
    padding-inline: 0.45rem;
  }

  body.has-app-sidebar.sidebar-collapsed .nav-drawer-logout {
    justify-content: center;
    font-size: 0;
    padding: 0.55rem;
  }

  body.has-app-sidebar.sidebar-collapsed .nav-drawer-logout::after {
    content: "⎋";
    font-size: 1.1rem;
    line-height: 1;
  }

  /* Brand + account live in the sidebar — free the full remaining column */
  body.has-app-sidebar #site-header {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.has-app-sidebar main.page.page-wrap {
    width: auto;
    max-width: none;
    margin-left: var(--samta-sidebar-current);
    margin-right: 0;
    padding-inline: 1.35rem;
  }

  body.has-app-sidebar .site-footer {
    margin-left: var(--samta-sidebar-current);
  }

  body.has-app-sidebar .site-footer-inner.page-wrap {
    width: auto;
    max-width: none;
    padding-inline: 1.35rem;
  }

  body.has-app-sidebar .samta-toast-host {
    top: max(0.75rem, env(safe-area-inset-top, 0px));
  }
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--silver);
  min-width: 0;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--wood-deep, #2a1f18);
}

.user-avatar-lg {
  width: 48px;
  height: 48px;
}

.profile-plan-card {
  margin: 0 0 1.15rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(232, 197, 71, 0.42);
  background: rgba(14, 10, 8, 0.42);
  display: grid;
  gap: 0.4rem;
}

.profile-plan-card .eyebrow {
  margin: 0;
}

.profile-plan-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.profile-plan-name {
  font-size: 1.15rem;
  color: var(--gold-soft, #f0d878);
}

.profile-plan-hint,
.profile-plan-until {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.profile-plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 0.35rem;
  width: fit-content;
  max-width: 100%;
  background: linear-gradient(135deg, #f3d56a 0%, #e8c547 40%, #c9a227 100%);
  color: #1a1404;
  border-color: #f0d878;
  font-weight: 700;
}

.profile-plan-cta:hover {
  color: #120e03;
  text-decoration: none;
}

@media (max-width: 480px) {
  .profile-plan-cta {
    width: 100%;
  }
}

.status-pill.trial {
  background: rgba(232, 197, 71, 0.16);
  color: var(--gold-soft, #f0d878);
}

.status-pill.expired {
  background: rgba(232, 120, 90, 0.18);
  color: #f3c4b6;
}

.profile-account-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--silver, #c9b8a8) 25%, transparent);
}

.profile-account-banner .eyebrow {
  margin: 0;
}

.profile-account-banner strong {
  display: block;
  margin: 0.15rem 0;
}

.profile-account-banner .muted {
  margin: 0;
  font-size: 0.85rem;
}

.profile-setup-note {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(232, 197, 71, 0.35);
  background: rgba(232, 197, 71, 0.1);
  color: var(--gold-soft, #f0d878);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* First-run alert: why birth date + birth coordinates matter, and the GPS offer */
.profile-setup-alert {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(232, 197, 71, 0.45);
  border-left: 4px solid var(--gold, #e8c547);
  background: rgba(232, 197, 71, 0.09);
  font-size: 0.95rem;
  line-height: 1.55;
}

.profile-setup-alert-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--gold-soft, #f0d878);
}

.profile-setup-alert-list {
  margin: 0 0 0.65rem;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.35rem;
  color: var(--silver-soft, #e8eaef);
}

.profile-setup-alert-list strong {
  color: var(--gold-soft, #f0d878);
}

.profile-setup-alert-gps {
  margin: 0;
  font-size: 0.88rem;
  color: var(--silver-soft, #e8eaef);
}

.user-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9rem;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

/* Fixed toast stack — below chrome so hamburger / nav stay usable */
.samta-toast-host {
  position: fixed;
  top: calc(4.75rem + env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  left: auto;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: min(320px, calc(100vw - 1.5rem));
  max-height: min(40dvh, 280px);
  overflow-y: auto;
  pointer-events: none;
}

@media (max-width: 899px) {
  .samta-toast-host {
    /* Keep toasts off the header row (brand + login + hamburger) */
    top: calc(5.25rem + env(safe-area-inset-top, 0px));
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    left: max(0.65rem, env(safe-area-inset-left, 0px));
    width: auto;
    max-height: min(36dvh, 240px);
  }
}

.samta-toast {
  pointer-events: auto;
  position: relative;
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 2.4rem 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--line-silver);
  background: rgba(20, 27, 51, 0.94);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  font-size: 0.9rem;
  color: var(--silver-soft);
  backdrop-filter: blur(10px);
  animation: toast-in 0.28s ease both;
}

.samta-toast-text {
  margin: 0;
  color: inherit;
  line-height: 1.4;
}

.samta-toast-close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--silver);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}

.samta-toast-close:hover {
  color: var(--gold-soft);
  background: rgba(232, 197, 71, 0.12);
}

.samta-toast .btn {
  justify-self: start;
}

.action-toast {
  padding-right: 0.95rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.action-toast-ok {
  background: #141b33;
  color: #fff8e7;
  border: 2px solid #e8c547;
}

.action-toast-err {
  background: #e8c547;
  color: #141b33;
  border: 2px solid #1a1020;
}

@media (max-width: 899px) {
  .action-toast {
    font-size: 1.1rem;
    line-height: 1.45;
  }
}

/* No close button — auto-dismisses, so keep the text padding even */
.consent-saved-toast {
  border-color: rgba(232, 197, 71, 0.45);
  padding-right: 0.95rem;
}

.demo-toast {
  border-style: dashed;
  border-color: rgba(232, 197, 71, 0.45);
  background: rgba(28, 37, 69, 0.95);
  color: var(--gold-soft);
}

.entitle-trial {
  border-color: rgba(232, 197, 71, 0.45);
  background: rgba(28, 32, 20, 0.95);
  color: var(--gold-soft);
}

.entitle-once {
  border-color: rgba(200, 205, 214, 0.35);
}

.entitle-basic {
  border-color: rgba(232, 93, 117, 0.35);
  color: #f0c4cc;
}

.entitle-paid {
  border-color: rgba(94, 207, 155, 0.4);
  color: var(--good);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Legacy class kept for any residual markup */
.demo-banner,
.entitle-banner {
  display: none !important;
}

.guest-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: var(--texture-wood);
  border: 1px solid rgba(107, 74, 46, 0.45);
}

main.page {
  padding: 0.5rem 0 3rem;
}

.hero-landing {
  min-height: calc(100vh - 5rem);
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: 2rem 0 3rem;
}

.hero-landing h1 {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  color: var(--gold-soft);
  text-shadow: 0 0 40px rgba(232, 197, 71, 0.25);
}

.hero-landing .support {
  max-width: 36rem;
  font-size: 1.1rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 840px) {
  .grid-2 {
    grid-template-columns: 1.1fr 1fr;
  }
}

.yam-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  border: 1px solid var(--line-silver);
}

.yam-now-name {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(1.35rem, 3.6vw, 1.85rem);
  color: var(--gold-soft, #f0d878);
}

.vibe-good { color: var(--good); border-color: rgba(94, 207, 155, 0.45); }
.vibe-neutral { color: var(--neutral); }
.vibe-caution { color: var(--caution); border-color: rgba(232, 93, 117, 0.45); }

.score-big {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--gold);
  margin: 0.25rem 0;
}

.life-graph-svg {
  width: 100%;
  height: auto;
  display: block;
}

.life-graph-svg .axis-label {
  fill: var(--silver-deep);
  font-size: 11px;
  font-family: var(--font-body);
}

.forecast-list,
.result-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.65rem;
}

.forecast-list li,
.result-list li {
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(20, 27, 51, 0.55);
}

.lagna-forecast {
  margin-top: 1.25rem;
}

.lagna-forecast h2 {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
}

.lagna-forecast-meta {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
}

.lagna-forecast-vibe {
  margin: 0 0 0.65rem;
  color: var(--gold, #e8c547);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lagna-forecast-daily,
.lagna-forecast-window {
  margin: 0 0 0.75rem;
  line-height: 1.55;
}

.lagna-forecast-disclaimer {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0.85;
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}

.form-grid label {
  display: grid;
  gap: 0.35rem;
  color: var(--silver-soft);
  font-size: 0.92rem;
}

.form-grid > .btn {
  min-height: 44px;
  width: 100%;
  padding: 0.75rem 1.35rem;
  overflow: visible;
  font-size: 1rem;
  text-indent: 0;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  background: rgba(11, 16, 38, 0.65);
  border: 1px solid var(--line-silver);
  border-radius: 12px;
  color: var(--text);
  padding: 0.65rem 0.8rem;
}

.place-field .place-hint,
#lagnaHint {
  font-size: 0.82rem;
  line-height: 1.35;
}

.profile-gender-looks {
  display: grid;
  gap: 0.4rem;
}

.profile-gender-look-list {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  list-style: none;
  margin: 0;
  padding: 0.15rem 0 0.4rem;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.profile-gender-look-list li {
  flex: 0 0 4.6rem;
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.3;
}

.profile-gender-look-list img {
  width: 4.6rem;
  height: 6.1rem;
  object-fit: cover;
  border-radius: 10px;
  max-width: 100%;
}

.place-field {
  display: grid;
  gap: 0.4rem;
}

.place-label {
  color: var(--silver-soft);
  font-size: 0.92rem;
}

/* Search runs on Enter / button only — the input never fires requests while typing */
.place-search-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.place-search-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.place-search-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
}

.place-gps-btn {
  justify-self: start;
  min-height: 44px;
  padding: 0.6rem 1.05rem;
  border-radius: 12px;
  font-size: 0.88rem;
}

.place-field .place-hint {
  margin: 0;
}

/* display:grid would defeat the UA [hidden] rule */
.place-gps-confirm[hidden] {
  display: none;
}

.place-gps-confirm {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line-silver);
  background: rgba(28, 37, 69, 0.6);
  display: grid;
  gap: 0.6rem;
}

.place-gps-confirm-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--silver-soft, #e8eaef);
}

.place-gps-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.place-gps-confirm-actions .btn {
  min-height: 44px;
  border-radius: 12px;
}

.pricing-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .pricing-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.price-card {
  position: relative;
  padding: 1.35rem;
}

.price-card .price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0.4rem 0;
  color: var(--marble-ink);
}

.price-card .price small {
  display: block;
  font-size: 0.85rem;
  color: var(--marble-muted);
}

.price-card.highlight {
  outline: 2px solid var(--gold-deep);
  box-shadow: 0 0 0 6px rgba(232, 197, 71, 0.15);
}

.ribbon {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold-deep));
  color: #1a1404;
  font-family: var(--font-display);
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 18, 0.72);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 1rem;
}

.modal-card {
  width: min(420px, 100%);
}

.watch-shell {
  width: min(360px, 100%);
  margin: 0 auto;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid rgba(200, 205, 214, 0.35);
  background:
    radial-gradient(circle at 35% 30%, rgba(232, 197, 71, 0.16), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(107, 74, 46, 0.35), transparent 50%),
    #0b1026;
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  box-shadow: var(--shadow-glow), inset 0 0 40px rgba(0, 0, 0, 0.45);
}

.watch-face {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}

.watch-modes {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.watch-modes button {
  border-radius: 999px;
  border: 1px solid var(--line-silver);
  background: transparent;
  color: var(--silver-soft);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-family: var(--font-display);
}

.watch-modes button.active {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1a1404;
  border-color: transparent;
}

.hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: bottom center;
  background: var(--gold);
  border-radius: 2px;
  width: 2px;
}

.hand.hour { height: 22%; width: 3px; }
.hand.minute { height: 30%; background: var(--silver); }
.hand.second { height: 34%; background: var(--alert); width: 1px; }

.planet-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-soft);
  left: 50%;
  top: 50%;
  margin: -4px;
}

.sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
}

.sound-grid button {
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(28, 37, 69, 0.7);
  color: var(--text);
  padding: 0.65rem;
  cursor: pointer;
}

.sound-grid button.muted {
  opacity: 0.45;
  text-decoration: line-through;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tabs button {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--line-silver);
  background: transparent;
  color: var(--silver-soft);
  padding: 0.55rem;
  cursor: pointer;
  font-family: var(--font-display);
}

.tabs button.active {
  background: var(--texture-wood);
  color: var(--text);
  border-color: rgba(107, 74, 46, 0.55);
}

.switch-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-family: var(--font-display);
  background: rgba(200, 205, 214, 0.15);
  color: var(--silver-soft);
}

.status-pill.on {
  background: rgba(94, 207, 155, 0.18);
  color: var(--good);
}

.status-pill.demo {
  background: rgba(232, 197, 71, 0.16);
  color: var(--gold-soft);
}

.takfak-tip {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--gold);
  background: rgba(232, 197, 71, 0.08);
  animation: fade-up 0.55s ease both;
}

.takfak-tip.vibe-caution {
  border-left-color: var(--caution);
  background: rgba(232, 93, 117, 0.08);
}

.takfak-tip.vibe-good {
  border-left-color: var(--good);
  background: rgba(94, 207, 155, 0.08);
}

.takfak-tip .eyebrow {
  margin-bottom: 0.25rem;
}

.takfak-opt-in {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
}

.upsell-note {
  margin: 0.75rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(232, 197, 71, 0.28);
  background: rgba(232, 197, 71, 0.08);
  color: var(--muted, #b8b0a0);
  font-size: 0.92rem;
}

.upsell-note a {
  color: var(--gold-soft, #f0d878);
}

.switch-row.is-locked {
  opacity: 0.55;
}

.price-card.price-free {
  border-color: rgba(94, 207, 155, 0.35);
}

/* —— ปฏิทินฤกษ์ยาม —— */
.ruek-cal-disclaimer {
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.ruek-cal-export {
  margin-top: 0.75rem;
}

.ruek-cal-export .btn {
  min-height: 44px;
}

.ruek-cal-export-hint {
  font-size: 0.88rem;
  margin-top: 0.35rem;
  margin-bottom: 1rem;
}

.ruek-cal-views {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
}

.ruek-cal-views button {
  min-height: 44px;
}

.ruek-cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}

.ruek-cal-toolbar .btn {
  min-height: 44px;
  min-width: 44px;
}

.ruek-cal-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1rem;
  min-width: 8rem;
}

.ruek-cal-views button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ruek-slot-list .ruek-slot {
  list-style: none;
}

.ruek-slot-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
}

.ruek-slot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.ruek-week {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .ruek-week {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

.ruek-week-day {
  border: 1px solid rgba(200, 205, 214, 0.14);
  border-radius: 14px;
  padding: 0.55rem;
  background: rgba(11, 16, 38, 0.35);
}

.ruek-week-day.is-today {
  border-color: rgba(232, 197, 71, 0.45);
  box-shadow: inset 0 0 0 1px rgba(232, 197, 71, 0.2);
}

.ruek-week-head {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0.15rem 0;
  min-height: 44px;
  font: inherit;
  text-align: left;
}

.ruek-week-slots {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
}

.ruek-week-slots li {
  padding: 0.2rem 0;
  border-top: 1px solid rgba(200, 205, 214, 0.08);
}

.ruek-week-slots li.ruek-now {
  border: 1px solid rgba(232, 197, 71, 0.55);
  border-radius: 8px;
  padding: 0.28rem 0.4rem;
  margin-top: 0.15rem;
}

.ruek-month-wd {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  text-align: center;
  color: var(--silver-soft);
  font-size: 0.8rem;
  font-family: var(--font-display);
}

.ruek-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.ruek-month-cell {
  min-height: 5.2rem;
  border-radius: 12px;
  border: 1px solid rgba(200, 205, 214, 0.12);
  background: rgba(11, 16, 38, 0.4);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  padding: 0.4rem;
  cursor: pointer;
  font: inherit;
  text-align: left;
  overflow: hidden;
}

.ruek-month-cell.empty {
  border: 0;
  background: transparent;
  cursor: default;
  min-height: 0;
}

.ruek-month-cell.is-today {
  border-color: rgba(232, 197, 71, 0.5);
}

@keyframes ruek-now-border {
  0%,
  100% {
    border-color: rgba(232, 197, 71, 0.38);
    box-shadow: inset 0 0 0 1px rgba(232, 197, 71, 0.16);
  }
  50% {
    border-color: rgba(232, 197, 71, 0.98);
    box-shadow: inset 0 0 0 2px rgba(232, 197, 71, 0.55);
  }
}

.ruek-now {
  animation: ruek-now-border 1.8s ease-in-out infinite;
}

.ruek-month-cell.vibe-good {
  background: rgba(94, 207, 155, 0.1);
}

.ruek-month-cell.vibe-caution {
  background: rgba(232, 93, 117, 0.1);
}

.ruek-month-cell.has-sig.sig-calm {
  box-shadow: inset 0 0 0 1px rgba(94, 207, 155, 0.22);
}

.ruek-month-cell.has-sig.sig-caution {
  box-shadow: inset 0 0 0 1px rgba(232, 197, 71, 0.28);
}

.ruek-month-cell.has-sig.sig-alert {
  box-shadow: inset 0 0 0 1px rgba(232, 93, 117, 0.35);
}

.ruek-month-top {
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem;
}

.ruek-month-num {
  font-family: var(--font-display);
  font-weight: 600;
}

.ruek-month-score {
  font-size: 0.72rem;
  color: var(--gold-soft);
}

.ruek-month-hint {
  font-size: 0.68rem;
  color: var(--silver-soft);
  margin-top: auto;
}

.ruek-month-sig {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
  min-width: 0;
}

.ruek-month-icons {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.ruek-sig-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 4px;
  color: var(--gold-soft);
  background: rgba(232, 197, 71, 0.08);
  flex-shrink: 0;
  position: relative;
}

.ruek-sig-ico .ruek-sig-svg {
  display: block;
}

.ruek-sig-ico .ruek-sig-glyph {
  position: absolute;
  font-size: 0.55rem;
  line-height: 1;
  opacity: 0.85;
  pointer-events: none;
}

.ruek-sig-ico.ruek-sig-guardian .ruek-sig-svg {
  opacity: 0.35;
}

.ruek-sig-sev.sev-calm {
  color: #5ecf9b;
  background: rgba(94, 207, 155, 0.12);
}

.ruek-sig-sev.sev-caution {
  color: #e8c547;
  background: rgba(232, 197, 71, 0.12);
}

.ruek-sig-sev.sev-alert {
  color: #e85d75;
  background: rgba(232, 93, 117, 0.14);
}

.ruek-month-tip,
.ruek-month-advice {
  display: block;
  font-size: 0.62rem;
  line-height: 1.25;
  color: var(--silver-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ruek-month-advice {
  color: var(--gold-soft);
  font-weight: 500;
}

.ruek-month-legend {
  font-size: 0.88rem;
}

.ruek-day-sig {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(200, 205, 214, 0.14);
  background: rgba(11, 16, 38, 0.45);
}

.ruek-day-sig.sig-calm {
  border-color: rgba(94, 207, 155, 0.28);
}

.ruek-day-sig.sig-caution {
  border-color: rgba(232, 197, 71, 0.32);
}

.ruek-day-sig.sig-alert {
  border-color: rgba(232, 93, 117, 0.35);
}

.ruek-day-sig-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.ruek-day-sig p {
  margin: 0.2rem 0;
}

.ruek-day-advice {
  color: var(--gold-soft);
  font-weight: 600;
}

/* ปัดเปลี่ยนหน้า (มือถือ) — ป้ายบอกหน้าถัดไป, ไม่แตะ layout ของหน้า */
.swipe-nav-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 60;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 197, 71, 0.45);
  background: rgba(11, 16, 38, 0.92);
  color: var(--gold-soft, #f0d878);
  font-family: var(--font-display, inherit);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.swipe-nav-hint.is-on {
  animation: swipe-hint-in 0.5s ease both;
}

@keyframes swipe-hint-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* สุดเมนูแล้ว — สะกิดเบา ๆ */
[data-swipe-edge="next"] {
  animation: swipe-edge-next 0.28s ease both;
}

[data-swipe-edge="prev"] {
  animation: swipe-edge-prev 0.28s ease both;
}

@keyframes swipe-edge-next {
  0%,
  100% {
    transform: translateX(0);
  }
  45% {
    transform: translateX(-9px);
  }
}

@keyframes swipe-edge-prev {
  0%,
  100% {
    transform: translateX(0);
  }
  45% {
    transform: translateX(9px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .swipe-nav-hint.is-on {
    animation: none;
    opacity: 1;
  }
  [data-swipe-edge="next"],
  [data-swipe-edge="prev"] {
    animation: none;
  }
  .ruek-now {
    animation: none;
    border-color: rgba(232, 197, 71, 0.78);
    box-shadow: inset 0 0 0 2px rgba(232, 197, 71, 0.42);
  }
}

@media (max-width: 520px) {
  .ruek-month-cell {
    min-height: 3.8rem;
    padding: 0.22rem;
    gap: 0.08rem;
  }
  .ruek-month-hint {
    display: none;
  }
  .ruek-month-tip {
    font-size: 0.55rem;
  }
  .ruek-month-advice {
    display: none;
  }
  .ruek-sig-ico {
    width: 0.9rem;
    height: 0.9rem;
  }
  .ruek-sig-svg {
    width: 11px;
    height: 11px;
  }
}

.lang-switch-host,
.lang-switch {
  position: relative;
  flex-shrink: 0;
  z-index: 60;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line-silver, rgba(200, 205, 214, 0.28));
  border-radius: 12px;
  background: rgba(28, 37, 69, 0.75);
  color: var(--gold-soft, #f0d878);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.lang-switch-badge,
.lang-switch-opt-badge {
  font-family: var(--font-display, "Chakra Petch", "Sarabun", sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.lang-switch-menu,
.lang-switch-menu[hidden],
.lang-switch:not(.is-open) .lang-switch-menu {
  display: none !important;
}

.lang-switch.is-open .lang-switch-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  left: auto;
  z-index: 130;
  display: grid !important;
  gap: 0.1rem;
  min-width: 12rem;
  width: max-content;
  max-width: min(18rem, calc(100vw - 1.25rem));
  max-height: min(70vh, 24.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.25rem;
  border: 1px solid var(--line-silver, rgba(200, 205, 214, 0.28));
  border-radius: 12px;
  background: rgba(14, 20, 42, 0.98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.lang-switch-opt-name {
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: start;
}

.lang-switch-compact .lang-switch-opt-name {
  display: inline;
}

.lang-switch-opt {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  width: 100%;
  padding: 0.3rem 0.55rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text, #f3ede0);
  text-align: start;
  cursor: pointer;
}

.lang-switch-opt[aria-selected="true"] {
  background: rgba(232, 197, 71, 0.16);
  color: var(--gold-soft, #f0d878);
}

@media (hover: hover) and (pointer: fine) {
  .lang-switch-opt:hover:not([aria-selected="true"]) {
    background: rgba(200, 205, 214, 0.08);
  }
}

.lang-switch-opt:focus-visible:not([aria-selected="true"]) {
  outline: 2px solid var(--gold, #e8c547);
  outline-offset: -2px;
}

.lang-setting {
  border: 1px solid var(--line-silver, rgba(200, 205, 214, 0.22));
  border-radius: 14px;
  padding: 0.85rem 1rem 1rem;
  margin: 0.4rem 0 0.8rem;
}

.lang-setting legend {
  padding: 0 0.35rem;
  color: var(--gold-soft, #f0d878);
  font-family: var(--font-display, "Chakra Petch", "Sarabun", sans-serif);
}

.lang-setting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.5rem;
}

.lang-setting-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  border: 1px solid var(--line-silver, rgba(200, 205, 214, 0.22));
  border-radius: 12px;
  background: rgba(28, 37, 69, 0.55);
  color: inherit;
  cursor: pointer;
}

.lang-setting-opt[aria-pressed="true"] {
  border-color: var(--gold, #e8c547);
  background: rgba(232, 197, 71, 0.16);
  color: var(--gold-soft, #f0d878);
}

@media (hover: hover) and (pointer: fine) {
  .lang-setting-opt:hover:not([aria-pressed="true"]) {
    background: rgba(200, 205, 214, 0.08);
  }
}

@media (max-width: 899px) {
  #site-header .lang-switch-host {
    order: 3;
  }

  #site-header .nav-menu-toggle,
  #site-header #cta-login-header {
    order: 4;
  }

  .lang-switch.is-open .lang-switch-menu {
    right: 0;
    left: auto;
    transform: none;
    min-width: 12rem;
    max-width: min(18rem, calc(100vw - 1.25rem));
  }
}

.app-sidebar-foot .lang-switch-host {
  margin-top: 0.35rem;
}

.app-sidebar-foot .lang-switch.is-open .lang-switch-menu {
  top: auto;
  bottom: calc(100% + 0.35rem);
  right: 0;
  left: auto;
}

.profile-ai-card {
  margin-top: 1.25rem;
}

.profile-ai-card h2 {
  margin: 0.15rem 0 0.45rem;
  font-size: 1.25rem;
}

.profile-ai-lead,
.profile-ai-card #ai-status {
  margin: 0 0 0.65rem;
  line-height: 1.45;
}

.profile-ai-key-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.profile-ai-key-row input {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 44px;
}

.profile-ai-toggle,
.profile-ai-actions .btn {
  min-height: 44px;
  min-width: 44px;
  width: auto;
  height: auto;
  padding: 0.65rem 1.1rem;
  overflow: visible;
  font-size: 1rem;
  text-indent: 0;
  flex: 0 1 auto;
}

.profile-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

@media (max-width: 480px) {
  .profile-ai-actions .btn,
  .profile-ai-toggle {
    width: 100%;
  }
}

.notify-permit-card {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.05rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(232, 197, 71, 0.28);
  background: rgba(11, 16, 38, 0.35);
}

.notify-permit-card .cta-row,
.notify-permit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.notify-permit-card .btn,
.notify-permit-banner .btn,
.notify-permit-actions .btn {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

.notify-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.9rem 0 0.35rem;
  font-size: 0.92rem;
}

.notify-consent-row input {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 0.15rem;
}

.notify-permit-banner {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(232, 197, 71, 0.32);
  background: rgba(232, 197, 71, 0.1);
}

.notify-permit-banner p {
  margin: 0;
}

.notify-ios-hint {
  margin-top: 0.55rem;
}

@media (max-width: 480px) {
  .notify-permit-actions .btn {
    width: 100%;
  }
}

.feedback-page {
  max-width: 36rem;
}

body.has-app-sidebar main.page.page-wrap.feedback-page {
  max-width: 36rem;
  margin-inline: auto;
  width: 100%;
}

.feedback-page .surface-wood {
  max-width: 36rem;
  margin-inline: auto;
  overflow: visible;
}

.feedback-page p,
.feedback-page .muted {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.feedback-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  font: inherit;
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  min-height: 44px;
  border-radius: 0.45rem;
  border: 1px solid rgba(232, 197, 71, 0.28);
  background: rgba(8, 12, 28, 0.65);
  color: var(--text, #f3ede0);
}

.feedback-form textarea {
  min-height: 8rem;
}

.feedback-form .btn {
  width: auto;
}

@media (max-width: 560px) {
  .feedback-form .btn {
    width: 100%;
  }
}

@media (display-mode: standalone) {
  body.has-app-sidebar #site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .nav-menu-toggle,
  .app-nav-link,
  .sidebar-collapse-btn {
    min-height: 44px;
    min-width: 44px;
  }
}
