/* Day groups (journey-day-groups.mjs) for Share a Journey, Make It Mine and Plan a Trip. Colours come from the
   --mm-* tokens of the page (light and dark); the teal of the rail, tile band and + button is the design's own. */
.dg{--dg-teal:#0b7c8c;--dg-top:10px;--dg-head-top:0px;display:grid;grid-template-columns:76px minmax(0,1fr);column-gap:14px;align-items:stretch;min-width:0}
.dg+.dg{margin-top:0}
.dg-rail{position:relative;min-width:0}
.dg-bracket{position:absolute;top:0;bottom:20px;left:74px;width:10px;box-sizing:border-box;border:2px solid var(--dg-teal);border-right:0;border-radius:12px 0 0 12px;pointer-events:none}
.dg-badge{position:sticky;top:var(--dg-top);z-index:3;display:flex;flex-direction:column;align-items:center;gap:6px;width:58px}
.dg-stub{position:absolute;left:58px;top:31px;width:16px;height:2px;background:var(--dg-teal)}
.dg-tile{display:flex;flex-direction:column;align-items:center;width:58px;box-sizing:border-box;border-radius:12px;overflow:hidden;background:var(--mm-s,#fff);border:1.5px solid var(--dg-teal);box-shadow:0 6px 16px rgba(18,59,97,.12)}
.dg-band{align-self:stretch;display:flex;align-items:center;justify-content:center;height:20px;background:var(--dg-teal);color:#fff;font:700 10px/1 Arial,Helvetica,sans-serif;letter-spacing:.12em}
.dg-tile>b{padding-top:6px;color:var(--mm-i,#123b61);font:400 26px/1 Georgia,'Times New Roman',serif}
.dg-month{padding:2px 0 7px;color:var(--mm-mu,#58748c);font:700 10px/1.2 Arial,Helvetica,sans-serif;letter-spacing:.1em}
.dg-chip{display:flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;background:var(--mm-t,#e5f5fb);color:var(--mm-a,#0b7c8c);font:700 11px/1 Arial,Helvetica,sans-serif;white-space:nowrap}
.dg-cards{display:flex;flex-direction:column;gap:10px;min-width:0;padding-bottom:20px}
.dg-head{display:none}
/* Phones: the bracket only, and a pinned header above the cards. */
@media (max-width:767px){
 .dg{grid-template-columns:14px minmax(0,1fr);column-gap:10px}
 .dg-bracket{left:2px}
 .dg-badge{display:none}
 .dg-head{position:sticky;top:var(--dg-head-top);z-index:8;display:flex;align-items:center;gap:10px;padding:8px 0;background:var(--mm-s,#fff);border-bottom:1px solid var(--mm-l,#dbeaf1)}
 .dg-tile.is-small{flex:0 0 44px;width:44px;border-radius:10px;box-shadow:none}
 .dg-tile.is-small .dg-band{height:16px;font-size:9px;letter-spacing:.1em}
 .dg-tile.is-small>b{padding:4px 0 5px;font-size:19px}
 .dg-head-text{display:flex;flex-direction:column;gap:1px;flex:1;min-width:0}
 .dg-head-title{display:flex;align-items:baseline;gap:5px;color:var(--mm-i,#123b61)}
 .dg-head-title b{font:700 16px/1.25 Arial,Helvetica,sans-serif}
 .dg-head-title span,.dg-head-sub{color:var(--mm-mu,#58748c);font:400 12px/1.35 Arial,Helvetica,sans-serif}
 .dg-head-sub{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 html body .dg .dg-jump{background:var(--mm-s,#fff)!important;display:flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;min-width:0;min-height:0;margin:0;padding:0;box-sizing:border-box;border:1.5px solid var(--mm-c,#c9dde6);border-radius:50%;background:var(--mm-s,#fff);color:var(--mm-i,#123b61);cursor:pointer}
 html body .dg .dg-jump[aria-disabled=true]{opacity:.4;cursor:default}
}
.dg-jump:focus-visible,.dg-plus:focus-visible,.dg-add-card:focus-visible{outline:3px solid var(--mm-a,#0b7c8c);outline-offset:2px}

/* "Add a stop or a day": a round + button, its two cards in a tray above it, in the page flow. */
.dg-add{--dg-teal:#0b7c8c;display:flex;flex-direction:column;align-items:center;gap:10px;padding-top:4px;min-width:0}
.dg-add-tray{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%;box-sizing:border-box;padding:10px;border-radius:20px;background:var(--mm-t,#e5f5fb)}
html body .dg-add .dg-add-card{background:var(--mm-s,#fff)!important;display:flex;align-items:center;gap:12px;min-width:0;margin:0;padding:12px 14px;box-sizing:border-box;border:1.5px solid var(--mm-c,#c9dde6);border-radius:16px;background:var(--mm-s,#fff);box-shadow:0 4px 14px rgba(18,59,97,.08);color:var(--mm-a,#0b7c8c);text-align:left;cursor:pointer;transition:border-color .15s}
html body .dg-add .dg-add-card:hover{border-color:var(--dg-teal)}
.dg-add-card>svg{flex:0 0 auto}
html body .dg-add .dg-add-icon{background:var(--dg-teal,#0b7c8c)!important;color:#fff!important}
.dg-add-icon{display:flex;align-items:center;justify-content:center;flex:0 0 42px;width:42px;height:42px;border-radius:50%;background:var(--dg-teal);color:#fff}
.dg-add-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.dg-add-text b{color:var(--mm-i,#123b61);font:700 15px/1.25 Arial,Helvetica,sans-serif}
.dg-add-text span{overflow:hidden;color:var(--mm-mu,#58748c);font:400 12px/1.35 Arial,Helvetica,sans-serif;white-space:nowrap;text-overflow:ellipsis}
html body .dg-add .dg-plus{background:#0b7c8c!important;color:#fff!important;border:0!important;display:flex;align-items:center;justify-content:center;width:54px;height:54px;min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:50%;background:var(--dg-teal);color:#fff;box-shadow:0 8px 20px rgba(11,124,140,.28),0 0 0 6px var(--mm-t,#e5f5fb);cursor:pointer}
.dg-plus>span{display:flex;transition:transform .2s ease}
.dg-plus.is-open>span{transform:rotate(45deg)}
.dg-plus-caption{color:var(--mm-mu,#58748c);font:700 12px/1.3 Arial,Helvetica,sans-serif}
@media (max-width:767px){.dg-add-tray{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.dg-plus>span,.dg-add-card{transition:none}}

/* ==== Stop cards in day groups (Share a Journey, Make It Mine, Plan a Trip) ===================================== */
/* The header: grip and number, STOP n with its chip and the day's weather, the name (19px, one line) with a pencil,
   a one-line summary of its places, the actions, and the arrow. Phones put the actions on a second row. */
html body .mm-flow .dg .mm-stop-head{display:grid;grid-template-columns:14px 30px minmax(0,1fr) auto 32px;align-items:center;column-gap:12px;row-gap:10px;padding:12px 14px}
html body .mm-flow .dg .mm-stop-head>.mm-grip{width:14px;min-width:0;margin-right:-6px;padding:0;justify-content:center}
html body .mm-flow .dg .mm-stop-title{display:flex;flex-direction:column;gap:2px;min-width:0}
html body .mm-flow .dg .mm-kicker{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0}
html body .mm-flow .dg .mm-kicker>span:first-child{color:var(--mm-a);font:700 11px/1.3 Arial,Helvetica,sans-serif;letter-spacing:.1em}
html body .mm-flow .dg .mm-name{display:flex;align-items:center;gap:6px;min-width:0}
html body .mm-flow .dg .mm-name h4,html body .mm-flow .dg .mm-stop.is-open .mm-name h4{min-width:0;margin:0;overflow:hidden;color:var(--mm-i);font:700 19px/1.25 Arial,Helvetica,sans-serif;white-space:nowrap;text-overflow:ellipsis}
html body .mm-flow .dg .mm-rename{display:flex;flex:0 0 26px;align-items:center;justify-content:center;width:26px;height:26px;min-width:0;min-height:0;margin:0;padding:0;border:0;border-radius:50%;background:none;color:var(--mm-mu);cursor:pointer}
html body .mm-flow .dg .mm-rename:hover{background:var(--mm-s);color:var(--mm-i)}
html body .mm-flow .dg .mm-name.is-editing{display:block}
html body .mm-flow .dg .mm-name-input{width:100%;height:36px;min-height:0;margin:0;padding:0 10px;box-sizing:border-box;border:1.5px solid #0b7c8c;border-radius:9px;background:var(--mm-s);color:var(--mm-i);font:700 15px/1.2 Arial,Helvetica,sans-serif;outline:none}
html body .mm-flow .dg .mm-name-input::placeholder{color:var(--mm-mu);font-weight:400}
html body .mm-flow .dg .mm-name-input:focus{box-shadow:0 0 0 3px rgba(11,124,140,.18)}
html body .mm-flow .dg .mm-sub{display:block;min-width:0;overflow:hidden;color:var(--mm-mu);font:400 12px/1.35 Arial,Helvetica,sans-serif;white-space:nowrap;text-overflow:ellipsis}
html body .mm-flow .dg .mm-chipline,html body .mm-flow .dg .mm-thumb{display:none}
html body .mm-flow .dg .mm-ksr{justify-self:end;margin:0}
html body .mm-flow .dg .mm-ksr.is-single{padding:0;border:0;background:none}
html body .mm-flow .dg .mm-ksr.is-single .is-danger,html body .mm-flow .dg .mm-stop-head .sj-remove{height:34px;padding:0 12px;border:1px solid var(--mm-l);border-radius:999px;background:var(--mm-s);color:#c0392b;font:700 12px/1 Arial,Helvetica,sans-serif}
html[data-theme=dark] body .mm-flow .dg :is(.mm-ksr .is-danger,.mm-stop-head .sj-remove){color:#ff9a8a}
.mm-visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media (max-width:767px){
 html body .mm-flow .dg .mm-stop-head,html body .mm-flow .dg .mm-stop.is-open .mm-stop-head{grid-template-columns:14px 30px minmax(0,1fr) 32px;padding:12px 14px}
 html body .mm-flow .dg .mm-stop-head>.mm-toggle{grid-column:4;grid-row:1}
 html body .mm-flow .dg .mm-stop-head>:is(.mm-ksr,.sj-head-actions){grid-column:1/-1;grid-row:2;justify-self:start;order:0}
}
/* "Time here": a small dropdown with a clock. */
html body .mm-flow .dg .mm-time-pick{display:flex;flex:0 0 auto;align-items:center;gap:4px;height:34px;margin:0;padding:0 4px 0 10px;box-sizing:border-box;border:1px solid var(--mm-c);border-radius:999px;background:var(--mm-s);color:var(--mm-a)}
html body .mm-flow .dg .mm-time-pick select{width:auto;height:30px;min-height:0;margin:0;padding:0 2px;border:0;background:var(--mm-s);color:var(--mm-i);font:700 12px/1 Arial,Helvetica,sans-serif;outline:none;box-shadow:none;cursor:pointer}
html body .mm-flow .dg .mm-time-pick:focus-within{outline:3px solid rgba(11,124,140,.35);outline-offset:1px}
/* Make It Mine and Plan a Trip: the body opens straight to the places, the time here beside their heading. */
html body .mm-flow .dg .mm-stop-body{position:relative;display:flex;flex-direction:column;gap:8px;padding:12px 14px 14px}
html body .mm-flow .dg .mm-stop-body>.mm-time-pick{position:absolute;top:10px;right:14px;z-index:2}
html body .mm-flow .dg .mm-stop-body>.mm-time-pick+.sp>.sp-head{min-height:36px;padding-right:128px;align-items:center}
html body .mm-flow .dg .mm-free-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
html body .mm-flow .dg .mm-free-head .mm-time-pick{position:static}
/* Places heading, inline: "Places to see at this stop · drag to reorder or move to another stop". */
html body .mm-flow .dg .sp .sp-head.is-inline{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 6px}
html body .mm-flow .dg .sp .sp-head.is-inline strong{color:var(--mm-i)!important;font:700 12px/1.4 Arial,Helvetica,sans-serif!important}
html body .mm-flow .dg .sp .sp-head.is-inline small{color:var(--mm-mu)!important;font:400 12px/1.4 Arial,Helvetica,sans-serif!important}
html body .mm-flow .dg .sp .sp-drop{display:flex;align-items:center;justify-content:center;height:44px;margin:0;border:1.5px dashed var(--mm-c);border-radius:12px;color:var(--mm-mu);font:400 13px/1 Arial,Helvetica,sans-serif}
/* "+ Add a place you visited in Tallinn": a compact solid teal pill; it widens into a search field while typing. */
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;padding:0;border:0;background:none}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill>.sp-recs{align-self:stretch;width:auto;min-width:0;margin-top:4px}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-field{display:inline-flex;align-items:center;gap:8px;width:auto;max-width:100%;height:40px;margin:0;padding:0 18px 0 14px;box-sizing:border-box;border:1.5px solid #0b7c8c;border-radius:999px;background:#0b7c8c;color:#fff;box-shadow:none;cursor:pointer}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-plus{display:flex;flex:0 0 auto;width:auto;height:auto;border-radius:0;background:none;color:#fff!important}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-plus svg{stroke:#fff}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-text{display:flex;flex:0 1 auto;min-width:0}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-text input,html[data-theme=dark] body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-text input{field-sizing:content;width:auto;max-width:100%;height:24px;min-height:0!important;margin:0;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;color:#fff!important;font:700 14px/24px Arial,Helvetica,sans-serif!important;outline:none;cursor:pointer;text-overflow:ellipsis}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-text input::placeholder,html[data-theme=dark] body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-text input::placeholder{color:#fff!important;opacity:1}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-field:hover{background:#09707e}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-field:focus-within{width:100%;background:var(--mm-s);color:var(--mm-a);box-shadow:0 0 0 3px rgba(11,124,140,.18);cursor:text}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-field:focus-within .sp-add-plus{color:#0b7c8c!important}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-field:focus-within .sp-add-plus svg{stroke:#0b7c8c}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-field:focus-within .sp-add-text{flex:1}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-field:focus-within input,html[data-theme=dark] body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-field:focus-within input{width:100%;color:var(--mm-i)!important;cursor:text}
html body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-field:focus-within input::placeholder{color:var(--mm-mu)!important;font-weight:400}
html[data-theme=dark] body .mm-flow .dg .mm-stop .sp .sp-add.is-pill .sp-add-field:focus-within{border-color:var(--mm-a)}
/* Long names stay on one line: places, pit stops, their sub-lines and the route labels. */
html body .mm-flow .dg .sp-main{min-width:0}
html body .mm-flow .dg .sp-main>.sp-select,html body .mm-flow .dg .sp-main>.sp-select strong,html body .mm-flow .dg .sp-main>:is(.sp-meta,.sp-origin){display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body .mm-flow .dg :is(.mm-pit-text,.sj-pit-text){min-width:0}
html body .mm-flow .dg :is(.mm-pit-text,.sj-pit-text)>:is(strong,span){display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body .mm-flow .dg :is(.mm-leg-names,.sf-leg-caption){min-width:0;max-width:40%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
/* The notes button: "Add notes & packing list" on wider screens, "Add notes" on phones. */
.sp-notes-text .is-short{display:none}
@media (max-width:767px){.sp-notes-text .is-long{display:none}.sp-notes-text .is-short{display:inline}}
/* Where you stayed: one dashed card per day, after the day's stop cards. */
html body .mm-flow .dg :is(.mm-stay.mm-stay-day,.sj-stay.is-day){display:flex;align-items:center;gap:10px;margin:0;padding:10px 14px;box-sizing:border-box;border:1.5px dashed var(--mm-c);border-radius:14px;background:var(--mm-s)}
html body .mm-flow .dg .mm-stay.mm-stay-day .mm-stay-icon{flex:0 0 34px;width:34px;height:34px;border-radius:10px}
html body .mm-flow .dg .mm-stay.mm-stay-day .mm-stay-text small{font:700 11px/1.3 Arial,Helvetica,sans-serif;letter-spacing:.06em}
html body .mm-flow .dg .mm-stay.mm-stay-day .mm-stay-text strong{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body .mm-flow .dg .mm-stay.mm-stay-day>button{height:34px}
/* Travel lines inside a day group sit under the cards. */
html body .mm-flow .dg .mm-leg{margin:-4px 0 -4px 14px}
html body .mm-flow .dg .mm-day-empty{margin:0;padding:12px 14px;border:1.5px dashed var(--mm-c);border-radius:14px;color:var(--mm-mu);font-size:13px}

/* Share a Journey's header: the place search sits in the name's spot while the stop is being named (a new stop, or
   after the pencil); otherwise the name and its pencil. The time here and Remove sit together before the arrow. */
html body .mm-flow .dg .sf-stop-row .sj-name-slot{display:none}
html body .mm-flow .dg .sf-stop-row.is-naming .sj-name-slot{display:block;flex:1 1 auto;min-width:0}
html body .mm-flow .dg .sf-stop-row.is-naming .mm-name>:is(h4,.mm-rename){display:none}
html body .mm-flow .dg .sf-stop-row .sj-name-field{display:block!important;position:relative;margin:0!important;padding:0!important}
html body .mm-flow .dg .sf-stop-row .sj-name-field>span{position:absolute!important;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html body .mm-flow .dg .sf-stop-row .sj-name-field input{width:100%!important;height:36px!important;min-height:0!important;margin:0!important;padding:0 10px!important;box-sizing:border-box;border:1.5px solid #0b7c8c!important;border-radius:9px!important;background:var(--mm-s)!important;color:var(--mm-i)!important;font:700 15px/1.2 Arial,Helvetica,sans-serif!important;box-shadow:none!important;outline:none}
html body .mm-flow .dg .sf-stop-row .sj-name-field input::placeholder{color:var(--mm-mu)!important;font-weight:400!important}
html body .mm-flow .dg .sf-stop-row .sj-name-field input:focus{box-shadow:0 0 0 3px rgba(11,124,140,.18)!important}
html body .mm-flow .dg .sf-stop-row .sj-head-actions{display:flex;align-items:center;justify-self:end;gap:8px;min-width:0}
html body .mm-flow .dg .sf-stop-row .mm-time-pick{flex-direction:row!important;gap:4px!important;width:auto!important;height:34px!important;min-height:0!important;margin:0!important;padding:0 4px 0 10px!important;font:inherit}
html body .mm-flow .dg .mm-time-pick select{-webkit-appearance:auto;appearance:auto;width:auto!important;height:30px!important;min-height:0!important;margin:0!important;padding:0 2px!important;border:0!important;border-radius:0!important;background:var(--mm-s)!important;box-shadow:none!important;color:var(--mm-i)!important;font:700 12px/1 Arial,Helvetica,sans-serif!important}
html body .mm-flow .dg .sf-stop-row .sj-remove{display:inline-flex;align-items:center;justify-content:center;width:auto!important;min-width:0!important;min-height:0!important;margin:0!important}
/* The line under the old place field: the header's search shows the place, so it is not repeated. */
html body .mm-flow .dg .cj-stop>.cj-stop-location{display:none!important}
@media (max-width:767px){html body .mm-flow .dg .sf-stop-row .sj-head-actions{justify-self:start}}

/* Share a Journey's header is the same grid as Make It Mine's (its own rules make it a wrapping row otherwise). */
html body.share-flow.sf-v5 .sf-part-body .sj-mm .dg .sf-stop-row.mm-stop-head{display:grid;grid-template-columns:14px 30px minmax(0,1fr) auto 32px;align-items:center;column-gap:12px;row-gap:10px;flex-wrap:nowrap;padding:12px 14px}
html body.share-flow.sf-v5 .sf-part-body .sj-mm .dg .sf-stop-row.mm-stop-head>.mm-stop-title{flex:none;min-width:0}
@media (max-width:767px){
 html body.share-flow.sf-v5 .sf-part-body .sj-mm .dg .sf-stop-row.mm-stop-head{grid-template-columns:14px 30px minmax(0,1fr) 32px;padding:12px 14px}
 html body.share-flow.sf-v5 .sf-part-body .sj-mm .dg .sf-stop-row.mm-stop-head>.mm-toggle{grid-column:4;grid-row:1}
 html body.share-flow.sf-v5 .sf-part-body .sj-mm .dg .sf-stop-row.mm-stop-head>.sj-head-actions{grid-column:1/-1;grid-row:2;justify-self:start}
}
/* Travel lines and pit stops stay inside the day's column. */
html body .mm-flow .dg .dg-cards>:is(.sf-leg,.mm-leg){align-self:stretch;width:auto!important;min-width:0;max-width:100%;box-sizing:border-box}
html body .mm-flow .dg :is(.sf-leg-row,.mm-leg-row){flex-wrap:wrap;min-width:0}
html body .mm-flow .dg :is(.sj-pits,.sj-pit,.sj-part){min-width:0;max-width:100%;box-sizing:border-box}
