:root {
  color-scheme: dark;
  --bg: #100b18;
  --bg-deep: #0b0711;
  --surface: rgba(30, 21, 42, 0.82);
  --surface-solid: #1b1326;
  --surface-raised: #24182f;
  --line: rgba(230, 205, 158, 0.16);
  --line-strong: rgba(230, 205, 158, 0.32);
  --text: #f7f0e6;
  --muted: #b9adbf;
  --subtle: #807488;
  --gold: #d8bb80;
  --gold-light: #f1dca9;
  --gold-dark: #987545;
  --plum: #5a3868;
  --plum-bright: #7d4d8c;
  --green: #83c7a5;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--bg-deep);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(91, 55, 107, 0.32), transparent 35rem),
    linear-gradient(180deg, #140d1e 0%, var(--bg) 45%, var(--bg-deep) 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

button {
  border: 0;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

::selection {
  color: #1a1122;
  background: var(--gold-light);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
  opacity: 0.12;
}

.ambient-one {
  top: 15%;
  left: -15rem;
  background: #a05cad;
}

.ambient-two {
  right: -14rem;
  bottom: 10%;
  background: #b58f50;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 110px;
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 86px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(216, 187, 128, 0.06);
  box-shadow: inset 0 0 20px rgba(216, 187, 128, 0.08);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.brand small {
  margin-top: 1px;
  color: var(--gold);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.privacy-pill,
.icon-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(131, 199, 165, 0.1);
}

.status-dot.offline {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(216, 187, 128, 0.1);
}

.icon-button {
  color: var(--text);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
}

.view {
  animation: view-in 350ms ease both;
}

.view[hidden] {
  display: none;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(30px, 7vw, 96px);
  align-items: center;
  width: min(calc(100% - 40px), var(--max-width));
  min-height: min(760px, calc(100vh - 86px));
  margin: 0 auto;
  padding: 72px 0 82px;
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  margin-right: 7px;
  color: var(--gold-light);
}

.hero h1,
.page-intro h1 {
  max-width: 750px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.15rem, 6.8vw, 5.75rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero h1 em {
  color: var(--gold-light);
  font-weight: 400;
}

.hero-text {
  max-width: 540px;
  margin: 28px 0 30px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.13rem);
  line-height: 1.7;
}

.home-search-wrap {
  position: relative;
  z-index: 8;
  max-width: 600px;
}

.search-box {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.hero-search {
  min-height: 66px;
  padding: 0 19px;
  border-color: rgba(216, 187, 128, 0.23);
  background: rgba(28, 19, 39, 0.9);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
}

.search-box:focus-within {
  border-color: rgba(240, 217, 168, 0.62);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 0 0 4px rgba(216, 187, 128, 0.07);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder,
.notes-input::placeholder {
  color: #8c8091;
}

.search-icon {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-right: 12px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
}

.search-icon::after {
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 6px;
  height: 1.5px;
  content: "";
  background: var(--gold);
  transform: rotate(45deg);
}

.search-box kbd {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--subtle);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--sans);
}

.clear-search {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  overflow: hidden;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: rgba(27, 19, 38, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.suggestion-item {
  display: flex;
  gap: 13px;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.suggestion-item:hover,
.suggestion-item:focus-visible {
  background: rgba(255, 255, 255, 0.055);
}

.suggestion-symbol {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--gold-light);
  background: #21162c;
  font-family: var(--serif);
}

.suggestion-item strong,
.suggestion-item small {
  display: block;
}

.suggestion-item strong {
  margin-bottom: 3px;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
}

.suggestion-item small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-top: 20px;
}

.primary-button,
.secondary-button,
.text-button {
  cursor: pointer;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  gap: 22px;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 21px;
  border: 1px solid var(--gold);
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  color: #211528;
  background: linear-gradient(135deg, var(--gold-light), #caa66a);
  box-shadow: 0 10px 28px rgba(184, 143, 77, 0.18);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  box-shadow: 0 14px 34px rgba(184, 143, 77, 0.28);
}

.secondary-button {
  color: var(--gold-light);
  background: rgba(216, 187, 128, 0.06);
}

.text-button {
  padding: 10px 2px;
  color: var(--gold-light);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
}

.text-button:hover {
  color: #fff3d4;
}

.trust-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 31px;
  color: var(--subtle);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.trust-row b {
  color: var(--muted);
  font-weight: 600;
}

.trust-row i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold-dark);
}

.hero-art {
  position: relative;
  min-height: 520px;
  perspective: 1200px;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(216, 187, 128, 0.13);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit::before,
.orbit::after {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: var(--gold);
  box-shadow: 0 0 16px var(--gold);
}

.orbit-one {
  width: 430px;
  height: 430px;
  animation: orbit-spin 34s linear infinite;
}

.orbit-one::before { top: 40px; left: 85px; }
.orbit-one::after { right: 32px; bottom: 110px; }

.orbit-two {
  width: 320px;
  height: 320px;
  border-style: dashed;
  opacity: 0.55;
  animation: orbit-spin-reverse 26s linear infinite;
}

.orbit-two::before { top: 26px; right: 72px; }
.orbit-two::after { bottom: 21px; left: 95px; }

@keyframes orbit-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbit-spin-reverse {
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

.floating-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 360px;
  margin: -180px 0 0 -110px;
  border-radius: 18px;
  box-shadow: 0 36px 70px rgba(0, 0, 0, 0.5);
}

.card-back {
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 187, 128, 0.46);
  color: rgba(240, 217, 168, 0.72);
  background:
    radial-gradient(circle at center, transparent 0 20%, rgba(216, 187, 128, 0.06) 20.5% 21%, transparent 21.5%),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(216, 187, 128, 0.035) 12px 13px),
    #281831;
  font-family: var(--serif);
  font-size: 3rem;
}

.card-back::before {
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(216, 187, 128, 0.24);
  border-radius: 12px;
  content: "";
}

.card-back-left {
  transform: translate(-94px, 20px) rotate(-13deg);
}

.card-back-right {
  transform: translate(96px, 18px) rotate(13deg);
}

.feature-card {
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 19px 17px 16px;
  border: 1px solid rgba(240, 217, 168, 0.62);
  color: #2a1a2e;
  background:
    radial-gradient(circle at 50% 37%, rgba(113, 76, 125, 0.16), transparent 40%),
    linear-gradient(160deg, #f0dfb9, #cab28b 60%, #ab8d67);
  transform: translateY(-12px);
  animation: card-float 5.5s ease-in-out infinite;
}

.feature-card::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(57, 35, 59, 0.45);
  border-radius: 12px;
  content: "";
}

.feature-number {
  position: relative;
  font-family: var(--serif);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.feature-stars {
  margin-top: 30px;
  color: #6f4d73;
  font-size: 0.73rem;
  letter-spacing: 0.35em;
}

.feature-symbol {
  display: grid;
  width: 105px;
  height: 105px;
  margin: 24px 0 15px;
  place-items: center;
  border: 1px solid rgba(66, 38, 67, 0.28);
  border-radius: 50%;
  color: #5b3b62;
  font-family: var(--serif);
  font-size: 4rem;
}

.feature-lines {
  display: flex;
  gap: 7px;
  align-items: end;
  height: 32px;
  margin: 2px 0 25px;
}

.feature-lines i {
  display: block;
  width: 1px;
  height: 23px;
  background: rgba(78, 48, 79, 0.44);
  transform: rotate(25deg);
}

.feature-lines i:nth-child(2) { height: 32px; transform: rotate(0); }
.feature-lines i:nth-child(3) { transform: rotate(-25deg); }

.feature-card strong {
  position: relative;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
}

.feature-card small {
  position: relative;
  margin-top: 5px;
  color: rgba(42, 26, 46, 0.68);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes card-float {
  0%, 100% { transform: translateY(-12px) rotate(0.3deg); }
  50% { transform: translateY(-28px) rotate(-0.5deg); }
}

.content-section {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 90px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 30px;
}

.section-heading h2,
.dedication blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.section-heading .section-kicker {
  margin-bottom: 10px;
}

.centered-heading {
  display: block;
  max-width: 650px;
  margin: 0 auto 46px;
  text-align: center;
}

.centered-heading > p:last-child {
  margin: 16px auto 0;
  color: var(--muted);
  line-height: 1.7;
}

.horizontal-cards {
  display: grid;
  grid-auto-columns: minmax(190px, 230px);
  grid-auto-flow: column;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.guide-card {
  position: relative;
  min-height: 275px;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.guide-card::after {
  position: absolute;
  right: -65px;
  bottom: -90px;
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
}

.featured-guide {
  border-color: rgba(216, 187, 128, 0.3);
  background: linear-gradient(145deg, rgba(91, 56, 104, 0.25), rgba(255, 255, 255, 0.025));
  transform: translateY(-10px);
}

.step-number {
  position: absolute;
  top: 22px;
  right: 23px;
  color: var(--gold-dark);
  font-family: var(--serif);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.guide-icon {
  display: grid;
  width: 53px;
  height: 53px;
  margin-bottom: 29px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 1.5rem;
}

.guide-card h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
}

.guide-card p {
  max-width: 290px;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.dedication {
  width: min(calc(100% - 40px), 750px);
  margin: 0 auto;
  padding: 110px 0 130px;
  text-align: center;
}

.dedication > span {
  display: block;
  margin-bottom: 25px;
  color: var(--gold);
  font-size: 1.2rem;
}

.dedication blockquote {
  color: var(--gold-light);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.25;
}

.dedication p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-intro,
.library-toolbar,
.results-heading,
.card-grid,
.empty-state,
.notes-list {
  width: min(calc(100% - 40px), var(--max-width));
  margin-right: auto;
  margin-left: auto;
}

.page-intro {
  padding: 78px 0 42px;
}

.page-intro h1 {
  font-size: clamp(2.65rem, 6vw, 4.65rem);
}

.page-intro > p:last-child {
  max-width: 600px;
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.library-toolbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  background: rgba(16, 11, 24, 0.88);
  backdrop-filter: blur(18px);
}

.library-toolbar::before {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  content: "";
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: inherit;
  transform: translateX(-50%);
}

.filter-chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
  white-space: nowrap;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.chip.active {
  border-color: var(--gold-dark);
  color: #211528;
  background: var(--gold-light);
}

.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px 0 20px;
}

.results-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sort-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.75rem;
  cursor: pointer;
}

.sort-button:hover {
  color: var(--text);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 100px;
}

.tarot-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.025);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.tarot-card:hover {
  border-color: rgba(216, 187, 128, 0.36);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
  transform: translateY(-4px);
}

.tarot-card[data-suit="bastos"] { --suit-accent: #cb8f68; --suit-glow: rgba(182, 99, 59, 0.23); }
.tarot-card[data-suit="copas"] { --suit-accent: #91b7cf; --suit-glow: rgba(77, 124, 157, 0.23); }
.tarot-card[data-suit="espadas"] { --suit-accent: #a9a4c8; --suit-glow: rgba(114, 104, 154, 0.23); }
.tarot-card[data-suit="oros"] { --suit-accent: #d2b36f; --suit-glow: rgba(178, 139, 55, 0.23); }
.tarot-card[data-suit="major"] { --suit-accent: var(--gold-light); --suit-glow: rgba(117, 74, 127, 0.26); }

.card-open-area {
  display: block;
  width: 100%;
  min-height: 292px;
  padding: 17px 17px 19px;
  text-align: left;
  background:
    radial-gradient(circle at 50% 35%, var(--suit-glow), transparent 42%),
    transparent;
  cursor: pointer;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--subtle);
  font-family: var(--serif);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
}

.card-mini-suit {
  color: var(--suit-accent);
  font-family: var(--sans);
  font-size: 0.56rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.card-symbol-wrap {
  display: grid;
  width: 100px;
  height: 126px;
  margin: 19px auto 20px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50% 50% 46% 46%;
  color: var(--suit-accent);
  background: rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 0 35px var(--suit-glow);
  font-family: var(--serif);
  font-size: 2.75rem;
}

.card-open-area h3 {
  overflow: hidden;
  margin: 0 34px 7px 0;
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 400;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-open-area p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 34px;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.favorite-button {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(20, 13, 29, 0.82);
  font-size: 1.05rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.favorite-button:hover,
.favorite-button.active {
  border-color: rgba(216, 187, 128, 0.48);
  color: var(--gold-light);
}

.favorite-button.active {
  background: rgba(216, 187, 128, 0.1);
}

.empty-state {
  padding: 80px 20px 130px;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state > span {
  display: grid;
  width: 70px;
  height: 70px;
  margin: 0 auto 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.8rem;
}

.empty-state h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
}

.empty-state p {
  margin: 12px auto 25px;
  color: var(--muted);
  line-height: 1.6;
}

.collection-view .card-grid,
.notes-view .notes-list {
  padding-top: 20px;
}

.notes-list {
  display: grid;
  gap: 12px;
  max-width: 860px;
  padding-bottom: 100px;
}

.note-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.note-row:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.note-symbol {
  display: grid;
  width: 54px;
  height: 64px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--gold-light);
  background: var(--surface-solid);
  font-family: var(--serif);
  font-size: 1.4rem;
}

.note-row h3 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 400;
}

.note-row p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-row > span:last-child {
  color: var(--gold);
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(calc(100% - 32px), 610px);
  min-height: 66px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: rgba(25, 17, 35, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  transform: translateX(50%);
  backdrop-filter: blur(22px);
}

.nav-item {
  position: relative;
  display: flex;
  gap: 3px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--subtle);
  background: transparent;
  font-size: 0.63rem;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}

.nav-item.active {
  color: var(--gold-light);
  background: rgba(216, 187, 128, 0.07);
}

.nav-item.active::before {
  position: absolute;
  top: 0;
  width: 24px;
  height: 1px;
  content: "";
  background: var(--gold);
  box-shadow: 0 0 9px var(--gold);
}

.nav-icon {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1;
}

dialog {
  color: var(--text);
}

dialog::backdrop {
  background: rgba(6, 4, 9, 0.75);
  backdrop-filter: blur(8px);
}

.card-dialog {
  width: min(calc(100% - 30px), 900px);
  max-width: none;
  max-height: min(880px, calc(100vh - 30px));
  margin: auto;
  overflow: hidden auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #171020;
  box-shadow: var(--shadow);
}

.card-dialog[open] {
  animation: dialog-in 260ms ease both;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 650px;
}

.detail-visual {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 650px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 50px 30px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 38%, rgba(112, 66, 122, 0.32), transparent 35%),
    linear-gradient(165deg, #23162e, #110c18);
}

.detail-visual::before,
.detail-visual::after {
  position: absolute;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(216, 187, 128, 0.12);
  border-radius: 50%;
  content: "";
}

.detail-visual::after {
  width: 230px;
  height: 230px;
  border-style: dashed;
  transform: rotate(15deg);
}

.detail-card-face {
  position: relative;
  z-index: 2;
  display: flex;
  width: 210px;
  height: 340px;
  flex-direction: column;
  align-items: center;
  padding: 20px 17px;
  border: 1px solid rgba(240, 217, 168, 0.58);
  border-radius: 16px;
  background: linear-gradient(155deg, #eadab7, #bfa27c);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.42);
}

.detail-card-face::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(50, 31, 51, 0.36);
  border-radius: 10px;
  content: "";
}

.detail-card-number,
.detail-card-name,
.detail-card-suit,
.detail-symbol {
  position: relative;
  z-index: 1;
}

.detail-card-number {
  color: #4d344f;
  font-family: var(--serif);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
}

.detail-symbol {
  display: grid;
  width: 125px;
  height: 155px;
  margin: 35px 0 28px;
  place-items: center;
  border: 1px solid rgba(67, 41, 69, 0.28);
  border-radius: 50%;
  color: #5b3b61;
  font-family: var(--serif);
  font-size: 4rem;
}

.detail-card-name {
  max-width: 170px;
  color: #2a1a2e;
  font-family: var(--serif);
  font-size: 1.15rem;
  text-align: center;
}

.detail-card-suit {
  margin-top: 5px;
  color: rgba(42, 26, 46, 0.62);
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-content {
  position: relative;
  padding: 43px 42px 48px;
}

.dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 1.25rem;
  cursor: pointer;
}

.dialog-close:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.detail-close {
  position: absolute;
  z-index: 4;
  top: 20px;
  right: 20px;
}

.detail-heading-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding-right: 45px;
}

.detail-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.035em;
}

.detail-heading .eyebrow {
  margin-bottom: 12px;
}

.detail-favorite {
  position: static;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin-left: 14px;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 26px;
  padding: 0;
  list-style: none;
}

.keyword-list li {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(216, 187, 128, 0.045);
  font-size: 0.68rem;
}

.detail-summary {
  margin: 0 0 28px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.65;
}

.orientation-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.orientation-tabs button {
  min-height: 40px;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
  cursor: pointer;
}

.orientation-tabs button.active {
  color: #28182d;
  background: var(--gold-light);
  font-weight: 650;
}

.meaning-panel {
  min-height: 128px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.meaning-panel h3,
.question-panel h3,
.personal-note h3 {
  margin: 0 0 9px;
  color: var(--gold);
  font-size: 0.67rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.meaning-panel p,
.question-panel p {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.7;
}

.question-panel {
  position: relative;
  margin-top: 14px;
  padding: 18px 20px 18px 46px;
  border-left: 2px solid var(--gold-dark);
  background: linear-gradient(90deg, rgba(216, 187, 128, 0.06), transparent);
}

.question-panel::before {
  position: absolute;
  top: 17px;
  left: 18px;
  color: var(--gold);
  content: "✦";
}

.personal-note {
  margin-top: 26px;
}

.personal-note-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-saved {
  color: var(--green);
  font-size: 0.68rem;
  opacity: 0;
  transition: opacity 180ms ease;
}

.note-saved.visible {
  opacity: 1;
}

.notes-input {
  display: block;
  width: 100%;
  min-height: 105px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.82rem;
  line-height: 1.6;
}

.notes-input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(216, 187, 128, 0.06);
}

.welcome-dialog {
  width: min(calc(100% - 30px), 470px);
  max-width: none;
  overflow: visible;
  padding: 48px 42px 39px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(105, 64, 116, 0.3), transparent 45%),
    #181020;
  box-shadow: var(--shadow);
}

.welcome-dialog[open] {
  animation: dialog-in 350ms ease both;
}

.welcome-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.welcome-symbol {
  position: relative;
  display: grid;
  width: 96px;
  height: 96px;
  margin: 0 auto 25px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 2.8rem;
  box-shadow: inset 0 0 35px rgba(216, 187, 128, 0.07), 0 0 40px rgba(116, 67, 127, 0.16);
}

.welcome-symbol i {
  position: absolute;
  top: 7px;
  right: 7px;
  color: var(--gold);
  font-size: 0.75rem;
  font-style: normal;
}

.welcome-dialog .eyebrow {
  margin-bottom: 12px;
}

.welcome-dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 400;
}

.welcome-dialog > p:not(.eyebrow) {
  margin: 16px auto 27px;
  color: var(--muted);
  line-height: 1.7;
}

.wide-button {
  width: 100%;
}

.welcome-dialog > small {
  display: block;
  margin-top: 16px;
  color: var(--subtle);
  font-size: 0.68rem;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 50%;
  bottom: 100px;
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: rgba(27, 19, 38, 0.96);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.4);
  font-size: 0.78rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(50%, 0);
}

/* Carta natal */

.natal-intro {
  padding-bottom: 34px;
}

.natal-workspace {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 0 0 110px;
}

.natal-form-card {
  position: relative;
  max-width: 760px;
  overflow: visible;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(100, 61, 112, 0.19), transparent 35%),
    rgba(28, 19, 39, 0.84);
  box-shadow: var(--shadow);
}

.natal-form-card::before {
  position: absolute;
  z-index: -1;
  top: -80px;
  right: -80px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(216, 187, 128, 0.08);
  border-radius: 50%;
  content: "";
}

.natal-form-heading {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 36px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.natal-form-symbol {
  display: grid;
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(216, 187, 128, 0.055);
  box-shadow: inset 0 0 28px rgba(216, 187, 128, 0.08);
  font-family: var(--serif);
  font-size: 1.9rem;
}

.natal-form-heading .section-kicker {
  margin-bottom: 7px;
}

.natal-form-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 400;
}

.natal-form-heading p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  position: relative;
  margin-bottom: 21px;
}

.form-field label {
  display: block;
  margin: 0 0 9px;
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.form-field > input,
.location-input-wrap {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.form-field > input {
  padding: 0 16px;
  outline: 0;
}

.form-field > input:focus,
.location-input-wrap:focus-within {
  border-color: rgba(240, 217, 168, 0.55);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 4px rgba(216, 187, 128, 0.06);
}

.form-field input::placeholder {
  color: #8c8091;
}

.form-field input[type="date"],
.form-field input[type="time"] {
  color-scheme: dark;
}

.location-input-wrap {
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.location-input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.location-spinner {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--gold-light);
  border-radius: 50%;
  animation: natal-spin 700ms linear infinite;
}

@keyframes natal-spin {
  to { transform: rotate(360deg); }
}

.location-field > small {
  display: block;
  margin-top: 8px;
  color: var(--subtle);
  font-size: 0.7rem;
}

.location-results {
  position: absolute;
  z-index: 16;
  top: calc(100% - 18px);
  right: 0;
  left: 0;
  overflow: hidden;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(24, 16, 33, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.location-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.location-option:hover,
.location-option:focus-visible {
  background: rgba(255, 255, 255, 0.055);
}

.location-pin {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
}

.location-option strong,
.location-option small {
  display: block;
}

.location-option strong {
  margin-bottom: 3px;
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 400;
}

.location-option small,
.location-timezone {
  color: var(--muted);
  font-size: 0.68rem;
}

.location-timezone {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-location {
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(131, 199, 165, 0.22);
  border-radius: 11px;
  color: #bfe8d0;
  background: rgba(131, 199, 165, 0.055);
  font-size: 0.74rem;
}

.selected-location:not([hidden]) {
  display: flex;
}

.selected-location button {
  padding: 3px 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.birth-time-note {
  display: flex;
  gap: 12px;
  align-items: start;
  margin: 5px 0 22px;
  padding: 14px 16px;
  border-left: 2px solid var(--gold-dark);
  background: linear-gradient(90deg, rgba(216, 187, 128, 0.055), transparent);
}

.birth-time-note > span {
  color: var(--gold);
}

.birth-time-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.birth-time-note strong {
  color: var(--text);
}

.form-error {
  margin: 0 0 15px;
  padding: 12px 14px;
  border: 1px solid rgba(207, 121, 121, 0.28);
  border-radius: 11px;
  color: #efb4b4;
  background: rgba(154, 66, 66, 0.08);
  font-size: 0.76rem;
}

.natal-submit {
  width: 100%;
}

.natal-submit[disabled] {
  cursor: wait;
  opacity: 0.6;
}

.local-data-note {
  margin: 12px 0 0;
  color: var(--subtle);
  font-size: 0.66rem;
  text-align: center;
}

.natal-result {
  animation: view-in 420ms ease both;
}

.natal-result-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.natal-result-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.natal-result-header > div > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.compact-button {
  min-height: 42px;
  padding: 0 15px;
  font-size: 0.74rem;
}

.natal-overview {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
  gap: 24px;
  align-items: stretch;
}

.natal-wheel-card,
.big-three-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
}

.natal-wheel-card {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 25px;
  background:
    radial-gradient(circle at center, rgba(98, 59, 109, 0.21), transparent 45%),
    rgba(255, 255, 255, 0.018);
}

.natal-wheel {
  width: min(100%, 510px);
  aspect-ratio: 1;
}

.natal-wheel svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.natal-wheel-card > p {
  margin: 15px 0 0;
  color: var(--subtle);
  font-size: 0.68rem;
  text-align: center;
}

.wheel-outer,
.wheel-inner,
.wheel-center,
.wheel-segment {
  fill: none;
  stroke: rgba(216, 187, 128, 0.2);
}

.wheel-outer { stroke-width: 1.7; }
.wheel-inner { stroke-width: 1; }
.wheel-center { stroke: rgba(216, 187, 128, 0.1); }
.wheel-segment { stroke: rgba(216, 187, 128, 0.12); }

.wheel-house-line {
  stroke: rgba(216, 187, 128, 0.24);
  stroke-width: 1;
}

.wheel-house-label {
  fill: rgba(240, 217, 168, 0.68);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
}

.wheel-sign {
  fill: var(--gold-light);
  font-family: var(--serif);
  font-size: 22px;
  text-anchor: middle;
  dominant-baseline: middle;
}

.wheel-planet-line {
  stroke: rgba(216, 187, 128, 0.18);
  stroke-width: 1;
}

.wheel-planet-dot {
  fill: #25172f;
  stroke: var(--gold);
  stroke-width: 1;
}

.wheel-planet-symbol {
  fill: #f4dfaf;
  font-family: var(--serif);
  font-size: 18px;
  text-anchor: middle;
  dominant-baseline: middle;
}

.wheel-asc-line {
  stroke: #e7c987;
  stroke-width: 2;
  stroke-dasharray: 4 4;
}

.wheel-asc-label {
  fill: #f5d993;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-anchor: middle;
}

.wheel-center-symbol {
  fill: rgba(240, 217, 168, 0.5);
  font-family: var(--serif);
  font-size: 36px;
  text-anchor: middle;
  dominant-baseline: middle;
}

.big-three-wrap {
  padding: clamp(24px, 4vw, 36px);
}

.big-three-wrap > .section-kicker {
  margin-bottom: 21px;
}

.big-three {
  display: grid;
  gap: 12px;
}

.big-three-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.022);
}

.big-three-card::after {
  position: absolute;
  right: -30px;
  bottom: -42px;
  width: 105px;
  height: 105px;
  border: 1px solid rgba(216, 187, 128, 0.08);
  border-radius: 50%;
  content: "";
}

.big-three-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(216, 187, 128, 0.05);
  font-family: var(--serif);
  font-size: 1.65rem;
}

.big-three-label {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.big-three-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
}

.big-three-degree {
  margin-left: 5px;
  color: var(--subtle);
  font-family: var(--sans);
  font-size: 0.66rem;
}

.big-three-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.65;
}

.big-three-meta {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.astrology-tag {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.6rem;
}

.planet-section {
  margin-top: 80px;
}

.natal-section-heading {
  margin-bottom: 25px;
}

.planet-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.planet-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 180ms ease, transform 180ms ease;
}

.planet-row:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.planet-symbol {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 1.45rem;
}

.planet-title-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.planet-title-row h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 400;
}

.planet-position {
  color: var(--gold);
  font-size: 0.68rem;
  white-space: nowrap;
}

.retrograde-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 5px;
  border: 1px solid rgba(216, 187, 128, 0.24);
  border-radius: 6px;
  font-size: 0.54rem;
}

.planet-row p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.62;
}

.house-section {
  margin-top: 80px;
}

.house-system-note {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--subtle);
  font-size: 0.72rem;
  line-height: 1.55;
}

.house-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.house-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  min-height: 172px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.02);
}

.house-card-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 0.82rem;
}

.house-card-heading {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.house-card-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
}

.house-card-heading span {
  color: var(--gold);
  font-size: 0.62rem;
  white-space: nowrap;
}

.house-card-content > p {
  margin: 10px 0 13px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.house-occupants {
  display: block;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 0.62rem;
  line-height: 1.45;
}

.natal-disclaimer {
  display: flex;
  gap: 14px;
  max-width: 720px;
  align-items: center;
  margin: 45px auto 0;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--subtle);
  background: rgba(255, 255, 255, 0.018);
}

.natal-disclaimer > span {
  color: var(--gold);
  font-size: 1.3rem;
}

.natal-disclaimer p {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .natal-overview {
    grid-template-columns: 1fr;
  }

  .natal-wheel-card {
    min-height: auto;
  }

  .house-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .natal-workspace {
    width: calc(100% - 30px);
  }

  .natal-form-card {
    padding: 25px 18px;
    border-radius: 22px;
  }

  .natal-form-heading {
    align-items: start;
  }

  .natal-form-symbol {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
    font-size: 1.45rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .location-timezone {
    display: none;
  }

  .natal-result-header {
    align-items: start;
    flex-direction: column;
    gap: 20px;
  }

  .natal-result-header > div {
    width: 100%;
    min-width: 0;
  }

  .natal-result-header h2 {
    max-width: 100%;
    font-size: clamp(2rem, 10vw, 2.75rem);
    line-height: 1.04;
    overflow-wrap: anywhere;
  }

  .natal-result-header > div > p:last-child {
    max-width: 100%;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .natal-wheel-card {
    padding: 16px 8px 22px;
  }

  .natal-wheel-card > p {
    max-width: calc(100% - 20px);
    line-height: 1.45;
  }

  .big-three-wrap {
    padding: 20px 14px;
  }

  .planet-section {
    margin-top: 60px;
  }

  .planet-list {
    grid-template-columns: 1fr;
  }

  .planet-row {
    min-height: auto;
  }

  .planet-title-row,
  .house-card-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .planet-position,
  .house-card-heading span {
    white-space: normal;
  }

  .house-section {
    margin-top: 60px;
  }

  .house-list {
    grid-template-columns: 1fr;
  }

  .house-card {
    min-height: auto;
  }

  .bottom-nav {
    padding: 6px;
  }

  .nav-item {
    font-size: 0.58rem;
  }
}

@media (max-width: 390px) {
  .nav-item {
    font-size: 0.54rem;
  }

  .nav-icon {
    font-size: 1rem;
  }

  .big-three-card {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 16px;
  }

  .big-three-icon {
    width: 48px;
    height: 48px;
  }

  .big-three-card h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 25px;
  }

  .hero-art {
    min-height: 450px;
    transform: scale(0.82);
  }

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .library-toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding-bottom: 98px;
  }

  .topbar {
    width: calc(100% - 30px);
    min-height: 72px;
  }

  .privacy-pill {
    padding: 0 11px;
  }

  .install-button span:last-child {
    display: none;
  }

  .hero {
    display: block;
    width: calc(100% - 30px);
    min-height: auto;
    padding: 58px 0 74px;
  }

  .hero h1 {
    font-size: clamp(3rem, 14vw, 4.6rem);
  }

  .hero-art {
    min-height: 420px;
    margin-top: 50px;
    transform: scale(0.82);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .text-button {
    align-self: center;
  }

  .trust-row {
    justify-content: center;
  }

  .content-section,
  .page-intro,
  .library-toolbar,
  .results-heading,
  .card-grid,
  .empty-state,
  .notes-list {
    width: calc(100% - 30px);
  }

  .content-section {
    padding: 70px 0;
  }

  .section-heading:not(.centered-heading) {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }

  .featured-guide {
    transform: none;
  }

  .guide-card {
    min-height: 235px;
  }

  .page-intro {
    padding: 56px 0 34px;
  }

  .library-toolbar {
    top: 0;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .card-open-area {
    min-height: 252px;
    padding: 13px;
  }

  .card-symbol-wrap {
    width: 78px;
    height: 106px;
    margin: 16px auto;
    font-size: 2.25rem;
  }

  .card-open-area h3 {
    font-size: 1rem;
  }

  .detail-layout {
    display: block;
  }

  .card-dialog {
    top: auto;
    width: 100%;
    max-height: calc(100vh - 18px);
    margin: 18px 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 26px 26px 0 0;
  }

  .detail-visual {
    position: relative;
    min-height: 320px;
    padding: 36px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-visual::before {
    width: 270px;
    height: 270px;
  }

  .detail-visual::after {
    width: 205px;
    height: 205px;
  }

  .detail-card-face {
    width: 154px;
    height: 244px;
    padding: 14px 12px;
    border-radius: 13px;
  }

  .detail-symbol {
    width: 86px;
    height: 105px;
    margin: 21px 0 15px;
    font-size: 2.9rem;
  }

  .detail-card-name {
    font-size: 0.91rem;
  }

  .detail-card-suit {
    font-size: 0.45rem;
  }

  .detail-content {
    padding: 35px 20px 45px;
  }

  .detail-close {
    position: fixed;
    top: 32px;
    right: 15px;
    color: var(--text);
    background: rgba(18, 12, 25, 0.84);
    backdrop-filter: blur(8px);
  }

  .bottom-nav {
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 18px);
  }

  .welcome-dialog {
    padding: 42px 25px 31px;
  }
}

@media (max-width: 390px) {
  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand strong {
    font-size: 1.12rem;
  }

  .privacy-pill {
    font-size: 0.68rem;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero-art {
    margin-right: -30px;
    margin-left: -30px;
    transform: scale(0.72);
  }

  .card-open-area {
    min-height: 236px;
  }

  .card-symbol-wrap {
    height: 92px;
  }

  .card-open-area p {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
