:root {
    --primary-blue: #0052cc;
    --hero-gradient: linear-gradient(135deg, #0061ff 0%, #0033aa 100%);
    --bg-light: #f8fafc;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
    --success-bg: #ecfdf5;
    --success-text: #047857;
    --warning-bg: #fff7ed;
    --warning-text: #c2410c;
    --danger-bg: #fef2f2;
    --danger-text: #b91c1c;
  }
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html {
    scroll-behavior: smooth;
    overflow-x: hidden;
  }
  
  body {
    margin: 0;
    font-family: "Inter", sans-serif;
    color: var(--text-main);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
  }
  
  a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
  }
  
  a:hover {
    text-decoration: underline;
  }
  
  button,
  input,
  select {
    font: inherit;
  }
  
  button {
    cursor: pointer;
  }
  
  table {
    width: 100%;
    border-collapse: collapse;
  }
  
  th,
  td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
  }
  
  th {
    color: var(--text-main);
    background: var(--bg-light);
    font-weight: 800;
  }
  
  td {
    color: var(--text-muted);
  }
  
  ul,
  ol {
    padding-left: 1.25rem;
  }
  
  li {
    margin-bottom: 8px;
  }
  
  .container {
    width: 100%;
    max-width: 1200px;
    padding: 0 16px;
    margin: 0 auto;
  }
  
  .hidden {
    display: none !important;
  }
  
  .travel-hero {
    background: var(--hero-gradient);
    color: var(--white);
    padding: 34px 0 38px;
  }
  
  .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    font-size: 0.92rem;
  }
  
  .breadcrumb a,
  .breadcrumb span {
    color: rgba(255, 255, 255, 0.92);
  }
  
  .travel-hero h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(2.2rem, 5vw, 3.55rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
  }
  
  .main-area {
    padding: 42px 0 58px;
    background: var(--bg-light);
  }
  
  .calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 34px;
  }
  
  .calculator-card {
    min-width: 0;
    padding: 28px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
  }
  
  .result-card {
    position: sticky;
    top: 18px;
  }
  
  .card-heading {
    display: flex;
    gap: 16px;
    margin-bottom: 22px;
  }
  
  .card-heading h2 {
    margin: 0 0 6px;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
  }
  
  .card-heading p {
    margin: 0;
    color: var(--text-muted);
  }
  
  .card-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 16px;
    background: rgba(0, 82, 204, 0.08);
    color: var(--primary-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
  }
  
  .mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px;
    margin-bottom: 22px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-light);
  }
  
  .mode-tab {
    flex: 1 1 145px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-main);
    background: transparent;
    font-weight: 800;
    transition: var(--transition);
  }
  
  .mode-tab:hover {
    background: var(--white);
    border-color: var(--border-color);
  }
  
  .mode-tab.active {
    color: var(--white);
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
  }
  
  .form-section {
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-light);
  }
  
  .form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
  }
  
  .form-section-title span {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--primary-blue);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
  }
  
  .form-section-title h3 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
  }
  
  .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  
  .form-group {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .form-group label {
    font-weight: 800;
  }
  
  .form-group small {
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.4;
  }
  
  .form-group input,
  .form-group select {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    color: var(--text-main);
    font-size: 16px;
  }
  
  .form-group input:focus,
  .form-group select:focus,
  .btn:focus,
  .mode-tab:focus,
  .quick-steps button:focus,
  .faq-section summary:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.16);
  }
  
  .quick-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
  }
  
  .quick-steps span {
    width: 100%;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 800;
  }
  
  .quick-steps button {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(0, 82, 204, 0.18);
    border-radius: 999px;
    color: var(--primary-blue);
    background: rgba(0, 82, 204, 0.06);
    font-size: 0.9rem;
    font-weight: 800;
    transition: var(--transition);
  }
  
  .quick-steps button:hover {
    color: var(--white);
    background: var(--primary-blue);
    border-color: var(--primary-blue);
  }
  
  .direction-preview {
    padding: 14px 16px;
    margin: 4px 0 18px;
    border: 1px solid rgba(0, 82, 204, 0.18);
    border-radius: 10px;
    color: var(--primary-blue);
    background: rgba(0, 82, 204, 0.06);
    font-weight: 800;
  }
  
  .form-message {
    display: none;
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 800;
  }
  
  .form-message.error {
    display: block;
    color: var(--danger-text);
    background: var(--danger-bg);
  }
  
  .form-message.success {
    display: block;
    color: var(--success-text);
    background: var(--success-bg);
  }
  
  .button-row,
  .result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
  }
  
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 800;
    transition: var(--transition);
  }
  
  .btn-primary {
    color: var(--white);
    background: var(--primary-blue);
    box-shadow: var(--shadow-sm);
  }
  
  .btn-primary:hover {
    background: #003f9e;
    transform: translateY(-1px);
  }
  
  .btn-secondary {
    color: var(--text-main);
    background: var(--white);
    border-color: var(--border-color);
  }
  
  .btn-secondary:hover {
    background: var(--bg-light);
  }
  
  .results-placeholder {
    text-align: center;
    padding: 44px 18px;
  }
  
  .placeholder-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 18px;
    border-radius: 999px;
    background: rgba(0, 82, 204, 0.08);
    color: var(--primary-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.92rem;
  }
  
  .results-placeholder h3 {
    margin: 0 0 10px;
    font-size: 1.35rem;
  }
  
  .results-placeholder p {
    margin: 0;
    color: var(--text-muted);
  }
  
  .mini-label {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--primary-blue);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  
  .results-content h2 {
    margin: 0 0 10px;
    color: var(--primary-blue);
    font-size: clamp(1.7rem, 4vw, 2.35rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
  }
  
  #resultSummary {
    margin: 0 0 18px;
    color: var(--text-muted);
    overflow-wrap: anywhere;
  }
  
  .highlight-result {
    padding: 20px;
    margin: 18px 0;
    border: 1px solid rgba(0, 82, 204, 0.18);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(0, 82, 204, 0.08), rgba(0, 82, 204, 0.03));
  }
  
  .highlight-result span {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  
  .highlight-result strong {
    display: block;
    color: var(--primary-blue);
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
  }
  
  .result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
  }
  
  .result-grid div {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
  }
  
  .result-grid span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 700;
  }
  
  .result-grid strong {
    display: block;
    font-size: 1.02rem;
    overflow-wrap: anywhere;
  }
  
  .formula-box,
  .result-note {
    padding: 15px;
    margin-top: 18px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
  }
  
  .formula-box strong,
  .result-note strong {
    display: block;
    margin-bottom: 5px;
  }
  
  .formula-box p,
  .result-note p {
    margin: 0;
    color: var(--text-muted);
  }
  
  .content-section {
    max-width: 960px;
    margin: 0 auto 22px;
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
  }
  
  .content-section h2 {
    margin: 0 0 14px;
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
  }
  
  .content-section h3 {
    margin: 24px 0 8px;
    font-size: 1.2rem;
    line-height: 1.25;
  }
  
  .content-section p {
    margin: 0 0 16px;
    color: var(--text-muted);
  }
  
  .content-section p:last-child {
    margin-bottom: 0;
  }
  
  .disclaimer-section {
    border-color: rgba(194, 65, 12, 0.22);
    background: var(--warning-bg);
  }
  
  .disclaimer-section h2 {
    color: var(--warning-text);
  }
  
  .disclaimer-section p {
    color: #7c2d12;
  }
  
  .table-wrap {
    width: 100%;
    margin: 18px 0;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--white);
  }
  
  .table-wrap table {
    min-width: 680px;
  }
  
  .related-section {
    max-width: 1080px;
  }
  
  .related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  
  .related-grid a {
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-light);
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.35;
    transition: var(--transition);
  }
  
  .related-grid a:hover {
    color: var(--primary-blue);
    background: var(--white);
    border-color: rgba(0, 82, 204, 0.25);
    text-decoration: none;
    transform: translateY(-1px);
  }
  
  .faq-section details {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--white);
    overflow: hidden;
  }
  
  .faq-section details + details {
    margin-top: 12px;
  }
  
  .faq-section summary {
    padding: 16px 18px;
    color: var(--text-main);
    font-weight: 800;
    cursor: pointer;
    list-style: none;
  }
  
  .faq-section summary::-webkit-details-marker {
    display: none;
  }
  
  .faq-section summary::after {
    content: "+";
    float: right;
    color: var(--primary-blue);
    font-weight: 800;
  }
  
  .faq-section details[open] summary::after {
    content: "−";
  }
  
  .faq-section details p {
    margin: 0;
    padding: 0 18px 18px;
    color: var(--text-muted);
  }
  
  @media (max-width: 980px) {
    .calculator-layout {
      grid-template-columns: 1fr;
    }
  
    .result-card {
      position: static;
    }
  
    .related-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  
  @media (max-width: 720px) {
    .travel-hero {
      padding: 28px 0 32px;
    }
  
    .main-area {
      padding: 28px 0 44px;
    }
  
    .calculator-card,
    .content-section {
      padding: 22px;
    }
  
    .card-heading {
      flex-direction: column;
    }
  
    .card-icon {
      width: 50px;
      height: 50px;
      min-width: 50px;
    }
  
    .form-grid,
    .result-grid,
    .related-grid {
      grid-template-columns: 1fr;
    }
  
    .mode-tabs {
      gap: 8px;
    }
  
    .mode-tab {
      flex-basis: 100%;
    }
  
    .button-row .btn,
    .result-actions .btn {
      width: 100%;
    }
  
    .quick-steps button {
      flex: 1 1 calc(50% - 8px);
    }
  }
  
  @media (max-width: 420px) {
    .container {
      padding: 0 14px;
    }
  
    .calculator-card,
    .content-section {
      padding: 18px;
    }
  
    .travel-hero h1 {
      font-size: 2.1rem;
    }
  
    .breadcrumb {
      font-size: 0.84rem;
    }
  
    th,
    td {
      padding: 10px 12px;
    }
  
    .quick-steps button {
      flex-basis: 100%;
    }
  }