/* ============================================================
   Yunnan Planner — 雲南之旅  |  Mobile-first CSS
   ============================================================ */

/* ── Root variables ───────────────────────────── */
:root {
    --bg:         #f5f5f7;
    --surface:    #ffffff;
    --text:       #1a1a2e;
    --text-light: #6b7280;
    --border:     #e5e7eb;
    --accent:     #e94560;
    --primary:    #1a1a2e;
    --blue:       #3b82f6;
    --green:      #10b981;
    --gold:       #f5a623;
    --red:        #ef4444;
    --radius:     12px;
    --radius-sm:  8px;
    --shadow:     0 2px 8px rgba(0,0,0,.08);
    --shadow-lg:  0 8px 24px rgba(0,0,0,.12);
    --safe-top:   env(safe-area-inset-top, 0px);
    --safe-bottom:env(safe-area-inset-bottom, 0px);
    --city-guangzhou:  linear-gradient(135deg, #FF6B6B, #ee5a24);
    --city-lijiang:    linear-gradient(135deg, #0abde3, #10ac84);
    --city-shangri-la: linear-gradient(135deg, #6c5ce7, #341f97);
    --city-dali:       linear-gradient(135deg, #54a0ff, #2e86de);
    --city-kunming:    linear-gradient(135deg, #10B981, #059669);
}

/* ── Twemoji image sizing ── */
img.emoji {
    height: 1em; width: 1em;
    margin: 0 .05em 0 .1em;
    vertical-align: -0.1em;
    display: inline-block;
}
.yp-traveler-card__emoji img.emoji { height: 44px; width: 44px; }
.yp-pin-avatar__emoji img.emoji { height: 40px; width: 40px; }
.yp-bottom-nav__item__icon img.emoji { height: 22px; width: 22px; margin: 0; }
.yp-meeting-msg__avatar img.emoji { height: 16px; width: 16px; margin: 0; }

/* ── Reset ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body.yp-app {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100dvh;
}
#yunnan-planner-app { min-height: 100dvh; position: relative; }

/* ── Utility ──────────────────────────────────── */
.yp-loading { display:flex; justify-content:center; align-items:center; height:60vh; }
.yp-spinner { width:32px; height:32px; border:3px solid var(--border); border-top-color:var(--blue);
    border-radius:50%; animation:yp-spin .7s linear infinite; }
@keyframes yp-spin { to { transform:rotate(360deg); } }
.yp-hidden { display:none !important; }
.yp-error { color: var(--red); text-align: center; padding: 40px 20px; }

/* ============================================================
   PIN SCREEN (Traveler Select + PIN Entry)
   ============================================================ */
.yp-pinscreen {
    min-height: 100dvh;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 40%, #0f3460 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 30px 20px; padding-top: calc(30px + var(--safe-top));
    animation: yp-fadeIn .6s ease;
    position: relative; overflow: hidden;
}
@keyframes yp-fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ── Floating particles ── */
.yp-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.yp-particle {
    position: absolute; bottom: -10px; border-radius: 50%;
    background: rgba(255,255,255,.15);
    animation: yp-float linear infinite;
}
@keyframes yp-float {
    0%   { transform: translateY(0) scale(1);   opacity: 0; }
    10%  { opacity: .6; }
    90%  { opacity: .3; }
    100% { transform: translateY(-100vh) scale(.5); opacity: 0; }
}

.yp-pinscreen__title {
    font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 4px;
    text-shadow: 0 0 30px rgba(59,130,246,.4);
    animation: yp-titleGlow 3s ease-in-out infinite;
    position: relative; z-index: 1;
}
@keyframes yp-titleGlow {
    0%,100% { text-shadow: 0 0 20px rgba(59,130,246,.3); }
    50%     { text-shadow: 0 0 40px rgba(59,130,246,.6), 0 0 80px rgba(59,130,246,.2); }
}
.yp-pinscreen__subtitle {
    font-size: 13px; color: rgba(255,255,255,.4); margin-bottom: 28px;
    letter-spacing: 2px; text-transform: uppercase;
    position: relative; z-index: 1;
}

/* ── Traveler selection grid ── */
.yp-traveler-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    max-width: 340px; width: 100%; margin: 0 auto 24px;
    position: relative; z-index: 1;
}
.yp-traveler-card {
    display: flex; flex-direction: column; align-items: center;
    padding: 16px 8px 14px; border-radius: 20px;
    background: rgba(255,255,255,.06);
    border: 2px solid rgba(255,255,255,.1);
    cursor: pointer; transition: all .3s cubic-bezier(.4,0,.2,1);
    position: relative; overflow: hidden;
    animation: yp-cardPop .4s ease both;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
@keyframes yp-cardPop {
    from { opacity:0; transform:scale(.8) translateY(12px); }
    to   { opacity:1; transform:scale(1)  translateY(0); }
}
.yp-traveler-card__glow {
    position: absolute; inset: 0; opacity: 0; border-radius: 20px;
    filter: blur(20px); transition: opacity .3s;
}
.yp-traveler-card:active { transform: scale(.93); }
.yp-traveler-card.selected {
    background: rgba(255,255,255,.15);
    border-color: var(--card-color, var(--gold));
    box-shadow: 0 0 24px rgba(245,166,35,.3), inset 0 0 20px rgba(255,255,255,.05);
}
.yp-traveler-card.selected .yp-traveler-card__glow {
    opacity: .15;
}
.yp-traveler-card__emoji {
    font-size: 44px; margin-bottom: 8px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
    transition: transform .3s;
}
.yp-traveler-card.selected .yp-traveler-card__emoji {
    transform: scale(1.15);
    animation: yp-bounce .5s ease;
}
@keyframes yp-bounce {
    0%,100% { transform:scale(1.15); }
    50%     { transform:scale(1.3); }
}
.yp-traveler-card__name {
    color: rgba(255,255,255,.8); font-size: 13px; font-weight: 600;
    letter-spacing: .5px;
}
.yp-traveler-card.selected .yp-traveler-card__name { color: #fff; }

.yp-select-continue {
    position: relative; z-index: 1;
    margin-top: 8px; padding: 12px 48px; border: none; border-radius: 30px;
    font-size: 16px; font-weight: 600; color: #1a1a2e;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    cursor: pointer; transition: all .25s;
    box-shadow: 0 4px 20px rgba(245,166,35,.3);
    letter-spacing: .5px;
}
.yp-select-continue:active { transform: scale(.95); box-shadow: 0 2px 10px rgba(245,166,35,.2); }

.yp-pin-prompt {
    color: rgba(255,255,255,.6); font-size: 14px; margin-bottom: 18px;
    position: relative; z-index: 1; letter-spacing: 1px;
}

/* ── PIN avatar (smaller, with glow ring) ── */
.yp-pin-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.08);
    border: 3px solid var(--avatar-color, var(--gold));
    box-shadow: 0 0 30px rgba(245,166,35,.2), 0 0 60px rgba(245,166,35,.1);
    margin-bottom: 10px;
    position: relative; z-index: 1;
    animation: yp-avatarPulse 2.5s ease-in-out infinite;
}
@keyframes yp-avatarPulse {
    0%,100% { box-shadow: 0 0 20px rgba(245,166,35,.15), 0 0 40px rgba(245,166,35,.05); }
    50%     { box-shadow: 0 0 30px rgba(245,166,35,.3),  0 0 60px rgba(245,166,35,.15); }
}
.yp-pin-avatar__emoji {
    font-size: 40px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.yp-pin-name {
    color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 4px;
    position: relative; z-index: 1;
}

/* ── PIN dots (bigger, with glow) ── */
.yp-pin-dots {
    display:flex; gap:12px; margin-bottom:28px;
    position: relative; z-index: 1;
}
.yp-pin-dot {
    width:14px; height:14px; border-radius:50%;
    border:2px solid rgba(255,255,255,.25);
    transition: all .2s cubic-bezier(.4,0,.2,1);
}
.yp-pin-dot.filled {
    background:var(--gold); border-color:var(--gold);
    box-shadow: 0 0 8px rgba(245,166,35,.5);
    animation: yp-dotPop .2s ease;
}
@keyframes yp-dotPop { from { transform:scale(1.4); } to { transform:scale(1); } }
.yp-pin-dots.error .yp-pin-dot {
    border-color:var(--red); background:transparent;
    animation:yp-shake .4s;
}
@keyframes yp-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-8px)} 75%{transform:translateX(8px)} }

.yp-pin-error {
    color: var(--red); font-size: 13px; min-height: 20px;
    margin-bottom: 8px; position: relative; z-index: 1;
}

/* ── PIN keypad (BIGGER buttons) ── */
.yp-keypad {
    display:grid; grid-template-columns:repeat(3, 76px); gap:14px;
    position: relative; z-index: 1;
}
.yp-keypad__btn {
    width:76px; height:76px; border-radius:50%; border:none;
    font-size:28px; font-weight:600; color:#fff;
    background:rgba(255,255,255,.08);
    cursor:pointer;
    transition: all .15s cubic-bezier(.4,0,.2,1);
    display:flex; align-items:center; justify-content:center;
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.08);
}
.yp-keypad__btn:hover {
    background:rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.15);
}
.yp-keypad__btn:active {
    background:rgba(255,255,255,.25);
    transform:scale(.9);
    box-shadow: 0 0 20px rgba(255,255,255,.1);
}
.yp-keypad__btn--fn {
    font-size: 18px; color: rgba(255,255,255,.6);
}
.yp-keypad__btn--delete { font-size:20px; }

.yp-pin-back {
    margin-top: 20px; background: none; border: none;
    color: rgba(255,255,255,.4); font-size: 14px;
    cursor: pointer; padding: 8px 16px;
    transition: color .2s;
    position: relative; z-index: 1;
}
.yp-pin-back:active { color: rgba(255,255,255,.7); }

/* ── Toast ── */
.yp-toast {
    position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: rgba(0,0,0,.85); color: #fff; padding: 8px 20px;
    border-radius: 20px; font-size: 13px; z-index: 9999;
    opacity: 0; transition: all .3s; pointer-events: none;
}
.yp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   POST-LOGIN LAYOUT — Homepage
   ============================================================ */
.yp-home {
    padding-bottom: 80px;
}

.yp-home-header {
    background: linear-gradient(135deg, var(--primary) 0%, #0a3d62 100%);
    padding: 24px 20px 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.yp-home-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -10%;
    width: 120%;
    height: 60px;
    background: var(--bg);
    border-radius: 50% 50% 0 0;
}

.yp-home-header__title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
}

.yp-home-header__dates {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.yp-home-header__countdown {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-top: 10px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.yp-refresh-btn {
    position: absolute;
    top: 20px;
    right: 16px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yp-refresh-btn:active {
    background: rgba(255,255,255,0.3);
    transform: rotate(180deg);
}

/* ── Reminder Bar ── */
.yp-reminder-bar {
    background: linear-gradient(90deg, var(--accent, #e74c3c) 0%, #c0392b 100%);
    color: #fff;
    padding: 12px 16px;
    margin: 0 16px 12px;
    border-radius: var(--radius-sm, 8px);
    font-size: 13px;
    display: none;
    animation: yp-slideDown 0.4s ease;
}
@keyframes yp-slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.yp-reminder-bar.visible { display: block; }
.yp-reminder-bar__label { font-weight: 700; font-size: 11px; text-transform: uppercase; opacity: 0.8; }
.yp-reminder-bar__title { font-weight: 500; margin-top: 2px; }
.yp-reminder-bar__hotel { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.2); }

/* ── Tab Bar ── */
.yp-tabs {
    display: flex;
    gap: 4px;
    padding: 4px 16px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.yp-tabs::-webkit-scrollbar { display: none; }

.yp-tab {
    flex: 0 0 auto;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: var(--surface);
    color: var(--text-light);
    border: 1px solid var(--border);
    -webkit-tap-highlight-color: transparent;
}

.yp-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ── Day Cards (homepage) ── */
.yp-days-grid {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.yp-day-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    transform: translateY(20px);
    animation: yp-cardReveal 0.5s ease forwards;
}

.yp-day-card:nth-child(1) { animation-delay: 0.05s; }
.yp-day-card:nth-child(2) { animation-delay: 0.1s; }
.yp-day-card:nth-child(3) { animation-delay: 0.15s; }
.yp-day-card:nth-child(4) { animation-delay: 0.2s; }
.yp-day-card:nth-child(5) { animation-delay: 0.25s; }
.yp-day-card:nth-child(6) { animation-delay: 0.3s; }
.yp-day-card:nth-child(7) { animation-delay: 0.35s; }
.yp-day-card:nth-child(8) { animation-delay: 0.4s; }

@keyframes yp-cardReveal {
    to { opacity: 1; transform: translateY(0); }
}

.yp-day-card:active { transform: scale(0.98); }

.yp-day-card--today {
    border: 2px solid var(--gold);
    box-shadow: 0 0 20px rgba(245,166,35,0.25);
}

.yp-day-card__header {
    padding: 16px 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.yp-day-card__day-num {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.yp-day-card__day-num span { font-size: 9px; font-weight: 400; opacity: 0.8; }
.yp-day-card__day-num.guangzhou  { background: var(--city-guangzhou); }
.yp-day-card__day-num.lijiang    { background: var(--city-lijiang); }
.yp-day-card__day-num.shangri-la { background: var(--city-shangri-la); }
.yp-day-card__day-num.dali       { background: var(--city-dali); }
.yp-day-card__day-num.kunming    { background: var(--city-kunming); }

.yp-day-card__info { flex: 1; margin-left: 12px; }
.yp-day-card__date { font-size: 12px; color: var(--text-light); }
.yp-day-card__city { font-size: 20px; font-weight: 700; margin-top: 2px; }

/* ── Weather on Day Card ── */
.yp-day-card__weather {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 6px;
}

.yp-day-card__weather-icon { font-size: 20px; line-height: 1; }

.yp-day-card__weather-temp {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

/* ── Day Card Preview ── */
.yp-day-card__preview {
    padding: 0 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.yp-day-card__preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
}

.yp-day-card__preview-icon { width: 20px; text-align: center; font-size: 14px; }
.yp-day-card__preview-time { font-size: 12px; color: var(--text-light); min-width: 40px; }

/* ============================================================
   BOTTOM NAV
   ============================================================ */
.yp-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    padding: 6px 0 calc(6px + var(--safe-bottom));
    z-index: 100;
}

.yp-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: none;
    transition: color 0.2s;
    position: relative;
}

.yp-bottom-nav__item.active { color: var(--primary); }
.yp-bottom-nav__item__icon { font-size: 22px; }

.yp-bottom-nav__badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 18px);
    background: var(--red);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.yp-bottom-nav__badge.show { display: flex; }

/* ============================================================
   DAY DETAIL
   ============================================================ */
.yp-day-detail {
    animation: yp-slideIn 0.3s ease;
}

@keyframes yp-slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.yp-day-detail__header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 50;
    border-bottom: 1px solid var(--border);
}

.yp-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

/* Back button light variant (for dark headers) */
.yp-back-btn--light {
    background: rgba(255,255,255,0.2);
    color: #1a1a2e;
    backdrop-filter: blur(4px);
    background: #e5e7eb;
}

.yp-day-detail__title { font-size: 18px; font-weight: 700; }
.yp-day-detail__subtitle { font-size: 12px; color: var(--text-light); }

.yp-day-detail__items {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 100px;
}

/* ── Hotel Banner ── */
.yp-hotel-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 16px 0;
    padding: 10px 14px;
    background: linear-gradient(135deg, #fef9c3, #fef3c7);
    border-radius: var(--radius-sm);
    border: 1px solid #fde68a;
}

.yp-hotel-banner__icon { font-size: 20px; flex-shrink: 0; }
.yp-hotel-banner__label { font-size: 11px; color: var(--text-light); font-weight: 500; }
.yp-hotel-banner__name { font-size: 14px; font-weight: 600; color: var(--text); }

/* ============================================================
   ITEM CARD
   ============================================================ */
.yp-item-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.yp-item-card__header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.yp-item-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.yp-item-card__icon.transport { background: #dbeafe; }
.yp-item-card__icon.hotel_checkin,
.yp-item-card__icon.hotel_checkout { background: #fef3c7; }
.yp-item-card__icon.meal { background: #fce7f3; }
.yp-item-card__icon.activity { background: #d1fae5; }
.yp-item-card__icon.shopping { background: #ede9fe; }
.yp-item-card__icon.other { background: #f3f4f6; }

.yp-item-card__title-wrap { flex: 1; min-width: 0; }

.yp-item-card__title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yp-item-card.expanded .yp-item-card__title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.yp-item-card__time { font-size: 12px; color: var(--text-light); margin-top: 1px; }

.yp-item-card__cost {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}

.yp-item-card__expand {
    font-size: 14px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.yp-item-card__expand.open { transform: rotate(180deg); }

/* ── Item body (expanded) ── */
.yp-item-card__body {
    padding: 0 16px 14px;
    display: none;
    animation: yp-expandIn 0.3s ease;
}

.yp-item-card__body.open { display: block; }

@keyframes yp-expandIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.yp-item-card__desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.5;
}

.yp-item-card__meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.yp-item-card__meta-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
}

.yp-item-card__meta-icon {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    color: var(--text-light);
}

.yp-item-card__meta-text {
    flex: 1;
    color: var(--text-light);
    word-break: break-all;
}

.yp-item-card__meta-text a { color: var(--blue); text-decoration: none; }
.yp-item-card__meta-text a:hover { text-decoration: underline; }

/* ── Copy Button ── */
.yp-copy-btn {
    background: #f0f4ff; border: 1px solid #dbeafe; cursor: pointer;
    font-size: 11px; padding: 2px 6px; border-radius: 4px;
    transition: all 0.2s; flex-shrink: 0; color: var(--blue); white-space: nowrap;
}
.yp-copy-btn:hover, .yp-copy-btn:active { background: #dbeafe; }

/* ── Quick Copy Row (always visible) ── */
.yp-item-card__quick-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 8px;
    flex-wrap: wrap;
}

.yp-quick-link {
    font-size: 12px;
    color: var(--blue);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    transition: all 0.2s;
}
.yp-quick-link:active { background: #bae6fd; }

/* ── Link Button ── */
.yp-link-btn {
    display: inline-block; padding: 4px 12px;
    background: var(--blue); color: #fff; border-radius: 6px;
    font-size: 11px; text-decoration: none; transition: opacity 0.2s;
}
.yp-link-btn:active { opacity: 0.7; }

/* ── Photo Grid ── */
.yp-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
    margin-bottom: 12px;
}

.yp-photo-grid__item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.yp-photo-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yp-photo-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    padding: 0;
    cursor: pointer;
    z-index: 2;
}

.yp-photo-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.yp-photo-upload-btn:active { border-color: var(--blue); color: var(--blue); }

/* ── Lightbox ── */
.yp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.yp-lightbox.open { opacity: 1; }

.yp-lightbox img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.yp-lightbox__close {
    position: absolute;
    top: calc(12px + var(--safe-top));
    right: 16px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

/* ── Comments ── */
.yp-comments {
    margin-top: 12px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.yp-comments__title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }

.yp-comment {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}
.yp-comment:last-child { border-bottom: none; }
.yp-comment__author { font-size: 12px; font-weight: 600; color: var(--blue); }
.yp-comment__text { font-size: 13px; color: var(--text-light); margin-top: 2px; }
.yp-comment__time { font-size: 11px; color: var(--text-light); margin-top: 2px; }

.yp-comment-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.yp-comment-form input, .yp-comment-form textarea {
    flex: 1; padding: 8px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 13px; font-family: inherit;
    outline: none; background: var(--bg);
}

.yp-comment-form input:focus,
.yp-comment-form textarea:focus { border-color: var(--blue); }

.yp-comment-form button {
    padding: 8px 16px; background: var(--primary); color: #fff;
    border: none; border-radius: var(--radius-sm); font-size: 13px;
    cursor: pointer; white-space: nowrap;
}

/* ── Action Buttons Row ── */
.yp-item-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.yp-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-light);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.15s;
}

.yp-action-btn:active { background: var(--bg); }

.yp-action-btn.edit-item {
    background: #eef2ff;
    color: var(--blue);
    border-color: #c7d2fe;
}
.yp-action-btn.edit-item:active { background: #c7d2fe; }

.yp-action-btn.delete-item {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}
.yp-action-btn.delete-item:active { background: #dc2626; }

.yp-action-btn.whatsapp {
    background: #25d366;
    color: #fff;
    border-color: #25d366;
}
.yp-action-btn.whatsapp:active { background: #1da851; }

/* ── Add Item Button ── */
.yp-add-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 14px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: none;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.yp-add-item-btn:active { border-color: var(--blue); color: var(--blue); }

/* ============================================================
   MODAL / BOTTOM SHEET
   ============================================================ */
.yp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: yp-fadeIn 0.2s ease;
}

.yp-modal {
    background: var(--surface);
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 20px;
    animation: yp-slideUp 0.3s ease;
}

@keyframes yp-slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.yp-modal__handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.yp-modal__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.yp-form-group { margin-bottom: 14px; }

.yp-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-light);
}

.yp-form-group input,
.yp-form-group select,
.yp-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: var(--bg);
    transition: border-color 0.2s;
}

.yp-form-group input:focus,
.yp-form-group select:focus,
.yp-form-group textarea:focus { border-color: var(--blue); }

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

.yp-form-row { display: flex; gap: 10px; }
.yp-form-row > .yp-form-group { flex: 1; }

.yp-form-buttons { display: flex; gap: 10px; margin-top: 8px; }
.yp-form-buttons .yp-submit-btn { flex: 1; margin-top: 0; }

.yp-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s;
}
.yp-submit-btn:active { opacity: 0.8; }
.yp-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.yp-cancel-btn {
    flex: 0 0 auto;
    padding: 14px 20px;
    background: var(--bg);
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.yp-cancel-btn:active { background: var(--border); }

/* ── Confirm Dialog ── */
.yp-confirm-dialog {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px 20px;
    margin: auto;
    width: 85%;
    max-width: 340px;
    text-align: center;
}

.yp-confirm-dialog__title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.yp-confirm-dialog__text {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.5;
}

.yp-confirm-dialog .yp-form-buttons { justify-content: center; }
.yp-danger-btn { background: var(--red); border: none; color: #fff; }
.yp-danger-btn:active { background: #dc2626; }

/* ============================================================
   CHECKLIST
   ============================================================ */
.yp-checklist-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px 0;
}

.yp-checklist-tab {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    color: var(--text-light);
}

.yp-checklist-tab.active {
    border-color: var(--primary);
    background: rgba(26, 26, 46, 0.05);
    color: var(--text);
}

.yp-checklist-tab__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.yp-checklist-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 0;
}

.yp-checklist-progress__bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.yp-checklist-progress__fill {
    height: 100%;
    background: var(--green);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.yp-checklist-progress__text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.yp-checklist { padding: 16px; padding-bottom: 90px; }

.yp-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.yp-checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--green);
    cursor: pointer;
}

.yp-checklist-item__text { flex: 1; font-size: 14px; }
.yp-checklist-item__text.checked { text-decoration: line-through; color: var(--text-light); }

.yp-checklist-item__by {
    font-size: 10px;
    color: var(--text-light);
    white-space: nowrap;
}

.yp-checklist-item__delete {
    border: none;
    background: none;
    color: var(--text-light);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

.yp-checklist-add {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.yp-checklist-add input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    background: var(--bg);
}

.yp-checklist-add button {
    padding: 10px 16px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
}

/* ============================================================
   EXPENSES
   ============================================================ */
.yp-expenses-summary {
    background: var(--surface);
    margin: 12px 16px;
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.yp-expenses__total { font-size: 28px; font-weight: 700; color: var(--green); }
.yp-expenses__total-label { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.yp-expenses__per-person {
    font-size: 16px;
    font-weight: 600;
    color: var(--blue);
    margin-top: 8px;
}

.yp-expenses__rate { font-size: 11px; color: var(--text-light); margin-top: 4px; }

.yp-expense-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
}

.yp-expense-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.yp-expense-group { margin-bottom: 12px; }
.yp-expense-group__header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; font-size: 14px; font-weight: 700; color: var(--text);
    border-bottom: 2px solid var(--border);
}
.yp-expense-group__subtotal { font-size: 13px; font-weight: 600; color: var(--primary); }
.yp-expense-row__desc { font-size: 13px; color: var(--text); }
.yp-expense-row__amount { text-align: right; }
.yp-expense-row__original { font-size: 14px; font-weight: 600; }
.yp-expense-row__converted { font-size: 11px; color: var(--text-light); }
.yp-expense-del-btn {
    background: none; border: none; color: #ccc; font-size: 14px;
    padding: 4px 6px; cursor: pointer; flex-shrink: 0; margin-left: 6px;
}
.yp-expense-del-btn:hover { color: #e53e3e; }

.yp-expense-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 2px solid var(--primary);
    font-size: 18px;
    font-weight: 700;
}

.yp-expense-total__value { color: var(--accent); }

.yp-add-expense-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: calc(100% - 32px);
    margin: 16px auto;
    padding: 14px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: none;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.yp-add-expense-btn:active { border-color: var(--blue); color: var(--blue); }

/* ============================================================
   MEETING ROOM (Unique to Yunnan)
   ============================================================ */
.yp-meeting {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 60px);
    padding-bottom: 0;
}

.yp-meeting-header {
    background: linear-gradient(135deg, var(--primary), #0a3d62);
    padding: calc(12px + var(--safe-top)) 16px 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.yp-meeting-header__title { font-size: 16px; font-weight: 600; flex: 1; color: #fff; }
.yp-meeting-header__count { font-size: 11px; color: rgba(255,255,255,0.5); }

/* ── Messages ── */
.yp-meeting-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yp-meeting-msg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.yp-meeting-msg__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.yp-meeting-msg__content {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.yp-meeting-msg__name {
    font-size: 10px;
    color: var(--text-light);
    margin-bottom: 2px;
    padding-left: 4px;
}

.yp-meeting-msg__bubble {
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.yp-meeting-msg.me {
    flex-direction: row-reverse;
}
.yp-meeting-msg.me .yp-meeting-msg__content {
    align-items: flex-end;
}
.yp-meeting-msg.me .yp-meeting-msg__name {
    text-align: right;
}
.yp-meeting-msg.me .yp-meeting-msg__bubble {
    background: #dcf8c6;
    border: 1px solid #b7e59c;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 4px;
}

.yp-meeting-msg.other .yp-meeting-msg__bubble {
    background: #f0f0f0;
    border-bottom-left-radius: 4px;
}

.yp-meeting-msg.ai .yp-meeting-msg__bubble {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-bottom-left-radius: 4px;
}

.yp-meeting-msg.ai .yp-meeting-msg__bubble a {
    color: var(--blue);
    text-decoration: underline;
}

.yp-ai-thinking {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; color: #6366f1; font-style: italic;
}
.yp-ai-thinking .yp-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #6366f1;
    animation: yp-thinking-bounce 1.2s infinite ease-in-out;
}
.yp-ai-thinking .yp-dot:nth-child(2) { animation-delay: 0.2s; }
.yp-ai-thinking .yp-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes yp-thinking-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.yp-meeting-msg.system {
    align-self: center;
    justify-content: center;
}

.yp-meeting-msg.system .yp-meeting-msg__bubble {
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 12px;
    text-align: center;
}

.yp-meeting-msg__time {
    font-size: 9px;
    color: #bbb;
    flex-shrink: 0;
    margin: 0 4px;
    align-self: center;
}

/* ── Emoji Picker ── */
.yp-emoji-picker {
    display: none;
    padding: 8px 12px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    max-height: 180px;
    overflow-y: auto;
}

.yp-emoji-picker.open {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.yp-emoji-item {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.yp-emoji-item:hover, .yp-emoji-item:active { background: #f3f4f6; }

/* ── Meeting Input Area ── */
.yp-meeting-input-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px calc(8px + var(--safe-bottom));
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.yp-meeting-input-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.yp-meeting-ai-toggle {
    display: flex;
    align-items: center;
    padding: 2px 0;
}

.yp-ai-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.yp-ai-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--blue);
    cursor: pointer;
}

.yp-ai-checkbox input[type="checkbox"]:checked + span {
    color: var(--blue);
    font-weight: 600;
}

.yp-meeting-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    font-family: inherit;
    resize: none;
    max-height: 80px;
    outline: none;
    background: var(--bg);
}

.yp-meeting-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    transition: all 0.2s;
}

.yp-meeting-btn.send { background: var(--green); color: #fff; }

/* ── Meeting AI Add Card ── */
.yp-meeting-add-card {
    background: var(--surface);
    border: 1px solid var(--blue);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    margin-top: 4px;
}

.yp-meeting-add-card__title { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.yp-meeting-add-card__row { font-size: 11px; margin-bottom: 2px; }
.yp-meeting-add-card__actions { display: flex; gap: 6px; margin-top: 6px; }
.yp-meeting-add-card__actions button {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.yp-meeting-add-card__desc {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.yp-meeting-confirm-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 14px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.yp-meeting-confirm-btn:active { opacity: 0.7; }
.yp-meeting-confirm-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   AI CHAT
   ============================================================ */
.yp-chat {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 60px);
    padding-bottom: 0;
}

.yp-chat-header {
    background: linear-gradient(135deg, var(--primary), #0a3d62);
    padding: calc(14px + var(--safe-top)) 16px 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.yp-chat-header__title {
    font-size: 16px;
    font-weight: 700;
    flex: 1;
    color: #fff;
}

.yp-chat-header__clear {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
}

.yp-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.yp-chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.yp-chat-msg.user {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.yp-chat-msg.assistant {
    align-self: flex-start;
    background: var(--surface);
    box-shadow: var(--shadow);
    border-bottom-left-radius: 4px;
}

.yp-chat-msg.assistant a { color: var(--blue); text-decoration: underline; word-break: break-all; }
.yp-chat-msg.assistant strong { font-weight: 700; }
.yp-chat-msg.assistant em { font-style: italic; }
.yp-chat-msg img,
.yp-chat-msg svg { max-width: 100%; max-height: 200px; border-radius: 8px; }
.yp-chat-msg__img { display: block; margin-bottom: 6px; }

.yp-chat-msg.loading::after {
    content: '...';
    animation: yp-dots 1s steps(3, end) infinite;
}

@keyframes yp-dots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

.yp-chat-input-area {
    padding: 10px 16px calc(10px + var(--safe-bottom));
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.yp-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: none;
    max-height: 100px;
    background: var(--bg);
}

.yp-chat-img-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yp-chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.yp-chat-send-btn:disabled { opacity: 0.4; }

/* ── AI Add Item Card ── */
.yp-ai-add-card {
    background: var(--bg);
    border: 1px solid var(--blue);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.yp-ai-add-card__title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text);
}

.yp-ai-add-card__row {
    font-size: 12px;
    color: var(--text-light);
    padding: 1px 0;
}

.yp-ai-add-card__row b { color: var(--text); }
.yp-ai-add-card .yp-form-buttons { margin-top: 8px; }
.yp-ai-add-card .yp-submit-btn { font-size: 13px; padding: 8px 14px; }
.yp-ai-add-card .yp-cancel-btn { font-size: 13px; padding: 8px 14px; }

/* ============================================================
   DRAG SORT
   ============================================================ */
.yp-drag-handle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 16px;
    cursor: grab;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

.yp-item-card.yp-dragging {
    opacity: 0.9;
    box-shadow: var(--shadow-lg);
    transform: scale(1.02);
}

.yp-drag-placeholder {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: rgba(59,130,246,0.05);
}

/* ============================================================
   REMINDER BAR
   ============================================================ */
.yp-reminder-bar {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    padding: 8px 16px;
    font-size: 12px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: yp-slideDown 0.3s ease;
}

@keyframes yp-slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.yp-reminder-bar__icon { font-size: 16px; }
.yp-reminder-bar__text { flex: 1; }
.yp-reminder-bar__hotel { font-size: 11px; color: rgba(26,26,46,0.7); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 768px) {
    #yunnan-planner-app { max-width: 480px; margin: 0 auto; }
}
