*{box-sizing:border-box}
:root{
  --blue:#2563eb;--blue2:#1d4ed8;--soft:#eef4ff;--text:#172033;--muted:#7c8798;
  --line:#e6eaf0;--bg:#f6f8fb;--danger:#dc2626;--warn:#b45309;--warnbg:#fff7ed;
}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif}
button,input,textarea,select{font:inherit}
button{cursor:pointer}.hidden{display:none!important}

/* START */
.start-screen{min-height:100vh;display:grid;place-items:center;padding:28px;background:linear-gradient(180deg,#f7fbff,#f6f8fb)}
.start-wrap{width:min(760px,100%)}
.start-brand{text-align:center;margin-bottom:22px}
.start-logo{font-size:42px;font-weight:950;color:var(--blue);letter-spacing:-1.5px}
.start-tag{font-size:14px;color:#6f7a8b;margin-top:4px}
.start-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:26px;box-shadow:0 14px 40px rgba(15,23,42,.08)}
.start-title{font-size:22px;font-weight:950;margin-bottom:3px}
.start-desc{font-size:12px;color:#8a94a4;margin-bottom:18px}
.form-label{display:block;font-size:11px;font-weight:850;color:#596579;margin:13px 0 5px}
.text-input{width:100%;height:44px;border:1px solid #dce2eb;border-radius:10px;padding:0 12px;background:#fff;color:var(--text);font-size:16px;outline:none}
.text-input::placeholder{color:#a8b0bd}
.range-display{width:100%;height:44px;border:1px solid #dce2eb;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-size:14px;color:#4b5563}
.member-add-row{display:flex;gap:8px}
.member-add-row .text-input{flex:1}
.small-primary{border:0;background:var(--blue);color:#fff;border-radius:9px;padding:0 13px;font-size:11px;font-weight:900}
.member-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.member-chip{display:inline-flex;align-items:center;gap:5px;background:#f4f6f9;border:1px solid var(--line);border-radius:999px;padding:6px 8px;font-size:10px;font-weight:850}
.member-chip button{border:0;background:transparent;color:#98a1ad;padding:0;font-size:12px}
.start-actions{display:flex;gap:9px;margin-top:20px}
.primary,.secondary{border-radius:10px;padding:11px 14px;font-weight:900}
.primary{border:0;background:var(--blue);color:#fff}
.secondary{border:1px solid var(--line);background:#fff;color:#465266}
.start-actions>*{flex:1}

/* APP COMMON */
.app-shell{min-height:100vh;background:#fff}
.topbar{position:sticky;top:0;z-index:50;height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.96);backdrop-filter:blur(10px)}
.top-left{display:flex;align-items:center;gap:12px}
.brand{font-size:25px;font-weight:950;color:var(--blue);letter-spacing:-.9px}
.member-top{font-size:11px;color:#7b8797;font-weight:800}
.top-actions{display:flex;gap:7px}
.top-btn{height:36px;padding:0 11px;border:1px solid var(--line);border-radius:9px;background:#fff;font-size:10px;font-weight:850;color:#526074}
.top-btn.share{color:var(--blue)}
.tripbar{padding:13px 20px;border-bottom:1px solid var(--line)}
.tripbar-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.trip-title-input{width:min(560px,70vw);border:0;background:transparent;font-size:22px;font-weight:950;color:var(--text);outline:none;padding:2px 0}
.date-btn{border:0;border-radius:9px;background:var(--soft);color:var(--blue);font-size:11px;font-weight:900;padding:8px 10px}

/* DESKTOP */
.desktop-ui{display:block}
.desktop-grid{display:grid;grid-template-columns:340px minmax(0,1fr);min-height:calc(100vh - 120px)}
.desktop-sidebar{padding:18px;border-right:1px solid var(--line);background:#fbfcfe}
.desktop-main{padding:20px 24px 34px;min-width:0}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}
.section-title{font-size:17px;font-weight:950;margin:0}
.inline-register{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;margin-bottom:10px}
.inline-register input{height:38px;font-size:14px;border:1px solid #dce2eb;border-radius:9px;padding:0 10px;outline:none}
.inline-register button{border:0;background:var(--blue);color:#fff;border-radius:8px;padding:0 12px;font-size:10px;font-weight:900}
.place-desc{font-size:10px;color:#96a0af;margin:-2px 0 10px}
.desktop-places{display:flex;flex-direction:column;gap:8px}
.desktop-place{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:7px;min-height:46px;padding:7px 7px 7px 5px;border:1px solid var(--line);border-radius:10px;background:#fff}
.drag-handle{touch-action:none;user-select:none;color:#a6afbc;letter-spacing:-2px;font-size:13px;text-align:center;cursor:grab}
.desktop-place-name{min-width:0;font-size:13px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.used{font-size:9px;font-weight:900;color:#2563eb;background:#eef4ff;border-radius:999px;padding:3px 6px;margin-left:6px}
.desktop-place-actions{display:flex;gap:4px}
.mini-btn{height:28px;border:1px solid var(--line);border-radius:7px;background:#fff;padding:0 7px;font-size:9px;font-weight:850;color:#657185}
.mini-btn.add{background:var(--soft);color:var(--blue);border-color:#dfe8ff}
.mini-btn.delete{color:var(--danger);background:#fff8f8;border-color:#fee2e2}
.tool-row{display:flex;gap:7px;margin-top:11px}
.tool{flex:1;border:1px dashed #cbd5e1;border-radius:8px;background:#fff;padding:8px;color:#667085;font-size:10px;font-weight:850;touch-action:none}
.error-box{display:none;margin-top:14px;padding:10px;border:1px solid #fed7aa;background:var(--warnbg);border-radius:9px;color:#9a3412;font-size:10px;line-height:1.5}
.error-box.show{display:block}
.error-title{font-weight:950;margin-bottom:4px}

.tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}
.tab{flex:0 0 auto;min-width:86px;border:1px solid var(--line);background:#f4f6f9;border-radius:8px;padding:9px 11px;font-size:10px;font-weight:850;color:#334155}
.tab.active{background:var(--blue);border-color:var(--blue);color:#fff}
.day-head{padding:12px 0 9px}
.day-name{font-size:15px;font-weight:950}
.day-start{display:flex;align-items:center;gap:6px;color:#7f8998;font-size:10px;font-weight:850;margin-top:7px}
.time-button{border:1px solid var(--line);background:#fff;border-radius:7px;padding:6px 8px;color:#344054;font-size:10px;font-weight:900;min-width:58px}
.schedule{border-top:1px solid var(--line)}
.item{position:relative;display:grid;grid-template-columns:20px 54px minmax(0,1fr);gap:8px;align-items:start;padding:10px 2px;border-bottom:1px solid var(--line);background:#fff}
.item.drop-before:before,.item.drop-after:after{content:attr(data-drop-label);position:absolute;left:0;right:0;height:24px;display:flex;align-items:center;justify-content:center;background:#eaf1ff;color:var(--blue);font-size:10px;font-weight:950;border:1px solid #bcd0ff;z-index:5}
.item.drop-before:before{top:-13px}.item.drop-after:after{bottom:-13px}
.item-time{font-size:10px;font-weight:850;color:#697586;font-variant-numeric:tabular-nums;padding-top:5px}
.item-center{min-width:0}
.item-topline{display:flex;align-items:center;gap:7px;min-width:0}
.item-name{font-size:13px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tag{font-size:9px;border-radius:6px;padding:3px 6px}
.tag.maybe{background:#fff7df;color:#946200}.tag.empty{background:#f2f4f7;color:#667085}
.inline-controls{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}
.control{display:flex;align-items:center;gap:4px;color:#7a8595;font-size:9px;font-weight:800}
.control select{height:30px;border:1px solid var(--line);border-radius:7px;background:#fff;padding:0 7px;font-size:10px}
.memo-btn,.delete-item{height:30px;border:1px solid var(--line);border-radius:7px;background:#fff;padding:0 8px;font-size:9px;font-weight:850;color:#5e6979}
.delete-item{color:var(--danger);background:#fff8f8;border-color:#fee2e2}
.memo-area{display:none;margin-top:7px}.memo-area.open{display:block}
.memo-area textarea{width:100%;min-height:62px;border:1px solid var(--line);border-radius:8px;padding:8px;font-size:13px}
.travel{display:flex;align-items:center;gap:5px;min-height:30px;padding:4px 0 4px 30px;border-bottom:1px solid #f1f3f6;color:#9ba4b0;font-size:9px}
.travel-btn{border:1px solid var(--line);background:#f8fafc;border-radius:7px;padding:4px 7px;color:#697586;font-size:9px;font-weight:850}
.empty-state{padding:34px 12px;text-align:center;color:#9aa4b2;font-size:11px}

/* MOBILE unchanged visual */
.mobile-ui{display:none}
.mobile-wishlist{padding:10px 14px 7px;border-bottom:1px solid var(--line)}
.mobile-wishlist-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.mobile-wishlist-title{font-size:12px;font-weight:950}
.mobile-add-register{border:0;background:var(--blue);color:#fff;border-radius:8px;padding:6px 8px;font-size:8px;font-weight:900}
.mobile-place-row{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding-bottom:5px}.mobile-place-row::-webkit-scrollbar{display:none}
.mobile-chip{flex:0 0 auto;display:flex;align-items:center;gap:6px;min-height:32px;max-width:165px;padding:5px 6px 5px 8px;border:1px solid var(--line);border-radius:9px;background:#fff}
.mobile-chip-name{min-width:0;font-size:9px;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mobile-used{font-size:7px;color:var(--blue);font-weight:900}
.mobile-chip-add{flex:0 0 22px;width:22px;height:22px;border:0;border-radius:7px;background:var(--soft);color:var(--blue);font-size:13px;font-weight:950}
.mobile-main{padding:0 14px 24px}
.mobile-schedule-title{font-size:14px;font-weight:950;margin:10px 0 8px}
.mobile-tabs{display:flex;gap:5px;overflow-x:auto;scrollbar-width:none;padding-bottom:6px}.mobile-tabs::-webkit-scrollbar{display:none}
.mobile-tab{flex:0 0 auto;min-width:64px;border:1px solid var(--line);background:#f4f6f9;color:#263247;border-radius:8px;padding:7px 8px;font-size:9px;font-weight:850;text-align:center}
.mobile-tab.active{background:var(--blue);border-color:var(--blue);color:#fff}
.mobile-daybar{padding:5px 0 7px}
.mobile-day{font-size:12px;font-weight:950}
.mobile-start{display:flex;align-items:center;gap:4px;font-size:8px;color:var(--muted);font-weight:800;margin-top:5px}
.mobile-start .time-button{height:27px;padding:0 8px}
.mobile-error{display:none;margin:5px 0;padding:7px 8px;border-radius:7px;background:var(--warnbg);color:#9a3412;font-size:8px;font-weight:800}.mobile-error.show{display:block}
.mobile-list{border-top:1px solid var(--line)}
.mobile-item{position:relative;display:grid;grid-template-columns:14px 42px minmax(0,1fr) auto 24px;align-items:center;gap:6px;min-height:42px;padding:7px 1px;border-bottom:1px solid var(--line);background:#fff}
.mobile-item.drop-before:before,.mobile-item.drop-after:after{content:attr(data-drop-label);position:absolute;left:0;right:0;height:20px;display:flex;align-items:center;justify-content:center;background:#eaf1ff;color:var(--blue);font-size:8px;font-weight:950;border:1px solid #bcd0ff;z-index:5}
.mobile-item.drop-before:before{top:-10px}.mobile-item.drop-after:after{bottom:-10px}
.mobile-time{font-size:9px;font-weight:850;color:#687386}
.mobile-name{min-width:0;font-size:10.5px;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mobile-duration{font-size:7.5px;color:#7f8999;white-space:nowrap}
.mobile-more{width:24px;height:24px;border:1px solid var(--line);background:#f8fafc;border-radius:7px;font-size:9px;font-weight:900;color:#556173}
.mobile-travel{display:flex;align-items:center;gap:5px;min-height:24px;padding:2px 0 2px 20px;border-bottom:1px solid #f2f4f7;color:#9aa3b1;font-size:7px}
.mobile-travel .travel-btn{font-size:7px;padding:4px 7px}


/* MOBILE: PC functionality in compact mobile UI */
.mobile-inline-register{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;margin-bottom:6px}
.mobile-inline-register input{min-width:0;height:34px;border:1px solid #dce2eb;border-radius:8px;padding:0 9px;font-size:16px;outline:none}
.mobile-inline-register button{border:0;background:var(--blue);color:#fff;border-radius:8px;padding:0 11px;font-size:9px;font-weight:900}
.mobile-place-help{font-size:7.5px;color:#98a1af;margin-bottom:6px}
.mobile-chip-handle{color:#a6afbc;font-size:9px;letter-spacing:-2px;cursor:grab;touch-action:none}
.mobile-chip-search{width:22px;height:22px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#657185;font-size:9px;font-weight:900}
.mobile-tools{display:flex;gap:5px;margin:3px 0 6px}
.mobile-tool{border:1px dashed #cbd5e1;border-radius:7px;padding:6px 9px;color:#667085;font-size:8px;font-weight:850;touch-action:none}
.mobile-tool.empty{background:#f6fbf7}.mobile-tool.maybe{background:#fffaf0}
.mobile-time-stack{display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.mobile-manual-start{border:1px solid var(--line);background:#fff;border-radius:5px;padding:2px 4px;color:#7b8797;font-size:7px;font-weight:850;white-space:nowrap}
.mobile-manual-start.manual{background:#fff7ed;border-color:#fdba74;color:#b45309}
.mobile-candidates{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;grid-column:3/6;padding:0 0 5px}
.mobile-candidates::-webkit-scrollbar{display:none}
.mobile-candidate{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;border:1px solid #f3d59a;background:#fffdf7;border-radius:6px;padding:3px 5px;font-size:7px;font-weight:850;color:#7c5b14}
.mobile-candidate button{border:0;background:#fff3c4;border-radius:4px;padding:2px 4px;color:#8a5b00;font-size:7px;font-weight:900}
.mobile-candidate-hint{grid-column:3/6;font-size:7px;color:#a3833d;padding-bottom:5px}
@media(max-width:760px){.mobile-item{grid-template-columns:14px 49px minmax(0,1fr) auto 24px}.mobile-chip{max-width:210px}}

/* MODALS */
.overlay{position:fixed;inset:0;z-index:100;background:rgba(15,23,42,.36);display:none;align-items:flex-end;justify-content:center;padding:18px}
.overlay.open{display:flex}
.sheet{width:min(520px,100%);max-height:min(84vh,720px);overflow:auto;background:#fff;border-radius:20px;padding:16px;box-shadow:0 20px 60px rgba(15,23,42,.16)}
.sheet-grab{width:42px;height:4px;border-radius:99px;background:#d5dae2;margin:0 auto 12px}
.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.sheet-title{font-size:15px;font-weight:950}
.close{width:30px;height:30px;border:0;border-radius:8px;background:#f3f5f8;color:#667085;font-size:17px}
.sheet-actions{display:flex;gap:8px;margin-top:14px}.sheet-actions>*{flex:1}
.day-choices{display:grid;gap:7px}
.day-choice{border:1px solid var(--line);background:#fff;border-radius:10px;padding:11px 12px;text-align:left;font-size:12px;font-weight:900;color:#344054}
.maps-row{display:flex;gap:7px;margin-top:8px}.maps-row>*{flex:1}
.maps-btn{border:1px solid var(--line);background:#fff;border-radius:9px;padding:9px 10px;color:#596579;font-size:10px;font-weight:850}
.memo-input{width:100%;min-height:78px;border:1px solid #dce2eb;border-radius:10px;padding:10px 11px;font-size:16px;resize:vertical;outline:none}
.edit-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.field span{display:block;font-size:9px;font-weight:850;color:#697586;margin:0 0 5px}
.select{width:100%;height:38px;border:1px solid #dce2eb;border-radius:9px;background:#fff;padding:0 8px;font-size:11px;color:#344054}
.danger-btn{width:100%;margin-top:12px;border:1px solid #fecaca;background:#fff7f7;color:var(--danger);border-radius:9px;padding:9px;font-size:10px;font-weight:900}

/* Calendar */
.calendar{width:100%}
.cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.cal-head button{border:1px solid var(--line);background:#fff;border-radius:8px;width:34px;height:30px}
.cal-title{font-size:14px;font-weight:950}
.cal-week,.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.cal-week div{text-align:center;font-size:9px;color:#98a1af;font-weight:850;padding:4px 0}
.cal-day{height:36px;border:0;background:#fff;border-radius:8px;font-size:10px;color:#364152}
.cal-day.other{color:#c1c7d0}
.cal-day.range{background:#eef4ff;color:#1d4ed8}
.cal-day.start,.cal-day.end{background:var(--blue);color:#fff;font-weight:950}
.range-hint{font-size:10px;color:#7c8798;margin-bottom:8px}

/* time wheel */
.time-display{text-align:center;font-size:25px;font-weight:950;letter-spacing:.5px;margin:2px 0 10px}
.wheels{display:grid;grid-template-columns:1fr 24px 1fr;align-items:center;height:190px}
.wheel{height:190px;overflow-y:auto;scroll-snap-type:y mandatory;scrollbar-width:none;padding:72px 0}.wheel::-webkit-scrollbar{display:none}
.wheel-option{height:46px;display:flex;align-items:center;justify-content:center;scroll-snap-align:center;font-size:18px;font-weight:850;color:#b0b7c1}
.wheel-option.selected{font-size:23px;color:var(--text)}
.colon{text-align:center;font-size:24px;font-weight:950}
.wheel-wrap{position:relative}.wheel-wrap:after{content:"";position:absolute;left:5px;right:5px;top:72px;height:46px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);pointer-events:none}
.drag-ghost{position:fixed;z-index:999;pointer-events:none;transform:translate(-50%,-50%);background:#172033;color:#fff;border-radius:9px;padding:8px 10px;font-size:10px;font-weight:900;box-shadow:0 8px 24px rgba(15,23,42,.25)}
.toast{position:fixed;left:50%;bottom:20px;z-index:200;transform:translateX(-50%) translateY(20px);opacity:0;pointer-events:none;background:#172033;color:#fff;border-radius:999px;padding:9px 13px;font-size:10px;font-weight:850;transition:.2s}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

@media(max-width:760px){
  body{background:#fff}.desktop-ui{display:none!important}.mobile-ui{display:block!important}
  .topbar{height:52px;padding:0 14px}.member-top,.top-btn:not(.share){display:none}.brand{font-size:21px}
  .tripbar{padding:9px 14px 8px}.trip-title-input{font-size:15px;width:65%;max-width:none}.date-btn{font-size:9px;padding:6px 8px}
  .overlay{padding:0}.sheet{width:100%;max-height:88vh;border-radius:20px 20px 0 0;padding:14px 14px max(16px,env(safe-area-inset-bottom))}
  .start-screen{padding:16px}.start-logo{font-size:38px}.start-card{padding:19px}
}

/* v4 refinements */
.item.kind-empty{background:#f8fbff}
.item.kind-maybe{background:#fffdf5}
.mobile-item.kind-empty{background:#f8fbff}
.mobile-item.kind-maybe{background:#fffdf5}
.item-time-col{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding-top:2px}
.manual-start-btn{height:24px;border:1px solid var(--line);border-radius:6px;background:#fff;color:#8a94a4;padding:0 6px;font-size:8px;font-weight:900;white-space:nowrap}
.manual-start-btn.manual{background:#eef4ff;border-color:#bcd0ff;color:#1d4ed8}
.item-time.manual,.mobile-time.manual{color:#2563eb;font-weight:950}
.candidate-list{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.candidate-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 7px;border:1px solid #f1d99e;background:#fffaf0;border-radius:7px;font-size:9px;font-weight:850;color:#7c5a12}
.candidate-chip button{border:0;background:#fff1c2;color:#8a5d00;border-radius:5px;padding:3px 5px;font-size:8px;font-weight:900}
.maybe-drop-note{font-size:8px;color:#a07a26;margin-top:6px}
.tab.drag-target,.mobile-tab.drag-target{outline:2px solid #8fb2ff;outline-offset:2px;background:#eaf1ff!important;color:#1d4ed8!important}
.item.swap-target,.mobile-item.swap-target{outline:2px solid #7da7ff;outline-offset:-2px;background:#f3f7ff}
.item.maybe-target,.mobile-item.maybe-target{outline:2px dashed #e3b341;outline-offset:-3px;background:#fff8dd}


/* ============================================================
   DESKTOP LARGE LAYOUT v7
   Mobile styles are intentionally left unchanged.
   ============================================================ */
@media(min-width:761px){
  .topbar{
    height:72px;
    padding:0 30px;
  }
  .brand{
    font-size:30px;
    letter-spacing:-1.1px;
  }
  .member-top{
    font-size:13px;
  }
  .top-btn{
    height:42px;
    padding:0 15px;
    border-radius:10px;
    font-size:12px;
  }

  .tripbar{
    padding:17px 30px;
  }
  .trip-title-input{
    width:min(720px,68vw);
    font-size:28px;
  }
  .date-btn{
    padding:10px 14px;
    font-size:13px;
  }

  .desktop-grid{
    grid-template-columns:minmax(390px,26vw) minmax(0,1fr);
    min-height:calc(100vh - 145px);
  }
  .desktop-sidebar{
    padding:26px 24px;
  }
  .desktop-main{
    padding:28px 36px 48px;
  }

  .section-head{
    margin-bottom:12px;
  }
  .section-title{
    font-size:21px;
  }
  .inline-register{
    gap:9px;
    margin-bottom:12px;
  }
  .inline-register input{
    height:46px;
    border-radius:11px;
    padding:0 13px;
    font-size:16px;
  }
  .inline-register button{
    padding:0 17px;
    border-radius:10px;
    font-size:12px;
  }
  .place-desc{
    font-size:12px;
    margin-bottom:13px;
    line-height:1.5;
  }
  .desktop-places{
    gap:10px;
  }
  .desktop-place{
    grid-template-columns:24px minmax(0,1fr) auto;
    gap:9px;
    min-height:58px;
    padding:10px 10px 10px 7px;
    border-radius:12px;
  }
  .drag-handle{
    font-size:16px;
  }
  .desktop-place-name{
    font-size:15px;
  }
  .used{
    font-size:10px;
    padding:4px 7px;
  }
  .desktop-place-actions{
    gap:5px;
  }
  .mini-btn{
    height:34px;
    border-radius:8px;
    padding:0 9px;
    font-size:11px;
  }
  .tool-row{
    gap:9px;
    margin-top:14px;
  }
  .tool{
    padding:11px;
    border-radius:10px;
    font-size:12px;
  }
  .error-box{
    margin-top:18px;
    padding:13px;
    border-radius:11px;
    font-size:12px;
  }

  .tabs{
    gap:8px;
  }
  .tab{
    min-width:108px;
    border-radius:10px;
    padding:11px 14px;
    font-size:12px;
  }
  .day-head{
    padding:17px 0 13px;
  }
  .day-name{
    font-size:20px;
  }
  .day-start{
    gap:8px;
    font-size:12px;
    margin-top:9px;
  }
  .time-button{
    min-width:70px;
    padding:8px 10px;
    border-radius:8px;
    font-size:12px;
  }

  .item{
    grid-template-columns:26px 76px minmax(0,1fr);
    gap:12px;
    padding:16px 5px;
  }
  .item-time-col{
    gap:7px;
  }
  .item-time{
    font-size:13px;
    padding-top:5px;
  }
  .manual-start-btn{
    height:30px;
    padding:0 8px;
    border-radius:7px;
    font-size:10px;
  }
  .item-name{
    font-size:17px;
  }
  .tag{
    font-size:10px;
    padding:4px 7px;
  }
  .inline-controls{
    gap:9px;
    margin-top:11px;
  }
  .control{
    gap:6px;
    font-size:11px;
  }
  .control select{
    height:36px;
    padding:0 9px;
    border-radius:8px;
    font-size:12px;
  }
  .memo-btn,.delete-item{
    height:36px;
    padding:0 11px;
    border-radius:8px;
    font-size:11px;
  }
  .memo-area{
    margin-top:10px;
  }
  .memo-area textarea{
    min-height:76px;
    padding:10px;
    font-size:15px;
  }
  .travel{
    min-height:38px;
    padding:5px 0 5px 42px;
    font-size:11px;
  }
  .travel-btn{
    padding:6px 9px;
    font-size:11px;
  }
  .candidate-chip{
    padding:7px 9px;
    font-size:11px;
  }
  .candidate-chip button{
    padding:4px 7px;
    font-size:10px;
  }
  .maybe-drop-note{
    font-size:10px;
    margin-top:8px;
  }
  .empty-state{
    padding:46px 15px;
    font-size:13px;
  }
}

.auto-gap-tag{
  background:#e9f7ee!important;
  color:#267447!important;
}
.auto-gap-duration{
  border:1px solid #d7eadf;
  background:#f4fbf6;
  border-radius:7px;
  padding:7px 9px;
  color:#397154;
}


/* ============================================================
   v8 iPhone / smartphone interaction reliability
   ============================================================ */
button,
.range-display,
.cal-day,
.mobile-tab,
.mobile-chip-add,
.mobile-more,
.time-button,
.travel-btn{
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

.mobile-start-helper{
  display:none;
}

@media(max-width:760px){
  html,body{
    min-height:100%;
    min-height:100dvh;
  }

  body{
    overflow-x:hidden;
    -webkit-text-size-adjust:100%;
  }

  .start-screen{
    min-height:100vh;
    min-height:100dvh;
    display:block;
    overflow-y:auto;
    padding:
      max(14px,env(safe-area-inset-top))
      14px
      max(22px,env(safe-area-inset-bottom));
  }

  .start-wrap{
    width:100%;
    max-width:520px;
    margin:0 auto;
    padding-top:12px;
  }

  .start-brand{
    margin-bottom:14px;
  }

  .start-card{
    padding:18px;
    border-radius:18px;
  }

  .start-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
    margin-top:13px;
  }

  .start-actions .primary,
  .start-actions .secondary{
    width:100%;
    min-height:48px;
    font-size:13px;
  }

  .mobile-start-helper{
    display:block;
    margin-top:14px;
    font-size:9px;
    line-height:1.55;
    color:#7c8798;
  }

  .range-display{
    min-height:48px;
    height:auto;
    padding:12px;
  }

  .overlay{
    z-index:1000;
    height:100vh;
    height:100dvh;
    padding:0;
    overscroll-behavior:contain;
  }

  .sheet{
    width:100%;
    max-height:92vh;
    max-height:92dvh;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    border-radius:20px 20px 0 0;
    padding:14px 14px max(18px,env(safe-area-inset-bottom));
  }

  #calendarSheet .sheet{
    max-height:96vh;
    max-height:96dvh;
  }

  .cal-day{
    min-height:42px;
  }

  .sheet-actions{
    position:sticky;
    bottom:0;
    background:#fff;
    padding-top:9px;
    padding-bottom:max(2px,env(safe-area-inset-bottom));
    z-index:3;
  }

  .sheet-actions .primary,
  .sheet-actions .secondary{
    min-height:44px;
  }

  .app-shell{
    min-height:100vh;
    min-height:100dvh;
  }

  .mobile-ui{
    min-height:calc(100dvh - 120px);
  }

  .mobile-main{
    padding-bottom:max(32px,env(safe-area-inset-bottom));
  }

  input,textarea,select{
    font-size:16px;
  }
}

.preview-banner{
  position:sticky;top:0;z-index:3000;
  background:#eff6ff;color:#1d4ed8;border-bottom:1px solid #bfdbfe;
  text-align:center;padding:7px 10px;font-size:10px;font-weight:900;
}


/* ============================================================
   v9 smartphone usability
   ============================================================ */
@media(max-width:760px){
  /* 入力欄だけで意味が分かるため見出しは表示しない */
  .mobile-wishlist-head,
  .mobile-wishlist-title{
    display:none!important;
  }

  .mobile-wishlist{
    padding-top:12px;
  }

  /* ボタン以外の予定ブロック全体をドラッグ領域にする */
  .mobile-item,
  .mobile-chip{
    -webkit-user-select:none;
    user-select:none;
  }

  .mobile-item{
    grid-template-columns:14px 58px minmax(0,1fr) auto 30px 28px;
    gap:7px;
    min-height:54px;
    padding:8px 1px;
    touch-action:none;
  }

  .mobile-chip{
    touch-action:none;
  }

  .mobile-item button,
  .mobile-chip button{
    touch-action:manipulation;
  }

  /* 時間を見やすく */
  .mobile-time{
    font-size:13px;
    line-height:1.1;
    font-weight:950;
    color:#42506a;
    letter-spacing:.1px;
  }

  .mobile-time.manual{
    font-size:13.5px;
    color:var(--blue);
  }

  .mobile-time-stack{
    gap:5px;
  }

  .mobile-manual-start{
    padding:3px 5px;
    font-size:8px;
    line-height:1;
  }

  .mobile-day{
    font-size:14px;
  }

  .mobile-start{
    gap:7px;
    font-size:10px;
  }

  .mobile-start .time-button{
    min-width:68px;
    height:34px;
    padding:0 10px;
    font-size:13px;
    font-weight:950;
  }

  .mobile-name{
    font-size:11.5px;
  }

  .mobile-duration{
    font-size:8.5px;
  }

  .mobile-travel{
    min-height:30px;
    padding-left:30px;
    gap:7px;
    font-size:9px;
  }

  .mobile-travel .travel-btn{
    min-height:28px;
    padding:4px 9px;
    font-size:9px;
    font-weight:900;
  }

  /* スケジュール反映後の場所検索 */
  .mobile-schedule-search{
    width:30px;
    height:30px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    color:#66758b;
    font-size:12px;
    font-weight:950;
  }

  .mobile-schedule-search-placeholder{
    width:30px;
    height:30px;
    display:block;
  }

  .mobile-more{
    width:28px;
    height:30px;
    border-radius:8px;
  }

  /* 点々はドラッグ可能であることの目印としてだけ残す */
  .mobile-item .item-handle,
  .mobile-chip-handle{
    pointer-events:none;
    opacity:.55;
  }
}


/* ============================================================
   v10 smartphone schedule readability + scrollbars
   ============================================================ */
@media(max-width:760px){

  /* Wish-list area: keep chips horizontally scrollable and show a clear scrollbar. */
  .mobile-place-scroll{
    width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:auto;
    scrollbar-color:#b9c5d6 #eef2f7;
    padding-bottom:7px;
    margin-bottom:4px;
  }
  .mobile-place-scroll::-webkit-scrollbar{
    height:7px;
  }
  .mobile-place-scroll::-webkit-scrollbar-track{
    background:#eef2f7;
    border-radius:999px;
  }
  .mobile-place-scroll::-webkit-scrollbar-thumb{
    background:#b9c5d6;
    border-radius:999px;
  }
  .mobile-place-row{
    width:max-content;
    min-width:100%;
    overflow:visible!important;
    padding-bottom:1px;
  }

  /* Dedicated schedule scroll area. */
  .mobile-schedule-scroll{
    position:relative;
    max-height:64dvh;
    overflow-y:auto;
    overflow-x:hidden;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:auto;
    scrollbar-color:#aeb9ca #eef2f7;
    padding-right:5px;
    margin-right:-5px;
    overscroll-behavior:contain;
  }
  .mobile-schedule-scroll::-webkit-scrollbar{
    width:8px;
  }
  .mobile-schedule-scroll::-webkit-scrollbar-track{
    background:#eef2f7;
    border-radius:999px;
  }
  .mobile-schedule-scroll::-webkit-scrollbar-thumb{
    background:#aeb9ca;
    border-radius:999px;
  }

  /* Time area is larger and easier to read. */
  .mobile-item{
    grid-template-columns:14px 66px minmax(0,1fr) 92px 30px 28px;
    min-height:62px;
    gap:7px;
    padding:9px 1px;
  }

  .mobile-time{
    font-size:15px;
    line-height:1.05;
    font-weight:950;
    color:#354258;
    letter-spacing:.15px;
  }

  .mobile-time.manual{
    font-size:15px;
    color:var(--blue);
  }

  .mobile-time-stack{
    gap:5px;
  }

  .mobile-manual-start{
    min-height:24px;
    padding:3px 5px;
    font-size:7.5px;
    line-height:1;
    font-weight:900;
    border-color:#d8e0eb;
    color:#657287;
    background:#fff;
  }

  .mobile-manual-start.manual{
    color:#b45309;
    background:#fff7ed;
    border-color:#fdba74;
  }

  /* More descriptive, larger stay duration. */
  .mobile-duration{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    justify-content:center;
    gap:2px;
    min-width:86px;
    color:#59667b;
    line-height:1.05;
  }

  .mobile-duration-label{
    font-size:7.5px;
    font-weight:800;
    color:#8a95a6;
    white-space:nowrap;
  }

  .mobile-duration-value{
    font-size:11.5px;
    font-weight:950;
    color:#4d596d;
    white-space:nowrap;
  }

  /* Travel row: darker but still within the same gray-blue palette. */
  .mobile-travel{
    min-height:34px;
    padding-left:43px;
    gap:8px;
    color:#5d697b;
    font-size:9.5px;
    font-weight:850;
  }

  .mobile-travel-label{
    color:#657184;
    font-weight:900;
  }

  .mobile-travel .travel-btn{
    min-height:30px;
    padding:4px 10px;
    border-color:#d7dee8;
    background:#f8fafc;
    color:#49576b;
    font-size:10px;
    font-weight:950;
  }

  .mobile-name{
    font-size:12px;
    font-weight:900;
  }

  /* Scrollbar remains usable even when schedule blocks themselves are draggable. */
  .mobile-schedule-scroll{
    touch-action:pan-y;
  }
}


/* v11 smartphone direct editing + large touch scrollbars */
@media(max-width:760px){
  .mobile-daybar{display:none!important}

  .mobile-place-scroll-wrap{position:relative;padding-bottom:20px}
  .mobile-place-scroll{padding-bottom:2px!important;margin-bottom:0!important;scrollbar-width:none!important}
  .mobile-place-scroll::-webkit-scrollbar{display:none!important}
  .mobile-hscroll-rail{position:absolute;left:2px;right:2px;bottom:2px;height:14px;border-radius:999px;background:#edf1f6;border:1px solid #dce3ed;touch-action:none;z-index:6}
  .mobile-hscroll-thumb{position:absolute;left:0;top:1px;height:10px;min-width:48px;border-radius:999px;background:#91a0b5;box-shadow:0 1px 2px rgba(30,50,80,.12)}

  .mobile-schedule-scroll-wrap{position:relative;padding-right:24px}
  .mobile-schedule-scroll{max-height:64dvh;padding-right:0!important;margin-right:0!important;scrollbar-width:none!important}
  .mobile-schedule-scroll::-webkit-scrollbar{display:none!important}
  .mobile-vscroll-rail{position:absolute;right:2px;top:2px;bottom:2px;width:16px;border-radius:999px;background:#edf1f6;border:1px solid #dce3ed;touch-action:none;z-index:8}
  .mobile-vscroll-thumb{position:absolute;left:2px;top:0;width:10px;min-height:48px;border-radius:999px;background:#8798ae;box-shadow:0 1px 2px rgba(30,50,80,.14)}
  .scroll-disabled{opacity:.28}

  .mobile-item{grid-template-columns:14px 66px minmax(0,1fr) 90px 30px 44px}
  button.mobile-duration{appearance:none;border:0;background:transparent;padding:4px 3px;cursor:pointer}
  button.mobile-duration:active{background:#f2f6fc;border-radius:8px}
  .mobile-duration-value{font-size:12px}

  .mobile-memo-btn{width:44px!important;min-width:44px;padding:0 5px!important;font-size:8.5px!important;font-weight:900!important;letter-spacing:0!important}
  .memo-item-name{margin:-2px 0 14px;padding:10px 12px;border-radius:10px;background:#f6f8fb;color:#27364d;font-size:14px;font-weight:900}

  .duration-input-wrap{display:flex;align-items:center;justify-content:center;gap:9px;margin:10px 0 4px;font-size:16px;font-weight:900;color:#526176}
  .duration-minutes-input{width:150px;height:58px;border:1px solid #d9e1ec;border-radius:13px;text-align:center;font-size:24px!important;font-weight:950;color:#25344d;outline:none}
  .duration-human{text-align:center;margin:8px 0 15px;color:var(--blue);font-size:18px;font-weight:950}
  .duration-presets{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
  .duration-presets button{min-height:42px;border:1px solid #dce4ef;border-radius:10px;background:#f8fafc;color:#46566d;font-size:12px;font-weight:900}
}


/* ============================================================
   v12 smartphone refinements
   ============================================================ */
@media(max-width:760px){
  /* Wishlist input + list button */
  .mobile-inline-register-v12{
    grid-template-columns:minmax(0,1fr) auto auto;
  }
  .mobile-list-open-btn{
    min-width:52px;
    border:1px solid #cfd9e7!important;
    background:#f7f9fc!important;
    color:#40516a!important;
  }

  /* Full-screen wishlist */
  .mobile-fullscreen-panel{
    position:fixed;
    inset:0;
    z-index:5000;
    background:#fff;
    display:flex;
    flex-direction:column;
    min-height:100dvh;
  }
  .mobile-fullscreen-panel.hidden{
    display:none!important;
  }
  .mobile-fullscreen-head{
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:10px;
    min-height:64px;
    padding:
      max(10px,env(safe-area-inset-top))
      16px
      10px;
    border-bottom:1px solid #e3e8f0;
    background:#fff;
    position:sticky;
    top:0;
    z-index:2;
  }
  .mobile-fullscreen-back{
    min-height:40px;
    padding:0 12px;
    border:1px solid #d7e0eb;
    border-radius:10px;
    background:#fff;
    color:#40516a;
    font-size:12px;
    font-weight:900;
  }
  .mobile-fullscreen-title{
    text-align:center;
    font-size:17px;
    font-weight:950;
    color:#1f2e45;
  }
  .mobile-fullscreen-spacer{
    width:62px;
  }
  .mobile-fullscreen-body{
    flex:1;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    padding:14px 14px max(24px,env(safe-area-inset-bottom));
  }
  .mobile-full-list{
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  .mobile-full-place{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    align-items:center;
    border:1px solid #dfe6ef;
    border-radius:14px;
    padding:13px 12px;
    background:#fff;
  }
  .mobile-full-place-main{
    min-width:0;
    display:flex;
    align-items:center;
    gap:7px;
  }
  .mobile-full-place-name{
    min-width:0;
    font-size:14px;
    font-weight:950;
    color:#24344b;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .mobile-full-place-actions{
    display:flex;
    gap:6px;
  }
  .mobile-full-search,
  .mobile-full-add{
    min-height:38px;
    border-radius:9px;
    padding:0 10px;
    font-size:10px;
    font-weight:900;
  }
  .mobile-full-search{
    border:1px solid #d6dfeb;
    background:#fff;
    color:#516178;
  }
  .mobile-full-add{
    border:1px solid #cfe0ff;
    background:#edf4ff;
    color:#2460d8;
  }
  .mobile-full-empty{
    padding:40px 10px;
    text-align:center;
    color:#96a1b0;
    font-size:12px;
  }

  /* Slightly larger touch scrollbars */
  .mobile-hscroll-rail{
    height:18px!important;
  }
  .mobile-hscroll-thumb{
    top:2px!important;
    height:12px!important;
    min-width:56px!important;
  }
  .mobile-vscroll-rail{
    width:20px!important;
  }
  .mobile-vscroll-thumb{
    left:2px!important;
    width:14px!important;
    min-height:56px!important;
  }

  /* Clearly tappable duration button */
  button.mobile-duration{
    min-height:46px;
    border:1px solid #d6dfeb!important;
    border-radius:11px!important;
    background:#f8fafc!important;
    box-shadow:0 1px 2px rgba(37,52,77,.04);
    padding:6px 8px!important;
  }
  button.mobile-duration::after{
    content:"変更";
    display:block;
    margin-top:3px;
    font-size:7px;
    font-weight:900;
    color:#6e7e93;
  }
  button.mobile-duration:active{
    background:#eef4fb!important;
    transform:translateY(1px);
  }
  .mobile-duration-label{
    font-size:7.5px!important;
  }
  .mobile-duration-value{
    font-size:12.5px!important;
  }
}


/* ============================================================
   v13 unified mobile time controls
   ============================================================ */
@media(max-width:760px){
  /* Drag insertion label no longer gets clipped by the schedule viewport. */
  .mobile-list{
    padding-bottom:34px;
    overflow:visible;
  }
  .mobile-item.drop-before:before,
  .mobile-item.drop-after:after{
    left:2px!important;
    right:2px!important;
    height:24px!important;
    border-radius:7px;
    font-size:8.5px!important;
    box-sizing:border-box;
  }
  .mobile-item.drop-before:before{
    top:1px!important;
  }
  .mobile-item.drop-after:after{
    bottom:1px!important;
  }

  /* Clean gray palette for schedule action controls. */
  .mobile-item{
    grid-template-columns:14px 82px minmax(0,1fr) 82px 32px 44px!important;
    gap:7px!important;
    min-height:66px;
  }

  .mobile-time-control{
    min-width:0;
    min-height:48px;
    border:1px solid #d7dfe9!important;
    border-radius:10px!important;
    background:#f6f8fb!important;
    color:#435169!important;
    padding:6px 7px!important;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:3px;
    box-shadow:none!important;
    text-align:center;
    -webkit-tap-highlight-color:transparent;
  }
  .mobile-time-control:active{
    background:#edf1f6!important;
    transform:translateY(1px);
  }
  .mobile-time-control-label{
    display:block;
    font-size:7.5px;
    line-height:1;
    font-weight:850;
    color:#8490a1;
    white-space:nowrap;
  }
  .mobile-time-control-value{
    display:block;
    font-size:12.5px;
    line-height:1.05;
    font-weight:950;
    color:#344258;
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
  }
  .mobile-start-control.manual,
  .mobile-start-control.manual .mobile-time-control-value{
    color:#344258!important;
    background:#f6f8fb!important;
    border-color:#d7dfe9!important;
  }

  /* Remove old special duration treatment; it now matches start time. */
  button.mobile-duration{
    min-height:48px!important;
    border:1px solid #d7dfe9!important;
    border-radius:10px!important;
    background:#f6f8fb!important;
    padding:6px 7px!important;
  }
  button.mobile-duration::after{
    content:none!important;
  }

  /* Travel uses exactly the same visual language. */
  .mobile-travel{
    min-height:56px!important;
    padding:4px 0 4px 27px!important;
    gap:8px!important;
    color:#66758a!important;
    justify-content:flex-start;
  }
  .mobile-travel-arrow{
    font-size:12px;
    color:#7e8a9c;
    font-weight:900;
  }
  .mobile-travel-control{
    width:82px;
    min-height:44px;
  }

  /* Search / memo controls use the same calm gray palette. */
  .mobile-schedule-search,
  .mobile-memo-btn{
    border:1px solid #d7dfe9!important;
    background:#f6f8fb!important;
    color:#536177!important;
    box-shadow:none!important;
  }
  .mobile-schedule-search:active,
  .mobile-memo-btn:active{
    background:#edf1f6!important;
  }

  /* Full wishlist can register new places too. */
  .mobile-full-register{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    margin-bottom:6px;
  }
  .mobile-full-register input{
    min-width:0;
    height:46px;
    border:1px solid #d8e0ea;
    border-radius:11px;
    padding:0 12px;
    font-size:16px;
    color:#28374d;
    outline:none;
    background:#fff;
  }
  .mobile-full-register button{
    min-width:66px;
    border:1px solid #d7dfe9;
    border-radius:11px;
    background:#f2f5f9;
    color:#435169;
    font-size:11px;
    font-weight:950;
  }
  .mobile-full-register-help{
    margin:0 1px 13px;
    color:#929dab;
    font-size:8.5px;
    line-height:1.45;
  }
}


/* ============================================================
   v14 refined smartphone schedule UI
   - action = small gray button
   - value = plain text
   ============================================================ */
@media(max-width:760px){

  .mobile-item{
    grid-template-columns:14px 74px minmax(0,1fr) 70px 30px 42px!important;
    gap:7px!important;
    min-height:62px!important;
    padding:8px 1px!important;
    align-items:center;
  }

  /* common time field */
  .mobile-time-field{
    min-width:0;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:5px;
  }

  .mobile-duration-field{
    align-items:flex-end;
  }

  /* small button: only the label is tappable */
  .mobile-field-action{
    appearance:none;
    min-height:23px;
    border:1px solid #d8e0ea;
    border-radius:7px;
    background:#f5f7fa;
    color:#69778b;
    padding:0 6px;
    font-size:7.5px;
    line-height:1;
    font-weight:900;
    white-space:nowrap;
    box-shadow:none;
    -webkit-tap-highlight-color:transparent;
  }

  .mobile-field-action:active{
    background:#e9eef4;
    border-color:#cbd5e2;
  }

  .mobile-field-action.manual{
    border-color:#cfd9e6!important;
    background:#f5f7fa!important;
    color:#69778b!important;
  }

  /* plain value text */
  .mobile-field-value{
    color:#2e3b51;
    font-weight:950;
    line-height:1;
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
  }

  .mobile-start-value{
    font-size:15px;
  }

  .mobile-start-value.manual{
    color:#2f67df;
  }

  .mobile-duration-value{
    font-size:12px!important;
    color:#3c495e!important;
  }

  /* remove previous button-box treatment */
  .mobile-time-control,
  button.mobile-duration{
    all:unset;
  }

  /* place name */
  .mobile-name{
    font-size:12px!important;
    font-weight:950!important;
    color:#18263b;
    line-height:1.2;
  }

  /* search / memo remain compact */
  .mobile-schedule-search{
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    border-radius:8px!important;
    border:1px solid #d8e0ea!important;
    background:#f7f9fb!important;
    color:#5b697d!important;
    font-size:11px!important;
  }

  .mobile-memo-btn{
    width:42px!important;
    min-width:42px!important;
    height:30px!important;
    border-radius:8px!important;
    padding:0 5px!important;
    border:1px solid #d8e0ea!important;
    background:#f7f9fb!important;
    color:#5b697d!important;
    font-size:8.5px!important;
    font-weight:900!important;
  }

  /* travel row: same interaction rule */
  .mobile-travel{
    min-height:38px!important;
    padding:3px 0 3px 42px!important;
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    color:#66758a!important;
  }

  .mobile-travel-arrow{
    color:#8a97a9!important;
    font-size:11px!important;
    font-weight:900!important;
  }

  .mobile-travel-action{
    min-height:23px!important;
  }

  .mobile-travel-value{
    font-size:11px;
    line-height:1;
    font-weight:950;
    color:#3d4a5f;
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
  }

  /* keep drag guide readable */
  .mobile-item.drop-before:before,
  .mobile-item.drop-after:after{
    z-index:12!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
}


/* ============================================================
   v15 mobile cleanup
   ============================================================ */
.bookmark-handle{position:relative;color:transparent!important;letter-spacing:0!important;font-size:0!important;width:14px;min-width:14px;height:18px;cursor:grab}
.bookmark-handle::before{content:"";position:absolute;left:3px;right:3px;top:1px;bottom:5px;background:#d9e4f6;border-radius:3px 3px 1px 1px;border:1px solid #c4d3ea}
.bookmark-handle::after{content:"";position:absolute;left:3px;right:3px;bottom:1px;margin:auto;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #c4d3ea}
.item-inline-error{margin:7px 0 0;padding:6px 8px;border-radius:9px;background:#fff4f2;border:1px solid #ffd7d0;color:#c2410c;font-size:11px;font-weight:800;line-height:1.4}

@media(max-width:760px){
  .mobile-full-register button{
    border:1px solid var(--blue)!important;
    background:var(--blue)!important;
    color:#fff!important;
  }
  .mobile-item{
    grid-template-columns:16px 70px minmax(0,1fr) 66px 30px 36px!important;
    gap:8px!important;
    min-height:64px!important;
  }
  .mobile-name{font-size:12.5px!important;}
  .mobile-memo-btn{width:36px!important;min-width:36px!important;font-size:11px!important;letter-spacing:.5px;}
  .mobile-inline-error{grid-column:2 / -1;margin:0 0 2px;padding:4px 7px;border-radius:8px;background:#fff4f2;border:1px solid #ffd7d0;color:#c2410c;font-size:9px;font-weight:850;line-height:1.35;}
  .mobile-candidates{grid-column:2 / -1!important;padding:0 0 6px 0!important;}
  .mobile-candidate{display:inline-flex;align-items:center;gap:5px;padding:5px 7px;border:1px dashed #e7c86a;background:#fff9e9;border-radius:999px;font-size:9.5px;font-weight:800;color:#5f4a12;}
  .mobile-candidate button{min-height:22px;border:1px solid #d8c27a;border-radius:999px;padding:0 7px;background:#fff;color:#7a5a0d;font-size:8.5px;font-weight:900;}
  .mobile-candidate-hint{grid-column:2 / -1;padding:3px 0 6px;color:#907243;font-size:8.5px;font-weight:700;}
  .mobile-schedule-search,.mobile-memo-btn,.mobile-field-action,.mobile-travel-action,.mobile-full-search,.mobile-fullscreen-back{border-color:#d5dde8!important;background:#f7f9fb!important;color:#5c6a7f!important;}
  .mobile-full-register button{background:var(--blue)!important;color:#fff!important;border-color:var(--blue)!important}
  .mobile-hscroll-rail{height:20px!important}
  .mobile-hscroll-thumb{height:14px!important;top:2px!important;min-width:72px!important}
  .mobile-vscroll-rail{width:22px!important}
  .mobile-vscroll-thumb{width:16px!important;left:2px!important;min-height:72px!important}
}


/* ============================================================
   v16 first-item time logic + subtle bookmark marker
   ============================================================ */
.bookmark-handle{
  position:relative!important;
  width:16px!important;
  min-width:16px!important;
  height:24px!important;
  color:transparent!important;
  font-size:0!important;
  letter-spacing:0!important;
  cursor:grab;
}

/* short string */
.bookmark-handle::before{
  content:""!important;
  position:absolute!important;
  left:50%!important;
  top:2px!important;
  width:1.5px!important;
  height:7px!important;
  transform:translateX(-50%)!important;
  background:#c9d5e6!important;
  border:0!important;
  border-radius:999px!important;
}

/* small round bookmark charm */
.bookmark-handle::after{
  content:""!important;
  position:absolute!important;
  left:50%!important;
  top:9px!important;
  width:8px!important;
  height:8px!important;
  transform:translateX(-50%)!important;
  background:#e4ecf8!important;
  border:1px solid #cbd8ea!important;
  border-radius:50%!important;
}

@media(max-width:760px){
  .mobile-item{
    grid-template-columns:16px 70px minmax(0,1fr) 66px 30px 30px!important;
    gap:8px!important;
  }

  .mobile-memo-btn{
    width:30px!important;
    min-width:30px!important;
    height:30px!important;
    padding:0!important;
    border-radius:8px!important;
    font-size:17px!important;
    line-height:1!important;
    font-weight:700!important;
    letter-spacing:0!important;
  }

  .mobile-chip .bookmark-handle{
    width:12px!important;
    min-width:12px!important;
    height:20px!important;
  }

  .mobile-chip .bookmark-handle::before{
    height:6px!important;
  }

  .mobile-chip .bookmark-handle::after{
    top:8px!important;
    width:7px!important;
    height:7px!important;
  }
}


/* ============================================================
   v17 simple round drag marker
   ============================================================ */
.bookmark-handle{
  position:relative!important;
  width:14px!important;
  min-width:14px!important;
  height:18px!important;
  color:transparent!important;
  font-size:0!important;
  letter-spacing:0!important;
}

/* Remove the string completely */
.bookmark-handle::before{
  content:none!important;
  display:none!important;
}

/* Keep only one subtle round marker */
.bookmark-handle::after{
  content:""!important;
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  width:7px!important;
  height:7px!important;
  transform:translate(-50%,-50%)!important;
  background:#dfe8f5!important;
  border:1px solid #c8d5e7!important;
  border-radius:50%!important;
}

@media(max-width:760px){
  .mobile-chip .bookmark-handle,
  .mobile-item .bookmark-handle{
    width:14px!important;
    min-width:14px!important;
    height:18px!important;
  }
}


/* ============================================================
   v18 full-list sheets + reference travel time
   ============================================================ */

/* Search/day-selection sheets must appear above the full-screen wishlist. */
.overlay{
  z-index:6100!important;
}
.toast{
  z-index:7000!important;
}

.route-ref-btn{
  border:1px solid #d7e0eb;
  border-radius:7px;
  background:#f7f9fb;
  color:#58677c;
  font-size:9px;
  font-weight:900;
  padding:4px 7px;
}

@media(max-width:760px){
  .mobile-travel{
    flex-wrap:nowrap;
  }

  .mobile-route-ref-btn{
    min-width:36px;
    min-height:24px;
    padding:0 7px;
    font-size:8px;
    white-space:nowrap;
    background:#f7f9fb!important;
    color:#59687d!important;
    border-color:#d7e0eb!important;
  }

  #searchSheet .sheet,
  #daySheet .sheet{
    z-index:6200;
  }
}
