/* 여행일정 페이지 스타일 - Modern & Simple */
.trip-planner-content {
    padding-bottom: 80px;
    background: #f9fafb;
    min-height: 100vh;
}

.trip-section {
    margin-bottom: 24px;
    padding-top: 20px;
}

.trip-detail-section {
    margin-bottom: 0;
}

.trip-section .section-header h2,
.trip-detail-section .section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
    text-align: left;
    letter-spacing: -0.02em;
}

/* 모던 헤더 스타일 */
.modern-header {
    background: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.98);
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    color: #6b7280;
    flex-shrink: 0;
}

.back-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.back-btn .material-icons {
    font-size: 20px;
}

.header-content {
    flex: 1;
    min-width: 0;
}

.trip-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 6px 0;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.trip-dates-display {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 400;
}

.trip-description {
    font-size: 0.8125rem;
    color: #9ca3af;
    line-height: 1.5;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    color: #6b7280;
    position: relative;
}

.icon-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.icon-btn .material-icons {
    font-size: 20px;
}

.notification-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    border: 1.5px solid #fff;
}

/* 큰 액션 버튼들 */
.main-action-buttons {
    display: flex;
    gap: 8px;
    padding: 20px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.main-action-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    color: #ffffff;
    letter-spacing: -0.01em;
    text-decoration: none;
}

a.main-action-btn {
    text-decoration: none;
}

a.main-action-btn:hover {
    color: #ffffff;
}

a.main-action-btn.secondary,
a.main-action-btn.secondary:hover {
    color: #1976d2;
}

.main-action-btn.primary {
    background: #1976d2;
}

.main-action-btn.primary:hover {
    background: #1565c0;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

.main-action-btn.secondary {
    background: #f3f8ff;
    color: #1976d2;
    border: 1px solid rgba(25, 118, 210, 0.18);
}

.main-action-btn.secondary:hover {
    background: #e3f2fd;
    border-color: rgba(25, 118, 210, 0.3);
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.1);
}

.main-action-btn.secondary .material-icons {
    color: #1976d2;
}

.main-action-btn .material-icons {
    font-size: 18px;
}

/* 작은 액션 버튼들 */
.sub-action-buttons {
    display: flex;
    gap: 8px;
    padding: 0 20px 20px;
    background: #fff;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sub-action-buttons::-webkit-scrollbar {
    display: none;
}

.sub-action-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2937;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sub-action-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: none;
}

.sub-action-btn .material-icons {
    font-size: 18px;
    color: #6b7280;
}

/* 일행 섹션 */
.collaborators-section {
    background: #ffffff;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
}

.collaborators-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 12px;
}

.collaborators-header .material-icons {
    font-size: 18px;
    color: #6b7280;
}

.collaborators-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.collaborator-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.8125rem;
    position: relative;
}

.collaborator-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1976d2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.collaborator-name {
    font-weight: 500;
    color: #1f2937;
}

.collaborator-role {
    font-size: 0.75rem;
    color: #6b7280;
    padding: 2px 6px;
    background: #e5e7eb;
    border-radius: 6px;
}

.collaborator-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    color: #999;
    margin-left: 4px;
}

.collaborator-remove-btn:hover {
    background: #e0e0e0;
    color: #f44336;
}

.collaborator-remove-btn .material-icons {
    font-size: 16px;
}

/* 라디오 버튼 스타일 개선 */
#role-editor-label:has(input:checked),
#role-viewer-label:has(input:checked) {
    border-color: #1976d2;
    background: #f3f8ff;
}

/* 메모 예산 타입 라디오 버튼 스타일 */
#memo-budget-type-expense-label:has(input:checked) {
    border-color: #1976d2;
    background: #f3f8ff;
}

#memo-budget-type-income-label:has(input:checked) {
    border-color: #1976d2;
    background: #f3f8ff;
}

.section-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-subheader h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    letter-spacing: -0.01em;
}

/* 버튼 스타일 */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: #1976d2;
    color: #ffffff;
    font-weight: 500;
}

.btn-primary:hover {
    background: #1565c0;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2);
}

.btn-secondary {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    font-weight: 500;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.8125rem;
}

.btn-primary .material-icons, .btn-secondary .material-icons {
    font-size: 18px;
}

/* 여행일정 목록 */
.trip-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trip-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
}

.trip-card::before {
    display: none;
}

.trip-card:hover {
    box-shadow: 0 6px 22px rgba(25, 118, 210, 0.12);
    border-color: rgba(25, 118, 210, 0.18);
    transform: translateY(-3px);
}

/* 목록 카드: 이미지 풀블리드 + 본문 패딩 (index 카드 톤) */
.trip-card--list {
    padding: 0 !important;
    border-radius: 16px;
    overflow: hidden;
}
.trip-card-cover {
    position: relative;
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3f8ff 100%);
}
.trip-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.trip-card-cover.is-placeholder::after {
    content: 'restaurant';
    font-family: 'Material Icons';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: rgba(25, 118, 210, 0.35);
}
.trip-card-pad {
    padding: 16px 18px 14px;
}
.trip-card-loc {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 0.875rem;
}
.trip-card-loc .material-icons {
    font-size: 16px;
    color: #1976d2;
}
.trip-card-foot {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.trip-card:hover::before {
    display: none;
}

.trip-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.trip-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
    line-height: 1.5;
}

.trip-card-dates {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.trip-card-dates .material-icons {
    font-size: 16px;
    color: #6b7280;
}

/* 정보 카드 (여행 기본 정보) */
.info-card {
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    flex: 1;
    letter-spacing: -0.01em;
}

.info-value {
    font-size: 0.9375rem;
    color: #6b7280;
    text-align: right;
    flex: 1;
    font-weight: 400;
}

/* 일정 항목 섹션 */
.budget-section {
    margin-top: 0;
    margin-bottom: 0;
    padding: 20px;
    background: #ffffff;
    display: block;
    border-bottom: 1px solid #e5e7eb;
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.budget-total {
    display: flex;
    align-items: center;
}

.budget-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trip-items-section {
    margin-top: 24px;
}

.trip-items-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 일정 항목 섹션 */
.trip-items-section {
    margin-top: 0;
    padding: 0;
    background: #fff;
}

/* 날짜별 그룹 */
.trip-day-group {
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    margin-bottom: 0;
    border-bottom: 1px solid #e5e7eb;
}

.trip-day-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.trip-day-header {
    background: #ffffff;
    color: #111827;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
    border-bottom: 1px solid #e5e7eb;
    letter-spacing: -0.01em;
    overflow: hidden;
}

.trip-day-header:hover { background: #f9fafb; }
.trip-day-header.active { background: #f3f4f6; }
.trip-day-header.active::after { display: none; }

/* 왼쪽: day N + 날짜 */
.trip-day-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 오른쪽: 예산 + 버튼들 + 화살표 */
.trip-day-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
}

.trip-day-btns {
    display: flex;
    align-items: center;
    gap: 2px;
}

.trip-day-action-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.trip-day-action-btn:hover { background: #f0f0f0; }

.trip-day-indicator {
    display: flex;
    align-items: center;
    opacity: 0.5;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.trip-day-header.active .trip-day-indicator {
    opacity: 0.7;
    transform: rotate(180deg);
}

.trip-day-indicator .material-icons {
    font-size: 20px;
    color: #666;
}

.trip-day-action-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trip-day-action-btn:hover {
    background: #e5e7eb;
}

.trip-day-action-btn .material-icons {
    font-size: 18px;
    color: #1976d2;
}

.trip-day-number {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: lowercase;
}

.trip-day-date {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

.trip-day-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.trip-day-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 0;
    border-top: none;
}

.trip-day-actions .btn-sm {
    flex: 1;
    justify-content: center;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.trip-day-actions .btn-sm:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: none;
}

.trip-item-card {
    background: #ffffff;
    padding: 16px 20px;
    box-shadow: none;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.2s ease;
    border-bottom: 1px solid #e5e7eb;
}

.trip-item-card:last-child {
    border-bottom: none;
}

.trip-item-card:hover {
    background: #f9fafb;
    box-shadow: none;
    transform: none;
}

.trip-item-order {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    width: 32px;
    height: 32px;
    background: #1976d2;
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.trip-item-content {
    flex: 1;
    min-width: 0;
}

.trip-item-restaurant-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    word-break: break-word;
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.trip-item-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.trip-item-time .material-icons {
    font-size: 16px;
    color: #6b7280;
}

.trip-item-notes {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
    line-height: 1.5;
    word-break: break-word;
}

.trip-item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.trip-item-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.trip-item-action-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: none;
}

.trip-item-action-btn.view {
    background: #f9fafb;
}

.trip-item-action-btn.view:hover {
    background: #f3f4f6;
}

.trip-item-action-btn.view .material-icons {
    color: #6b7280;
}

.trip-item-action-btn.edit {
    background: #f9fafb;
}

.trip-item-action-btn.edit:hover {
    background: #f3f4f6;
}

.trip-item-action-btn.edit .material-icons {
    color: #6b7280;
}

.trip-item-action-btn.delete:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

.trip-item-action-btn.delete .material-icons {
    color: #ef4444;
}

.trip-item-action-btn .material-icons {
    font-size: 18px;
}

/* 동선 지도 */
.trip-route-section {
    margin-top: 0;
    background: #ffffff;
    border-radius: 0;
    padding: 20px;
    box-shadow: none;
    border-top: 1px solid #e5e7eb;
}

/* 동선 마커 번호 스타일 */
.route-marker-number {
    background: transparent !important;
    border: none !important;
}

.route-marker-circle {
    width: 32px;
    height: 32px;
    background: #1976d2;
    color: #fff;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.trip-route-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    margin-top: 0;
    letter-spacing: -0.01em;
}

.route-map {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

/* Leaflet Popup 스타일 */
.route-marker-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
}

.route-marker-popup .leaflet-popup-content {
    margin: 0;
    padding: 12px;
    min-width: 200px;
}

.route-marker-popup .leaflet-popup-content .material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* 동선 시간 표시 라벨 */
.route-time-label {
    background: transparent !important;
    border: none !important;
}

.route-time-badge {
    background: rgba(25, 118, 210, 0.92);
    color: #fff;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    border: 1.5px solid #fff;
    text-align: center;
    line-height: 1.2;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 8px 48px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.modal-large {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    letter-spacing: -0.01em;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.modal-close .material-icons {
    font-size: 20px;
}

.modal-body {
    padding: 0;
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1f2937;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
    background: #ffffff;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* 검색 결과 */
.search-results {
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    display: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f9fafb;
}

.search-result-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.search-result-item-info {
    flex: 1;
}

.search-result-item-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.search-result-item-address {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #9ca3af;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.empty-state .material-icons {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.empty-state p {
    font-size: 0.875rem;
    color: #9ca3af;
    line-height: 1.5;
}

/* 반응형 */
@media (max-width: 768px) {
    .trip-planner-content {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* 모바일에서 1열 그리드로 표시 */
    .trip-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .trip-card {
        width: 100% !important;
        min-width: 0 !important;
        padding: 16px !important;
        box-sizing: border-box !important;
    }
    
    .trip-section {
        padding: 0 16px;
    }
    
    .section-subheader {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .route-map {
        height: 300px;
    }
    
    .trip-route-section {
        padding: 16px;
    }
    
    .modal-content {
        padding: 20px;
        max-height: 95vh;
    }
    
    .info-card {
        border-radius: 12px;
    }
    
    .info-item {
        padding: 14px 16px;
    }
    
    .trip-item-card {
        padding: 14px;
        gap: 12px;
    }
    
    /* 모던 헤더 모바일 최적화 */
    .modern-header {
        padding: 12px 16px;
        gap: 12px;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    
    /* 첫 번째 줄을 위한 wrapper 효과 */
    .back-btn {
        padding: 6px;
        order: 0;
        flex-shrink: 0;
        align-self: flex-start;
    }
    
    .back-btn .material-icons {
        font-size: 20px;
    }
    
    .header-actions {
        gap: 2px;
        order: 1;
        flex-shrink: 0;
        margin-left: auto;
        align-self: flex-start;
    }
    
    .icon-btn {
        padding: 6px;
    }
    
    .icon-btn .material-icons {
        font-size: 20px;
    }
    
    .header-content {
        flex: 1 1 100%;
        min-width: 0;
        order: 2;
        margin-top: 8px;
        width: 100%;
        text-align: center;
    }
    
    .trip-title {
        font-size: 1.25rem;
        word-break: break-word;
        text-align: center;
    }
    
    .trip-dates-display {
        font-size: 0.85rem;
    }
    
    .trip-description {
        font-size: 0.8rem;
    }
    
    /* 큰 액션 버튼들 모바일 최적화 */
    .main-action-buttons {
        padding: 16px;
        gap: 8px;
        flex-direction: column;
    }
    
    .main-action-btn {
        padding: 14px 20px;
        font-size: 0.9rem;
        width: 100%;
    }
    
    .main-action-btn .material-icons {
        font-size: 18px;
    }
    
    /* 일행 섹션 모바일 최적화 */
    .collaborators-section {
        padding: 16px;
    }
    
    .collaborators-header {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    
    .collaborators-header .material-icons {
        font-size: 18px;
    }
    
    .collaborators-list {
        gap: 6px;
    }
    
    .collaborator-item {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .collaborator-avatar {
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .trip-planner-content {
        padding-top: 10px;
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .trip-section .section-header h2,
    .trip-detail-section .section-header h2 {
        font-size: 1.125rem;
    }
    
    .section-subheader h3 {
        font-size: 1.1rem;
    }
    
    .trip-item-restaurant-name {
        font-size: 1rem;
    }
    
    .trip-item-time {
        font-size: 0.85rem;
    }
    
    /* 모던 헤더 작은 모바일 최적화 */
    .modern-header {
        padding: 10px 12px;
        gap: 8px;
        align-items: flex-start;
    }
    
    .header-content {
        margin-top: 6px;
        text-align: center;
    }
    
    .trip-title {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .trip-dates-display {
        font-size: 0.8rem;
    }
    
    .trip-description {
        font-size: 0.75rem;
    }
    
    .header-actions {
        margin-left: auto;
    }
    
    .icon-btn {
        padding: 4px;
    }
    
    .icon-btn .material-icons {
        font-size: 18px;
    }
    
    .back-btn {
        padding: 4px;
        align-self: flex-start;
        margin-right: auto;
    }
    
    .back-btn .material-icons {
        font-size: 18px;
    }
    
    /* 큰 액션 버튼들 작은 모바일 최적화 */
    .main-action-buttons {
        padding: 12px;
        gap: 6px;
    }
    
    .main-action-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    .main-action-btn .material-icons {
        font-size: 16px;
    }
    
    /* 일행 섹션 작은 모바일 최적화 */
    .collaborators-section {
        padding: 12px;
    }
    
    .collaborators-header {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .collaborators-header .material-icons {
        font-size: 16px;
    }
    
    .collaborator-item {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
    
    .collaborator-avatar {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}

/* 메모 아이템 스타일 */
.memo-item {
    cursor: move;
    transition: all 0.2s ease;
}

.memo-item:hover {
    transform: none;
    box-shadow: none;
    background: #f9fafb;
}

.memo-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.memo-images {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.memo-images img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ══════════════════════════════════════════════
   YouTube 모달 반응형
══════════════════════════════════════════════ */
.yt-modal-content {
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
}
.yt-layout {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* 소형 전용 가로 행 — 큰 화면에서는 숨김 */
.yt-panel-row    { display: none; }
.yt-panel-video  { position: relative; flex-shrink: 0; }
.yt-panel-info   { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }

/* 전체화면 버튼: yt-panel-video 기준으로 배치 */
.yt-fullscreen-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 200;          /* 높은 z-index로 iframe보다 위 */
    background: rgba(0,0,0,0.65);
    border: none;
    border-radius: 6px;
    padding: 5px 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;   /* 항상 클릭 가능 */
}
@media (max-width: 540px) {
    .yt-modal-content {
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 12px 12px 0 0 !important;
    }
    #youtube-search-modal {
        align-items: flex-end !important;
    }
    .yt-layout {
        flex-direction: column !important;
    }
    /* 패널: 그리드 위에 표시, 가로 행 레이아웃 */
    #yt-preview-panel {
        order: -1;
        width: 100% !important;
        flex-direction: column !important; /* 외부는 column */
        gap: 0 !important;
    }
    /* 소형: 오른쪽 정보 영역 보이기 */
    .yt-panel-row { display: block !important; }
    /* 큰화면용 요소 숨기기 */
    #yt-preview-title,
    .yt-confirm-btn,
    #yt-preview-open-link { display: none !important; }

    /* 영상 영역 */
    .yt-panel-video { width: 110px; }
    #yt-preview-wrapper {
        width: 110px !important;
        padding-bottom: 0 !important;
        height: 196px !important;
    }
    #yt-results-grid {
        order: 1;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
        max-height: 200px !important;
    }
}
@media (max-width: 360px) {
    .yt-panel-video { width: 85px !important; }
    #yt-preview-wrapper {
        width: 85px !important;
        height: 151px !important;
    }
    #yt-results-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        max-height: 160px !important;
    }
}

/* ══════════════════════════════════════════════
   320px 초소형 모바일 반응형
══════════════════════════════════════════════ */
@media (max-width: 360px) {

    /* 전체 컨테이너 오버플로 방지 */
    .trip-planner-content,
    .trip-detail-section,
    .trip-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden;
    }

    /* 헤더 */
    .modern-header {
        padding: 8px 10px;
        gap: 6px;
    }
    .trip-title {
        font-size: 0.95rem;
    }
    .trip-dates-display {
        font-size: 0.72rem;
    }
    .header-actions {
        gap: 0;
    }
    .icon-btn {
        padding: 3px;
    }
    .icon-btn .material-icons {
        font-size: 17px;
    }

    /* 액션 버튼 영역 */
    .main-action-buttons {
        padding: 10px 8px;
        gap: 6px;
        flex-direction: column;
    }
    .main-action-btn {
        width: 100%;
        padding: 11px 12px;
        font-size: 0.82rem;
        gap: 5px;
    }
    .main-action-btn .material-icons {
        font-size: 15px;
    }

    /* 일행 섹션 */
    .collaborators-section {
        padding: 10px 10px;
    }

    /* 예산 헤더 → 세로 정렬 */
    .budget-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .budget-total {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }
    .budget-total input[type="number"] {
        width: 100% !important;
        box-sizing: border-box;
        font-size: 0.9rem;
    }

    /* 예산 요약 2x2 그리드 */
    .budget-summary > div {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    /* 날짜 헤더 */
    .trip-day-header {
        padding: 10px 10px;
        gap: 6px;
        flex-wrap: wrap;
    }
    .trip-day-number {
        font-size: 0.78rem !important;
    }
    .trip-day-date {
        font-size: 0.75rem !important;
    }

    /* 일정 아이템 카드 */
    .trip-item-card {
        padding: 10px 10px;
        gap: 8px;
    }
    .trip-item-restaurant-name {
        font-size: 0.88rem;
    }
    .trip-item-order {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
        flex-shrink: 0;
    }
    .trip-item-actions {
        flex-direction: column;
        gap: 4px;
    }
    .trip-item-action-btn {
        padding: 5px !important;
    }

    /* 모달 전체 */
    .modal-content {
        margin: 0 !important;
        border-radius: 12px 12px 0 0 !important;
        max-height: 96vh;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 14px 12px !important;
    }
    .modal {
        align-items: flex-end !important;
    }
    .modal-header {
        padding-bottom: 12px;
        margin-bottom: 12px;
    }
    .modal-header h3 {
        font-size: 1rem;
    }

    /* 모달 내 폼 */
    .form-group label {
        font-size: 0.85rem;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.875rem;
        padding: 8px 10px;
    }
    .form-actions {
        gap: 6px;
    }
    .form-actions button,
    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        flex: 1;
        padding: 10px 8px;
        font-size: 0.82rem;
    }

    /* 권한 설정 라디오 → 세로 */
    #role-editor-label,
    #role-viewer-label {
        flex: unset !important;
        width: 100% !important;
        padding: 10px !important;
    }
    #role-editor-label + #role-viewer-label,
    #role-editor-label ~ * {
        margin-top: 6px;
    }

    /* 칩 입력창 */
    #invite-chip-box {
        min-height: 40px;
        padding: 4px 8px;
    }
    #invite-search-input,
    #hashtag-input {
        min-width: 80px !important;
        font-size: 0.85rem;
    }
    #invite-add-btn,
    #hashtag-chip-box + button {
        padding: 0 10px !important;
        font-size: 0.82rem;
    }

    /* 유튜브 검색 모달 - 세로 단일 컬럼 */
    #youtube-search-modal .modal-content {
        max-width: 100% !important;
    }
    #yt-results-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        max-height: 160px;
    }
    #yt-preview-wrapper {
        width: 80px !important;
        height: 142px !important;
    }

    /* 공유 링크 버튼 행 */
    #share-link-input {
        min-width: 0 !important;
        width: 60px !important;
    }

    /* 버튼 sm */
    .btn-sm {
        padding: 7px 8px !important;
        font-size: 0.78rem !important;
    }

    /* 정보 아이템 */
    .info-item {
        padding: 12px 12px;
        font-size: 0.85rem;
    }
    .info-label {
        font-size: 0.85rem;
    }

    /* 동선 텍스트 숨김 (너무 좁을 때) */
    .trip-day-number ~ span[style*="동선"] {
        display: none;
    }

    /* 메모 이미지 */
    .memo-images img {
        width: 72px;
        height: 72px;
    }
}

