/* Weekend Planner: add buttons, the tray, the plan panel with its day timeline, toasts. */

/* "+" on every listing; a check once it's in the plan */
.pl-add { --s: 40px; flex: none; position: relative; width: var(--s); height: var(--s); padding: 0; border-radius: 50%; border: 1.5px solid var(--ink-3);
  background: #fffaf2; color: var(--ink); cursor: pointer; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.pl-add:hover { transform: scale(1.07); border-color: var(--ink); }
.pl-add:active { transform: scale(.94); }
.pl-add:focus-visible { outline: 2.5px solid var(--tile); outline-offset: 2px; }
.pl-add-i, .pl-add-i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; background: currentColor; border-radius: 2px; }
.pl-add-i::after { margin: 0; left: 0; top: 0; transform: rotate(90deg); }
.pl-add[aria-pressed="true"] { background: var(--sage); border-color: var(--sage); color: #fff; }
.pl-add[aria-pressed="true"] .pl-add-i { width: 7px; height: 13px; margin: -8px 0 0 -4px; background: none; border: solid currentColor; border-width: 0 2.4px 2.4px 0; border-radius: 0 0 1px 0; transform: rotate(45deg); }
.pl-add[aria-pressed="true"] .pl-add-i::after { display: none; }
/* With a word: a pill that reads "+ Plan", then "✓ Planned"; one width for both so nothing shifts on tap */
.pl-add.has-t { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-8); width: auto; min-width: 7.6em; height: 36px; padding: 0 var(--sp-12) 0 var(--sp-12); border-radius: var(--r-ctl);
  font: 600 .82rem/1 var(--sans); white-space: nowrap; }
.pl-add.has-t:hover { transform: translateY(-1px); }
.pl-add.has-t:active { transform: scale(.96); }
.pl-add.has-t .pl-add-i { position: relative; left: auto; top: auto; flex: none; width: 12px; height: 12px; margin: 0; background: none; border-radius: 0; }
.pl-add.has-t .pl-add-i::before, .pl-add.has-t .pl-add-i::after { content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 2px; margin: 0; background: currentColor; border-radius: 2px; }
.pl-add.has-t .pl-add-i::after { transform: rotate(90deg); }
.pl-add-t::after { content: "Plan"; }
.pl-add[aria-pressed="true"] .pl-add-t::after { content: "Planned"; }
.pl-add.has-t[aria-pressed="true"] .pl-add-i { width: 12px; height: 12px; border: 0; transform: none; }
.pl-add.has-t[aria-pressed="true"] .pl-add-i::before { left: 3px; top: -1px; width: 5px; height: 10px; background: none; border: solid currentColor; border-width: 0 2.2px 2.2px 0; border-radius: 0 0 1px 0; transform: rotate(45deg); }
.pl-add.has-t[aria-pressed="true"] .pl-add-i::after { display: none; }
.poster .pl-add { --s: 40px; position: relative; z-index: 3; margin-left: auto; border: 0; background: var(--paper-2); }
.poster .tag + .pl-add { margin-left: 0; }
.poster .pl-add.has-t { height: 34px; font-size: .82rem; }
.poster .pl-add[aria-pressed="true"] { background: var(--sage); }
.pick.in-plan { box-shadow: 0 0 0 2.5px var(--sage), var(--shadow-1); }
.ev.in-plan { background: #eef2e6; }
.ongoing li.in-plan a { box-shadow: 0 0 0 2px var(--sage), var(--shadow-1); }

/* Day colors shared by stubs, tabs and blocks */
.d0 { --tc: var(--sea); } .d1 { --tc: var(--tile); } .d2 { --tc: #d98a22; } .d3 { --tc: var(--dusk); } .d4 { --tc: var(--sage); } .d5 { --tc: #a4506f; } .d6 { --tc: #3f7f8c; } .d7 { --tc: #7a756c; }

/* Tray */
.pl-tray { position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; justify-content: center; pointer-events: none; }
.pl-tray-btn { pointer-events: auto; width: min(100%, 520px); display: flex; align-items: center; gap: var(--sp-16); padding: var(--sp-12) var(--sp-12) var(--sp-12) var(--sp-16); border: 0; border-radius: var(--radius);
  background: var(--ink); color: var(--paper); text-align: left; font: inherit; cursor: pointer; box-shadow: 0 18px 44px -14px rgba(10, 20, 36, .65);
  animation: pl-rise .5s var(--ease) both; }
.pl-tray-btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.pl-stubs { display: flex; flex: none; }
.pl-stubs i { display: grid; place-items: center; width: 18px; height: 26px; border-radius: 4px; margin-left: -7px; background: var(--tc); border: 2px solid var(--ink); color: #fff; font: 700 .62rem/1 var(--sans); font-style: normal; }
.pl-stubs i:first-child { margin-left: 0; }
.pl-tray-txt { display: grid; gap: 2px; min-width: 0; }
.pl-tray-txt b { font: 600 1.12rem/1.1 var(--sans); }
.pl-tray-sub { font-size: .82rem; opacity: .8; }
.pl-tray-sub.warn { color: #f4ab92; opacity: 1; font-weight: 600; }
.pl-open { margin-left: auto; flex: none; background: var(--sun); color: var(--ink); font: 600 .9rem/1 var(--sans); padding: var(--sp-12) var(--sp-16); border-radius: var(--r-ctl); }
.pl-tray.bump .pl-tray-btn { animation: pl-bump .5s var(--ease); }
body.menu-open .pl-tray { display: none; }
body.pl-has .site-foot { padding-bottom: 120px; }
@media (min-width: 900px) {
  .pl-tray { left: auto; right: 26px; bottom: 26px; }
  .pl-tray-btn { width: 370px; }
  body.pl-has .site-foot { padding-bottom: 0; }
}
@keyframes pl-rise { from { transform: translateY(30px); opacity: 0; } }
@keyframes pl-bump { 30% { transform: translateY(-5px) scale(1.025); } 60% { transform: translateY(1px) scale(.995); } }

.pl-fly { position: fixed; z-index: 80; width: 34px; height: 22px; border-radius: 5px; pointer-events: none; background: var(--tc); box-shadow: 0 10px 20px -8px rgba(24, 34, 46, .55); }
.pl-fly::before, .pl-fly::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--paper); }
.pl-fly::before { left: -4px; } .pl-fly::after { right: -4px; }

/* Panel: full screen on phones, a docked column on wide screens */
.pl-panel { position: fixed; z-index: 60; inset: 0; display: flex; flex-direction: column; background: var(--paper); overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(26px); transition: transform .4s var(--ease), opacity .25s; }
.pl-panel.open { opacity: 1; transform: none; }
body.pl-modal { overflow: hidden; }
@media (min-width: 1100px) {
  .pl-panel { z-index: 40; inset: 76px 0 0 auto; width: 420px; border-left: 1px solid var(--line); box-shadow: -24px 0 60px -40px rgba(24, 34, 46, .5); transform: translateX(36px); }
  body.pl-docked { padding-right: 420px; }
  /* the see-through bar showed the page on the left and bare paper over the panel: one solid bar while docked */
  body.pl-docked .site-head { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.pl-head { position: sticky; top: 0; z-index: 4; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-12);
  padding: calc(18px + env(safe-area-inset-top)) var(--sp-20) var(--sp-12); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.pl-k { margin: 0; font: 600 .75rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--tile); }
.pl-head h2 { margin: var(--sp-8) 0 0; font-size: 2.1rem; line-height: 1; }
.pl-head h2:focus { outline: none; }
.pl-head h2 em { color: var(--tile); }
.pl-x { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: #fffaf2; color: var(--ink); font: 400 1.75rem/1 var(--sans); cursor: pointer; }
.pl-x:hover { border-color: var(--ink-3); }

.pl-note { margin: var(--sp-4) var(--sp-20) var(--sp-12); padding: var(--sp-16) var(--sp-16); border-radius: var(--radius); background: #fff1d6; box-shadow: inset 0 0 0 1px rgba(217, 138, 34, .35); font-size: .9rem; }
.pl-note p { margin: 0; }
.pl-note-b { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-8); margin-top: var(--sp-12); }
.pl-note .btn, .pl-start-in .btn, .pl-empty .btn { padding: .65em 1.1em; font-size: .9rem; }
.pl-link { background: none; border: 0; padding: var(--sp-8); font: 600 .9rem var(--sans); color: var(--ink-2); text-decoration: underline; cursor: pointer; }
.pl-copy { display: grid; gap: var(--sp-8); font-weight: 600; }
.pl-copy input { font: 500 .9rem var(--sans); padding: var(--sp-8) var(--sp-12); border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fffaf2; color: var(--ink); width: 100%; }

.pl-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--sp-8); padding: 2px var(--sp-20) 0; }
.pl-tabs [role="tab"] { display: grid; justify-items: center; gap: var(--sp-4); padding: var(--sp-8) var(--sp-4) var(--sp-8); border: 0; border-radius: var(--radius); background: var(--paper-2); color: var(--ink-2);
  font: 600 .75rem/1.1 var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.pl-tabs [role="tab"] b { font: 500 italic 1.75rem/1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ink); font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.pl-tabs [role="tab"] small { font-size: .68rem; letter-spacing: 0; text-transform: none; }
.pl-tabs [aria-selected="true"] { background: var(--tc); color: #fff8ee; }
.pl-tabs [aria-selected="true"] b { color: #fff8ee; }
.pl-tabs .d2[aria-selected="true"], .pl-tabs .d2[aria-selected="true"] b { color: var(--ink); }
.pl-tabs [role="tab"]:focus-visible { outline: 2.5px solid var(--tile); outline-offset: 2px; }

.pl-day { padding: var(--sp-16) var(--sp-20) var(--sp-8); }
.pl-conds { display: flex; flex-wrap: wrap; gap: var(--sp-8); margin-bottom: var(--sp-12); }
.pl-c { display: inline-flex; align-items: center; gap: var(--sp-8); padding: var(--sp-8) var(--sp-8); border-radius: var(--r-tag); background: #fffaf2; box-shadow: inset 0 0 0 1px var(--line); font: 600 .75rem/1.1 var(--sans); }
a.pl-c { color: inherit; text-decoration: none; }
a.pl-c:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.pl-c.rain { background: #e1ecf1; box-shadow: none; color: var(--sea-deep); }
.pl-c.clock { background: var(--dusk); box-shadow: none; color: #fff; }
.pl-c.spot { background: #fff3c4; box-shadow: none; color: #6b3d0a; }
/* the day header's tier marks (tier.css), chip-sized; the chip prints the word */
.pl-c .tmark.pl-tm { --sz: 20px; border-radius: 5px; margin: -2px 0; }

.pl-allday { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-8); margin-bottom: var(--sp-12); }
.pl-lbl { font: 600 .68rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-right: 2px; }
.pl-pill { display: inline-flex; align-items: center; gap: 2px; padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-12); border-radius: var(--r-tag); background: #fffaf2; box-shadow: inset 0 0 0 1px var(--line); font-size: .82rem; }
.pl-pill .pl-name { font-size: .82rem; }

/* The day timeline: hours on the left, the sky band with plan blocks on the right */
.pl-tl { position: relative; display: grid; grid-template-columns: 52px 1fr; margin-top: var(--sp-4); }
.pl-hours { position: relative; }
.pl-hours span { position: absolute; right: 9px; transform: translateY(-50%); font: 600 .68rem/1 var(--sans); color: var(--ink-3); white-space: nowrap; }
.pl-hours span:first-child { transform: none; }
.pl-sky { position: relative; border-radius: var(--radius); overflow: hidden; }
.pl-sky::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, rgba(24, 34, 46, .08) 0 1px, transparent 1px 60px); pointer-events: none; }
.pl-lane { position: absolute; inset: 0 2px 0 8px; z-index: 2; }
.pl-blk { position: absolute; display: flex; flex-direction: column; gap: 1px; padding: var(--sp-8) var(--sp-32) var(--sp-8) var(--sp-12); border-radius: var(--radius-sm); overflow: hidden;
  background: rgba(255, 250, 242, .97); box-shadow: 0 6px 18px -8px rgba(24, 34, 46, .5); animation: pl-pop .35s var(--ease) both; }
.pl-blk.est { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 26px), rgba(0, 0, 0, .3)); mask-image: linear-gradient(180deg, #000 calc(100% - 26px), rgba(0, 0, 0, .3)); }
.pl-blk.clash { box-shadow: 0 0 0 2px var(--tile), 0 6px 18px -8px rgba(24, 34, 46, .5); }
.pl-t { font: 600 .75rem/1.25 var(--sans); color: var(--tile); }
.pl-blk.pick .pl-t::before { content: "★ "; color: var(--sun); }
.pl-name { font: 600 .9rem/1.22 var(--sans); color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-name:hover { text-decoration: underline; }
.pl-v { font-size: .75rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-blk.sm .pl-name { -webkit-line-clamp: 1; }
.pl-blk.sm .pl-t, .pl-blk.xs .pl-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-blk.xs { padding-top: var(--sp-4); padding-bottom: var(--sp-4); }
.pl-blk.xs .pl-name { -webkit-line-clamp: 1; }
.pl-blk.xs .pl-v { display: none; }
.pl-legin { color: var(--sea-deep); }
.pl-legin.tight { color: #6b2412; }
.pl-rm { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); font: 400 1.3rem/1 var(--sans); cursor: pointer; }
.pl-rm:hover { background: var(--paper-2); color: var(--ink); }
.pl-pill .pl-rm, .pl-any .pl-rm { position: static; flex: none; }
.pl-sunset { position: absolute; left: 0; right: 0; z-index: 1; height: 2px; margin-top: -1px; background: #fff3c4; box-shadow: 0 0 10px 3px rgba(255, 214, 120, .85); pointer-events: none; }
/* today: the time now, a thin line with its label on the right edge */
.pl-now { position: absolute; left: 0; right: 0; z-index: 1; height: 0; border-top: 2px solid #b9472a; pointer-events: none; }
.pl-hours .pl-nowh { z-index: 1; display: grid; justify-items: end; gap: 2px; padding: var(--sp-4) 0; transform: translateY(-50%); background: var(--paper); color: #b9472a; font-size: .68rem; font-weight: 700; }
.pl-hours .pl-nowh small { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
.pl-hours .pl-sunh { display: grid; justify-items: end; gap: 2px; transform: translateY(-50%); color: var(--tile); font-size: .75rem; }
.pl-hours .pl-sunh small { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: #8f520e; }
.pl-hours .pl-sunh::after { content: ""; position: absolute; right: -9px; top: 50%; width: 9px; height: 2px; margin-top: -1px; background: #f2b25c; }

/* Three or more at once: one card listing them */
.pl-stack { position: absolute; left: 0; right: 6px; display: flex; flex-direction: column; border-radius: var(--radius); overflow: auto; overscroll-behavior: contain;
  background: rgba(255, 250, 242, .97); box-shadow: 0 6px 18px -8px rgba(24, 34, 46, .5); animation: pl-pop .35s var(--ease) both; }
.pl-stack.clash { box-shadow: 0 0 0 2px var(--tile), 0 6px 18px -8px rgba(24, 34, 46, .5); }
.pl-stack-h { position: sticky; top: 0; z-index: 1; margin: 0; padding: var(--sp-8) var(--sp-12) var(--sp-8); background: inherit; font: 600 .75rem/1.2 var(--sans); color: var(--tile); }
.pl-stack-h b { margin-right: var(--sp-4); }
.pl-stack ul { list-style: none; margin: 0; padding: 0 var(--sp-4) var(--sp-4) var(--sp-12); }
.pl-stack li { display: grid; grid-template-columns: 58px 1fr 28px; align-items: start; column-gap: var(--sp-8); padding: var(--sp-8) 0; border-top: 1px solid var(--line); }
.pl-stack .pl-t { padding-top: 2px; }
.pl-stack li.is-pick .pl-t::before { content: "\2605  "; color: var(--sun); }
.pl-sn { display: grid; min-width: 0; }
.pl-stack .pl-rm { position: static; margin-top: -3px; }
@keyframes pl-pop { from { opacity: 0; transform: translateY(6px); } }

.pl-clashes { list-style: none; margin: var(--sp-12) 0 0; padding: 0; display: grid; gap: var(--sp-8); }
.pl-clashes li { padding: var(--sp-8) var(--sp-12); border-radius: var(--radius-sm); background: #f8e2d8; color: #6b2412; font-size: .9rem; line-height: 1.4; }
.pl-empty { padding: var(--sp-32) var(--sp-12) var(--sp-16); text-align: center; color: var(--ink-3); }
.pl-empty p { margin: 0 0 var(--sp-12); font: 500 italic 1.12rem/1.3 var(--sans); }
.pl-start-in { margin-bottom: var(--sp-16); padding: var(--sp-16); border-radius: var(--radius); background: #fffaf2; box-shadow: var(--shadow-1); text-align: center; }
.pl-start-in p { margin: 0 0 var(--sp-12); color: var(--ink-2); }

.pl-any { padding: 0 var(--sp-20); }
.pl-any:empty { display: none; }
.pl-any h3 { margin: var(--sp-16) 0 var(--sp-8); font: 600 .75rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.pl-any ul { list-style: none; margin: 0; padding: 0; }
.pl-any li { display: grid; grid-template-columns: 1fr auto; column-gap: var(--sp-8); align-items: center; padding: var(--sp-8) 0; border-top: 1px solid var(--line); }
.pl-any li span { grid-column: 1; font-size: .82rem; color: var(--ink-3); }
.pl-any li .pl-rm { grid-column: 2; grid-row: 1 / span 2; }

.pl-cal { margin: var(--sp-12) var(--sp-20) var(--sp-4); padding: var(--sp-16); border-radius: var(--radius); background: #fffaf2; box-shadow: var(--shadow-1); font-size: .9rem; }
.pl-cal p { margin: 0 0 var(--sp-8); }
.pl-cal .btn { padding: .65em 1.1em; font-size: .9rem; margin-bottom: var(--sp-16); }
.pl-cal ul { list-style: none; margin: 0 0 var(--sp-8); padding: 0; }
.pl-cal li a { display: block; padding: var(--sp-8) 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.pl-cal li a:hover { color: var(--tile); }
.pl-small { font-size: .82rem; color: var(--ink-3); }

.pl-actions { position: sticky; bottom: 0; z-index: 4; margin-top: auto; display: flex; align-items: center; gap: var(--sp-8);
  padding: var(--sp-16) var(--sp-20) calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, color-mix(in srgb, var(--paper) 0%, transparent), var(--paper) 28%); }
.pl-actions .btn { padding: .8em 1.3em; font-size: .9rem; }
.pl-actions .btn-ghost { color: var(--ink); }
.pl-clear { margin-left: auto; padding: var(--sp-8) var(--sp-4); background: none; border: 0; color: var(--ink-3); font: 600 .82rem var(--sans); text-decoration: underline; cursor: pointer; }

/* Status line */
.pl-toast { position: fixed; z-index: 70; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: var(--sp-16); max-width: calc(100vw - 32px);
  margin: 0; padding: var(--sp-12) var(--sp-16); border-radius: var(--radius); background: var(--ink); color: var(--paper); font-size: .9rem; line-height: 1.35;
  box-shadow: 0 14px 34px -14px rgba(10, 20, 36, .6); opacity: 0; transform: translate(-50%, 14px); pointer-events: none; transition: opacity .25s, transform .3s var(--ease); }
.pl-toast:empty { padding: 0; }
.pl-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.pl-undo { flex: none; padding: var(--sp-4) 2px; background: none; border: 0; color: var(--sun); font: 600 .9rem var(--sans); cursor: pointer; }
@media (min-width: 900px) { .pl-toast { bottom: 110px; } }
@media (min-width: 1100px) { body.pl-docked .pl-toast { left: calc(100vw - 210px); max-width: 388px; bottom: calc(96px + env(safe-area-inset-bottom)); } }

/* Ready-made plans: chips on the page, in the empty plan and under a preview */
.pl-ready { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-8); }
.pl-ready .pl-lbl { margin-right: var(--sp-4); }
.pl-rd { padding: .5em 0; margin-right: var(--sp-8); font-size: .9rem; border: 0; background: none; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.pl-rd:hover { text-decoration-color: currentColor; }
.pl-rd small { margin-left: var(--sp-4); font-weight: 700; color: var(--tile); }
/* as pills (the page's chips and the preview's "Or try"): no link underline inside the pill */
.pl-rd.chip { padding: var(--sp-8) var(--sp-16); margin-right: 0; text-decoration: none; }
.pl-rd.chip:hover { text-decoration: none; }
.pl-start-in .pl-ready { justify-content: center; margin-top: var(--sp-16); }
.pl-ortry { margin: var(--sp-16) 0; }
.pl-note .pl-ready { margin-top: var(--sp-12); padding-top: var(--sp-12); border-top: 1px solid rgba(217, 138, 34, .3); }

/* Ideas for free time: dashed, at their own times, with a "+" for listings */
.pl-idea { position: absolute; display: flex; flex-direction: column; gap: 1px; padding: var(--sp-8) var(--sp-48) var(--sp-8) var(--sp-12); border-radius: var(--radius-sm); overflow: hidden;
  background: rgba(255, 250, 242, .86); border: 1.5px dashed rgba(24, 34, 46, .34); animation: pl-pop .35s var(--ease) both; }
.pl-idea:hover { background: rgba(255, 250, 242, .97); }
.pl-idea .pl-t { color: var(--ink-2); }
.pl-idea .pl-add { --s: 32px; position: absolute; top: 6px; right: 6px; }
.pl-idea.hh { border-color: rgba(185, 71, 42, .5); }
.pl-idea.pool { border-color: rgba(29, 90, 110, .55); }
/* A place to eat: an idea until it's added, then a stop like any other with a warm ground */
.pl-idea.eat { border-color: rgba(217, 138, 34, .7); }
.pl-idea.eat .pl-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-idea.eat .pl-name { -webkit-line-clamp: 1; }
.pl-idea.eat .pl-v { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pl-idea.hh, .pl-idea.pool { padding-right: var(--sp-12); } /* no + to make room for */
.pl-idea .pl-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-next-idea { align-self: flex-start; display: inline-flex; align-items: center; gap: var(--sp-4); margin-top: auto; padding: var(--sp-4) 0 0; border: 0; background: none; color: var(--tile); font: 600 .75rem/1.2 var(--sans); cursor: pointer; }
.pl-next-idea small { margin-left: var(--sp-4); font-weight: 500; color: var(--ink-3); font-size: .68rem; }
.pl-next-idea:focus-visible { outline: 2.5px solid var(--tile); outline-offset: 2px; }
.pl-another { position: absolute; top: 42px; right: 6px; width: 32px; height: 32px; padding: 0; border: 1.5px solid var(--line); border-radius: 50%; background: #fffaf2; color: var(--ink-2); font: 400 1rem/1 var(--sans); cursor: pointer; }
.pl-another:hover { border-color: var(--ink-3); color: var(--ink); }
.pl-another:focus-visible, .pl-eat-tog:focus-visible { outline: 2.5px solid var(--tile); outline-offset: 2px; }
.pl-blk.meal { background: #fff3dd; }
.pl-eat-tog { border: 0; cursor: pointer; color: var(--ink); }
.pl-eat-tog[aria-pressed="false"] { background: transparent; color: var(--ink-2); }
/* the meal switch reads as a switch: a small track with a knob, teal when on */
.pl-sw { position: relative; flex: none; width: 26px; height: 16px; border-radius: 8px; background: #cfc6b8; transition: background .2s; }
.pl-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.pl-eat-tog[aria-pressed="true"] .pl-sw { background: var(--tile); }
.pl-eat-tog[aria-pressed="true"] .pl-sw::after { transform: translateX(10px); }
/* Plan it for me on a phone: the Build button stays in reach while the questions scroll */
@media (max-width: 899px) { .pl-ask fieldset { scroll-margin-bottom: 96px; } .pl-ask .pl-note-b { position: sticky; bottom: 0; z-index: 2; margin-inline: calc(-1 * var(--sp-16)); padding: var(--sp-12) var(--sp-16); background: linear-gradient(rgba(246, 240, 230, 0), var(--paper) 30%); pointer-events: none; } .pl-ask .pl-note-b > * { pointer-events: auto; } }
.pl-wet { color: var(--sea-deep); }
/* Getting there: a small label under a stop */
.pl-go { position: absolute; left: 4px; z-index: 1; padding: var(--sp-4) var(--sp-8); border-radius: var(--r-tag); background: rgba(255, 250, 242, .92); color: var(--ink-2); font: 600 .68rem/1.2 var(--sans); white-space: nowrap; }
.pl-go::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: var(--sp-8); border-radius: 50%; background: var(--sea); vertical-align: 1px; }
.pl-go.tight { background: #f8e2d8; color: #6b2412; }
.pl-go.tight::before { background: var(--tile); }

/* Tight connections and rain, under the day */
.pl-tips { list-style: none; margin: var(--sp-8) 0 0; padding: 0; display: grid; gap: var(--sp-8); }
.pl-keepone { display: flex; flex-wrap: wrap; gap: var(--sp-8); margin-top: var(--sp-8); }
.pl-keepone button { padding: var(--sp-4) var(--sp-12); border: 1.5px solid rgba(107, 36, 18, .35); border-radius: var(--r-tag); background: #fffaf2; color: #6b2412; font: 600 .75rem/1.2 var(--sans); cursor: pointer; text-align: left; }
.pl-keepone button:hover { border-color: #6b2412; }
.pl-keepone button:focus-visible { outline: 2.5px solid var(--tile); outline-offset: 2px; }
.pl-clashes + .pl-tips { margin-top: var(--sp-8); }
.pl-tips li { padding: var(--sp-8) var(--sp-12); border-radius: var(--radius-sm); font-size: .9rem; line-height: 1.4; }
.pl-tips .tight { background: #fff1d6; color: #5c3a06; }
.pl-tips .rain { background: #e1ecf1; color: var(--sea-deep); }
.pl-tips .pl-name { display: inline; font-size: inherit; color: inherit; text-decoration: underline; }
.pl-tips .pl-link { padding: 2px var(--sp-4); color: inherit; }

/* Plan it for me: three questions as tap-to-pick chips, then Swap on each item */
.pl-ask fieldset, .pl-around { margin: var(--sp-16) 0 0; padding: 0; border: 0; }
.pl-around + .pl-around { margin-top: var(--sp-12); }
.pl-around + .pl-note-b { margin-top: var(--sp-16); }
.pl-ask legend, .pl-around legend { padding: 0; margin-bottom: var(--sp-8); font: 600 .75rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.pl-opts { display: flex; flex-wrap: wrap; gap: var(--sp-8); }
.pl-opts label { position: relative; cursor: pointer; }
.pl-opts input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pl-opts span { display: inline-block; padding: .55em .95em; border-radius: var(--r-ctl); border: 1.5px solid rgba(24, 34, 46, .2); background: #fffaf2; color: var(--ink); font: 600 .82rem/1.1 var(--sans); }
.pl-opts input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pl-opts input:focus-visible + span { outline: 2.5px solid var(--tile); outline-offset: 2px; }
.pl-ask-msg { margin-top: var(--sp-12) !important; font-weight: 600; color: #6b2412; }
.pl-ask .pl-note-b { margin-top: var(--sp-16); }
.pl-swap { position: absolute; top: 5px; right: 5px; padding: var(--sp-4) var(--sp-8); border: 1.5px solid var(--line); border-radius: var(--r-tag); background: #fffaf2; color: var(--ink); font: 600 .75rem/1 var(--sans); cursor: pointer; }
.pl-swap:hover { border-color: var(--ink-3); }
.pl-blk:has(.pl-swap) { padding-right: var(--sp-64); }
.pl-blk .pl-swap[data-kept-swap] { top: auto; bottom: 5px; } /* a kept stop: Swap under its × */
.pl-pill .pl-swap, .pl-any .pl-swap, .pl-stack .pl-swap { position: static; flex: none; }
.pl-any li .pl-swap { grid-column: 2; grid-row: 1 / span 2; }
.pl-stack li:has(.pl-swap) { grid-template-columns: 58px 1fr auto; }

/* The story image: a button under the plan, a preview in the note */
.pl-story { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-8) var(--sp-12); margin: var(--sp-16) var(--sp-20) 0; padding: var(--sp-16) var(--sp-16); border-radius: var(--radius); background: #fffaf2; box-shadow: var(--shadow-1); }
.pl-story[hidden] { display: none; }
.pl-story .btn { padding: .6em 1.05em; font-size: .9rem; color: var(--ink); }
.pl-story span { flex: 1 1 14em; font-size: .82rem; color: var(--ink-2); }
.pl-ticket { margin: 0; display: grid; place-items: center; }
.pl-ticket img { display: block; width: auto; max-width: 100%; max-height: 62vh; border-radius: var(--radius); box-shadow: 0 14px 34px -14px rgba(24, 34, 46, .5); }
.pl-note .btn-ghost { color: var(--ink); }

/* Timeline or map */
.pl-views { display: flex; gap: var(--sp-4); margin: var(--sp-12) var(--sp-20) 0; padding: var(--sp-4); border-radius: calc(var(--r-ctl) + 3px); background: var(--paper-2); width: max-content; }
.pl-views[hidden] { display: none; }
.pl-views button { padding: var(--sp-8) var(--sp-16); border: 0; border-radius: var(--r-tag); background: transparent; color: var(--ink-2); font: 600 .82rem/1 var(--sans); cursor: pointer; }
.pl-views button[aria-pressed="true"] { background: #fffaf2; color: var(--ink); box-shadow: 0 1px 3px rgba(24, 34, 46, .18); }
.pl-views button:focus-visible { outline: 2.5px solid var(--tile); outline-offset: 2px; }
.pl-map { height: min(52vh, 360px); border-radius: var(--radius); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.pl-pin { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 var(--sp-8); border-radius: 999px; background: var(--tc); color: #fff8ee;
  font: 700 .82rem/1 var(--sans); border: 2.5px solid #fffaf2; box-shadow: 0 4px 10px -3px rgba(24, 34, 46, .55); }
.pl-map-note { margin: var(--sp-8) 2px var(--sp-4); }
.pl-stops { list-style: none; margin: var(--sp-8) 0 0; padding: 0; }
.pl-stops li { display: grid; grid-template-columns: 30px 1fr; column-gap: var(--sp-8); align-items: start; padding: var(--sp-8) 0; border-top: 1px solid var(--line); }
.pl-n { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tc); color: #fff8ee; font: 700 .82rem/1 var(--sans); }
.pl-n.off { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.pl-leg { margin-top: var(--sp-4); font-size: .75rem; color: var(--sea-deep); font-weight: 600; }
.pl-route { margin-top: var(--sp-12); padding: .65em 1.1em; font-size: .9rem; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .pl-panel, .pl-toast { transition: none; }
  .pl-tray-btn, .pl-blk, .pl-idea, .pl-tray.bump .pl-tray-btn { animation: none; }
}
.pl-blk.mo { background: #ffe9d2; }
.pl-blk.mo .pl-t::before { content: "◆ "; color: var(--sun); }
/* "Since you saved this": what changed in a saved plan since the last visit */
.pl-since { margin: var(--sp-4) 0 var(--sp-8) var(--sp-20); padding: 0; }
.pl-since li { margin: var(--sp-4) 0; }
.pl-map-note:empty { display: none; }
/* Prices, booking and getting there: a kit-style drawer */
.pl-practical { margin: var(--sp-16) 0 var(--sp-24); border-radius: var(--radius); background: #fffaf2; box-shadow: inset 0 0 0 1px var(--line); }
.pl-practical summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-12); padding: var(--sp-12) var(--sp-16); font: 600 .9rem/1.3 var(--sans); cursor: pointer; list-style: none; }
.pl-practical summary::-webkit-details-marker { display: none; }
.pl-practical summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-top: -4px; border: solid var(--ink-2); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.pl-practical[open] summary::after { margin-top: var(--sp-4); transform: rotate(-135deg); }
.pl-practical summary:focus-visible { outline: 2.5px solid var(--tile); outline-offset: 2px; border-radius: var(--radius); }
.pl-practical ul { margin: 0; padding: 0 var(--sp-16) var(--sp-8); list-style: none; }
.pl-practical li { padding: var(--sp-12) 0; border-top: 1px solid var(--line); font-size: .82rem; line-height: 1.45; }
.pl-practical li a { color: var(--tile); }
/* overlapping picks: a choice, each with our take */
.pl-clashes li.pl-decide { padding: var(--sp-12); background: #fbeee2; color: var(--ink); }
.pl-decide > p { margin: 0 0 var(--sp-8); color: #6b2412; }
.pl-decide ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-8); }
.pl-clashes .pl-decide li { display: grid; gap: var(--sp-4); padding: var(--sp-12); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.pl-decide .pl-dt { font: 600 .75rem/1.2 var(--sans); color: var(--tile); }
.pl-decide .pl-why { font-size: .82rem; line-height: 1.45; color: var(--ink-2); }
.pl-decide .btn { justify-self: start; margin-top: var(--sp-4); padding: var(--sp-8) var(--sp-16); font-size: .82rem; }
.pl-c.park a { color: inherit; font-weight: 600; }
/* a stop's name opens its detail sheet */
button.pl-name { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
button.pl-name:focus-visible { outline: 2.5px solid var(--tile); outline-offset: 2px; border-radius: 2px; }
/* the detail sheet: up from the bottom on a phone, along the bottom of the docked panel on a desktop */
.pl-sheet-bg { position: fixed; inset: 0; z-index: 61; background: rgba(24, 34, 46, .38); }
.pl-sheet { position: fixed; z-index: 62; left: 0; right: 0; bottom: 0; max-height: 82vh; overflow-y: auto; overscroll-behavior: contain; border-radius: var(--radius) var(--radius) 0 0;
  background: var(--paper); box-shadow: 0 -20px 50px -20px rgba(24, 34, 46, .45); transform: translateY(24px); opacity: 0; transition: transform .22s var(--ease), opacity .22s; }
.pl-sheet.open { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .pl-sheet { transition: none; } }
@media (min-width: 1100px) { .pl-sheet-bg { left: auto; width: 420px; top: 76px; } .pl-sheet { left: auto; width: 420px; } }
.pl-sheet-in { position: relative; display: grid; gap: var(--sp-8); padding: var(--sp-20) var(--sp-20) calc(var(--sp-20) + env(safe-area-inset-bottom)); }
.pl-sheet-x { position: absolute; top: var(--sp-12); right: var(--sp-12); width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: #fffaf2; color: var(--ink); font: 400 1.5rem/1 var(--sans); cursor: pointer; }
.pl-sheet-k { margin: 0; padding-right: var(--sp-48); font: 600 .75rem/1.3 var(--sans); color: var(--tile); }
.pl-sheet h3 { margin: 0; padding-right: var(--sp-48); font: 600 1.12rem/1.25 var(--sans); color: var(--ink); }
.pl-sheet-v { margin: 0; font-size: .82rem; color: var(--ink-3); }
.pl-sheet-b { margin: var(--sp-4) 0 0; font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.pl-sheet dl { margin: var(--sp-4) 0 0; display: grid; gap: var(--sp-4); }
.pl-sheet dl div { display: grid; grid-template-columns: 6.5em 1fr; gap: var(--sp-8); font-size: .82rem; }
.pl-sheet dt { color: var(--ink-3); }
.pl-sheet dd { margin: 0; color: var(--ink); }
.pl-sheet-links { display: flex; flex-wrap: wrap; gap: var(--sp-8) var(--sp-16); margin: var(--sp-4) 0 0; font: 600 .82rem/1.3 var(--sans); }
.pl-sheet-links a { color: var(--tile); }
.pl-near h4 { margin: var(--sp-8) 0 var(--sp-4); font: 600 .75rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pl-near ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
.pl-near li { display: flex; flex-wrap: wrap; gap: 0 var(--sp-8); font-size: .82rem; }
.pl-near a { font-weight: 600; color: var(--ink); }
.pl-near span { color: var(--ink-3); }
.pl-sheet-acts { display: flex; flex-wrap: wrap; gap: var(--sp-8); margin-top: var(--sp-8); }
.pl-sheet-acts .btn { padding: var(--sp-8) var(--sp-16); font-size: .82rem; }
