/* SEO H1 — clip-hidden on all screen sizes, present in DOM for crawlers */
.seo-h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:root {
    --primary-color: #1a2332;
    --primary-light: #2d3a4d;
    --accent-color: #00a8e8;
    --accent-hover: #0096d1;
    --secondary-color: #e31e24;
    --secondary-light: #ff3d43;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #c53030;
    --text-dark: #1a202c;
    --text-medium: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(to bottom, #f0f4f8 0%, #e2e8f0 100%);
    min-height: 100vh;
    padding: 0;
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 1.5rem 0;
}

@media (max-width: 768px) {
    .container {
        padding: 16px 1rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px 0.75rem 0;
    }
}

/* Old header styles removed - replaced with standardized Try Swiss Knife header */
/* See Language Selector section below for new header styles */


/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, #e3f2fd 0%, #e1f5fe 100%);
    border: 1.5px solid #4fc3f7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(79, 195, 247, 0.1);
}

.info-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.info-text {
    flex: 1;
    color: #01579b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.info-text strong {
    color: #004d7a;
    font-weight: 600;
}

.info-close {
    background: none;
    border: none;
    color: #01579b;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
    margin-left: auto;
}

.info-close:hover {
    background: rgba(1, 87, 155, 0.1);
    color: #004d7a;
}

.card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

/* Draft Section */
.draft-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.draft-label {
    font-size: 0.85rem;
    color: var(--text-medium);
    margin-bottom: 10px;
    font-weight: 500;
}

.draft-container {
    /* Container for draft card */
}

.draft-card {
    background: var(--bg-light);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    max-width: 500px;
}

.draft-card:hover {
    border-color: var(--accent-color);
    background: #e6f7ff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.draft-info {
    flex: 1;
}

.draft-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.draft-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.draft-delete {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.draft-card:hover .draft-delete {
    opacity: 1;
}

.draft-delete:hover {
    background: #a02020;
    transform: scale(1.1);
}

h1, h2 {
    color: var(--primary-color);
    margin-bottom: 16px;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

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

.sample-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 0.4rem;
}

.sample-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s;
}
.sample-link:hover { opacity: 0.75; text-decoration: underline; }

.modal-content .form-group {
    margin-bottom: 15px;
}

.transport-type-select {
    font-size: 0.95rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: var(--bg-white);
    color: var(--text-dark);
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
    text-transform: none;
    font-size: 0.9rem;
}

.date-input-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--accent-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-outline {
    background: var(--bg-white);
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Hero banner — illustration behind trip title + action buttons */
.voyage-hero {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    background-image: url('trip-planner-bg.webp');
    background-image: image-set(
        url('trip-planner-bg.webp') type('image/webp'),
        url('trip-planner-bg-opt.png') type('image/png')
    );
    background-size: cover;
    background-position: center center;
    background-color: #daeaf5;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.voyage-hero-overlay {
    position: absolute;
    inset: 0;
    /* Very light overlay — keeps dark text + button text readable on white-ish image */
    background: rgba(255, 255, 255, 0.80);
}

.voyage-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 24px;
}

.voyage-title-block {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

#voyage-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.01em;
    margin-bottom: 0;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 6px;
}

.voyage-subtitle {
    font-size: 0.8rem;
    color: var(--text-medium);
    letter-spacing: 0.02em;
    margin-top: 6px;
}

.actions-bar {
    background: var(--bg-white);
    padding: 14px 24px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#itinerary-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.day-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 0;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.day-card:hover {
    box-shadow: var(--shadow-md);
}

/* ── Day card header: single row ── */
.day-header {
    background: var(--primary-color);
    color: white;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 3px solid var(--accent-color);
}

.day-label {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.city-inputs {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    margin-left: auto;
}

.city-route-arrow {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.9rem;
    padding: 0 10px;
    flex-shrink: 0;
    user-select: none;
}

/* Day Highlight — thin strip toggle + collapsible textarea */

.day-highlight-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 4px 16px;
    background: #fffbf0;
    border: none;
    border-bottom: 1px solid #f0e6c8;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 500;
    color: #8a7040;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s;
    letter-spacing: 0.02em;
}

.day-highlight-strip:hover {
    background: #f5eddb;
}

.dhs-label { flex: 1; }
.dhs-chevron { font-size: 0.6rem; opacity: 0.7; }

.day-highlight-content {
    background: #fffbf0;
    border-bottom: 1px solid #f0e6c8;
}

.day-highlight-collapse {
    display: block;
    margin-left: auto;
    background: none;
    border: none;
    font-size: 0.68rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 1px 14px 4px;
    font-style: italic;
    font-family: inherit;
    transition: color 0.15s;
}

.day-highlight-collapse:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.day-highlight-textarea {
    width: 100%;
    padding: 8px 16px;
    border: none;
    border-radius: 0;
    font-size: 0.88rem;
    font-family: inherit;
    resize: none;
    overflow: hidden;
    min-height: 52px;
    background: transparent;
    color: var(--text-dark);
    line-height: 1.5;
    display: block;
}

.day-highlight-textarea:focus {
    outline: none;
    background: #fffef5;
}

.day-highlight-textarea::placeholder {
    color: var(--text-light);
    font-style: italic;
}

.city-input {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.city-input span {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.city-input input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 0.88rem;
    font-family: inherit;
    padding: 2px 0 3px;
    width: 275px;
    transition: border-color 0.15s;
}

.city-input input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

.city-input input:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
}

.day-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-day-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.btn-day-action:hover {
    background: rgba(255, 255, 255, 0.25);
}

.btn-delete-day:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-add-day:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    padding: 16px;
}

.section {
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    min-height: 60px;
    background: var(--bg-light);
    min-width: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
}

.add-activity {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.add-activity:hover {
    background: var(--primary-light);
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

.activities-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 50px;
    min-width: 0;
}

.activity-item {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    cursor: move;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    min-width: 0;
}

.activity-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.activity-item.dragging {
    opacity: 0.5;
}

/* Float layout: icon floats left, kebab floats right, description wraps around both */
/* Header: tinted band, edit/delete only (right-aligned) */
.activity-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: #f4f6f9;
    border-bottom: 1px solid var(--border-color);
    border-radius: 5px 5px 0 0;
    padding: 4px 8px;
    min-width: 0;
    box-sizing: border-box;
}

.activity-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* Body: icon + description side by side */
.activity-body {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    min-width: 0;
}

.activity-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    cursor: help;
    line-height: 1.45;
}

.edit-activity,
.delete-activity {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 26px;
    height: 26px;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    color: var(--text-medium);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.edit-activity:hover {
    background: #e8f4fd;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.delete-activity:hover {
    background: #fdecea;
    color: var(--danger-color);
    border-color: var(--danger-color);
}

/* Body: description */
.activity-description {
    padding: 0;
    flex: 1;
    min-width: 0;
    font-size: 0.88rem;
    color: var(--text-dark);
    font-weight: 400;
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

/* Footer: note then URL — separated by a thin line */
.activity-footer {
    border-top: 1px solid #eef0f3;
    padding: 5px 10px 7px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    overflow: hidden;
}

.activity-footer-url,
.activity-footer-note {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    cursor: pointer;
    min-width: 0;
    max-width: 100%;
}

.activity-footer-url {
    text-decoration: none;
    color: var(--accent-color);
    opacity: 0.75;
}

.activity-footer-url:hover {
    opacity: 1;
    text-decoration: underline;
}

.activity-footer-note {
    font-style: italic;
    color: var(--text-light);
    opacity: 0.85;
}

.activity-footer-note:hover {
    opacity: 1;
}

/* Note Popup */
.note-popup {
    position: fixed;
    background: var(--bg-white);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    max-width: 300px;
    box-shadow: var(--shadow-md);
    z-index: 1001;
    display: none;
}

.note-popup.active {
    display: block;
}

.note-popup-header {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.note-popup-content {
    color: var(--text-dark);
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.note-popup-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}


/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 32, 44, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 1;
}

.change-dates-hint {
    font-size: 0.9rem;
    color: var(--text-medium);
    background: var(--bg-light);
    border-left: 3px solid var(--accent-color);
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    line-height: 1.5;
    margin-bottom: 4px;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
    position: sticky;
    bottom: 0;
    background: var(--bg-white);
    padding-top: 15px;
}

.modal-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Drag and Drop */
.section.drag-over {
    background: #e6f0ff;
    border-color: var(--primary-color);
    box-shadow: inset 0 0 0 2px var(--primary-color);
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    font-size: 0.8rem;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
}

.tooltip:hover::after {
    opacity: 1;
}

/* Activity icon tooltip — left-align so it never clips off the left edge */
.activity-icon.tooltip::after {
    left: 0;
    transform: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 6px 8px;
    color: var(--text-light);
    font-style: italic;
    font-size: 0.78rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Old header mobile styles removed */

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .sections-grid {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 8px;
    }

    .section {
        padding: 8px 10px;
        min-height: unset;
    }

    .activities-list {
        min-height: 0;
    }

    .voyage-hero-content {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
    }

    #voyage-title {
        font-size: 1.3rem;
    }

    .actions-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    /* Day header: label+actions on line 1, city inputs on line 2 */
    .day-header {
        align-items: center;
    }

    .day-label {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        order: 1;
    }

    .day-actions {
        flex-shrink: 0;
        order: 2;       /* stays on line 1 beside label */
    }

    .city-inputs {
        order: 3;
        flex-basis: 100%;
        margin-left: 0;
        display: grid;
        grid-template-columns: max-content 1fr;
        row-gap: 4px;
        column-gap: 8px;
        padding: 4px 0 2px;
        width: 100%;
        min-width: 0;
    }

    .city-route-arrow {
        display: none;
    }

    /* Each city-input row dissolves into the parent grid */
    .city-input {
        display: contents;
    }

    .city-input span {
        grid-column: 1;
        white-space: nowrap;
        align-self: center;
        width: auto;
        min-width: unset;
        padding-right: 0;
    }

    .city-input input {
        grid-column: 2;
        width: 100%;
        min-width: 0;
    }
    
    .card {
        padding: 18px 16px;
    }

    /* Activity card: ensure description wraps on mobile */
    .activity-description {
        white-space: normal;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

/* Footer */
.app-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    margin-top: 20px;
    border-radius: 8px 8px 0 0;
}

.app-footer p {
    margin: 0;
    color: var(--text-medium);
    font-size: 0.9rem;
}

.app-footer p + p {
    margin-top: 8px;
}

.footer-separator {
    margin: 0 8px;
    color: var(--text-light);
}

.footer-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.footer-link:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}

/* Privacy Modal */
/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .voyage-hero,
    .voyage-hero-overlay,
    .actions-bar,
    .add-activity,
    .delete-activity,
    .btn-day-action {
        display: none !important;
    }

    .day-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20px;
    }
    
    .day-header {
        background: #f0f4f8 !important;
        color: var(--primary-color) !important;
        border-bottom: 2px solid var(--primary-color);
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-style: italic;
}

/* Execute Plan Button */
.btn-accent {
    background: var(--success-color);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* ─── ICON-LABEL BUTTONS (action toolbar) ─── */
.btn-icon-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    min-height: 52px;
    padding: 0.35rem 0.2rem;
    gap: 3px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-white);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    flex-shrink: 0;
    font-family: inherit;
}
.btn-icon-label:hover:not(:disabled) {
    background: #f0f4f8;
    border-color: var(--accent-color);
}
.btn-icon-label:disabled { opacity: 0.45; cursor: not-allowed; }

.bil-icon {
    font-size: 1.2rem;
    line-height: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bil-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
}

/* Execute Confirmation Modal */
.execute-info {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 3px solid var(--warning-color);
}

.execute-info p {
    margin-bottom: 12px;
    color: var(--text-dark);
    line-height: 1.6;
}

.execute-info ul {
    margin: 15px 0 15px 20px;
    color: var(--text-dark);
}

.execute-info li {
    margin-bottom: 8px;
    line-height: 1.5;
}


/* Executing Plan Card */
.executing-card {
    cursor: pointer;
    border-left: 3px solid var(--success-color);
}

.executing-card:hover {
    border-color: #059669;
    background: #f0fdf4;
}

/* File Type Hints */
.file-type-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 6px;
    font-style: italic;
}

.setup-section .file-type-hint {
    margin-top: 8px;
    margin-bottom: 20px;
}

/* Button with hint wrapper */
.button-with-hint {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    vertical-align: top;
}

.button-with-hint .file-type-hint {
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .button-with-hint {
        display: flex;
        width: 100%;
        align-items: center;
    }
}

/* Ensure action buttons align at top */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start; /* Align to top instead of stretch */
}

/* Mobile: icon-label buttons stay in a row and wrap naturally */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }
}


/* PDF Customization Modal */
.pdf-customize-content {
    max-width: 500px;
}

.pdf-customize-section {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.agency-fields {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 3px solid var(--accent-color);
}

.agency-fields .form-group {
    margin-bottom: 15px;
}

.agency-fields .form-group:last-child {
    margin-bottom: 0;
}

.agency-fields label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.agency-fields .required {
    color: var(--secondary-color);
}

.agency-fields input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.agency-fields input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.1);
}

.agency-fields input::placeholder {
    color: var(--text-light);
}


/* PDF Tip */
.pdf-tip {
    background: #e3f2fd;
    border-left: 3px solid var(--accent-color);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #01579b;
}

.pdf-tip strong {
    color: #004d7a;
    font-weight: 600;
}

.pdf-tip .tip-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--accent-color);
}

.pdf-tip .tip-link:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}


/* SEO-Optimized About Section */
.about-section {
    margin-bottom: 30px;
}

.about-toggle {
    width: 100%;
    background: linear-gradient(135deg, #e3f2fd 0%, #e1f5fe 100%);
    border: 1.5px solid #4fc3f7;
    border-radius: 10px;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    color: #01579b;
    text-align: left;
}

.about-toggle:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #b3e5fc 100%);
    border-color: #00a8e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 232, 0.15);
}

.about-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.about-title {
    flex: 1;
}

.toggle-icon {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.about-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.about-content {
    background: var(--bg-white);
    border: 1.5px solid #e3f2fd;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 30px;
    margin-top: -10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-content h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 25px;
    line-height: 1.4;
}

.about-content h3 {
    color: var(--primary-color);
    font-size: 1.125rem;
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 600;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.about-column ul,
.about-column ol {
    margin: 15px 0;
    padding-left: 25px;
}

.about-column li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-dark);
}

.about-column li strong {
    color: var(--primary-color);
}

.how-to-steps {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.how-to-steps li {
    counter-increment: step-counter;
    margin-bottom: 20px;
    padding-left: 45px;
    position: relative;
}

.how-to-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--accent-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
}

.how-to-steps li strong {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-color);
}

.how-to-steps li p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-medium);
}

.features-section {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 10px;
    margin-top: 25px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.feature-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.feature-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 6px;
    font-size: 0.9375rem;
}

.feature-item p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-medium);
}

.use-cases-section {
    margin-top: 25px;
}

.use-cases-section ul {
    margin-top: 15px;
    padding-left: 25px;
}

.use-cases-section li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.use-cases-section li strong {
    color: var(--primary-color);
}

.keywords-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.keywords-section p {
    margin: 0;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .about-content {
        padding: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .about-toggle {
        font-size: 0.9375rem;
        padding: 14px 16px;
    }
}

/* Cache Refresh Hint */
.cache-refresh-hint {
    margin-top: 20px;
    padding: 12px 16px;
    background: #fff8e1;
    border: 1px solid #ffa726;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #e65100;
    line-height: 1.6;
    text-align: center;
}

.cache-refresh-hint kbd {
    display: inline-block;
    padding: 3px 7px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin: 0 2px;
}

@media (max-width: 768px) {
    .cache-refresh-hint {
        font-size: 0.8125rem;
        padding: 10px 12px;
    }
    
    .cache-refresh-hint kbd {
        font-size: 0.75rem;
        padding: 2px 5px;
    }
}

/* ============================
   Header — TSK Standard
   Matches main dashboard implementation
   ============================ */

.header {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.header-logo-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.header-logo-link:hover {
    opacity: 0.85;
}

.logo-image {
    width: 85px;
    height: 85px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.tool-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a2332;
    white-space: nowrap;
    line-height: 1.2;
}

.tool-name-btn {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a2332;
    white-space: nowrap;
    line-height: 1.2;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s;
}
.tool-name-btn:hover { color: #00a8e8; }

/* ─── HEADER ICONS (Share + Language) — matches class-timetable reference ─── */
.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
}

.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4a5568;
    font-family: inherit;
}

.header-icon-btn:hover {
    border-color: #00a8e8;
    background: #f7fafc;
    color: #00a8e8;
}

.header-icon-btn svg {
    width: 20px;
    height: 20px;
}

.lang-short {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a202c;
    letter-spacing: 0.02em;
}

.header-icon-btn:hover .lang-short { color: #00a8e8; }

/* Language selector */
.language-selector { position: relative; }

.language-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 140px;
    z-index: 1001;
    overflow: hidden;
}

.language-dropdown.active {
    display: block;
    animation: langSlideDown 0.2s ease;
}

@keyframes langSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    color: #1a202c;
    transition: background 0.15s;
    font-family: inherit;
}

.lang-option:hover { background: #f7fafc; }
.lang-option.active { background: rgba(0, 168, 232, 0.08); color: #00a8e8; }
.lang-check { font-size: 0.75rem; opacity: 0; transition: opacity 0.15s; }
.lang-option.active .lang-check { opacity: 1; }

/* Tablet */
@media (max-width: 768px) {
    .header-inner { padding: 0.5rem 1rem; }
    .logo-image { width: 70px; height: 70px; }
    .tool-name { font-size: 1.25rem; }
    .header-icons { gap: 6px; }
    .header-icon-btn { width: 36px; height: 36px; }
    .header-icon-btn svg { width: 18px; height: 18px; }
    .lang-short { font-size: 0.8rem; }
}

/* Mobile */
@media (max-width: 480px) {
    .header-inner { padding: 0.4rem 0.75rem; }
    .logo-image { width: 60px; height: 60px; }
    .tool-name { font-size: 1.25rem; }
    .tool-name-btn { font-size: 1.25rem; }
}

/* ============================
   Version Badge & Changelog Modal
   ============================ */

.version-badge {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-light, #aaa);
    font-family: monospace;
    letter-spacing: 0.02em;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.version-badge:hover {
    opacity: 1;
    color: var(--accent-color, #003d82);
}

.changelog-modal-content {
    max-width: 560px;
    width: 90%;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.changelog-body {
    padding: 16px 24px 24px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-dark, #333);
}

.changelog-body h2 {
    font-size: 1.1rem;
    color: var(--primary-blue, #003d82);
    margin: 0 0 8px;
    border-bottom: 1px solid var(--border-color, #eee);
    padding-bottom: 6px;
}

.changelog-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 16px 0 6px;
    color: var(--text-dark, #333);
}

.changelog-body h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 12px 0 4px;
    color: var(--accent-gold, #b8962e);
}

.changelog-body ul {
    margin: 4px 0 12px;
    padding-left: 20px;
}

.changelog-body li {
    margin-bottom: 4px;
}

.changelog-body hr {
    border: none;
    border-top: 1px solid var(--border-color, #eee);
    margin: 16px 0;
}

.changelog-body code {
    background: #f4f4f4;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.85em;
}

.changelog-body em {
    color: var(--text-light, #888);
    font-style: italic;
}
