/* Shared dashboard/Plus navigation and polished App download sheet. */
.product-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 13px 9px;
}
.product-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 49px;
  padding: 8px 7px;
  border: 1px solid #293442;
  border-radius: 8px;
  background: linear-gradient(145deg, #172333, #101822);
  color: #c2ccd9;
  text-align: center;
  text-decoration: none;
}
.product-tab > svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.product-tab > span {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.product-tab-plus {
  color: #d5c197;
}
.product-plus-badge {
  flex: none;
  padding: 3px 5px;
  border: 1px solid #d5c1974d;
  border-radius: 3px;
  background: #d5c19708;
  color: #d5c197;
  font-size: 9px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.05em;
}
.product-tab[aria-current="page"] {
  border-color: #a49d875c;
  background: linear-gradient(115deg, #253344, #192534);
  color: #e3d7bd;
  box-shadow: inset 0 -2px #d5c19788, inset 0 1px #eef3f808;
}
.product-tab[aria-current="page"] .product-plus-badge {
  background: #283645;
  color: #e3d7bd;
  border-color: #d5c19766;
}
.product-tab:hover,
.product-tab:focus-visible {
  border-color: #d5c19780;
  color: #eadfc9;
}
.product-tab:focus-visible {
  outline: 2px solid var(--gold, #d5c197);
  outline-offset: 2px;
}
.phone-app:has(.product-tabs) section[id] {
  scroll-margin-top: 160px;
}

.download-app-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(140deg, #f0d9a0, #d5c197 55%, #b8955a);
  color: #121820;
  font-size: 16px;
  font-weight: 800;
  box-shadow: inset 0 1px #fff6, 0 4px 14px #0003;
  letter-spacing: -0.05em;
  border: 1px solid #d5c19788;
}

body:has(.app-download-dialog[open]) {
  overflow: hidden;
}

.app-download-dialog {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 440px);
  max-width: none;
  max-height: calc(100svh - 24px);
  margin: 0 auto;
  border: 1px solid rgba(213, 193, 151, 0.28);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  padding: 0;
  color: #f3f5f8;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(213, 193, 151, 0.16), transparent 52%),
    linear-gradient(165deg, #1a2433 0%, #101822 42%, #0a0f16 100%);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.55);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
    system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app-download-dialog::backdrop {
  background: rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(8px);
}

.app-sheet-inner {
  position: relative;
  padding: 24px 20px max(18px, env(safe-area-inset-bottom));
}

.app-sheet-handle {
  position: absolute;
  top: 10px;
  left: calc(50% - 18px);
  height: 4px;
  width: 36px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
}

.app-sheet-close {
  position: absolute;
  top: 12px;
  right: 10px;
  z-index: 2;
  min-height: 40px;
  width: 40px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 50%;
  background: rgba(16, 24, 34, 0.75);
  font-size: 22px;
  line-height: 1;
  color: #c5d0de;
  cursor: pointer;
}

.app-sheet-close:hover {
  color: #f3f5f8;
  border-color: rgba(213, 193, 151, 0.4);
}

.app-sheet-hero {
  padding-right: 36px;
  margin-bottom: 14px;
}

.app-sheet-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 12px;
}

.app-sheet-brand .download-app-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 20px;
}

.app-sheet-brand > span:last-child {
  font-size: 20px;
  font-weight: 700;
  color: #ead9b4;
  letter-spacing: 0.06em;
}

.app-sheet-brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #b7c4d5;
  margin-top: 4px;
}

.app-sheet-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #d5c197;
  text-transform: uppercase;
}

.app-download-dialog h2 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #f5f7fb;
}

#appDownloadDescription {
  margin: 0;
  font-size: 13px;
  color: #c2ccd9;
  line-height: 1.65;
}

.app-feature-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  color: #d5c197;
}

.app-feature-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(213, 193, 151, 0.35), transparent);
}

.app-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}

.app-feature-grid > div {
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.03), transparent 45%),
    #121a26;
  padding: 10px 11px 10px 13px;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.app-feature-grid > div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: rgba(213, 193, 151, 0.55);
}

.app-feature-grid > div > span {
  display: block;
  font-size: 10px;
  color: #8fa0b4;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.app-feature-grid strong {
  display: block;
  font-size: 13px;
  color: #eef3f9;
  margin-top: 6px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.app-feature-grid small {
  display: block;
  margin-top: 4px;
  color: #aeb9cb;
  font-size: 11px;
  line-height: 1.45;
}

.app-feature-grid > div:hover,
.app-feature-grid .is-selected {
  border-color: rgba(213, 193, 151, 0.42);
  background:
    linear-gradient(145deg, rgba(213, 193, 151, 0.08), transparent 55%),
    #182232;
}

.app-feature-grid .is-selected strong {
  color: #ead9b4;
}

.app-feature-grid > div:nth-child(5) {
  grid-column: 1 / -1;
}

.app-download-panel {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(213, 193, 151, 0.18);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(213, 193, 151, 0.1), transparent 55%),
    rgba(12, 18, 28, 0.85);
}

.app-download-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.app-platform-download {
  appearance: none;
  min-height: 68px;
  border: 1px solid rgba(213, 193, 151, 0.35);
  background: linear-gradient(145deg, #314456, #1c2a3a);
  color: #f0e6d0;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.app-platform-download:hover:not(:disabled) {
  border-color: rgba(213, 193, 151, 0.7);
  transform: translateY(-1px);
}

.app-platform-download strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.app-platform-download span {
  font-size: 11px;
  color: #d5c197;
  font-weight: 500;
}

.app-platform-download:disabled {
  opacity: 1;
  border-color: rgba(148, 163, 184, 0.2);
  background: linear-gradient(145deg, #1a2432, #121a26);
  color: #d7e0ec;
  cursor: default;
}

.app-platform-download:disabled span {
  color: #a8b6c8;
}

.app-platform-download__icon {
  width: 18px;
  height: 18px;
  margin-bottom: 2px;
  opacity: 0.9;
}

.app-download-availability {
  text-align: center;
  font-size: 12px;
  color: #aeb9cb;
  margin: 12px 0 0;
  line-height: 1.5;
}

.app-sheet-return {
  appearance: none;
  display: block;
  width: 100%;
  margin: 14px auto 0;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: transparent;
  color: #c5d0de;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}

.app-sheet-return:hover {
  border-color: rgba(213, 193, 151, 0.4);
  color: #ead9b4;
}

@media (min-width: 720px) {
  .app-download-dialog {
    inset: 0;
    width: min(92vw, 420px);
    max-height: min(88svh, 720px);
    margin: auto;
    border-radius: 22px;
    border-bottom: 1px solid rgba(213, 193, 151, 0.28);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  }

  .app-sheet-handle {
    display: none;
  }

  .app-sheet-inner {
    padding: 28px 26px 24px;
  }
}

@media (max-width: 350px) {
  .product-tabs {
    gap: 7px;
  }
  .product-tab {
    gap: 5px;
    padding-inline: 5px;
  }
  .product-plus-badge {
    font-size: 8px;
  }
  .app-sheet-inner {
    padding-inline: 16px;
  }
  .app-download-dialog h2 {
    font-size: 22px;
  }
  .app-feature-grid {
    gap: 8px;
  }
}
