/* Day plan as a numbered route: stops joined by a dashed path */
.schedule-panel .timeline{counter-reset:stop;position:relative!important;padding-left:46px!important;gap:22px!important}
.schedule-panel .timeline:before{content:""!important;display:block!important;position:absolute!important;left:17px!important;top:24px!important;bottom:24px!important;width:0!important;background:none!important;border-left:3px dashed #9fd3d6!important}
.schedule-panel .activity{position:relative!important;counter-increment:stop}
.schedule-panel .activity:before{content:counter(stop);position:absolute;left:-46px;top:14px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#117f89;color:#fff;font-weight:800;font-size:.95rem;box-shadow:0 0 0 4px #f6f7f9;z-index:1}
.schedule-panel .activity:first-child:before{background:#22203e}
.schedule-panel .activity.is-stay:before{content:"🏨";background:#ffd33f;font-size:1rem}
.schedule-panel .activity:not(:last-child):after{content:"↓";position:absolute;left:-36px;bottom:-21px;width:16px;text-align:center;color:#117f89;font-weight:800;font-size:.8rem;line-height:1;background:#f6f7f9;z-index:1}
.schedule-panel .activity:first-child .activity-card-top strong:before{content:"จุดเริ่มต้น";display:block;margin-bottom:3px;font-size:.7rem;font-weight:700;letter-spacing:.04em;color:#117f89}
.route-hint{margin:2px 0 0;font-size:.8rem;color:#6d7773;font-weight:600}
html[data-theme="dark"] .schedule-panel .activity:before{box-shadow:0 0 0 4px #22233a}
html[data-theme="dark"] .schedule-panel .activity:not(:last-child):after{background:#22233a;color:#7fd8de}
html[data-theme="dark"] .schedule-panel .timeline:before{border-color:#4f7281!important}
@media(max-width:650px){.schedule-panel .timeline{padding-left:40px!important}.schedule-panel .timeline:before{left:14px!important}.schedule-panel .activity:before{left:-40px;width:31px;height:31px;font-size:.85rem}.schedule-panel .activity:not(:last-child):after{left:-32px}}
.activity-when{display:inline-flex;gap:4px;align-items:center;margin:0 0 6px;padding:4px 10px;border-radius:999px;background:#ffffffc9;color:#117f89;font-size:.8rem;font-weight:600}.activity-when b{font-weight:800;color:#22203e}
html[data-theme="dark"] .activity-when{background:#ffffff14;color:#7fd8de}html[data-theme="dark"] .activity-when b{color:#fff}
/* Stop cards v2: time under number, ref chip, money footer, insert-between */
.schedule-panel .activity:not(:last-child):after{display:none}
.schedule-panel .activity .activity-time{display:block!important;position:absolute;left:-52px;top:56px;width:48px;text-align:center;font:700 .74rem/1 "DM Sans",monospace;color:#22203e;background:#f6f7f9;padding:3px 0;z-index:1}
.schedule-panel .timeline{gap:0!important}
.schedule-panel .activity{margin:0!important}
.activity-card-top{flex-wrap:wrap}
.activity-ref{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:999px;background:#e3f4f3;color:#117f89;border:1px solid #bfe3e0;font-size:.76rem;font-weight:700;white-space:nowrap}
.activity-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;padding-top:11px;border-top:1px solid #1f26401a}
.activity-foot .activity-cost{margin-top:0!important}
.activity-foot .activity-payline{display:block;margin-top:5px}
.activity-nocost{font-size:.78rem;color:#9aa0aa}
.activity-edit{flex:0 0 auto;display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#ffffffb3;border:1px solid #1f26401a;color:#5d6472}
.activity-main:hover .activity-edit{color:#117f89;border-color:#117f89}
.insert-stop{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin:6px 0;padding:8px 0;border:0;background:none;color:#8a8f9c;font-size:.8rem;font-weight:600;cursor:pointer}
.insert-stop:before{content:"";position:absolute;left:0;right:0;top:50%;border-top:1.5px dashed #d5d9e0}
.insert-stop>*,.insert-stop{z-index:0}
.insert-stop span{color:#117f89;font-size:1rem;font-weight:800}
.insert-stop{isolation:isolate}
.insert-stop::after{content:"";position:absolute;inset:4px auto 4px 50%;transform:translateX(-50%);width:min(290px,96%);border-radius:999px;background:#fff;border:1px solid #e4e7ec;z-index:-1}
.insert-stop:hover{color:#117f89}.insert-stop:hover::after{border-color:#117f89}
html[data-theme="dark"] .schedule-panel .activity .activity-time{background:#22233a;color:#f4f3ff}
html[data-theme="dark"] .activity-ref{background:#174e57;color:#d8fffb;border-color:#24707a}
html[data-theme="dark"] .activity-edit{background:#ffffff12;color:#c7c6d8;border-color:#ffffff1f}
html[data-theme="dark"] .insert-stop::after{background:#22233a;border-color:#3a3b58}
html[data-theme="dark"] .activity-foot{border-color:#ffffff1a}
@media(max-width:650px){.schedule-panel .activity .activity-time{left:-45px;top:50px;width:40px;font-size:.68rem}}
.insert-stop:before{z-index:-2}.insert-stop::after{z-index:-1}
/* Photo button + viewer */
.activity-card{position:relative}
.photo-viewer{width:min(720px,calc(100% - 24px));max-height:90vh;padding:0;border:0;border-radius:22px;background:#fff;color:#22203e;box-shadow:0 25px 70px #0005}
.photo-viewer::backdrop{background:#0d1b1fb3}
.pv-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 16px}
.pv-title{font-size:1rem;line-height:1.3}
.pv-close{width:34px;height:34px;flex:0 0 auto;border:0;border-radius:50%;background:#f1f3f6;font-size:.95rem;cursor:pointer}
.pv-strip{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;padding:0 16px}
.pv-strip img{flex:0 0 88%;height:min(60vh,420px);object-fit:cover;border-radius:14px;scroll-snap-align:center;background:#eef1f4}
.pv-msg{margin:10px 16px 16px;font-size:.8rem;color:#6d7773;text-align:center}
html[data-theme="dark"] .photo-viewer{background:#22233a;color:#f4f3ff}
html[data-theme="dark"] .pv-close{background:#30314c;color:#f4f3ff}
.activity-media{position:absolute;right:14px;bottom:14px;display:flex;gap:8px;z-index:2}
.activity-card .activity-edit{margin-left:auto}
.activity-foot{padding-right:96px}
.media-btn{position:relative;display:grid;place-items:center;width:38px;height:38px;border-radius:12px;border:1px solid #bfe3e0;background:#e3f4f3;color:#117f89;cursor:pointer}
.media-btn:hover{background:#117f89;color:#fff}
.media-btn.has-slip{background:#fff4cc;border-color:#f2cd63;color:#8a5b00}
.media-btn i{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:#e5533d;color:#fff;font:700 .66rem/18px sans-serif;font-style:normal}
.slip-fig{flex:0 0 88%;margin:0;position:relative;scroll-snap-align:center}.slip-fig img{width:100%;height:min(60vh,420px);object-fit:contain;background:#f1f3f6;border-radius:14px}
.slip-del{position:absolute;top:8px;right:8px;border:0;border-radius:999px;padding:5px 11px;background:#000a;color:#fff;font-size:.75rem;cursor:pointer}
.slip-add{display:block;margin:12px 16px 0;padding:12px;border:1.5px dashed #9fd3d6;border-radius:14px;text-align:center;color:#117f89;font-weight:700;cursor:pointer}
html[data-theme="dark"] .media-btn{background:#174e57;color:#d8fffb;border-color:#24707a}
html[data-theme="dark"] .media-btn.has-slip{background:#4b3d14;color:#ffe08a;border-color:#7a6320}
html[data-theme="dark"] .slip-fig img{background:#30314c}
.pv-tabs{display:flex;gap:6px;margin:0 16px 12px;padding:4px;border-radius:14px;background:#f1f3f6}
.pv-tabs button{flex:1;border:0;border-radius:11px;padding:9px 6px;background:none;color:#6d7773;font-weight:700;font-size:.82rem;cursor:pointer}
.pv-tabs button.on{background:#fff;color:#117f89;box-shadow:0 2px 6px #1f26401a}
.slip-fig figcaption{position:absolute;left:8px;bottom:8px;padding:3px 9px;border-radius:999px;background:#000a;color:#fff;font-size:.72rem}
html[data-theme="dark"] .pv-tabs{background:#30314c}html[data-theme="dark"] .pv-tabs button.on{background:#22233a;color:#7fd8de}
/* Share panel: list only; add-forms collapse behind a compact toggle */
.share-add{margin-top:12px}
.share-add summary{list-style:none;display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:999px;background:#e3f4f3;color:#117f89;font-weight:700;font-size:.84rem;cursor:pointer;user-select:none}
.share-add summary::-webkit-details-marker{display:none}
.share-add summary span{font-weight:800}
.share-add[open] summary{background:#117f89;color:#fff}
.share-add[open] summary span{display:inline-block;transform:rotate(45deg)}
.share-panel .invite-form{display:flex!important;gap:8px!important;align-items:center}
.share-panel .invite-form input{flex:1;min-width:0;height:42px;padding:0 14px!important;border-radius:12px!important;font-size:.88rem!important}
.share-panel .invite-form .primary-button{flex:0 0 auto;width:auto!important;height:42px;padding:0 16px!important;border-radius:12px!important;font-size:.85rem!important;margin:0!important}
.share-panel .share-copy--mt{margin:14px 0 6px!important;font-size:.8rem!important}
html[data-theme="dark"] .share-add summary{background:#174e57;color:#d8fffb}
.share-panel .invite-form{flex-direction:row!important}.share-panel .invite-form input{width:auto!important;text-align:left!important}
/* Unified teal icon buttons */
.activity-when .when-ico{flex:0 0 auto;color:#117f89}
.activity-card .activity-nav,.activity-card .activity-edit,.media-btn{display:grid!important;place-items:center!important;width:36px!important;height:36px!important;padding:0!important;margin:0!important;border-radius:11px!important;border:1px solid #bfe3e0!important;background:#e3f4f3!important;color:#117f89!important;box-shadow:none!important;font-size:0!important}
.activity-card .activity-nav svg{width:18px!important;height:18px!important}
.activity-card .activity-nav:hover,.activity-main:hover .activity-edit,.media-btn:hover{background:#117f89!important;color:#fff!important;border-color:#117f89!important}
.media-btn.has-slip{background:#fff4cc!important;border-color:#f2cd63!important;color:#8a5b00!important}
.activity-foot{padding-right:88px}
html[data-theme="dark"] .activity-card .activity-nav,html[data-theme="dark"] .activity-card .activity-edit,html[data-theme="dark"] .media-btn{background:#174e57!important;color:#d8fffb!important;border-color:#24707a!important}
html[data-theme="dark"] .activity-when .when-ico{color:#7fd8de}
@media(max-width:650px){.activity-card .activity-nav,.activity-card .activity-edit,.media-btn{width:32px!important;height:32px!important;border-radius:10px!important}.activity-card .activity-nav{transform:none!important}}
.activity-foot{align-items:flex-end!important}.activity-foot .activity-edit{position:relative;top:3px}
/* Nearby suggestions */
.near-list{display:grid;gap:10px;padding:0 16px 16px;max-height:62vh;overflow:auto}
.near-radius{display:flex;gap:7px;overflow:auto;padding:10px 16px 8px}.near-radius button{flex:0 0 auto;border:1px solid #d9e4e2;border-radius:999px;padding:7px 11px;background:#fff;color:#55706c;font:inherit;font-size:.78rem;font-weight:700;cursor:pointer}.near-radius button.on{border-color:#14838d;background:#14838d;color:#fff}
.near-item{display:flex;gap:12px;padding:10px;border-radius:16px;background:#f6f7f9}
.near-item img,.near-noimg{flex:0 0 74px;width:74px;height:74px;border-radius:12px;object-fit:cover;background:#e3f4f3}
.near-info{min-width:0;display:flex;flex-direction:column;gap:3px}
.near-info strong{font-size:.92rem;line-height:1.3}
.near-meta{font-size:.76rem;color:#6d7773}.near-meta small{color:#9aa0aa}
.near-actions{display:flex;gap:10px;align-items:center;margin-top:auto;font-size:.78rem}
.near-actions a{color:#6d7773;text-decoration:underline}
.near-actions button{border:0;border-radius:999px;padding:5px 11px;background:#117f89;color:#fff;font-weight:700;font-size:.76rem;cursor:pointer}
.near-actions button:disabled{background:#d4f1ee;color:#117f89}
.photo-viewer .pv-tabs button{font-size:.78rem}
html[data-theme="dark"] .near-item{background:#30314c}html[data-theme="dark"] .near-meta,html[data-theme="dark"] .near-actions a{color:#b9b8cc}
/* Nested side stops */
.substops{margin:10px 0 0;padding:8px 0 0 14px;border-left:2px dashed #9fd3d6;margin-left:4px}
.substops-head{margin:0 0 6px;font-size:.7rem;font-weight:700;color:#117f89;letter-spacing:.02em}
.substop{display:flex;align-items:center;gap:8px;padding:6px 8px;margin-bottom:6px;border-radius:12px;background:#ffffffc7}
.substop-dot{flex:0 0 8px;height:8px;border-radius:50%;background:#117f89}.substop-dot.food{background:#f3a34e}
.substop-body{flex:1;min-width:0;display:flex;flex-direction:column}
.substop-body strong{font-size:.82rem;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.substop-body small{font-size:.68rem;color:#6d7773}
.substop-btn{flex:0 0 auto;display:grid;place-items:center;width:28px;height:28px;border-radius:9px;border:1px solid #bfe3e0;background:#e3f4f3;color:#117f89;font-size:.72rem;cursor:pointer;text-decoration:none}
.substop-btn:hover{background:#117f89;color:#fff}
.activity-card:has(.substops) .activity-media{bottom:auto;top:auto;position:static;justify-content:flex-end;margin-top:8px}
html[data-theme="dark"] .substop{background:#ffffff0f}html[data-theme="dark"] .substop-btn{background:#174e57;color:#d8fffb;border-color:#24707a}
.activity-card:has(.substops) .activity-media{position:relative!important;right:auto!important;bottom:auto!important;display:flex!important;justify-content:flex-end;margin:-38px 0 4px!important;pointer-events:none}.activity-card:has(.substops) .activity-media>*{pointer-events:auto}@media(max-width:650px){.activity-card:has(.substops) .activity-media{margin-top:-34px!important}}
.activity-foot{padding-right:132px!important}@media(max-width:650px){.activity-foot{padding-right:118px!important}}
/* Side stops: explicit parent link + tree connectors */
.substops{position:relative;margin:12px 0 0 6px!important;padding:10px 10px 4px 22px!important;border-left:0!important;border-radius:14px;background:#117f890d}
.substops:before{content:"";position:absolute;left:10px;top:-12px;bottom:26px;border-left:2px solid #9fd3d6}
.substops-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin:0 0 8px!important;font-size:.72rem!important;color:#5d6472!important;font-weight:600!important;overflow:hidden}
.substops-from{flex:0 0 auto;padding:2px 8px;border-radius:999px;background:#117f89;color:#fff;font-weight:700}
.substops-from b{font-weight:800}
.substop{position:relative}
.substop:before{content:"";position:absolute;left:-12px;top:50%;width:12px;border-top:2px solid #9fd3d6}
.substop-num{flex:0 0 auto;min-width:30px;height:22px;padding:0 6px;border-radius:999px;display:grid;place-items:center;background:#e3f4f3;color:#117f89;border:1px solid #9fd3d6;font:800 .68rem/1 "DM Sans",sans-serif}
.substop-num.food{background:#fff1dc;color:#b5651d;border-color:#f3c48e}
html[data-theme="dark"] .substops{background:#ffffff08}
html[data-theme="dark"] .substops:before,html[data-theme="dark"] .substop:before{border-color:#4f7281}
html[data-theme="dark"] .substops-head{color:#b9b8cc!important}
html[data-theme="dark"] .substop-num{background:#174e57;color:#d8fffb;border-color:#24707a}
html[data-theme="dark"] .substop-num.food{background:#4b3416;color:#ffd39a;border-color:#7a5320}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field-row .field{min-width:0}
.nostart-check{display:flex;align-items:center;gap:8px;margin:-4px 0 14px;font-size:.82rem;font-weight:600;color:#5d6472;cursor:pointer}
.nostart-check input{width:18px;height:18px;accent-color:#117f89;margin:0}
.field-row:has(+ .nostart-check input:checked) .field:first-child{opacity:.35;pointer-events:none}
.field-row:has(+ .nostart-check input:checked) .field:first-child input{text-decoration:line-through}
.field-row input{min-width:0;width:100%}
/* Action row: nav pin joins photo / nearby / slip under the card */
.activity-card .activity-media{position:static!important;display:flex!important;justify-content:flex-end;gap:8px!important;margin:10px 0 0!important;padding-top:10px;border-top:1px dashed #1f26401a;pointer-events:auto!important}
.activity-card .activity-media .activity-nav{position:static!important;top:auto!important;right:auto!important}
.activity-card-top{padding-right:0!important}
.activity-foot{padding-right:0!important}
.activity-foot .activity-edit{top:0}
.plusday{margin-left:4px;padding:1px 6px;border-radius:999px;background:#fff1dc;color:#b5651d;font-style:normal;font-weight:800;font-size:.68rem}
.nostart-check.arrive-day select{flex:1;height:36px;border-radius:10px;border:0;background:#f1f3f6;padding:0 10px;font:inherit}
html[data-theme="dark"] .activity-card .activity-media{border-color:#ffffff1a}
.schedule-panel .activity-card .activity-media .activity-nav{display:grid!important;place-items:center!important;width:36px!important;height:36px!important;padding:0!important;margin:0!important;border-radius:11px!important;border:1px solid #bfe3e0!important;background:#e3f4f3!important;color:#117f89!important;box-shadow:none!important;font-size:0!important;transform:none!important}
.schedule-panel .activity-card .activity-media .activity-nav svg{width:18px!important;height:18px!important}
.schedule-panel .activity-card .activity-media .activity-nav:hover{background:#117f89!important;color:#fff!important}
.activity-media .media-edit{margin-right:auto}
.activity-foot .activity-edit{display:none!important}
html[data-theme="dark"] .schedule-panel .activity-card .activity-media .activity-nav{background:#174e57!important;color:#d8fffb!important;border-color:#24707a!important}
@media(max-width:650px){.schedule-panel .activity-card .activity-media .activity-nav{width:32px!important;height:32px!important;border-radius:10px!important}}
button.substop-body{border:0;background:none;padding:0;text-align:left;cursor:pointer;font:inherit;color:inherit}
button.substop-body:hover strong{color:#117f89;text-decoration:underline}
.substop-body small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sub-photos img{height:min(42vh,300px)!important}
.sub-info{padding:12px 16px 16px;font-size:.86rem}.sub-info p{margin:0 0 6px}.sub-addr{color:#6d7773;font-size:.8rem}
.sub-links{display:flex;gap:8px;margin-top:10px}.sub-links a{flex:1;text-align:center;padding:10px;border-radius:12px;background:#e3f4f3;color:#117f89;font-weight:700;text-decoration:none}.sub-links a+a{background:#117f89;color:#fff}
/* Labeled action toolbar */
.schedule-panel .activity-card .activity-media{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:6px!important}
.schedule-panel .activity-card .activity-media .media-btn,.schedule-panel .activity-card .activity-media .activity-nav{width:auto!important;height:auto!important;min-height:52px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:7px 2px!important;border-radius:14px!important;font-size:0!important;text-decoration:none}
.activity-media svg{width:19px!important;height:19px!important;flex:0 0 auto}
.activity-media .mb-label{font-size:.68rem;font-weight:700;line-height:1;letter-spacing:.01em}
.activity-media .media-btn i{top:4px!important;right:calc(50% - 22px)!important}
.activity-media .media-edit{background:#fff!important;border-color:#e4e7ec!important;color:#5d6472!important}
.activity-media .media-edit:hover{background:#22203e!important;color:#fff!important;border-color:#22203e!important}
html[data-theme="dark"] .activity-media .media-edit{background:#ffffff12!important;border-color:#ffffff1f!important;color:#c7c6d8!important}
@media(max-width:650px){.schedule-panel .activity-card .activity-media .media-btn,.schedule-panel .activity-card .activity-media .activity-nav{width:auto!important;height:auto!important;min-height:48px;border-radius:12px!important}.activity-media .mb-label{font-size:.64rem}}
/* Prevent horizontal overflow on phones */
.schedule-panel,.schedule-panel .timeline{min-width:0;max-width:100%}
.schedule-panel .timeline>*{min-width:0;max-width:100%}
.schedule-panel .activity-card{min-width:0;max-width:100%;overflow:hidden;box-sizing:border-box}
.activity-main{min-width:0;max-width:100%;width:100%}
.activity-card p,.activity-card-top strong{overflow-wrap:anywhere}
.activity-place-cover,.activity-place-cover img{max-width:100%}
.substops{min-width:0;max-width:100%}
.substops-head{flex-wrap:nowrap!important;min-width:0}
.substops-head>span{flex:0 0 auto}
.substops-head{white-space:nowrap;text-overflow:ellipsis}
.substop{min-width:0}
button.substop-body{flex:1 1 0;min-width:0;width:0;display:flex;flex-direction:column}
.substop-body strong,.substop-body small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:780px){.planner-grid{grid-template-columns:minmax(0,1fr)!important}.planner-grid>*{min-width:0!important;max-width:100%}}.app-shell,#plannerContent{max-width:100%;min-width:0}
.activity-card:has(.substops) .activity-media{margin:10px 0 0!important}.substop a.substop-btn{display:none}
/* Clear money summary + no overlap */
.activity-foot{display:block!important;padding:0!important;border-top:0!important;margin-top:10px!important}
.activity-foot-money{width:100%}
.money-box{padding:10px 12px;border-radius:14px;background:#fff;border:1px solid #e9ecef}
.money-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.money-label{font-size:.72rem;font-weight:700;color:#6d7773;letter-spacing:.02em}
.money-amt{font:800 1.25rem/1.1 "DM Sans","Noto Sans Thai",sans-serif;color:#22203e;letter-spacing:-.01em}
.money-jpy{display:block;text-align:right;font-size:.72rem;color:#9aa0aa;margin-top:2px}
.money-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;padding-top:8px;border-top:1px dashed #e4e7ec}
.money-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:999px;background:#f4f6f8;font-size:.72rem;color:#5d6472}
.money-chip b{color:#22203e}
.activity-nocost{display:block;padding:8px 12px;border-radius:12px;border:1px dashed #d5d9e0;font-size:.76rem;color:#9aa0aa;text-align:center}
.schedule-panel .activity-card .activity-media,.schedule-panel .activity-card:has(.substops) .activity-media{position:static!important;margin:10px 0 0!important;transform:none!important}
html[data-theme="dark"] .money-box{background:#ffffff0d;border-color:#ffffff1a}
html[data-theme="dark"] .money-amt,html[data-theme="dark"] .money-chip b{color:#f4f3ff}
html[data-theme="dark"] .money-chip{background:#ffffff12;color:#c7c6d8}
html[data-theme="dark"] .money-meta{border-color:#ffffff1a}
.schedule-panel .activity-card .activity-media>*{line-height:1!important;gap:4px!important}
/* From → To */
.from-field{margin:0 0 12px}
.from-field summary{list-style:none;display:inline-flex;gap:6px;padding:7px 12px;border-radius:999px;background:#e3f4f3;color:#117f89;font-weight:700;font-size:.8rem;cursor:pointer}
.from-field summary::-webkit-details-marker{display:none}
.from-field[open] summary{margin-bottom:10px}
.from-wrap{position:relative}
.from-suggest{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:5;display:grid;background:#fff;border-radius:12px;box-shadow:0 12px 30px #0002;overflow:hidden}
.from-suggest button{border:0;background:none;padding:10px 12px;text-align:left;font:inherit;font-size:.85rem;border-bottom:1px solid #f1f3f6;cursor:pointer}
.from-suggest button:hover{background:#e3f4f3}
.route-line{display:flex;align-items:flex-start;gap:8px;margin:2px 0 4px}
.route-mode{flex:0 0 auto;display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#e3f4f3;font-size:1rem}
.route-ends{display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;font-weight:800;font-size:1rem;line-height:1.3;color:#22203e;min-width:0;overflow-wrap:anywhere}
.route-ends i{font-style:normal;color:#117f89}
.route-line+.activity-card-top strong{display:none}
html[data-theme="dark"] .route-ends{color:#f4f3ff}html[data-theme="dark"] .route-mode{background:#174e57}
html[data-theme="dark"] .from-suggest{background:#22233a}html[data-theme="dark"] .from-suggest button{color:#f4f3ff;border-color:#30314c}
@media(max-width:650px){.route-ends{font-size:.92rem}.route-mode{width:26px;height:26px;font-size:.9rem}}
/* Route details */
.route-info{margin:6px 0 8px;padding:9px 11px;border-radius:12px;background:#ffffffc7;border:1px solid #e4e7ec}
.route-sum{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:.78rem;font-weight:700;color:#22203e}
.route-legs{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:6px}
.route-legs li{display:flex;gap:8px;align-items:flex-start;font-size:.8rem}
.route-legs .leg-ico{flex:0 0 24px;height:24px;display:grid;place-items:center;border-radius:8px;background:#e3f4f3}
.route-legs b{display:block;color:#22203e}.route-legs small{color:#6d7773;overflow-wrap:anywhere}
.route-msg{margin:0!important;font-size:.74rem!important;color:#6d7773!important;line-height:1.45}
html[data-theme="dark"] .route-info{background:#ffffff0d;border-color:#ffffff1a}html[data-theme="dark"] .route-sum,html[data-theme="dark"] .route-legs b{color:#f4f3ff}
/* Activity form sections */
#formFields .fsec{margin:0 0 12px;padding:12px 14px 4px;border-radius:18px;background:#f6f7f9;border:1px solid #eceef2}
#formFields .fsec h3{display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:.86rem;font-weight:800;color:#22203e}
#formFields .fsec h3 span{display:grid;place-items:center;width:26px;height:26px;border-radius:9px;background:#e3f4f3;font-size:.85rem}
#formFields .fsec .field{margin-bottom:10px}
#formFields .fsec .field label{font-size:.74rem!important}
#formFields .fsec input:not([type=checkbox]),#formFields .fsec select,#formFields .fsec textarea{background:#fff!important;border:1px solid #e4e7ec!important;border-radius:12px!important;min-height:44px;font-size:.95rem!important}
#formFields .fsec input:focus,#formFields .fsec select:focus,#formFields .fsec textarea:focus{outline:2px solid #9fd3d6;border-color:#117f89!important}
#formFields .fsec .from-field summary{margin-bottom:10px}
#formFields .fsec .nostart-check{margin:0 0 10px}
#formFields .fsec-place{background:#eef8f7;border-color:#d4ece9}
#formFields .fsec-money{background:#fffaf0;border-color:#f6e7c4}
#formFields .fsec-money h3 span{background:#fff1c8}
#formFields .fsec .cost-hint{font-size:.7rem}
html[data-theme="dark"] #formFields .fsec{background:#ffffff08;border-color:#ffffff14}
html[data-theme="dark"] #formFields .fsec h3{color:#f4f3ff}
html[data-theme="dark"] #formFields .fsec input:not([type=checkbox]),html[data-theme="dark"] #formFields .fsec select,html[data-theme="dark"] #formFields .fsec textarea{background:#30314c!important;border-color:#3a3b58!important;color:#f4f3ff}
/* Smart slips */
.slip-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 16px}
.slip-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:13px 8px;border-radius:14px;background:#117f89;color:#fff;font-weight:800;font-size:.88rem;cursor:pointer}
.slip-btn.alt{background:#e3f4f3;color:#117f89;border:1px solid #bfe3e0}
.slip-card{margin:10px 16px 14px;border-radius:18px;background:#f6f7f9;border:1px solid #eceef2;overflow:hidden}
.slip-img{position:relative;background:#eef1f4}.slip-img img{display:block;width:100%;max-height:240px;object-fit:contain}
.rc,.rc-read,.rc-msg{margin:12px}
.rc-read{display:block;width:calc(100% - 24px);padding:12px;border:1.5px dashed #9fd3d6;border-radius:14px;background:#fff;color:#117f89;font-weight:800;cursor:pointer}
.rc-msg{font-size:.82rem;color:#5d6472}.rc-msg.err{color:#c0392b}
.rc-head b{display:block;font-size:1rem}.rc-head small{color:#9aa0aa}.rc-head p{margin:6px 0 0;font-size:.8rem;color:#5d6472}
.rc-ask{margin:12px 0 6px;font-size:.74rem;font-weight:700;color:#117f89}
.rc-items{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.rc-items li{padding:10px;border-radius:14px;background:#fff;border:1px solid #eceef2}
.rc-line{display:flex;justify-content:space-between;gap:10px}.rc-line span{min-width:0}.rc-line b{display:block;font-size:.88rem}.rc-line small{display:block;font-size:.7rem;color:#9aa0aa;overflow-wrap:anywhere}.rc-line em{font-style:normal;font-weight:800;white-space:nowrap}
.rc-who{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.rc-who button{border:1px solid #d5d9e0;background:#fff;border-radius:999px;padding:5px 11px;font-size:.76rem;font-weight:700;color:#5d6472;cursor:pointer}
.rc-who button.on{background:#117f89;border-color:#117f89;color:#fff}
.rc-who .rc-all{border-style:dashed;color:#117f89}
.rc-total{margin-top:10px;padding:10px 12px;border-radius:14px;background:#fff}.rc-total div{display:flex;justify-content:space-between;font-size:.8rem;color:#5d6472}.rc-total .rc-sum{margin-top:4px;font-size:1rem;font-weight:800;color:#22203e}
.rc-per{margin-top:10px;padding:10px 12px;border-radius:14px;background:#fffaf0;border:1px solid #f6e7c4}.rc-per p{margin:0 0 6px;font-weight:800;font-size:.82rem}.rc-per div{display:flex;justify-content:space-between;font-size:.86rem;padding:3px 0}.rc-per small{color:#9aa0aa;font-weight:500}
.rc-use{display:block;width:100%;margin-top:10px;padding:12px;border:0;border-radius:14px;background:#ffd33f;color:#22203e;font-weight:800;cursor:pointer;box-shadow:0 3px 0 #dfa916}
html[data-theme="dark"] .slip-card,html[data-theme="dark"] .rc-items li,html[data-theme="dark"] .rc-total,html[data-theme="dark"] .rc-read{background:#30314c;border-color:#3a3b58;color:#f4f3ff}
html[data-theme="dark"] .rc-who button{background:#22233a;color:#c7c6d8;border-color:#3a3b58}html[data-theme="dark"] .rc-who button.on{background:#117f89;color:#fff}
html[data-theme="dark"] .rc-per{background:#4b3d14;border-color:#7a6320}html[data-theme="dark"] .rc-total .rc-sum{color:#f4f3ff}
/* Chat online bar */
.chat-online{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:8px 0 4px;font-size:.78rem;color:#2c6e4f}
.chat-online .dot{width:9px;height:9px;border-radius:50%;background:#2ecc71;box-shadow:0 0 0 3px #2ecc7133;animation:onpulse 2s infinite}
@keyframes onpulse{50%{box-shadow:0 0 0 6px #2ecc7111}}
.chat-online-chip{padding:3px 10px;border-radius:999px;background:#e5f7ec;color:#1e7a4b;font-weight:700}
.chat-online-chip.me{background:#e3f4f3;color:#117f89}
.chat-toast{position:fixed;left:50%;top:76px;transform:translateX(-50%);z-index:40;padding:8px 14px;border-radius:999px;background:#22203e;color:#fff;font-size:.8rem;font-weight:700;box-shadow:0 8px 20px #0003;animation:toastin .25s ease}
@keyframes toastin{from{opacity:0;transform:translate(-50%,-8px)}}
/* LINE-style keyboard composer */
body.kb-open .mobile-tabbar{display:none!important}
body.kb-open .chat-form{bottom:var(--kb,0px)!important;padding-bottom:max(10px,env(safe-area-inset-bottom))}
#chatState{--kb:0px}
body.kb-open .chat-state{padding-bottom:calc(84px + var(--kb,0px))}
.chat-form textarea{font-size:16px!important;line-height:1.35;overflow-y:auto}
html[data-theme="dark"] .chat-online{color:#8ee2b4}html[data-theme="dark"] .chat-online-chip{background:#1d4733;color:#c8f2d8}
/* Chat attachments */
.chat-plus{flex:0 0 43px!important;width:43px!important;height:43px!important;border-radius:15px!important;background:#e3f4f3!important;color:#117f89!important;box-shadow:none!important;font-size:1.5rem!important;transition:transform .2s}
.chat-plus.on{transform:rotate(45deg);background:#117f89!important;color:#fff!important}
.chat-tray{position:fixed;left:12px;right:12px;bottom:calc(140px + var(--kb,0px));z-index:13;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:12px;border-radius:20px;background:#fff;box-shadow:0 12px 30px #0002}
body.kb-open .chat-tray{bottom:calc(68px + var(--kb,0px))}
.chat-tray button,.chat-tray label{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 4px;border:0;border-radius:14px;background:#f6f7f9;font:inherit;font-size:.78rem;font-weight:700;color:#22203e;cursor:pointer}
.chat-tray span{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#e3f4f3;font-size:1.3rem}
.chat-loc{display:flex;gap:10px;align-items:center;min-width:200px;margin:4px 0;padding:10px;border-radius:14px;background:#ffffffd9;color:inherit;text-decoration:none}
.chat-loc-pin{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#e3f4f3;font-size:1.3rem}
.chat-loc b,.chat-loc small,.chat-loc em{display:block}.chat-loc small{font-size:.7rem;color:#6d7773}.chat-loc em{font-style:normal;font-size:.74rem;font-weight:700;color:#117f89;margin-top:2px}
.chat-img{display:block;margin:4px 0;padding:0;border:0;background:#eef1f4;border-radius:14px;overflow:hidden;min-width:140px;min-height:90px;cursor:pointer}
.chat-img img{display:block;max-width:min(240px,62vw);max-height:300px;object-fit:cover}
.chat-img span{display:block;padding:30px 14px;font-size:.75rem;color:#6d7773}
html[data-theme="dark"] .chat-tray{background:#22233a}html[data-theme="dark"] .chat-tray button,html[data-theme="dark"] .chat-tray label{background:#30314c;color:#f4f3ff}
html[data-theme="dark"] .chat-loc{background:#ffffff14}
/* Compact LINE-style attach row inside the input bar */
.chat-form{flex-wrap:wrap}
.chat-tray{position:static!important;order:-1;flex:0 0 100%;display:flex!important;gap:18px;justify-content:flex-start;padding:2px 4px 8px!important;margin:0!important;background:none!important;box-shadow:none!important;border-radius:0!important}
.chat-tray[hidden]{display:none!important}
.chat-tray button,.chat-tray label{flex-direction:column;gap:3px;padding:0!important;background:none!important;font-size:.66rem!important;color:#5d6472!important}
.chat-tray span{width:38px!important;height:38px!important;font-size:1.05rem!important;border-radius:12px!important}
.chat-plus{flex:0 0 38px!important;width:38px!important;height:38px!important;border-radius:12px!important;font-size:1.3rem!important;align-self:center}
.chat-state{padding-bottom:110px!important}
body.chat-tray-open .chat-state{padding-bottom:170px!important}
.chat-messages{scroll-padding-bottom:20px}
html[data-theme="dark"] .chat-tray button,html[data-theme="dark"] .chat-tray label{color:#c7c6d8!important}
/* Trip list groups */
.trip-group-head{list-style:none;display:flex;align-items:center;gap:8px;margin:14px 2px 4px;font-weight:800;font-size:.92rem;color:#22203e}
.trip-group-head:first-child{margin-top:0}
.trip-group-head span{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#e3f4f3}
.trip-group-head small{margin-left:auto;padding:2px 9px;border-radius:999px;background:#f1f3f6;color:#6d7773;font-size:.72rem}
.trip-card--shared{border-left:4px solid #9fd3d6}
.trip-owner-tag{display:inline-flex;align-self:flex-start;margin-bottom:4px;padding:2px 9px;border-radius:999px;background:#fff1dc;color:#b5651d;font-size:.7rem;font-weight:800}
html[data-theme="dark"] .trip-group-head{color:#f4f3ff}html[data-theme="dark"] .trip-group-head small{background:#30314c;color:#c7c6d8}html[data-theme="dark"] .trip-owner-tag{background:#4b3416;color:#ffd39a}
.join-plan-button{border:1px solid #bfe3e0;background:#e3f4f3;color:#117f89;border-radius:999px;padding:10px 16px;font:inherit;font-weight:800;font-size:.85rem;cursor:pointer}
.join-plan-button:hover{background:#117f89;color:#fff}
.empty-actions .join-plan-button{width:100%;margin-top:8px}
.create-join{display:block;width:calc(100% - 32px);margin:4px 16px 8px;padding:10px 14px;border:1px dashed #9fd3d6;border-radius:14px;background:#f4fbfa;color:#5d6472;font:inherit;font-size:.8rem;text-align:left;cursor:pointer}
.create-join b{color:#117f89}
html[data-theme="dark"] .join-plan-button{background:#174e57;color:#d8fffb;border-color:#24707a}html[data-theme="dark"] .create-join{background:#ffffff08;color:#c7c6d8}
.signed-out-state .guest-login{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;max-width:340px;margin:12px auto 0;padding:15px 18px;border-radius:999px;border:2px solid #ffffffcc;background:#ffffff26;color:#fff;font:inherit;font-weight:800;font-size:1rem;cursor:pointer}
.signed-out-state .guest-login:hover{background:#ffffff40}
/* Avatar picker: big 3-column cards with names */
#roomAccessDialog .guest-avatar-picker legend{font-size:1.05rem!important;font-weight:800;color:#22203e!important;padding-bottom:12px!important}
#roomAccessDialog .guest-avatar-choices{grid-template-columns:repeat(3,1fr)!important;gap:12px!important;max-height:52vh;overflow-y:auto;padding:2px 2px 6px}
#roomAccessDialog .guest-avatar-choices button{aspect-ratio:1/1;min-height:0!important;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:10px!important;padding:12px 6px!important;border:2px solid #e9ecef!important;border-radius:22px!important;background:#fff!important;font-size:2.6rem!important;line-height:1;transform:none!important;transition:border-color .15s,background .15s}
#roomAccessDialog .guest-avatar-choices button img{width:64%!important;height:auto!important;max-height:64px}
#roomAccessDialog .guest-avatar-choices button span{font-size:.82rem!important;font-weight:700;color:#22203e;white-space:normal!important;text-align:center;line-height:1.2}
#roomAccessDialog .guest-avatar-choices button.is-selected{border-color:#117f89!important;background:#eef8f7!important;box-shadow:0 0 0 3px #117f8922}
html[data-theme="dark"] #roomAccessDialog .guest-avatar-choices button{background:#30314c!important;border-color:#3a3b58!important}
html[data-theme="dark"] #roomAccessDialog .guest-avatar-choices button span,html[data-theme="dark"] #roomAccessDialog .guest-avatar-picker legend{color:#f4f3ff!important}
#roomAccessDialog .guest-avatar-choices button{aspect-ratio:auto!important;min-height:118px!important}#roomAccessDialog .guest-avatar-choices button span{flex:0 0 auto!important;height:auto!important;overflow:visible!important}#roomAccessDialog .guest-avatar-choices button img{flex:0 0 auto;width:60px!important;height:60px!important;object-fit:contain}
/* Trip list header: 2 main actions + small secondary links */
.trip-list-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:10px!important;align-items:stretch;margin-top:14px}
.trip-list-actions .list-main{display:flex!important;align-items:center;justify-content:center;gap:8px;min-height:50px;padding:0 12px!important;border-radius:16px!important;font-size:.92rem!important;font-weight:800!important;white-space:nowrap;width:100%;margin:0!important}
.trip-list-actions #newTripButton{order:1;background:#ffd33f!important;color:#22203e!important;border:0!important;box-shadow:0 3px 0 #dfa916!important}
.trip-list-actions .join-plan-button.list-main{order:2;background:#fff!important;color:#117f89!important;border:1.5px solid #9fd3d6!important}
.trip-list-actions .list-mini{order:3;grid-column:span 1;display:inline-flex!important;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:0 10px!important;border:0!important;border-radius:12px!important;background:#f1f3f6!important;color:#5d6472!important;font-size:.8rem!important;font-weight:700!important}
.trip-list-actions .list-mini[hidden]{display:none!important}
.trip-list-actions:not(:has(#trashToggle:not([hidden]))) #importBtn{grid-column:span 2}
.trip-list-actions:not(:has(#newTripButton:not([hidden]))) .join-plan-button{grid-column:span 2}
.trip-group-head span{color:#117f89}
html[data-theme="dark"] .trip-list-actions .join-plan-button.list-main{background:#22233a!important;color:#7fd8de!important;border-color:#24707a!important}
html[data-theme="dark"] .trip-list-actions .list-mini{background:#30314c!important;color:#c7c6d8!important}
.trip-join-line{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px;font-size:.74rem;color:#5d6472;overflow-wrap:anywhere}
.trip-join-line i{font-style:normal;padding:2px 8px;border-radius:999px;background:#e3f4f3;color:#117f89;font-weight:800}
.trip-join-line i.ok{background:#e5f7ec;color:#1e7a4b}
html[data-theme="dark"] .trip-join-line{color:#c7c6d8}html[data-theme="dark"] .trip-join-line i{background:#174e57;color:#d8fffb}
