  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --gold: #c9a84c;
    --deep: #0a0608;
    --ink: #12090f;
    --muted: #5a4a52;
    --text: #e8d9c0;
    --glow: rgba(201,168,76,0.15);
  }

  body {
    background: var(--deep);
    color: var(--text);
    font-family: 'Cormorant Garamond', serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-x: hidden;
    position: relative;
  }

  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
      radial-gradient(ellipse 60% 50% at 50% 0%, rgba(100,60,20,0.25) 0%, transparent 70%),
      radial-gradient(ellipse 40% 40% at 20% 80%, rgba(80,20,60,0.15) 0%, transparent 60%);
    pointer-events: none;
  }

  body::after {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    pointer-events: none;
  }

  .container {
    width: 100%;
    max-width: 680px;
    position: relative;
    z-index: 1;
  }

  header {
    text-align: center;
    margin-bottom: 3.5rem;
  }

  .eyebrow {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.85rem;
    letter-spacing: 0.35em;
    color: var(--gold);
    opacity: 0.8;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
  }

  h1 {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #e8c97a 0%, #c9a84c 40%, #a07830 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
  }

  .divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.2rem auto;
    max-width: 300px;
  }
  .divider-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.4; }
  .divider-diamond {
    width: 6px; height: 6px;
    background: var(--gold);
    transform: rotate(45deg);
    opacity: 0.7;
  }

  /* Section divider */
  .section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0 2rem;
  }
  .section-divider-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,168,76,0.2), transparent); }
  .section-divider-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.6;
    white-space: nowrap;
  }

  /* Input section */
  .input-section {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(201,168,76,0.15);
    border-radius: 2px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    position: relative;
  }

  .input-section::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 2px;
    background: linear-gradient(135deg, rgba(201,168,76,0.2), transparent 50%, rgba(201,168,76,0.05));
    pointer-events: none;
  }

  textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(201,168,76,0.25);
    color: var(--text);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    padding: 0.5rem 0 1rem;
    resize: none;
    outline: none;
    min-height: 80px;
    transition: border-color 0.3s;
    line-height: 1.6;
  }
  textarea::placeholder { color: var(--muted); font-style: italic; }
  textarea:focus { border-color: rgba(201,168,76,0.6); }

  /* Date fields */
  .date-section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0 1.25rem;
  }
  .date-section-label .dsl-line { flex: 1; height: 1px; background: rgba(201,168,76,0.15); }
  .date-section-label .dsl-text {
    font-size: 0.68rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
  }

  .date-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .date-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  .date-field label {
    font-size: 0.68rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .date-field input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(201,168,76,0.25);
    color: var(--text);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 300;
    padding: 0.4rem 0 0.6rem;
    outline: none;
    width: 100%;
    transition: border-color 0.3s;
    -moz-appearance: textfield;
  }
  .date-field input::-webkit-outer-spin-button,
  .date-field input::-webkit-inner-spin-button { -webkit-appearance: none; }
  .date-field input:focus { border-color: rgba(201,168,76,0.6); }
  .date-field input::placeholder { color: var(--muted); font-style: italic; }

  .controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .system-select {
    display: flex;
    gap: 0;
    border: 1px solid rgba(201,168,76,0.2);
  }

  .system-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border-right: 1px solid rgba(201,168,76,0.2);
  }
  .system-btn:last-child { border-right: none; }
  .system-btn.active {
    background: rgba(201,168,76,0.12);
    color: var(--gold);
  }
  .system-btn:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.03); }

  button.calculate {
    background: linear-gradient(135deg, rgba(201,168,76,0.15), rgba(201,168,76,0.08));
    border: 1px solid rgba(201,168,76,0.4);
    color: var(--gold);
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    padding: 0.75rem 1.75rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
  }
  button.calculate:hover {
    background: linear-gradient(135deg, rgba(201,168,76,0.25), rgba(201,168,76,0.15));
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(201,168,76,0.15);
  }

  /* Name results */
  .results {
    display: none;
    animation: fadeUp 0.5s ease both;
  }
  .results.visible { display: block; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .number-display {
    text-align: center;
    padding: 2.5rem;
    border: 1px solid rgba(201,168,76,0.2);
    background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,0.08), transparent 70%);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
  }

  .number-display::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
  }

  .result-label {
    font-style: italic;
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 1rem;
  }

  .big-number {
    font-family: 'Cinzel Decorative', serif;
    font-size: clamp(4rem, 15vw, 7rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #f0dc98, #c9a84c, #8a5c20);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(201,168,76,0.3));
    animation: pulse 3s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(201,168,76,0.2)); }
    50% { filter: drop-shadow(0 0 40px rgba(201,168,76,0.45)); }
  }

  .master-badge {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(201,168,76,0.4);
    padding: 0.25rem 0.75rem;
    margin-top: 0.5rem;
    opacity: 0.85;
  }

  .reduction-path {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--muted);
    margin-top: 1rem;
    letter-spacing: 0.05em;
  }

  .breakdown {
    border: 1px solid rgba(201,168,76,0.12);
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .breakdown-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.75rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0.7;
    margin-bottom: 1.25rem;
  }

  .letter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .letter-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
  }

  .letter-char {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text);
    opacity: 0.9;
    letter-spacing: 0.05em;
    min-width: 1.5rem;
    text-align: center;
  }

  .letter-val {
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.65rem;
    color: var(--gold);
    opacity: 0.7;
  }

  .meaning {
    border-top: 1px solid rgba(201,168,76,0.1);
    padding-top: 2rem;
  }

  .meaning h3 {
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gold);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
  }

  .meaning p {
    font-size: 1.05rem;
    line-height: 1.9;
    font-weight: 300;
    color: rgba(232,217,192,0.8);
    font-style: italic;
  }

  .value-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .value-card {
    border: 1px solid rgba(201,168,76,0.12);
    padding: 1rem;
    text-align: center;
    background: rgba(255,255,255,0.01);
  }

  .value-card .label {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.5rem;
  }

  .value-card .num {
    font-family: 'Cinzel Decorative', serif;
    font-size: 2rem;
    background: linear-gradient(135deg, #e8c97a, #c9a84c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .value-card .subtext {
    font-size: 0.75rem;
    color: var(--muted);
    font-style: italic;
    margin-top: 0.25rem;
  }

  /* Trio cards (shared by name + birth sections) */
  .meaning-trio, .birth-trio {
    border: 1px solid rgba(201,168,76,0.12);
    background: rgba(255,255,255,0.01);
    animation: fadeUp 0.5s ease 0.15s both;
  }

  .meaning-trio { margin-top: 2rem; }
  .birth-trio { margin-bottom: 2rem; }

  .trio-card {
    padding: 1.75rem 2rem;
  }

  .trio-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,0.2), transparent);
    margin: 0 2rem;
  }

  .trio-icon {
    font-size: 0.75rem;
    color: var(--gold);
    opacity: 0.5;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3em;
  }

  .trio-label {
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.1em;
    margin-bottom: 0.2rem;
  }

  .trio-label span {
    opacity: 0.6;
    font-size: 0.7rem;
  }

  .trio-subtitle {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--muted);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
  }

  .trio-text {
    font-size: 1rem;
    line-height: 1.9;
    font-weight: 300;
    color: rgba(232,217,192,0.75);
    font-style: italic;
  }

  /* Birth date results block */
  .birth-results { display: none; }
  .birth-results.visible { display: block; animation: fadeUp 0.5s ease both; }

  .life-path-display {
    text-align: center;
    padding: 2.5rem;
    border: 1px solid rgba(120,80,180,0.3);
    background: radial-gradient(ellipse at 50% 0%, rgba(80,30,120,0.12), transparent 70%);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
  }
  .life-path-display::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(180,120,220,0.5), transparent);
  }
  .life-path-display .big-number {
    background: linear-gradient(135deg, #e8c0f0, #c090d8, #8050a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulsePurple 3s ease-in-out infinite;
  }
  @keyframes pulsePurple {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(160,100,200,0.2)); }
    50% { filter: drop-shadow(0 0 40px rgba(160,100,200,0.45)); }
  }
  .life-path-display .master-badge {
    border-color: rgba(180,120,220,0.4);
    color: #c090d8;
  }
  .life-path-breakdown {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--muted);
    margin-top: 0.75rem;
    letter-spacing: 0.05em;
  }

