/* Editing foundation on New master (edit.js): Edit button, edit bar, in-panel confirm, note. base.css tokens. */
#edBtn { position: absolute; right: 12px; bottom: 34px; z-index: 4; display: flex; align-items: center; gap: 6px; padding: 8px 13px 8px 11px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; font: 600 13px Inter, system-ui, sans-serif; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); min-height: 40px; }
#edBtn[hidden] { display: none; }
#edBtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#edBtn:hover, #edBtn:focus-visible { border-color: var(--accent); outline: none; }
#edBtn.on { background: var(--accent); color: #1b1712; border-color: var(--accent); }
#edBar { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 5; width: min(560px, calc(100% - 200px)); box-sizing: border-box;
  background: var(--panel); color: var(--ink); border: 1px solid var(--accent); border-radius: 12px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px); font-size: 12.5px; }
#edBar[hidden] { display: none; }
.ed-head { display: flex; align-items: center; gap: 6px; }
.ed-head b { font-weight: 800; }
.ed-who { color: var(--soft); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-done { background: var(--accent); color: #1b1712; border: 0; border-radius: 8px; padding: 7px 14px; font: 700 12.5px Inter, system-ui, sans-serif; cursor: pointer; min-height: 34px; }
.ed-tools:empty { display: none; }
.ed-tools { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ed-slot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ed-slot button { background: rgba(246, 234, 210, 0.08); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; font: 600 12.5px Inter, system-ui, sans-serif; cursor: pointer; min-height: 34px; }
.ed-slot button:hover { border-color: var(--accent); }
.ed-hint { color: var(--soft); margin-top: 4px; font-size: 11.5px; }
#edAsk { position: fixed; inset: 0; z-index: 50; background: rgba(5, 12, 12, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ed-ask { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--ink); font-size: 13px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.ed-ask b { font-size: 14.5px; }
.ed-ask p { margin: 6px 0 0; color: var(--soft); line-height: 1.45; }
.ed-ask label { display: block; margin-top: 10px; color: var(--soft); font-size: 12px; }
.ed-ask input { display: block; width: 100%; box-sizing: border-box; margin-top: 5px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: rgba(246, 234, 210, 0.07); color: var(--ink); font: inherit; font-size: 16px; }
.ed-ask-b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ed-ask-b button { border-radius: 8px; padding: 8px 14px; font: 700 13px Inter, system-ui, sans-serif; cursor: pointer; border: 1px solid var(--line); background: none; color: var(--ink); min-height: 38px; }
.ed-ask-b .ed-yes { background: var(--accent); color: #1b1712; border-color: var(--accent); }
.ed-ask-b .ed-yes.danger { background: #c4553f; border-color: #c4553f; color: #fff; }
.ed-ask-b .ed-yes:disabled { opacity: 0.45; cursor: default; }
#edToast { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 9; padding: 7px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-size: 12.5px; }
#edToast[hidden] { display: none; }
#edToast.bad { border-color: #c4553f; }
#edToast.good { border-color: #1fa24a; }
/* while editing: the cars note and the hover name step aside */
body.nm-editing #carNote, body.nm-editing #nvTip { display: none !important; }
@media (max-width: 760px) {
  #edBtn { bottom: 64px; right: 12px; }
  /* phones: the edit bar sits at the bottom, the place sheet moves up above it */
  #edBar { left: 8px; right: 8px; bottom: 8px; transform: none; width: auto; padding: 8px; }
  body.nm-editing #edBtn { display: none; }
  body.nm-editing #place { bottom: 96px; max-height: 40%; }
  body.nm-editing #dataChip { display: none !important; }
  #edToast { bottom: 150px; }
}
