/* ================================================================
   KOOSHA PIANO — AGE DETECTION PAGE
   Standalone page: /age-detect.html
   Minimal luxury, Nell Piano aesthetic, RTL, Persian
   ================================================================ */

/* Ensure [hidden] is never overridden by explicit display rules in this file */
[hidden] { display: none !important; }

/* ── Local tokens (extends main.css) ─────────────────────────── */
:root {
  --ad-card-bg:     rgba(10, 10, 10, 0.72);
  --ad-card-border: rgba(201, 170, 113, 0.18);
  --ad-input-bg:    rgba(255, 255, 255, 0.04);
  --ad-input-border:rgba(255, 255, 255, 0.10);
  --ad-txt-3:       rgba(255, 255, 255, 0.28);
  --ad-radius-sm:   6px;
  --ad-radius-md:   10px;
  --ad-radius-lg:   16px;
  --ad-radius-full: 9999px;
}

/* ── Page wrapper ────────────────────────────────────────────── */
.age-page {
  min-height: 100vh;
}

/* ════════════════════════════════════════════════════════════════
   PHASE 1 — HERO + INPUT FORM
════════════════════════════════════════════════════════════════ */

.age-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-block: 7rem 4rem;
}

/* Background layers */
.age-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 60%, rgba(140, 107, 42, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(140, 107, 42, 0.04) 0%, transparent 50%),
    var(--clr-bg);
  z-index: 0;
}

/* Optional: if user provides a hero image */
.age-hero-bg[data-image]::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  mix-blend-mode: luminosity;
}

/* Decorative horizontal rule at top */
.age-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to left,
    transparent,
    rgba(201, 170, 113, 0.25) 30%,
    rgba(201, 170, 113, 0.25) 70%,
    transparent
  );
}

.age-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-max);
  padding-inline: var(--container-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-8);
}

/* ── Hero header text ─────────────────────────────────────────── */
.age-hero-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}

.age-seo-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.35rem 0.9rem;
  background: rgba(201, 170, 113, 0.07);
  border: 1px solid rgba(201, 170, 113, 0.22);
  border-radius: var(--ad-radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--clr-gold-lt);
}

.age-seo-badge svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  flex-shrink: 0;
}

.age-hero-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-gold-lt);
  opacity: 0.7;
}

.age-hero-title {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--clr-txt);
  line-height: 1.25;
  text-align: center;
}

.age-hero-title strong {
  color: var(--clr-gold-lt);
  font-weight: 900;
}

.age-hero-desc {
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: var(--clr-txt-2);
  max-width: 40ch;
  text-align: center;
  line-height: 1.7;
}

/* ── Glassmorphism form card ──────────────────────────────────── */
.age-form-card {
  width: 100%;
  max-width: 480px;
  background: var(--ad-card-bg);
  border: 1px solid var(--ad-card-border);
  border-radius: var(--ad-radius-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 1px 0 0 rgba(201, 170, 113, 0.12) inset,
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 0, 0, 0.25) inset;
}

.age-card-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clr-gold-lt);
  margin-bottom: var(--sp-5);
  opacity: 0.8;
}

/* ── Form fields ──────────────────────────────────────────────── */
.age-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.age-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.age-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}

.age-label-hint {
  margin-inline-start: auto;
  font-size: 0.7rem;
  color: var(--clr-gold-lt);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0.75;
  transition: opacity var(--t-fast);
}

.age-label-hint:hover { opacity: 1; }

.age-label-hint svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ── Custom Dropdown ──────────────────────────────────────────── */
.age-dropdown {
  position: relative;
}

.age-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  background: var(--ad-input-bg);
  border: 1px solid var(--ad-input-border);
  border-radius: var(--ad-radius-sm);
  padding: 0 1rem;
  color: var(--clr-txt);
  font-size: 0.9375rem;
  font-family: var(--font);
  cursor: pointer;
  min-height: 50px;
  text-align: right;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
}

.age-dropdown-trigger:focus {
  outline: none;
  border-color: rgba(201, 170, 113, 0.45);
  background: rgba(201, 170, 113, 0.04);
  box-shadow: 0 0 0 3px rgba(201, 170, 113, 0.10);
}

.age-dropdown-trigger:hover {
  border-color: rgba(201, 170, 113, 0.30);
}

.age-dropdown.is-open .age-dropdown-trigger {
  border-color: rgba(201, 170, 113, 0.45);
  background: rgba(201, 170, 113, 0.04);
  box-shadow: 0 0 0 3px rgba(201, 170, 113, 0.10);
  border-radius: var(--ad-radius-sm) var(--ad-radius-sm) 0 0;
}

.age-dropdown-value {
  flex: 1;
  text-align: right;
  color: var(--ad-txt-3);
  transition: color var(--t-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.age-dropdown-value.has-value {
  color: var(--clr-txt);
}

.age-dropdown-chevron {
  width: 16px;
  height: 16px;
  stroke: rgba(255, 255, 255, 0.30);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  transition: transform var(--t-base), stroke var(--t-base);
}

.age-dropdown.is-open .age-dropdown-chevron {
  transform: rotate(180deg);
  stroke: var(--clr-gold-lt);
}

/* Panel */
.age-dropdown-panel {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.99);
  border: 1px solid rgba(201, 170, 113, 0.28);
  border-top: 1px solid rgba(201, 170, 113, 0.10);
  border-radius: 0 0 var(--ad-radius-sm) var(--ad-radius-sm);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  max-height: 320px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7);
  animation: ad-dropdown-in var(--t-base) cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Search row */
.age-dropdown-search-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.99);
  z-index: 1;
}

.age-dropdown-search-icon {
  width: 14px;
  height: 14px;
  stroke: rgba(201, 170, 113, 0.40);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.age-dropdown-search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--clr-txt);
  font-size: 0.875rem;
  font-family: var(--font);
  padding: 0.3rem 0;
  direction: auto;
}

.age-dropdown-search::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.age-dropdown-search-clear {
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: background var(--t-fast);
}

.age-dropdown-search-clear:hover {
  background: rgba(255, 255, 255, 0.12);
}

.age-dropdown-search-clear svg {
  width: 10px;
  height: 10px;
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* Scrollable list */
.age-dropdown-list {
  overflow-y: auto;
  flex: 1;
  padding: 0.35rem 0;
}

.age-dropdown-list::-webkit-scrollbar {
  width: 3px;
}
.age-dropdown-list::-webkit-scrollbar-track {
  background: transparent;
}
.age-dropdown-list::-webkit-scrollbar-thumb {
  background: rgba(201, 170, 113, 0.18);
  border-radius: 3px;
}

/* Options */
.age-dropdown-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  position: relative;
  direction: ltr;
  text-align: left;
}

.age-dropdown-option span {
  color: rgba(255, 255, 255, 0.30);
  font-size: 0.78rem;
  flex-shrink: 0;
}

.age-dropdown-option:hover,
.age-dropdown-option.is-focused {
  background: rgba(201, 170, 113, 0.08);
  color: var(--clr-txt);
  outline: none;
}

.age-dropdown-option:hover span,
.age-dropdown-option.is-focused span {
  color: rgba(201, 170, 113, 0.55);
}

.age-dropdown-option.is-selected {
  color: var(--clr-gold-lt);
  background: rgba(201, 170, 113, 0.06);
}

.age-dropdown-option.is-selected span {
  color: rgba(201, 170, 113, 0.45);
}

.age-dropdown-option.is-selected::after {
  content: '';
  margin-inline-start: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--clr-gold-lt);
  flex-shrink: 0;
}

/* Fuzzy highlight */
.age-dropdown-option mark {
  background: none;
  color: var(--clr-gold-lt);
  font-weight: 700;
}

/* No results */
.age-dropdown-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.8125rem;
  text-align: center;
}

.age-dropdown-no-results svg {
  width: 22px;
  height: 22px;
  stroke: rgba(255, 255, 255, 0.15);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Text input */
.age-input {
  width: 100%;
  background: var(--ad-input-bg);
  border: 1px solid var(--ad-input-border);
  border-radius: var(--ad-radius-sm);
  padding: 0.8125rem 1rem;
  color: var(--clr-txt);
  font-size: 0.9375rem;
  font-family: var(--font);
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
  min-height: 50px;
}

.age-input:focus {
  outline: none;
  border-color: rgba(201, 170, 113, 0.45);
  background: rgba(201, 170, 113, 0.04);
  box-shadow: 0 0 0 3px rgba(201, 170, 113, 0.10);
}

.age-input::placeholder {
  color: var(--ad-txt-3);
}

/* Invalid state */
.age-field.is-invalid .age-select,
.age-field.is-invalid .age-input {
  border-color: rgba(220, 80, 60, 0.55);
  box-shadow: 0 0 0 3px rgba(220, 80, 60, 0.10);
}

.age-field-error {
  font-size: 0.72rem;
  color: rgba(255, 120, 100, 0.9);
  display: none;
}

.age-field.is-invalid .age-field-error { display: block; }

/* Detect button */
.age-detect-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.9375rem var(--sp-6);
  background: linear-gradient(
    135deg,
    rgba(201, 170, 113, 0.14) 0%,
    rgba(140, 107, 42, 0.08) 100%
  );
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  border: 1px solid rgba(201, 170, 113, 0.32);
  border-radius: var(--ad-radius-sm);
  cursor: pointer;
  min-height: 54px;
  margin-top: var(--sp-2);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
}

.age-detect-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201, 170, 113, 0.08), transparent);
  opacity: 0;
  transition: opacity var(--t-base);
}

.age-detect-btn:hover {
  border-color: rgba(201, 170, 113, 0.55);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(140, 107, 42, 0.15);
}

.age-detect-btn:hover::before { opacity: 1; }

.age-detect-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.age-detect-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.age-detect-btn.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.age-btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ad-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.age-detect-btn.is-loading .age-btn-icon { display: none; }
.age-detect-btn.is-loading .age-btn-text { opacity: 0.7; }
.age-detect-btn.is-loading .age-btn-spinner { display: block; }

.age-disclaimer {
  margin-top: var(--sp-4);
  font-size: 0.7rem;
  color: var(--ad-txt-3);
  text-align: center;
  line-height: 1.65;
}

/* Serial tooltip */
.age-serial-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(201, 170, 113, 0.2);
  border-radius: var(--ad-radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.age-label-hint:hover + .age-serial-tooltip,
.age-serial-tooltip.show {
  display: block;
}

/* ════════════════════════════════════════════════════════════════
   PHASE 2 — LOADING (Cinematic)
════════════════════════════════════════════════════════════════ */

.age-loading {
  position: fixed;
  inset: 0;
  background: var(--clr-bg);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
}

/* CSS clock */
.age-clock {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 170, 113, 0.30);
  box-shadow:
    0 0 0 6px rgba(201, 170, 113, 0.04),
    0 0 32px rgba(140, 107, 42, 0.10);
}

.age-clock::before,
.age-clock::after {
  content: '';
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  background: var(--clr-gold-lt);
  border-radius: 2px;
}

/* minute hand */
.age-clock::before {
  width: 1.5px;
  height: 26px;
  margin-left: -0.75px;
  animation: ad-minute-hand 6s linear infinite;
  opacity: 0.9;
}

/* hour hand */
.age-clock::after {
  width: 2px;
  height: 18px;
  margin-left: -1px;
  animation: ad-hour-hand 72s linear infinite;
  opacity: 0.65;
}

/* clock center dot */
.age-clock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: var(--clr-gold-lt);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* clock tick marks */
.age-clock-ticks {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.age-clock-ticks::before,
.age-clock-ticks::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 1px;
  height: 5px;
  background: rgba(201, 170, 113, 0.30);
  transform-origin: bottom center;
  margin-left: -0.5px;
}

.age-clock-ticks::after {
  transform: rotate(90deg) translateX(-50%);
  top: auto;
  left: auto;
  right: 6px;
  bottom: 50%;
}

.age-loading-text {
  font-size: 0.875rem;
  color: var(--clr-txt-2);
  letter-spacing: 0.04em;
  text-align: center;
  min-height: 1.4em;
}

.age-loading-text span {
  display: inline-block;
  animation: ad-blink 1.2s ease infinite;
}

/* ════════════════════════════════════════════════════════════════
   PHASE 3 — RESULT REVEAL
════════════════════════════════════════════════════════════════ */

.age-result {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 7rem 4rem;
  padding-inline: var(--container-pad);
  position: relative;
  overflow: hidden;
}

/* Gold glow behind the year number */
.age-result::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(140, 107, 42, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.age-result-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-8);
  animation: ad-slide-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Brand + model badge */
.age-result-brand {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-gold-lt);
  opacity: 0.7;
}

/* The big year number */
.age-result-year-wrap {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.age-result-year-label {
  font-size: 0.75rem;
  color: var(--clr-txt-2);
  letter-spacing: 0.1em;
}

.age-result-year {
  font-size: clamp(5rem, 18vw, 11rem);
  font-weight: 900;
  font-family: 'Montserrat', var(--font);
  color: var(--clr-gold-lt);
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(
    135deg,
    #C9AA71 0%,
    #E8D5A3 45%,
    #C9AA71 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(201, 170, 113, 0.25));
}

.age-result-year-range {
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 700;
  font-family: 'Montserrat', var(--font);
  color: var(--clr-gold-lt);
  opacity: 0.9;
}

/* Details grid */
.age-result-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  width: 100%;
}

@media (max-width: 480px) {
  .age-result-details { grid-template-columns: 1fr; }
}

.age-detail-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--ad-radius-md);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.age-detail-key {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-txt-2);
  opacity: 0.7;
}

.age-detail-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--clr-txt);
}

/* Timeline bar */
.age-timeline {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.age-timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--clr-txt-2);
}

.age-timeline-track {
  position: relative;
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  overflow: hidden;
}

.age-timeline-fill {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to left, rgba(201, 170, 113, 0.6), rgba(201, 170, 113, 0.2));
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

.age-timeline-dot {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--clr-gold-lt);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(201, 170, 113, 0.5);
  transition: right 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

.age-timeline-age {
  text-align: center;
  font-size: 0.8rem;
  color: var(--clr-txt-2);
}

.age-timeline-age strong {
  color: var(--clr-gold-lt);
}

/* Historical context */
.age-result-context {
  width: 100%;
  border: 1px solid rgba(201, 170, 113, 0.12);
  border-radius: var(--ad-radius-md);
  padding: var(--sp-5);
  background: rgba(140, 107, 42, 0.04);
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}

.age-context-icon {
  width: 32px;
  height: 32px;
  background: rgba(201, 170, 113, 0.10);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.age-context-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--clr-gold-lt);
  fill: none;
  stroke-width: 2;
}

.age-context-text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.age-context-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-gold-lt);
  opacity: 0.7;
}

.age-context-body {
  font-size: 0.875rem;
  color: var(--clr-txt-2);
  line-height: 1.65;
}

.age-context-source {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--clr-gold-lt);
  opacity: 0.65;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}
.age-context-source:hover { opacity: 1; }

/* Certificate button */
.age-cert-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.6rem 1.25rem;
  background: transparent;
  border: 1px solid rgba(201, 170, 113, 0.25);
  border-radius: var(--ad-radius-full);
  color: var(--clr-gold-lt);
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base), transform var(--t-fast);
}

.age-cert-btn:hover {
  border-color: rgba(201, 170, 113, 0.5);
  background: rgba(201, 170, 113, 0.06);
  transform: translateY(-1px);
}

.age-cert-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Reset / search again */
.age-reset-btn {
  background: none;
  border: none;
  color: var(--clr-txt-2);
  font-size: 0.8rem;
  font-family: var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.4rem 0.6rem;
  border-radius: var(--ad-radius-sm);
  transition: color var(--t-base);
}

.age-reset-btn:hover { color: var(--clr-txt); }

/* ════════════════════════════════════════════════════════════════
   PHASE 4 — FEEDBACK + CTA
════════════════════════════════════════════════════════════════ */

.age-feedback {
  padding-block: var(--sp-12) var(--sp-16);
  padding-inline: var(--container-pad);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-8);
  border-top: 1px solid var(--clr-border);
}

/* Micro-feedback */
.age-feedback-question {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}

.age-feedback-label {
  font-size: 0.875rem;
  color: var(--clr-txt-2);
}

.age-feedback-btns {
  display: flex;
  gap: var(--sp-2);
}

.age-fb-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--ad-radius-full);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8125rem;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color var(--t-base), color var(--t-base), background var(--t-base), transform var(--t-fast);
}

.age-fb-btn:hover {
  transform: translateY(-1px);
}

.age-fb-btn--yes:hover  {
  border-color: rgba(100, 200, 130, 0.45);
  color: rgba(100, 200, 130, 0.9);
  background: rgba(100, 200, 130, 0.06);
}

.age-fb-btn--maybe:hover {
  border-color: rgba(201, 170, 113, 0.45);
  color: var(--clr-gold-lt);
  background: rgba(201, 170, 113, 0.06);
}

.age-fb-btn--no:hover  {
  border-color: rgba(220, 100, 80, 0.45);
  color: rgba(220, 100, 80, 0.9);
  background: rgba(220, 100, 80, 0.06);
}

.age-fb-btn.is-selected {
  pointer-events: none;
}

.age-fb-btn--yes.is-selected {
  border-color: rgba(100, 200, 130, 0.45);
  color: rgba(100, 200, 130, 0.9);
  background: rgba(100, 200, 130, 0.06);
}

.age-fb-thanks {
  font-size: 0.8125rem;
  color: var(--clr-gold-lt);
  opacity: 0;
  transition: opacity 0.4s ease;
  text-align: center;
}

.age-fb-thanks.show { opacity: 1; }

/* Wrong-result modal */
.age-correction-modal {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.age-correction-modal.show { display: flex; }

.age-correction-title {
  font-size: 0.8125rem;
  color: var(--clr-txt-2);
}

.age-correction-form {
  display: flex;
  gap: var(--sp-2);
  width: 100%;
}

.age-correction-input {
  flex: 1;
  background: var(--ad-input-bg);
  border: 1px solid var(--ad-input-border);
  border-radius: var(--ad-radius-sm);
  padding: 0.6rem 0.875rem;
  color: var(--clr-txt);
  font-size: 0.875rem;
  font-family: var(--font);
  text-align: center;
  transition: border-color var(--t-base);
}

.age-correction-input:focus {
  outline: none;
  border-color: rgba(201, 170, 113, 0.4);
}

.age-correction-submit {
  padding: 0.6rem 1rem;
  background: rgba(201, 170, 113, 0.12);
  border: 1px solid rgba(201, 170, 113, 0.25);
  border-radius: var(--ad-radius-sm);
  color: var(--clr-gold-lt);
  font-size: 0.8125rem;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--t-base);
  white-space: nowrap;
}

.age-correction-submit:hover {
  background: rgba(201, 170, 113, 0.20);
}

/* CTA section */
.age-cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  text-align: center;
}

.age-cta-hint {
  font-size: 0.8125rem;
  color: var(--clr-txt-2);
}

.age-cta-hint strong { color: var(--clr-txt); }

.age-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, rgba(201, 170, 113, 0.15), rgba(140, 107, 42, 0.08));
  border: 1px solid rgba(201, 170, 113, 0.35);
  border-radius: var(--ad-radius-sm);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
}

.age-cta-primary:hover {
  border-color: rgba(201, 170, 113, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(140, 107, 42, 0.18);
}

.age-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 0.8rem;
  color: var(--clr-txt-2);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  transition: color var(--t-base);
}

.age-cta-secondary:hover { color: var(--clr-txt); }

/* Share button */
.age-share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--ad-radius-full);
  color: var(--clr-txt-2);
  font-size: 0.78rem;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color var(--t-base), color var(--t-base);
}

.age-share-btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--clr-txt);
}

.age-share-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ════════════════════════════════════════════════════════════════
   ERROR STATE
════════════════════════════════════════════════════════════════ */

.age-error-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  text-align: center;
  padding: var(--sp-16) var(--container-pad);
}

.age-error-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(220, 100, 80, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
}

.age-error-icon svg {
  width: 22px;
  height: 22px;
  stroke: rgba(220, 100, 80, 0.8);
  fill: none;
  stroke-width: 2;
}

.age-error-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--clr-txt);
}

.age-error-desc {
  font-size: 0.875rem;
  color: var(--clr-txt-2);
  max-width: 35ch;
  line-height: 1.65;
}

.age-error-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(201, 170, 113, 0.15);
  width: 100%;
}

.age-error-contact-hint {
  font-size: 0.8rem;
  color: var(--clr-txt-2);
  max-width: 38ch;
  line-height: 1.7;
  text-align: center;
}

.age-error-contact-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.age-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  font-family: var(--font-fa);
}

.age-contact-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.age-contact-btn--phone {
  background: rgba(255,255,255,0.07);
  color: var(--clr-txt);
  border: 1px solid rgba(255,255,255,0.12);
}

.age-contact-btn--wa {
  background: rgba(37, 211, 102, 0.12);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.25);
}

.age-contact-btn--tg {
  background: rgba(0, 136, 204, 0.12);
  color: #29a8dc;
  border: 1px solid rgba(0, 136, 204, 0.25);
}

/* ════════════════════════════════════════════════════════════════
   KEYFRAMES
════════════════════════════════════════════════════════════════ */

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

@keyframes ad-minute-hand {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes ad-hour-hand {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes ad-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

@keyframes ad-slide-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ad-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ad-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
  .age-hero {
    padding-block: 6rem 3rem;
    align-items: flex-start;
  }

  .age-form-card {
    max-width: 100%;
  }

  .age-result-year {
    font-size: clamp(4rem, 22vw, 7rem);
  }

  .age-feedback-btns {
    flex-wrap: wrap;
    justify-content: center;
  }

  .age-result-context {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .age-page {
    padding-top: 0;
  }

  .age-result {
    padding-top: 5rem;
    min-height: 100svh;
    justify-content: center;
  }

  #phase-error.age-result {
    padding-top: 0;
    margin-top: -7vh;
  }

  .age-result-brand {
    font-size: 1.375rem;
    color: var(--clr-gold-lt);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .age-result-inner     { animation: none; }
  .age-clock::before,
  .age-clock::after     { animation: none; }
  .age-loading-text span{ animation: none; }
  .age-timeline-fill    { transition: none; width: var(--fill-target) !important; }
}
