.age-building-page {
  --age-primary: #003c47;
  --age-primary-2: #006b74;
  --age-accent: #d99a24;
  --age-good: #18864b;
  --age-bad: #c2410c;
  --age-soft: #f6fafb;
  --age-ink: #18343c;
  --age-muted: #64748b;
  --age-border: #dce5e8;
  --age-surface: #ffffff;
  --age-radius-xl: 26px;
  --age-radius-lg: 18px;
  --age-shadow: 0 18px 48px rgba(12, 35, 42, 0.1);

  max-width: 1320px;
  margin: 10rem auto 4rem;
  padding: 0 16px;
  color: var(--age-ink);

  * {
    box-sizing: border-box;
  }

  .age-building-eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 34px;
    padding: 7px 13px;
    border: 1px solid rgba(217, 154, 36, 0.28);
    border-radius: 999px;
    background: #fff6e6;
    color: #8a5708;
    font-size: 1.18rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  .age-building-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(28px, 4vw, 48px);
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 46px);
    border-radius: var(--age-radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
      linear-gradient(135deg, rgba(0, 45, 54, 0.95) 0%, rgba(0, 60, 71, 0.92) 55%, rgba(180, 83, 9, 0.88) 100%),
      url(../../../docs/images/common/project/caurongdanang.jpg) center / cover no-repeat;
    box-shadow: 0 20px 48px rgba(0, 35, 43, 0.22);

    .age-building-hero__content {
      display: flex;
      flex-direction: column;
      justify-content: center;

      .age-building-eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border-color: rgba(255, 153, 0, 0.4);
        background: rgba(255, 153, 0, 0.16);
        color: #ffc278;
        padding: 5px 14px;
        font-size: 1.25rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        border-radius: 12px;
        backdrop-filter: blur(4px);

        svg {
          color: #ff9900;
          flex-shrink: 0;
        }
      }

      .age-building-hero__title {
        max-width: 820px;
        margin: 14px 0;
        color: #ffffff;
        font-size: clamp(2.4rem, 3.2vw, 3.6rem);
        font-weight: 700;
        line-height: 1.25;
        letter-spacing: -0.015em;
      }

      p {
        max-width: 700px;
        margin: 0 0 20px;
        color: rgba(255, 255, 255, 0.88);
        font-size: 1.5rem;
        line-height: 1.65;
      }

      .age-building-hero__features {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;

        .age-hero-chip {
          display: inline-flex;
          align-items: center;
          gap: 6px;
          padding: 6px 14px;
          border-radius: 12px;
          background: rgba(255, 255, 255, 0.1);
          border: 1px solid rgba(255, 255, 255, 0.18);
          color: #f1f5f9;
          font-size: 1.25rem;
          font-weight: 500;
          backdrop-filter: blur(6px);
          transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;

          svg {
            color: #ff9900;
            flex-shrink: 0;
          }

          &:hover {
            background: rgba(255, 255, 255, 0.18);
            border-color: rgba(255, 153, 0, 0.45);
            transform: translateY(-1px);
          }
        }
      }
    }

    .age-building-hero__visual {
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      width: clamp(170px, 18vw, 225px);
      height: clamp(170px, 18vw, 225px);
      flex-shrink: 0;
      justify-self: center;

      &::before {
        content: "";
        position: absolute;
        inset: -20px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 153, 0, 0.22) 0%, rgba(0, 60, 71, 0) 70%);
        pointer-events: none;
      }

      &::after {
        content: "";
        position: absolute;
        inset: 4px;
        border-radius: 50%;
        border: 2px dashed rgba(255, 153, 0, 0.45);
        animation: heroDashedRingSpin 10s linear infinite;
        pointer-events: none;
      }

      .age-building-hero-art {
        width: 82%;
        height: 82%;
        object-fit: contain;
        position: relative;
        z-index: 1;
        filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.35));
        transition: transform 0.5s ease;
      }

      &:hover .age-building-hero-art {
        transform: scale(1.06) rotate(3deg);
      }
    }
  }

  .age-building-tool {
    margin-top: 26px;
    padding: clamp(22px, 3vw, 34px);
    border: 1px solid var(--age-border);
    border-radius: var(--age-radius-xl);
    background: var(--age-surface);
    box-shadow: var(--age-shadow);
  }

  .age-building-tool__intro {
    max-width: 900px;
    margin-bottom: 24px;

    .age-building-tool__title {
      margin: 12px 0 10px;
      color: var(--age-primary);
      font-size: clamp(2.4rem, 3vw, 3.5rem);
      font-weight: 900;
      line-height: 1.16;
    }

    p {
      margin: 0;
      color: var(--age-muted);
      font-size: 1.48rem;
      line-height: 1.7;
    }
  }

  .age-building-form {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 16px;
    align-items: end;
  }

  .age-building-field {
    position: relative;
    min-width: 0;
  }

  .age-building-label {
    display: block;
    margin-bottom: 9px;
    color: var(--age-primary);
    font-size: 1.34rem;
    font-weight: 850;
  }

  .age-building-select {
    position: relative;
  }

  .age-building-input {
    width: 100%;
    height: 52px;
    padding: 0 44px 0 15px;
    border: 1px solid var(--age-border);
    border-radius: 14px;
    background: var(--age-soft);
    color: var(--age-ink);
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 720;
    outline: 0;
    transition:
      border-color 0.2s ease,
      background 0.2s ease,
      box-shadow 0.2s ease;

    &:focus {
      border-color: var(--age-primary-2);
      background: #fff;
      box-shadow: 0 0 0 4px rgba(0, 107, 116, 0.12);
    }

    &::placeholder {
      color: #8a9aa3;
      font-weight: 650;
    }

    &.shake {
      border-color: #ef4444;
      animation: ageBuildingShake 0.36s ease;
    }
  }

  .age-building-select__icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--age-muted);
    pointer-events: none;
    transform-origin: center center;
    transition: transform 0.25s ease, color 0.2s ease;

    &.active {
      transform: translateY(-50%) rotate(180deg);
      color: var(--age-primary);
    }
  }

  .age-building-error {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 4;
    color: #dc2626;
    font-size: 1.16rem;
    font-weight: 760;
  }

  .age-building-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    z-index: 30;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--age-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(12, 35, 42, 0.16);
  }

  .age-building-search {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid var(--age-border);

    .age-building-search__input {
      display: block;
      width: 100%;
      height: 40px;
      margin: 0;
      padding: 0 42px 0 14px;
      border: 1px solid var(--age-border);
      border-radius: 12px;
      color: var(--age-ink);
      font-size: 1.32rem;
      outline: 0;
      background: #ffffff;

      &:focus {
        border-color: var(--age-primary-2);
      }
    }

    .icon-tabler-search,
    svg,
    i {
      position: absolute;
      top: 50%;
      right: 24px;
      transform: translateY(-50%);
      width: 18px !important;
      height: 18px !important;
      display: block;
      vertical-align: initial;
      color: var(--age-muted);
      pointer-events: none;
      flex-shrink: 0;
    }
  }

  .age-building-suggestions__list {
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;

    &.age-building-suggestions__list--years {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
    }
  }

  .house-orientation-suggestions--sex {
    min-width: 280px;
    padding: 10px;
    overflow: visible !important;

    .house-orientation-suggestions__list--sex {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
      padding: 0;
      max-height: none;
    }

    .item-sex {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-height: 48px;
      padding: 12px 14px;
      border: 1.5px solid var(--age-border);
      border-radius: 12px;
      background: #ffffff;
      color: var(--age-ink);
      font-weight: 700;
      font-size: 1.35rem;
      cursor: pointer;
      transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;

      .sex-option-icon {
        width: 20px;
        height: 20px;
        font-size: 1.6rem;
        color: var(--age-primary);
        flex-shrink: 0;
        transition: transform 0.2s ease;
      }

      &:hover {
        border-color: var(--age-primary);
        background: #f0fdfa;
        color: var(--age-primary);
        box-shadow: 0 4px 12px rgba(0, 60, 71, 0.12);

        .sex-option-icon {
          transform: scale(1.12);
        }
      }

      &.active {
        border-color: var(--age-primary);
        background: #003c47;
        color: #ffffff;
        box-shadow: 0 4px 14px rgba(0, 60, 71, 0.22);

        .sex-option-icon {
          color: #ff9900;
        }

        .type-name-sex {
          color: #ffffff;
        }
      }
    }

    .age-building-clear {
      display: none !important;
      border-top: none !important;
    }
  }

  .age-building-option,
  .suggestion-item {
    display: flex;
    min-height: 42px;
    align-items: center;
    padding: 9px 12px;
    border-radius: 11px;
    color: var(--age-ink);
    cursor: pointer;
    font-size: 1.32rem;
    font-weight: 720;
    transition:
      background 0.18s ease,
      color 0.18s ease;

    &:hover,
    &.active {
      background: #fff6e6;
      color: #8a5708;
    }
  }

  .age-building-clear {
    display: none;
    padding: 10px 12px 12px;
    border-top: 1px solid var(--age-border);

    &.active {
      display: block;
    }
  }

  .age-building-clear__button {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 11px;
    background: #edf8f8;
    color: var(--age-primary);
    cursor: pointer;
    font-size: 1.28rem;
    font-weight: 850;
  }

  .age-building-submit {
    display: inline-flex;
    grid-column: 1 / -1;
    height: 52px;
    align-items: center;
    justify-content: center;
    justify-self: center;
    gap: 9px;
    min-width: 210px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    background: var(--age-primary);
    color: #fff;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 880;
    white-space: nowrap;
    box-shadow: 0 12px 26px rgba(0, 60, 71, 0.2);
    transition:
      background 0.2s ease,
      transform 0.2s ease,
      box-shadow 0.2s ease;

    &:hover {
      background: var(--age-primary-2);
      transform: translateY(-2px);
      box-shadow: 0 16px 32px rgba(0, 60, 71, 0.26);
    }

    &:disabled {
      opacity: 0.85;
      cursor: not-allowed;
      transform: none;
      box-shadow: 0 8px 18px rgba(0, 60, 71, 0.15);
    }

    svg.spin {
      animation: ageSpinLoader 0.85s linear infinite;
    }
  }

  @keyframes ageSpinLoader {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }

  .age-building-result {
    display: none;
    margin-top: 26px;

    &.active {
      display: block;
    }
  }

  .age-building-report {
    width: 100%;
    position: relative;
    padding: 0;
    overflow: hidden;
    border: none;
    background: transparent;
    box-shadow: none;
    animation: reportFadeSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes reportFadeSlideIn {
    0% {
      opacity: 0;
      transform: translateY(24px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* TABLER SVG ICONS GLOBAL STYLES */
  svg.icon-tabler {
    width: 1em;
    height: 1em;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
  }

  /* SÂN KHẤU BÀN QUAY THIÊN CAN - ĐỊA CHI TRUNG TÂM (CENTER STAGE NHƯ XEM HƯỚNG NHÀ) */
  .canchi-instrument-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 32px;
    position: relative;
    overflow: visible;
  }

  .canchi-instrument-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
    gap: 16px;
    padding: 6px 0 14px;

    @media (min-width: 992px) {
      gap: clamp(18px, 2.5vh, 26px);
      padding: 6px 0 18px;
    }

    .canchi-instrument-svg-box {
      position: relative;
      overflow: visible;
      border: none;
      background: transparent;
      padding: 0;
      box-shadow: none;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;

      .canchi-svg-instrument {
        width: min(calc(100vh - 210px), 640px, 92vw);
        min-width: 280px;
        height: auto;
        aspect-ratio: 1 / 1;
        display: block;
        filter: drop-shadow(0 12px 32px rgba(0, 36, 44, 0.16));
      }

      .canchi-ring {
        will-change: transform;
        transform-origin: 320px 320px;
      }

      .canchi-compass-needle {
        pointer-events: none;
        transform-origin: 320px 320px;
        will-change: transform;
      }

      .canchi-north-pointer {
        pointer-events: none;
        transform-origin: 320px 320px;
      }

      .canchi-active-target-overlay {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.5s ease;

        &.is-revealed {
          opacity: 1;
        }

        .canchi-target-frame {
          stroke: #ff9900;
          stroke-width: 2px;
          stroke-linejoin: round;
          stroke-linecap: round;
          fill: none !important;
          filter: drop-shadow(0 0 5px rgba(255, 153, 0, 0.45));
        }
      }

      .canchi-sector-item {
        .canchi-sector-bg {
          transition: fill 0.3s ease;
        }

        text {
          transition: font-weight 0.3s ease;
        }

        &.is-target-active {
          .canchi-sector-bg {
            fill: #ffffff !important;
          }

          text {
            font-weight: 950 !important;
          }
        }
      }
    }

    /* BOX THÔNG TIN NGẮN NGAY DƯỚI LA BÀN (NHƯ XEM HƯỚNG NHÀ & XEM HƯỚNG BẾP) */
    .canchi-instrument-caption {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 8px;
      width: 100%;
      max-width: min(calc(100vh - 210px), 640px, 92vw);
      padding: 14px 24px;
      border: 1.5px solid rgba(0, 60, 71, 0.14);
      border-radius: 18px;
      background: #ffffff;
      box-shadow: 0 10px 28px rgba(0, 40, 48, 0.08);
      transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;

      .caption-tag {
        color: var(--age-muted, #64748b);
        font-size: 1.15rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 750;
        display: inline-flex;
        align-items: center;
        gap: 6px;

        svg {
          width: 16px;
          height: 16px;
          color: #ff9900;
        }
      }

      .caption-title {
        color: #003c47;
        font-size: clamp(1.4rem, 1.8vw, 1.65rem);
        font-weight: 900;
        line-height: 1.35;
        transition: color 0.4s ease;
      }

      .caption-status-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 16px;
        border-radius: 999px;
        font-size: 1.2rem;
        font-weight: 850;
        width: fit-content;
        transition: all 0.4s ease;

        &.is-neutral {
          background: #f1f5f9;
          color: #475569;
          border: 1px solid #cbd5e1;
        }

        &.is-good {
          background: #dcfce7;
          color: #15803d;
          border: 1px solid #bbf7d0;
        }

        &.is-medium {
          background: #fef3c7;
          color: #b45309;
          border: 1px solid #fde68a;
        }

        &.is-bad {
          background: #fee2e2;
          color: #b91c1c;
          border: 1px solid #fecaca;
        }

        .spin {
          animation: spin 1s linear infinite;
        }
      }

      .caption-desc {
        font-size: 1.28rem;
        color: #475569;
        line-height: 1.55;

        strong {
          color: #003c47;
          font-weight: 800;
        }
      }

      &.is-waiting {
        border-top: 4px solid #94a3b8;
      }

      &.is-good {
        border-top: 4px solid #16a34a;
      }

      &.is-medium {
        border-top: 4px solid #f59e0b;
      }

      &.is-bad {
        border-top: 4px solid #dc2626;
      }
    }
  }

  /* KHỐI TIÊU ĐỀ LUẬN GIẢI CHI TIẾT */
  .age-building-heading-group {
    margin-bottom: 24px;

    .age-building-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 1.25rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: #ff9900;
      margin-bottom: 6px;

      svg {
        width: 16px;
        height: 16px;
      }
    }

    .age-building-main-title {
      font-size: clamp(2rem, 2.5vw, 2.8rem);
      font-weight: 900;
      color: #003c47;
      line-height: 1.25;
    }
  }

  /* CARD ĐÁNH GIÁ TỔNG QUAN: TỨ TRỤ CAN CHI + GAUGE ĐIỂM SỐ */
  .age-building-verdict-card {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
    gap: 24px;
    align-items: center;
    padding: clamp(20px, 3vw, 28px);
    background: #ffffff;
    border: 1px solid rgba(0, 60, 71, 0.12);
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 36, 44, 0.05);
    margin-bottom: 28px;

    @media (max-width: 900px) {
      grid-template-columns: 1fr;
      gap: 20px;
    }

    .verdict-card-left {
      display: flex;
      flex-direction: column;
      gap: 12px;

      .verdict-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 14px;
        border-radius: 999px;
        font-size: 1.2rem;
        font-weight: 800;
        width: fit-content;
        text-transform: uppercase;
        letter-spacing: 0.03em;

        &.is-good {
          background: #dcfce7;
          color: #15803d;
          border: 1px solid #bbf7d0;
        }

        &.is-medium {
          background: #fef3c7;
          color: #b45309;
          border: 1px solid #fde68a;
        }

        &.is-bad {
          background: #fee2e2;
          color: #b91c1c;
          border: 1px solid #fecaca;
        }
      }

      .verdict-summary {
        font-size: 1.45rem;
        line-height: 1.65;
        color: #334155;
        margin: 0;
      }
    }

    .verdict-card-right {
      display: flex;
      justify-content: center;
    }
  }

  /* BỘ TỨ TRỤ CAN - CHI - MỆNH - CUNG */
  .canchi-axis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 4px;

    @media (max-width: 580px) {
      grid-template-columns: repeat(2, 1fr);
    }

    .axis-cell {
      padding: 12px 8px;
      border-radius: 12px;
      background: #f8fafc;
      border: 1px solid #e2e8f0;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      transition: all 0.25s ease;

      &:hover {
        background: #ffffff;
        border-color: #ff9900;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 36, 44, 0.06);
      }

      .axis-cell-label {
        font-size: 1.12rem;
        font-weight: 750;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
      }

      .axis-cell-val {
        font-size: 1.6rem;
        font-weight: 900;
        color: #003c47;
        line-height: 1.2;
      }

      &.val-hanh--kim .axis-cell-val,
      .axis-cell-val.val-hanh--kim {
        color: #475569 !important;
      }

      &.val-hanh--thuy .axis-cell-val,
      .axis-cell-val.val-hanh--thuy {
        color: #0284c7 !important;
      }

      &.val-hanh--moc .axis-cell-val,
      .axis-cell-val.val-hanh--moc {
        color: #16a34a !important;
      }

      &.val-hanh--hoa .axis-cell-val,
      .axis-cell-val.val-hanh--hoa {
        color: #dc2626 !important;
      }

      &.val-hanh--tho .axis-cell-val,
      .axis-cell-val.val-hanh--tho {
        color: #b45309 !important;
      }

      &.is-good .axis-cell-val,
      .axis-cell-val.is-good {
        color: #16a34a !important;
      }

      &.is-bad .axis-cell-val,
      .axis-cell-val.is-bad {
        color: #dc2626 !important;
      }
    }
  }

  /* THƯỚC ĐO ĐIỂM SỐ PHONG THỦY GAUGE */
  .canchi-meter-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    width: 100%;

    .canchi-meter-dial {
      position: relative;
      width: 96px;
      height: 96px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;

      .age-gauge-svg {
        transform: rotate(-90deg);
        width: 96px;
        height: 96px;
      }

      .age-gauge-bg {
        stroke: #e2e8f0;
        stroke-width: 8.5;
        fill: none;
      }

      .age-gauge-progress {
        stroke-width: 8.5;
        stroke-linecap: round;
        fill: none;
        transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1);
      }

      .age-gauge-center {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: baseline;
        justify-content: center;
        margin-top: 32px;

        .age-gauge-score {
          font-size: 3rem;
          font-weight: 900;
          line-height: 1;
          color: #003c47;
          font-variant-numeric: tabular-nums;
        }

        .age-gauge-max {
          font-size: 1.4rem;
          font-weight: 700;
          color: #64748b;
          margin-left: 2px;
        }
      }
    }

    &.is-good .age-gauge-progress {
      stroke: #16a34a;
    }

    &.is-medium .age-gauge-progress {
      stroke: #f59e0b;
    }

    &.is-bad .age-gauge-progress {
      stroke: #dc2626;
    }

    .canchi-meter-text {
      min-width: 0;

      .canchi-meter-score-text {
        font-size: 1.55rem;
        color: #003c47;
        margin-bottom: 4px;

        strong {
          color: #ff9900;
          font-weight: 900;
        }
      }

      .canchi-meter-guide-text {
        font-size: 1.28rem;
        line-height: 1.55;
        color: #64748b;
      }
    }
  }

  /* KHỐI BÁO CÁO PHÂN TÍCH CHI TIẾT (XUẤT HIỆN SAU KHI QUAY) */
  .age-building-report-details {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;

    &.is-revealed {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .age-building-report__body {
    padding: clamp(20px, 3.5vw, 34px);
  }

  /* BẢNG ĐỊNH DANH GIA CHỦ CÂN ĐỐI 3 CỘT (LUXURY PROFILE CARDS) */
  .age-building-profile-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
    margin-bottom: 28px;
    padding: 0;
    background: transparent;
    border: none;

    @media (max-width: 900px) {
      grid-template-columns: 1fr;
      gap: 14px;
    }

    .profile-strip-card {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 20px 22px;
      border-radius: 18px;
      background: #ffffff;
      border: 1px solid rgba(0, 60, 71, 0.12);
      box-shadow: 0 4px 18px rgba(0, 36, 44, 0.04);
      position: relative;
      overflow: hidden;
      transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;

      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        border-radius: 4px 0 0 4px;
      }

      &:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(0, 36, 44, 0.08);
      }

      /* Card 1: Gia chủ */
      &--owner {
        &::before {
          background: #003c47;
        }

        .profile-strip-icon {
          background: rgba(0, 60, 71, 0.08);
          color: #003c47;
        }

        &:hover {
          border-color: rgba(0, 60, 71, 0.25);
        }
      }

      /* Card 2: Tuổi mụ âm lịch (Nổi bật trung tâm) */
      &--age {
        border-color: rgba(255, 153, 0, 0.32);
        background: linear-gradient(145deg, #ffffff 0%, #fffcf7 100%);
        box-shadow: 0 6px 20px rgba(255, 153, 0, 0.08);

        &::before {
          background: #ff9900;
        }

        .profile-strip-icon--age {
          background: rgba(255, 153, 0, 0.12);
          color: #d97706;
        }

        .lunar-age-badge {
          display: inline-flex;
          align-items: baseline;
          gap: 6px;

          .lunar-age-number {
            font-size: 2.7rem;
            font-weight: 900;
            color: #003c47;
            line-height: 1;
            font-variant-numeric: tabular-nums;
          }

          .lunar-age-unit {
            font-size: 1.35rem;
            font-weight: 850;
            color: #d97706;
            text-transform: uppercase;
            letter-spacing: 0.03em;
          }
        }

        &:hover {
          border-color: rgba(255, 153, 0, 0.5);
          box-shadow: 0 12px 28px rgba(255, 153, 0, 0.14);
        }
      }

      /* Card 3: Năm xây dựng */
      &--year {
        &::before {
          background: #006b74;
        }

        .profile-strip-icon {
          background: rgba(0, 107, 116, 0.09);
          color: #006b74;
        }

        &:hover {
          border-color: rgba(0, 107, 116, 0.25);
        }
      }

      .profile-strip-icon {
        flex-shrink: 0;
        width: 50px;
        height: 50px;
        border-radius: 14px;
        display: flex;
        align-items: center;
        justify-content: center;

        svg {
          width: 25px;
          height: 25px;
          flex-shrink: 0;
        }
      }

      .profile-strip-content {
        min-width: 0;
        flex: 1;
      }
    }

    .profile-strip-label {
      display: block;
      font-size: 1.15rem;
      font-weight: 750;
      text-transform: uppercase;
      color: #64748b;
      margin-bottom: 4px;
      letter-spacing: 0.03em;
    }

    .profile-strip-value,
    .profile-strip-title {
      font-size: 1.7rem;
      font-weight: 850;
      color: #003c47;
      line-height: 1.3;

      &--age {
        display: inline-flex;
        align-items: baseline;
        gap: 6px;

        .profile-strip-num {
          font-size: 2.5rem;
          font-weight: 900;
          color: #003c47;
          line-height: 1;
          font-variant-numeric: tabular-nums;
        }

        .profile-strip-unit {
          font-size: 1.3rem;
          font-weight: 850;
          color: #d97706;
          text-transform: uppercase;
          letter-spacing: 0.03em;
        }
      }
    }

    .profile-strip-desc {
      font-size: 1.25rem;
      color: #64748b;
      margin-top: 3px;
      line-height: 1.4;
    }
  }

  /* LƯỚI 4 CUNG HẠN CÂN XỨNG 2x2 */
  .age-building-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;

    @media (max-width: 768px) {
      grid-template-columns: 1fr;
    }
  }

  .age-building-section-card {
    padding: 22px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 45, 54, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease;

    &:hover {
      transform: translateY(-3px);
      box-shadow: 0 12px 28px rgba(0, 60, 71, 0.09);
    }

    &.is-good {
      border-left: 5px solid #16a34a;
      background: linear-gradient(135deg, rgba(22, 163, 74, 0.03) 0%, #ffffff 50%);
    }

    &.is-bad {
      border-left: 5px solid #dc2626;
      background: linear-gradient(135deg, rgba(220, 38, 38, 0.03) 0%, #ffffff 50%);
    }

    .age-building-section-card__header {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
      padding-bottom: 12px;
      border-bottom: 1px solid #f1f5f9;

      .card-identity {
        display: flex;
        align-items: center;
        gap: 10px;

        .card-icon-bubble {
          width: 36px;
          height: 36px;
          border-radius: 10px;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 1.6rem;

          svg {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
          }

          &.is-good {
            background: rgba(22, 163, 74, 0.1);
            color: #16a34a;
          }

          &.is-bad {
            background: rgba(220, 38, 38, 0.1);
            color: #dc2626;
          }
        }

        .card-title-text {
          font-size: 1.65rem;
          font-weight: 850;
          color: #003c47;
          white-space: normal;
          word-break: break-word;
          line-height: 1.35;
        }
      }
    }

    .age-building-section-card__body p {
      margin: 0;
      color: #334155;
      font-size: 1.42rem;
      line-height: 1.68;
    }
  }

  .age-building-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 1.22rem;
    font-weight: 800;

    svg {
      width: 16px;
      height: 16px;
      flex-shrink: 0;
    }

    &.is-good {
      background: #dcfce7;
      color: #15803d;
      border: 1px solid rgba(22, 163, 74, 0.25);
    }

    &.is-bad {
      background: #fee2e2;
      color: #b91c1c;
      border: 1px solid rgba(220, 38, 38, 0.25);
    }
  }

  /* KHỐI ĐÁNH GIÁ, MƯỢN TUỔI & NGHI LỄ */
  .age-building-block-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;

    .block-header-title {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 1.7rem;
      font-weight: 850;
      color: #003c47;

      svg {
        color: #ff9900;
        width: 22px;
        height: 22px;
      }
    }
  }

  .age-building-evaluation {
    border: 1px solid rgba(0, 60, 71, 0.18);
    border-radius: 18px;
    background: #f1fbfb;
    box-shadow: 0 4px 16px rgba(0, 60, 71, 0.05);
    padding: 22px;
    margin-bottom: 22px;

    .age-building-evaluation__content p {
      margin: 0;
      color: #1e293b;
      font-size: 1.44rem;
      line-height: 1.7;
    }
  }

  .age-building-borrow {
    border: 1px solid rgba(217, 154, 36, 0.3);
    border-radius: 18px;
    background: linear-gradient(180deg, #fffdf8 0%, #fff8ea 100%);
    box-shadow: 0 4px 16px rgba(217, 154, 36, 0.08);
    padding: 22px;
    margin-bottom: 22px;

    &.is-perfect {
      border-color: rgba(22, 163, 74, 0.35);
      background: linear-gradient(180deg, #f7fdf9 0%, #f1fbf5 100%);
    }

    .borrow-desc {
      margin: 0;
      color: #1e293b;
      font-size: 1.42rem;
      line-height: 1.65;
    }

    .age-building-age-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 14px;
    }

    .age-building-age-tag {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 36px;
      padding: 8px 16px;
      border-radius: 999px;
      background: #ffffff;
      border: 1px solid rgba(0, 60, 71, 0.16);
      color: #003c47;
      font-size: 1.34rem;
      font-weight: 800;
      box-shadow: 0 2px 8px rgba(0, 60, 71, 0.05);
      transition: transform 0.2s ease, border-color 0.2s ease;

      svg {
        color: #ff9900;
        width: 16px;
        height: 16px;
      }

      &:hover {
        transform: translateY(-2px);
        border-color: #ff9900;
      }
    }

    .age-building-borrow__note {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-top: 16px;
      padding: 12px 16px;
      border-radius: 12px;
      background: rgba(217, 154, 36, 0.12);
      color: #8a5708;
      font-size: 1.34rem;
      line-height: 1.6;

      svg {
        color: #ff9900;
        width: 20px;
        height: 20px;
        margin-top: 3px;
        flex-shrink: 0;
      }

      .borrow-note-text strong {
        color: #724706;
      }
    }
  }

  .age-building-rituals {
    border: 1px solid rgba(0, 60, 71, 0.14);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 45, 54, 0.05);
    padding: clamp(20px, 3vw, 28px);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;

    .rituals-header {
      display: flex;
      align-items: flex-start;
      gap: 14px;
      margin-bottom: 20px;
      padding-bottom: 16px;
      border-bottom: 1px solid #f1f5f9;

      .rituals-header__icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: rgba(0, 60, 71, 0.08);
        color: #003c47;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;

        svg {
          width: 24px;
          height: 24px;
        }
      }

      .rituals-header__text {
        min-width: 0;
        flex: 1;

        .rituals-header__title {
          font-size: 1.75rem;
          font-weight: 850;
          color: #003c47;
          line-height: 1.3;
          margin-bottom: 4px;
        }

        .rituals-header__desc {
          margin: 0;
          font-size: 1.3rem;
          color: #64748b;
          line-height: 1.5;
        }
      }
    }

    .age-building-ritual-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;

      @media (max-width: 992px) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      @media (max-width: 600px) {
        grid-template-columns: 1fr;
      }

      .age-ritual-step {
        padding: 20px 18px;
        border-radius: 16px;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: relative;
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;

        &:hover {
          transform: translateY(-4px);
          box-shadow: 0 10px 24px rgba(0, 60, 71, 0.08);
        }

        .ritual-step-top {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 8px;
          margin-bottom: 2px;
        }

        .ritual-step-badge {
          display: inline-flex;
          align-items: center;
          padding: 4px 10px;
          border-radius: 999px;
          font-size: 1.12rem;
          font-weight: 850;
          letter-spacing: 0.04em;
          text-transform: uppercase;
        }

        .ritual-step-icon {
          width: 32px;
          height: 32px;
          border-radius: 8px;
          display: flex;
          align-items: center;
          justify-content: center;
          flex-shrink: 0;

          svg {
            width: 18px;
            height: 18px;
          }
        }

        .ritual-step-title {
          font-size: 1.52rem;
          font-weight: 850;
          color: #003c47;
          line-height: 1.35;
        }

        .ritual-step-desc {
          margin: 0;
          font-size: 1.32rem;
          line-height: 1.62;
          color: #475569;
          flex: 1;
        }

        /* Bước 1: Giai đoạn chuẩn bị */
        &.step-1 {
          border-top: 3px solid #003c47;
          background: linear-gradient(180deg, rgba(0, 60, 71, 0.03) 0%, #ffffff 100%);

          .ritual-step-badge {
            background: rgba(0, 60, 71, 0.1);
            color: #003c47;
          }

          .ritual-step-icon {
            background: rgba(0, 60, 71, 0.08);
            color: #003c47;
          }

          &:hover {
            border-color: #003c47;
          }
        }

        /* Bước 2: Lễ Động thổ */
        &.step-2 {
          border-top: 3px solid #d97706;
          background: linear-gradient(180deg, rgba(217, 119, 6, 0.03) 0%, #ffffff 100%);

          .ritual-step-badge {
            background: rgba(217, 119, 6, 0.12);
            color: #b45309;
          }

          .ritual-step-icon {
            background: rgba(217, 119, 6, 0.1);
            color: #d97706;
          }

          &:hover {
            border-color: #d97706;
          }
        }

        /* Bước 3: Lễ Cất nóc */
        &.step-3 {
          border-top: 3px solid #0284c7;
          background: linear-gradient(180deg, rgba(2, 132, 199, 0.03) 0%, #ffffff 100%);

          .ritual-step-badge {
            background: rgba(2, 132, 199, 0.12);
            color: #0369a1;
          }

          .ritual-step-icon {
            background: rgba(2, 132, 199, 0.1);
            color: #0284c7;
          }

          &:hover {
            border-color: #0284c7;
          }
        }

        /* Bước 4: Lễ Nhập trạch */
        &.step-4 {
          border-top: 3px solid #16a34a;
          background: linear-gradient(180deg, rgba(22, 163, 74, 0.03) 0%, #ffffff 100%);

          .ritual-step-badge {
            background: rgba(22, 163, 74, 0.12);
            color: #15803d;
          }

          .ritual-step-icon {
            background: rgba(22, 163, 74, 0.1);
            color: #16a34a;
          }

          &:hover {
            border-color: #16a34a;
          }
        }
      }
    }
  }

  .age-building-disclaimer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    font-size: 1.3rem;
    line-height: 1.55;

    svg {
      color: #ff9900;
      width: 20px;
      height: 20px;
      flex-shrink: 0;
    }
  }

  .age-building-guide {
    margin-top: 32px;
    padding: clamp(28px, 4vw, 42px);
    border: 1px solid rgba(0, 60, 71, 0.1);
    border-radius: var(--age-radius-xl);
    background: linear-gradient(180deg, #ffffff 0%, #f7fafb 100%);
    box-shadow: 0 16px 40px rgba(0, 45, 54, 0.06);

    .age-building-guide__heading {
      max-width: 820px;
      margin-bottom: 30px;

      .age-building-eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 5px 14px;
        border-radius: 999px;
        background: rgba(0, 60, 71, 0.07);
        border: 1px solid rgba(0, 60, 71, 0.14);
        color: #003c47;
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;

        svg {
          color: #ff9900;
        }
      }

      h2 {
        margin: 12px 0 8px;
        color: #002d36;
        font-size: clamp(2.2rem, 2.6vw, 3rem);
        font-weight: 700;
        line-height: 1.25;
      }

      p {
        margin: 0;
        color: #52606d;
        font-size: 1.5rem;
        line-height: 1.65;
      }
    }

    .age-building-guide__grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 22px;
      align-items: stretch;

      @media (max-width: 900px) {
        grid-template-columns: 1fr !important;
        gap: 16px;
      }
    }

    .age-building-guide-card {
      position: relative;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      border: 1px solid rgba(0, 60, 71, 0.09);
      border-radius: 20px;
      padding: 24px;
      background: #ffffff;
      box-shadow: 0 4px 20px rgba(0, 60, 71, 0.05);
      transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
      overflow: hidden;

      &::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #003c47, #ff9900);
        opacity: 0;
        transition: opacity 0.25s ease;
      }

      &:hover {
        transform: translateY(-5px);
        box-shadow: 0 16px 36px rgba(0, 60, 71, 0.12);
        border-color: rgba(255, 153, 0, 0.35);

        &::after {
          opacity: 1;
        }

        .age-building-guide-card__icon {
          background: linear-gradient(135deg, #003c47 0%, #005666 100%);
          color: #ffffff;
          transform: scale(1.06) rotate(3deg);
        }

        .age-building-guide-title {
          color: #ff9900;
        }
      }

      .age-building-guide-card__body {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
      }

      .age-building-guide-card__info {
        flex: 1;
        min-width: 0;

        .age-building-guide-title {
          margin: 0 0 8px;
          color: #003c47;
          font-size: 1.85rem;
          font-weight: 700;
          line-height: 1.35;
          transition: color 0.2s ease;
        }

        p {
          margin: 0;
          color: #475569;
          font-size: 1.38rem;
          line-height: 1.6;
        }
      }

      .age-building-guide-card__icon {
        flex: 0 0 54px;
        width: 54px;
        height: 54px;
        border-radius: 14px;
        background: rgba(0, 60, 71, 0.08);
        border: 1px solid rgba(0, 60, 71, 0.12);
        color: #003c47;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;

        svg {
          width: 26px;
          height: 26px;
        }
      }

      .age-building-guide-card__footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 14px;
        margin-top: 16px;
        border-top: 1px solid rgba(0, 60, 71, 0.08);

        .guide-card-tag {
          font-size: 1.25rem;
          font-weight: 600;
          color: #003c47;
          background: rgba(0, 60, 71, 0.06);
          padding: 4px 10px;
          border-radius: 6px;
        }

        .guide-card-step {
          width: 28px;
          height: 28px;
          border-radius: 50%;
          background: rgba(0, 60, 71, 0.06);
          color: #003c47;
          font-size: 1.2rem;
          font-weight: 700;
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
    }
  }
}

@keyframes ageBuildingShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@media (max-width: 1100px) {
  .age-building-page {
    .age-building-form {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .age-building-submit {
      grid-column: 1 / -1;
      width: min(100%, 260px);
      justify-self: center;
    }

    .age-building-section-grid {
      grid-template-columns: 1fr;
    }
  }
}

@media (max-width: 900px) {
  .age-building-page {
    margin: 4rem auto 3rem;

    .age-building-hero {
      grid-template-columns: 1fr;

      .age-building-hero__content {
        min-height: auto;
      }
    }

    .age-building-report__header {
      grid-template-columns: 1fr;
    }

    .age-building-basic,
    .age-building-guide__grid {
      grid-template-columns: 1fr;
    }
  }
}

@media (max-width: 768px) {
  .age-building-page {
    margin: 3rem auto 2.5rem;
    padding: 0 8px;

    .age-building-hero {
      grid-template-columns: 1fr;
      text-align: left;
      padding: 22px 14px;
      border-radius: 18px;

      .age-building-hero__features {
        display: none !important;
      }

      .age-building-hero__visual {
        margin: 0 auto;
      }
    }

    .age-building-tool {
      margin-top: 18px;
      padding: 18px 14px;
      border-radius: 18px;
    }

    .age-building-result {
      margin-top: 20px;
    }

    .canchi-instrument-stage {
      padding: 0;
      margin-bottom: 20px;

      .canchi-instrument-visual {
        gap: 12px;

        .canchi-instrument-svg-box {
          width: 100%;
          max-width: 100%;
          height: auto;
          aspect-ratio: 1;
        }

        .canchi-instrument-caption {
          padding: 12px 14px;
          border-radius: 14px;
          max-width: 100%;

          .caption-title {
            font-size: 1.38rem;
          }

          .caption-desc {
            font-size: 1.22rem;
          }
        }
      }
    }

    .age-building-profile-strip {
      grid-template-columns: 1fr;
      gap: 10px;
      margin-bottom: 18px;

      .profile-strip-card {
        padding: 14px 16px;
        border-radius: 14px;
      }
    }

    .age-building-section-grid {
      grid-template-columns: 1fr;
      gap: 14px;
      margin-bottom: 18px;
    }

    .age-building-section-card {
      padding: 16px 14px;
      border-radius: 16px;

      .age-building-section-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-bottom: 10px;

        .card-identity {
          width: 100%;

          .card-title-text {
            font-size: 1.55rem;
            white-space: normal;
            word-break: break-word;
            line-height: 1.35;
          }
        }

        .card-status-badge {
          align-self: flex-start;
        }
      }
    }

    .age-building-guide {
      padding: 18px 14px;
      border-radius: 18px;
    }

    .age-building-submit {
      width: 100%;
      height: 50px;
      font-size: 1.45rem;
    }
  }
}

@keyframes heroDashedRingSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes canchiNeedlePulse {
  0% {
    filter: drop-shadow(0 2px 4px rgba(0, 18, 24, 0.45));
  }
  100% {
    filter: drop-shadow(0 5px 12px rgba(239, 68, 68, 0.55));
  }
}

@keyframes axisCellPop {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  60% {
    transform: translateY(-2px) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes canchiTargetPulse {
  0% {
    filter: drop-shadow(0 0 8px rgba(255, 153, 0, 0.85)) drop-shadow(0 0 16px rgba(255, 153, 0, 0.35));
  }
  100% {
    filter: drop-shadow(0 0 14px rgba(255, 153, 0, 1)) drop-shadow(0 0 28px rgba(255, 153, 0, 0.6));
  }
}

