/* China Trip 2026 — unified site */
:root {
    --red: #C41E3A;
    --red-light: #DC3545;
    --gold: #C9A227;
    --gold-light: #E6C35C;
    --ink: #1a1a2e;
    --ink-light: #2d2d44;
    --text: #333;
    --text-muted: #666;
    --bg: #FFFDF9;
    --bg-warm: #FFF8F0;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-lg: rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

/* === Site chrome (global navigation) === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg);
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 4px 0 var(--red);
}
.site-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.site-sync {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.site-sync.live { color: #15803d; font-weight: 600; }
.site-sync.err { color: var(--red); }
.site-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.site-tabs button {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.site-tabs button:hover {
  background: var(--gold-light);
  border-color: var(--gold);
}
.site-tabs button[aria-selected="true"] {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.migrate-banner {
  display: none;
  padding: 10px 20px;
  background: var(--gold-light);
  border-bottom: 2px solid var(--ink);
  font-size: 0.85rem;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.migrate-banner.on { display: flex; }
.migrate-banner button {
  font-weight: 600;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  background: var(--white);
  cursor: pointer;
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
html { scroll-behavior: smooth; }


@scope (#panel-details) {

h1,
h2,
h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero Section - Full Width Image */
.hero {
    position: relative;
    height: 90vh;
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1508804185872-d7badad00f7d?w=2400&auto=format&fit=crop') center/cover;
    filter: brightness(0.65);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 40px;
}

.hero-badge {
    display: inline-block;
    background: var(--red);
    color: white;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: clamp(3.5rem, 10vw, 6rem);
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 4px 30px rgba(0, 0, 0, 0.6);
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 16px;
    opacity: 0.95;
    text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
}

.hero-dates {
    font-size: 1.25rem;
    font-weight: 500;
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 14px 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 24px;
    letter-spacing: 1px;
}

/* Stats Bar */
.stats-bar {
    background: var(--ink);
    color: white;
    padding: 40px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-item h3 {
    font-size: 2.8rem;
    color: var(--gold);
    margin-bottom: 6px;
}

.stat-item p {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 400;
}

/* Section Styles */
section {
    padding: 90px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 2.8rem;
    color: var(--ink);
    margin-bottom: 18px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.15rem;
}

.section-tag {
    display: inline-block;
    background: var(--gold-light);
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 8px 16px;
    margin-bottom: 18px;
}

/* Image Cards Grid - Masonry Style */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }
}

.highlight-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 50px var(--shadow-lg);
}

.highlight-card.large {
    grid-column: span 2;
}

.highlight-card.tall {
    grid-row: span 2;
}

@media (max-width: 600px) {

    .highlight-card.large,
    .highlight-card.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

.highlight-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.highlight-card.large img {
    height: 340px;
}

.highlight-card.tall img {
    height: 580px;
}

.highlight-card:hover img {
    transform: scale(1.08);
}

.highlight-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    padding: 100px 24px 24px;
    color: white;
}

.highlight-overlay h3 {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.highlight-overlay p {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Full Width Image Break */
.image-break {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.image-break-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.image-break-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 20px;
}

.image-break h2 {
    font-size: 3rem;
    margin-bottom: 16px;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.7);
}

.image-break p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Timeline Section */
.timeline-section {
    background: var(--bg-warm);
}

.timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--red), var(--gold));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 36px;
    padding: 28px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 32px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--red);
    border: 4px solid white;
    box-shadow: 0 2px 8px var(--shadow);
}

.timeline-item.today::before {
    background: var(--gold);
    box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.25);
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--red);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.timeline-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

.timeline-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Itinerary Section */
.itinerary-section {
    background: white;
}

.city-block {
    margin-bottom: 70px;
}

.city-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 4px solid var(--red);
}

.city-header.shanghai {
    border-color: var(--gold);
}

.city-header h3 {
    font-size: 2.2rem;
    color: var(--ink);
}

.city-tag {
    background: var(--red);
    color: white;
    padding: 10px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
}

.city-header.shanghai .city-tag {
    background: var(--gold);
    color: var(--ink);
}

.city-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 32px;
    box-shadow: 0 8px 30px var(--shadow-lg);
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .days-grid {
        grid-template-columns: 1fr;
    }
}

.day-card {
    background: var(--bg-warm);
    padding: 28px;
    border-radius: 14px;
    border-left: 5px solid var(--red);
}

.day-card.gold {
    border-left-color: var(--gold);
}

.day-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--ink);
    margin-bottom: 16px;
}

.day-card ul {
    list-style: none;
}

.day-card li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.day-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--red);
    font-weight: bold;
}

.day-card.gold li::before {
    color: var(--gold);
}

.day-card li strong {
    color: var(--text);
}

/* Food Section */
.food-section {
    background: var(--ink);
    color: white;
    padding: 100px 0;
}

.food-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

@media (max-width: 768px) {
    .food-grid {
        grid-template-columns: 1fr;
    }
}

.food-content h2 {
    font-size: 2.8rem;
    margin-bottom: 24px;
    color: var(--gold);
}

.food-content p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 28px;
    line-height: 1.8;
}

.food-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.food-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.food-item span {
    font-size: 1.5rem;
}

.food-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.food-images img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Cost Section */
.cost-section {
    background: var(--bg-warm);
}

.cost-table-wrapper {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px var(--shadow);
}

.cost-table {
    width: 100%;
    border-collapse: collapse;
}

.cost-table th,
.cost-table td {
    padding: 22px 28px;
    text-align: left;
}

.cost-table th {
    background: var(--ink);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.cost-table td {
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}

.cost-table tr:last-child td {
    border-bottom: none;
}

.cost-table tr:hover td {
    background: var(--bg-warm);
}

.price-tag {
    display: inline-block;
    background: var(--red);
    color: white;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.price-tag.budget {
    background: #047857;
}

.cost-note {
    text-align: center;
    margin-top: 28px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Info Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 900px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    border-top: 5px solid var(--red);
}

.info-card:nth-child(2n) {
    border-top-color: var(--gold);
}

.info-card h3 {
    font-size: 1.15rem;
    color: var(--ink);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.info-card strong {
    color: var(--text);
}

/* Extensions */
.extension-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

@media (max-width: 768px) {
    .extension-grid {
        grid-template-columns: 1fr;
    }
}

.extension-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow);
}

.extension-header {
    background: var(--ink);
    color: white;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.extension-header h3 {
    font-size: 1.6rem;
}

.extension-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
}

.extension-body {
    padding: 28px;
}

.extension-body ul {
    list-style: none;
}

.extension-body li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
    color: var(--text-muted);
}

.extension-body li:last-child {
    border-bottom: none;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--red) 0%, #8B0000 100%);
    color: white;
    text-align: center;
    padding: 100px 0;
}

.cta-section h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.cta-deadline {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 20px 40px;
    margin-top: 28px;
    font-size: 1.3rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

/* Footer */
footer {
    background: var(--ink);
    color: white;
    text-align: center;
    padding: 50px 0;
}

footer p {
    opacity: 0.85;
    font-size: 1rem;
}

/* Visa Section */
.visa-section {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-light) 100%);
    color: white;
    padding: 100px 0;
}

.visa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

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

.visa-content h2 {
    font-size: 2.6rem;
    margin-bottom: 20px;
    color: var(--gold);
}

.visa-content>p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 28px;
    line-height: 1.8;
}

.visa-free-box {
    background: rgba(255, 255, 255, 0.1);
    border-left: 5px solid var(--gold);
    padding: 24px 28px;
    margin-bottom: 32px;
    border-radius: 0 12px 12px 0;
}

.visa-free-box h3 {
    color: var(--gold-light);
    font-size: 1.3rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.visa-free-box p {
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.7;
}

.visa-free-box strong {
    color: var(--gold-light);
}

.visa-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

.visa-option {
    background: rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.visa-option h4 {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-family: 'Playfair Display', serif;
}

.visa-option p {
    font-size: 0.95rem;
    opacity: 0.85;
}

.visa-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--red);
    color: white;
    padding: 18px 36px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.4);
}

.visa-btn:hover {
    background: var(--red-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(196, 30, 58, 0.5);
}

.visa-btn span {
    font-size: 1.3rem;
}

.visa-details {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 36px;
}

.visa-details h3 {
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 24px;
    text-align: center;
}

.visa-details ul {
    list-style: none;
}

.visa-details li {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.visa-details li:last-child {
    border-bottom: none;
}

.visa-details li span {
    font-size: 1.3rem;
}

/* Tabs */
.tabs-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    overflow: hidden;
}

.tab-nav {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    flex: 1;
    padding: 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.tab-btn.active {
    color: var(--gold);
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    border-bottom: 3px solid var(--gold);
}

.tab-content {
    display: none;
    padding: 36px;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Passport Specific Styles */
.step-list {
    list-style: none;
    counter-reset: step-counter;
}

.step-list li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 24px;
}

.step-list li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--gold);
    color: var(--ink);
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-list h4 {
    color: var(--white);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.step-list p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Interest Form */
.interest-form {
    max-width: 600px;
    margin: 40px auto 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
    font-size: 1rem;
    color: var(--ink);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    background: white;
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gold);
    color: var(--ink);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.submit-btn:hover {
    background: white;
    color: var(--red);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Print Styles */
@media print {
    .hero {
        height: auto;
        min-height: 300px;
    }

    section {
        padding: 40px 0;
    }

    .image-break {
        display: none;
    }
}
}


#panel-progress {
  --pt-bg: #f3e3d0;
  --pt-bg-warm: #ede0ca;
  --pt-surface: rgba(255, 252, 248, 0.72);
  --pt-ink: #2a2622;
  --pt-ink-soft: #7a6f66;
  --pt-accent: #C41E3A;
  --pt-accent-dark: #9b1628;
  --pt-blue: #81a6c6;
  --pt-taupe: #d2c4b4;
  --pt-taupe-light: #e8ddd2;
  --pt-white: #FFFFFF;
  --complete: #15803d;
  --amber: #D97706;
  --sky: #81a6c6;
  --radius-sm: 8px;
  --radius-md: 14px;
  --shadow-card: 0 4px 24px rgba(42, 38, 34, 0.14);
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--pt-bg);
  color: var(--pt-ink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== HERO ===== */
.progress-page-hero {
  position: relative;
  width: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px 48px;
  overflow: hidden;
  background:
    linear-gradient(160deg, #e8ddd2 0%, #f3e3d0 40%, #d2c4b4 100%);
}

.progress-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(196, 30, 58, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 100% 100%, rgba(129, 166, 198, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.pg-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pt-accent);
  color: var(--pt-white);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 40px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
}

.progress-page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  color: var(--pt-ink);
  line-height: 1.1;
  margin-bottom: 12px;
  position: relative;
}

.progress-page-hero h1 span {
  color: var(--pt-accent);
}

.pg-hero-sub {
  font-size: 1rem;
  color: var(--pt-ink-soft);
  position: relative;
  margin-bottom: 30px;
}

.pg-hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
}

.pg-hero-stat {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border-radius: 40px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--pt-ink);
}

.pg-hero-stat strong {
  color: var(--pt-accent);
  font-weight: 700;
}

/* ===== SUMMARY BAR ===== */
.summary-bar {
  background: var(--pt-bg-warm);
  border-bottom: 1px solid var(--pt-taupe);
  padding: 26px 24px;
}

.summary-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
  align-items: center;
}

.summary-item {
  text-align: center;
}

.summary-label {
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--pt-ink-soft);
  margin-bottom: 5px;
}

.summary-value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--pt-accent);
  line-height: 1;
}

.summary-value.crimson {
  color: var(--pt-accent);
}

.summary-value.green {
  color: var(--complete);
}

.group-progress-wrap {
  grid-column: 1 / -1;
  margin-top: 4px;
}

.group-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.77rem;
  color: var(--pt-ink-soft);
  margin-bottom: 7px;
}

.group-progress-label span {
  color: var(--pt-accent);
  font-weight: 600;
}

.progress-track {
  height: 10px;
  background: rgba(210, 196, 180, 0.5);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pt-accent), var(--pt-blue));
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  filter: blur(4px);
}

/* ===== MAIN ===== */
.main {
  max-width: 1360px;
  margin: 0 auto;
  padding: 38px 20px 64px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.section-kicker {
  font-size: 0.68rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--pt-accent);
  font-weight: 600;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--pt-ink);
  margin-top: 4px;
}

.divider {
  height: 2px;
  background: linear-gradient(90deg, var(--pt-accent), transparent);
  border-radius: 2px;
  margin-bottom: 28px;
}

/* ===== LEGEND ===== */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--pt-taupe);
  border-radius: 40px;
  padding: 6px 14px;
  font-size: 0.77rem;
  color: var(--pt-ink);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-dot.complete {
  background: var(--complete);
  box-shadow: 0 0 8px rgba(21, 128, 61, 0.5);
}

.legend-dot.incomplete {
  background: var(--pt-taupe);
}

.legend-dot.visa-free {
  background: var(--pt-blue);
  box-shadow: 0 0 8px rgba(129, 166, 198, 0.5);
}

.legend-dot.late {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.4);
}

/* ===== VIEW TOGGLE ===== */
.view-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--pt-taupe);
  border-radius: 40px;
  padding: 4px;
  width: fit-content;
}

.toggle-btn {
  padding: 8px 20px;
  border-radius: 40px;
  border: none;
  background: transparent;
  color: var(--pt-ink-soft);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.toggle-btn.active {
  background: linear-gradient(135deg, var(--pt-accent-dark), var(--pt-accent));
  color: var(--pt-white);
  box-shadow: 0 2px 12px rgba(196, 30, 58, 0.3);
}

.view-section {
  display: none;
}

.view-section.visible {
  display: block;
}

/* ===== TRAVELERS GRID ===== */
.travelers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.traveler-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--pt-taupe);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.traveler-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 24px rgba(196, 30, 58, 0.1);
  border-color: var(--pt-accent);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--pt-taupe);
  position: relative;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pt-accent-dark), var(--pt-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pt-white);
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(196, 30, 58, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pt-ink);
}

.card-pct-wrap {
  margin-left: auto;
  text-align: right;
}

.card-pct {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--pt-accent);
  line-height: 1;
}

.card-pct-label {
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--pt-ink-soft);
}

.card-mini-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(210, 196, 180, 0.5);
}

.card-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pt-accent), var(--pt-blue));
  transition: width 0.6s ease;
}

/* ===== MILESTONE GROUPS ===== */
.milestone-groups {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Top-level group row */
.ms-group {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--pt-taupe);
}

.ms-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.ms-group-header:hover {
  background: rgba(255, 255, 255, 0.8);
}

.group-complete-ring {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--pt-taupe);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.group-complete-ring svg {
  width: 11px;
  height: 11px;
  stroke: var(--white);
  stroke-width: 2.5;
  fill: none;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s;
}

.ms-group.group-done .group-complete-ring {
  background: var(--complete);
  border-color: var(--complete);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.ms-group.group-done .group-complete-ring svg {
  opacity: 1;
  transform: scale(1);
}

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

.group-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pt-ink);
  flex: 1;
}

.group-tally {
  font-size: 0.72rem;
  color: var(--pt-ink-soft);
}

.group-chevron {
  font-size: 0.7rem;
  color: var(--pt-ink-soft);
  transition: transform 0.2s ease;
}

.ms-group.expanded .group-chevron {
  transform: rotate(90deg);
}

/* Late-stage group */
.ms-group.late-stage .ms-group-header {
  background: rgba(217, 119, 6, 0.08);
  border-bottom: none;
}

.ms-group.late-stage .group-label {
  color: var(--amber);
}

.late-badge {
  font-size: 0.62rem;
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.3);
  color: var(--amber);
  padding: 2px 8px;
  border-radius: 40px;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Sub-milestones */
.ms-sub-list {
  display: none;
  flex-direction: column;
  gap: 0;
}

.ms-group.expanded .ms-sub-list {
  display: flex;
}

.milestone {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px 8px 44px;
  border-top: 1px solid rgba(210, 196, 180, 0.4);
  transition: background 0.2s ease;
}

.milestone:hover {
  background: rgba(255, 255, 255, 0.5);
}

.milestone.done {
  background: rgba(21, 128, 61, 0.06);
}

.milestone.done .m-check {
  background: var(--complete);
  border-color: var(--complete);
  box-shadow: 0 0 8px rgba(21, 128, 61, 0.4);
}

.milestone.done .m-check svg {
  opacity: 1;
  transform: scale(1);
}

.milestone.done .m-name {
  color: var(--pt-ink);
}

/* Visa-free style */
.milestone.visa-free-opt {
  border-top: 1px dashed rgba(129, 166, 198, 0.4);
}

.milestone.visa-free-opt .m-check {
  border-color: rgba(129, 166, 198, 0.5);
}

.milestone.visa-free-opt.done .m-check {
  background: var(--pt-blue);
  border-color: var(--pt-blue);
  box-shadow: 0 0 8px rgba(129, 166, 198, 0.5);
}

.milestone.visa-free-opt .m-name {
  color: var(--pt-blue);
  font-size: 0.76rem;
}

.visa-free-or {
  font-size: 0.65rem;
  color: var(--pt-ink-soft);
  padding: 4px 12px 4px 44px;
  font-style: italic;
}

/* Single (no sub) milestone — inherits group header click */
.ms-group.single-item .ms-group-header {
  cursor: pointer;
}

.m-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--pt-taupe);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.m-check svg {
  width: 11px;
  height: 11px;
  stroke: var(--pt-white);
  stroke-width: 2.5;
  fill: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
}

.m-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.m-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--pt-ink-soft);
  line-height: 1.25;
  transition: color 0.2s;
}

/* ===== TABLE VIEW ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--pt-taupe);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

thead tr {
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid var(--pt-taupe);
}

thead th {
  padding: 13px 12px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--pt-accent);
  text-align: center;
  white-space: nowrap;
}

thead th:first-child {
  text-align: left;
  padding-left: 20px;
  color: var(--pt-ink-soft);
  min-width: 130px;
}

thead th.late-th {
  color: var(--amber);
}

tbody tr {
  border-bottom: 1px solid rgba(210, 196, 180, 0.4);
  transition: background 0.15s;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.5);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody td {
  padding: 13px 12px;
  text-align: center;
  vertical-align: middle;
}

tbody td:first-child {
  text-align: left;
  padding-left: 20px;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pt-ink);
  white-space: nowrap;
}

.tbl-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tbl-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--pt-taupe);
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.2s ease;
}

.tbl-check:hover {
  border-color: var(--pt-accent);
  background: rgba(196, 30, 58, 0.08);
}

.tbl-check.done {
  background: var(--complete);
  border-color: var(--complete);
  box-shadow: 0 0 10px rgba(21, 128, 61, 0.4);
}

.tbl-check.done svg {
  opacity: 1;
  transform: scale(1);
}

.tbl-check.vf-opt {
  border-color: rgba(129, 166, 198, 0.5);
}

.tbl-check.vf-opt.done {
  background: var(--pt-blue);
  border-color: var(--pt-blue);
  box-shadow: 0 0 8px rgba(129, 166, 198, 0.5);
}

.tbl-check.late-chk {
  border-color: rgba(217, 119, 6, 0.3);
}

.tbl-check.late-chk.done {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.4);
}

.tbl-check svg {
  width: 12px;
  height: 12px;
  stroke: var(--pt-white);
  stroke-width: 2.5;
  fill: none;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s, transform 0.2s;
}

.sub-label {
  font-size: 0.6rem;
  color: var(--pt-ink-soft);
  white-space: nowrap;
}

.row-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pt-accent);
  white-space: nowrap;
}

.th-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

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

.th-lbl {
  font-size: 0.62rem;
}

/* ===== FOOTER ===== */
.progress-page-footer {
  text-align: center;
  padding: 30px 24px 40px;
  border-top: 1px solid var(--pt-taupe);
  color: var(--pt-ink-soft);
  font-size: 0.78rem;
}

.progress-page-footer strong {
  color: var(--pt-accent);
}

/* ===== POP RING ===== */
@keyframes pop {
  0% {
    transform: scale(0);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.pop-ring {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  border: 2px solid var(--complete);
  animation: pop 0.45s ease-out forwards;
  z-index: 9999;
}

@media (max-width: 680px) {
  .travelers-grid {
    grid-template-columns: 1fr;
  }

  .progress-page-hero {
    min-height: 260px;
  }
}


#panel-itinerary {
  --it-blue: #81a6c6;
  --it-blue-pale: #aacddc;
  --it-cream: #f3e3d0;
  --it-taupe: #d2c4b4;
  --it-ink: #2a2622;
  --it-ink-soft: #5a534c;
  --it-surface: rgba(255, 252, 248, 0.72);
  --it-accent: #C41E3A;
  --it-accent-hot: #9b1628;
  --it-radius: 12px;
  --it-radius-lg: 20px;
  --banner-h: clamp(220px, 32vh, 400px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.2, 0.64, 1);
  --dur: 0.38s;
  --dur-fast: 0.22s;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--it-ink);
  background: var(--it-cream);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


@scope (#panel-itinerary) {
.itinerary-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* —— Hero banner —— */
.hero-banner {
  position: relative;
  min-height: var(--banner-h);
  flex-shrink: 0;
  overflow: hidden;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: -4%;
  background-image: url("https://images.unsplash.com/photo-1588643426322-e2c2c99d0945?auto=format&fit=crop&w=2400&q=85");
  background-size: cover;
  background-position: center 42%;
  transform: translate3d(0, 0, 0) scale(1.06);
  animation: ken 36s var(--ease) infinite alternate;
  will-change: transform;
}

@keyframes ken {
  to {
    transform: translate3d(-1.2%, 0.5%, 0) scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg {
    animation: none;
    transform: scale(1.03);
  }
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(42, 38, 34, 0.75) 0%,
    rgba(42, 38, 34, 0.35) 45%,
    rgba(129, 166, 198, 0.25) 100%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem max(1.25rem, env(safe-area-inset-left)) 1.25rem max(1.25rem, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: var(--banner-h);
  justify-content: flex-end;
}

.hero-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

.hero-banner h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4.2vw, 2.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.25);
}

.hero-banner h1 em {
  font-style: normal;
  color: var(--it-blue-pale);
}

.hero-tag {
  margin: 0;
  max-width: 36rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.hero-tag strong {
  color: #fff;
  font-weight: 600;
}

.route-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
}

.route-flow .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.route-flow .chip:hover {
  transform: translate3d(0, -2px, 0);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(170, 205, 220, 0.55);
}

.route-flow .chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--it-blue-pale);
  opacity: 0.9;
}

.route-flow .sep {
  font-size: 0.75rem;
  opacity: 0.45;
  user-select: none;
}

.stats-glass {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--it-radius-lg);
  background: rgba(255, 252, 248, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

@media (max-width: 640px) {
  .stats-glass {
    grid-template-columns: 1fr;
  }
}

.stats-glass .sg {
  text-align: center;
  padding: 0.35rem 0.25rem;
}

.stats-glass .sg .lb {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.stats-glass .sg .val {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  margin-top: 0.1rem;
}

/* —— Calendar stage (fills remaining viewport) —— */
.cal-dock {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, var(--it-cream) 0%, rgba(243, 227, 208, 0.97) 100%);
}

.dock-bar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem max(1rem, env(safe-area-inset-left)) 0.5rem max(1rem, env(safe-area-inset-right));
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.dock-bar p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--it-ink-soft);
  max-width: 520px;
}

.btn {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.42rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--it-taupe);
  background: rgba(255, 252, 248, 0.85);
  color: var(--it-ink);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.btn:hover {
  transform: translate3d(0, -1px, 0);
  border-color: var(--it-blue);
  box-shadow: 0 6px 20px rgba(129, 166, 198, 0.2);
}

.btn:active {
  transform: translate3d(0, 0, 0);
}

.btn-primary {
  background: var(--it-accent);
  border-color: var(--it-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--it-accent-hot);
  border-color: var(--it-accent-hot);
  box-shadow: 0 8px 24px rgba(44, 74, 94, 0.28);
}

.btn.danger {
  color: #8b3a3a;
  border-color: rgba(139, 58, 58, 0.25);
  background: rgba(255, 252, 248, 0.6);
}

.cal-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 max(0.75rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-right));
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.cal-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--it-surface);
  border: 1px solid rgba(210, 196, 180, 0.65);
  border-radius: var(--it-radius-lg) var(--it-radius-lg) 0 0;
  box-shadow: 0 -4px 40px rgba(42, 38, 34, 0.06);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  overflow: hidden;
}

.cal-head {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid rgba(210, 196, 180, 0.55);
}

.cal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cal-title span {
  color: var(--it-accent);
  font-weight: 600;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--it-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cal-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  border: 2px solid var(--it-taupe);
  background: rgba(243, 227, 208, 0.5);
}

.cal-legend i.trip {
  border-color: var(--it-blue);
  background: rgba(170, 205, 220, 0.35);
}

.cal-legend i.sel {
  border-color: var(--it-accent);
  box-shadow: 0 0 0 2px rgba(61, 95, 122, 0.2);
}

.cal-weekdays {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  padding: 0 0.65rem 0.35rem;
}

.cal-weekdays div {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--it-accent);
  padding: 0.2rem 0;
}

.cal-grid-scroll {
  flex: 1;
  min-height: 0;
  padding: 0 0.65rem 0.65rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: 0.45rem;
  height: min(calc(100dvh - var(--banner-h) - 140px), 720px);
  min-height: 320px;
}

@media (max-width: 900px) {
  .cal-grid {
    height: min(calc(100dvh - var(--banner-h) - 160px), 640px);
    min-height: 280px;
  }
}

@media (max-width: 560px) {
  .cal-grid {
    gap: 0.3rem;
    height: min(calc(100dvh - var(--banner-h) - 180px), 520px);
  }
}

.cal-cell {
  min-height: 0;
  border-radius: var(--it-radius);
  animation: cellIn 0.55s var(--ease) both;
}

@keyframes cellIn {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(0.98);
  }
}

.cal-cell.pad {
  pointer-events: none;
}

.cal-cell.outside {
  background: rgba(210, 196, 180, 0.22);
  border: 1px dashed rgba(210, 196, 180, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  color: rgba(90, 83, 76, 0.45);
}

.cal-cell.trip {
  padding: 0;
  position: relative;
}

.cal-cell.trip.drop-target .cal-day-btn {
  border-color: var(--it-accent);
  box-shadow: inset 0 0 0 2px rgba(61, 95, 122, 0.35), 0 12px 36px rgba(129, 166, 198, 0.22);
  transform: translate3d(0, -2px, 0) scale(1.01);
}

.cal-day-btn {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0.45rem 0.4rem 0.5rem;
  border-radius: var(--it-radius);
  border: 1px solid rgba(210, 196, 180, 0.85);
  background: rgba(255, 252, 248, 0.92);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.12rem;
  position: relative;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  transition:
    transform var(--dur-fast) var(--ease-spring),
    border-color var(--dur-fast) var(--ease),
    box-shadow var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
  box-shadow: 0 2px 12px rgba(42, 38, 34, 0.04);
}

.cal-day-btn:hover {
  transform: translate3d(0, -3px, 0);
  border-color: var(--it-blue);
  box-shadow: 0 10px 28px rgba(129, 166, 198, 0.18);
}

.cal-day-btn:focus-visible {
  outline: none;
  border-color: var(--it-accent);
  box-shadow: 0 0 0 3px rgba(61, 95, 122, 0.2);
}

.cal-day-btn.selected {
  border-color: var(--it-accent);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(61, 95, 122, 0.15), 0 14px 36px rgba(61, 95, 122, 0.12);
}

.cal-day-btn .num {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 700;
  color: var(--it-ink);
  line-height: 1;
}

.cal-day-btn .wd {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--it-blue);
}

.cal-day-btn .city {
  font-size: clamp(0.58rem, 1.1vw, 0.68rem);
  font-weight: 600;
  color: var(--it-ink-soft);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.cal-day-btn .bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(210, 196, 180, 0.5);
  border-radius: 0 0 calc(var(--it-radius) - 1px) calc(var(--it-radius) - 1px);
  overflow: hidden;
}

.cal-day-btn .bar > i {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  background: linear-gradient(90deg, var(--it-blue), var(--it-blue-pale));
  transition: width 0.5s var(--ease);
}

/* Overlay + panel */
.itinerary-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 38, 34, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
  z-index: 220;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.itinerary-overlay.on {
  opacity: 1;
  pointer-events: auto;
}

.day-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  max-height: 100dvh;
  background: rgba(255, 252, 248, 0.97);
  border-left: 1px solid var(--it-taupe);
  z-index: 230;
  transform: translate3d(100%, 0, 0);
  transition: transform var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: -24px 0 60px rgba(42, 38, 34, 0.1);
  will-change: transform;
}

.day-drawer.on {
  transform: translate3d(0, 0, 0);
}

.day-drawer-head {
  flex-shrink: 0;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(210, 196, 180, 0.65);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  background: rgba(255, 252, 248, 0.9);
}

.day-drawer-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.day-drawer-head .ph-sub {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--it-ink-soft);
}

.day-drawer-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--it-taupe);
  border-radius: 10px;
  background: rgba(255, 252, 248, 0.9);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--it-ink-soft);
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.day-drawer-close:hover {
  border-color: var(--it-accent);
  color: var(--it-accent);
  transform: scale(1.04);
}

.day-drawer-scroll {
  flex: 1;
  overflow: auto;
  padding: 1rem 1rem 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.dnd-hint {
  font-size: 0.72rem;
  color: var(--it-ink-soft);
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: rgba(170, 205, 220, 0.2);
  border: 1px solid rgba(129, 166, 198, 0.25);
  line-height: 1.4;
}

.field-row {
  margin-bottom: 0.85rem;
}

.field-row label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--it-ink-soft);
  margin-bottom: 0.3rem;
}

.field-row input[type="text"],
.field-row textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--it-taupe);
  background: #fff;
  color: var(--it-ink);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.field-row input:focus,
.field-row textarea:focus {
  outline: none;
  border-color: var(--it-blue);
  box-shadow: 0 0 0 3px rgba(129, 166, 198, 0.22);
}

.field-row textarea {
  min-height: 72px;
  resize: vertical;
}

.activities h4 {
  margin: 0 0 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--it-ink-soft);
}

.act-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.act-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(210, 196, 180, 0.55);
  background: rgba(255, 252, 248, 0.9);
  overflow: hidden;
  transition: opacity var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.act-item.dragging {
  opacity: 0.55;
  box-shadow: 0 12px 32px rgba(42, 38, 34, 0.12);
}

.drag-handle {
  flex-shrink: 0;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: rgba(90, 83, 76, 0.35);
  background: rgba(210, 196, 180, 0.2);
  border: none;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1;
  user-select: none;
  touch-action: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.drag-handle:hover {
  background: rgba(129, 166, 198, 0.2);
  color: var(--it-accent);
}

.drag-handle:active {
  cursor: grabbing;
}

.act-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.4rem 0.45rem 0.4rem 0;
  min-width: 0;
}

.act-item input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.25rem;
  accent-color: var(--it-accent);
  cursor: pointer;
  flex-shrink: 0;
}

.act-text {
  flex: 1;
  min-width: 0;
}

.act-text input {
  width: 100%;
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.2rem 0;
  border: none;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--it-ink);
}

.act-text input:focus {
  outline: none;
  border-bottom-color: var(--it-blue);
}

.act-item.done .act-text input {
  color: var(--it-ink-soft);
  text-decoration: line-through;
}

.act-del {
  flex-shrink: 0;
  width: 32px;
  border: none;
  background: transparent;
  color: var(--it-ink-soft);
  cursor: pointer;
  font-size: 1.1rem;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.act-del:hover {
  color: #8b3a3a;
  background: rgba(139, 58, 58, 0.06);
}

.add-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.add-row input {
  flex: 1;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.48rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--it-taupe);
  background: #fff;
}

.fine-print {
  flex-shrink: 0;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(90, 83, 76, 0.65);
  padding: 0.5rem 1rem 0.75rem;
}

@media print {
  .hero-bg {
    animation: none;
  }
  .itinerary-overlay,
  .day-drawer,
  .dock-bar .btn {
    display: none !important;
  }
}
}
