/* The professionals' panel (docs/m5-blog.md, "The panel"). Phone first.
   Every page, the editor included, is Encuadre's own and the same for
   every site: the sales page's fonts and colors. A site's design shows
   only in the previews. */
@font-face { font-family: "Piazzolla"; src: url("fonts/piazzolla-roman.woff2") format("woff2"); font-weight: 300 600; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
:root {
  --p-paper: #F6F3EE; --p-ink: #1B2036; --p-accent: #2340C9; --p-on-accent: #F6F3EE; --p-muted: #4A4F66; --p-radius: 10px;
  --p-display: "Piazzolla", Georgia, serif; --p-body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --p-page: #ECE7DE;
  --p-rule: color-mix(in srgb, var(--p-ink) 14%, transparent); --p-tint: color-mix(in srgb, var(--p-ink) 6%, transparent);
  --p-bad: #B3261E; --ed-kb: 0px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--p-page); color: var(--p-ink); font-family: var(--p-body); font-size: max(17px, 1.0625rem); line-height: 1.65; -webkit-tap-highlight-color: transparent; }
@media (min-width: 760px) { body { font-size: max(18px, 1.125rem); } }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--p-accent); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- The frame: header, buttons ---- */
.p-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px;
  background: color-mix(in srgb, var(--p-page) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--p-rule); font-size: 15px; line-height: 1.3;
}
.p-top .back { color: inherit; text-decoration: none; padding: 8px 6px; border-radius: 8px; white-space: nowrap; }
.p-top .back:hover { background: var(--p-tint); }
.p-out { margin-left: auto; }
.p-top .brand { font-family: var(--p-display); font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-status { flex: 1; min-width: 0; text-align: right; font-size: 13px; color: var(--p-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-status.bad { color: var(--p-bad); white-space: normal; line-height: 1.25; }
.btn, .btn-ghost, .btn-quiet {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--p-rule); border-radius: 999px; background: var(--p-paper); color: var(--p-ink);
  font-size: 15px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
}
.btn { background: var(--p-accent); color: var(--p-on-accent); border-color: transparent; }
.btn:hover { filter: brightness(1.06); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--p-ink) 30%, transparent); }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-quiet:hover { background: var(--p-tint); }
.danger { color: var(--p-bad); }
button:disabled { opacity: .5; cursor: default; }
@media (max-width: 480px) { .narrow-hide { display: none !important; } }
.p-menu { position: relative; }
.p-menu .btn-quiet { font-size: 22px; padding: 0 10px; letter-spacing: 1px; }
.p-menu-list { position: absolute; right: 0; top: 100%; z-index: 30; display: none; flex-direction: column; width: min(264px, calc(100vw - 24px)); margin: 6px 0 0; padding: 6px; list-style: none; border-radius: 12px; background: var(--p-paper); border: 1px solid var(--p-rule); box-shadow: 0 14px 40px -16px rgba(0,0,0,.4); }
.p-menu[open] .p-menu-list, .p-menu.open .p-menu-list { display: flex; }
.p-menu-list a, .p-menu-list button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: inherit; text-align: left; text-decoration: none; font-size: 16px; }
.p-menu-list a:hover, .p-menu-list button:hover { background: var(--p-tint); }
.p-menu summary { list-style: none; cursor: pointer; }
.p-menu summary::-webkit-details-marker { display: none; }
/* An action in the menu that can't be undone opens a box that says what
   happens; the box's button does it. */
.p-confirm summary { display: block; padding: 10px 12px; border-radius: 8px; font-size: 16px; }
.p-confirm summary:hover, .p-confirm[open] summary { background: var(--p-tint); }
.p-confirm-box { padding: 8px 12px 10px; font-size: 14px; line-height: 1.45; color: var(--p-muted); }
.p-confirm-box p { margin: 0 0 10px; }
.p-menu-list .p-confirm-box button { min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--p-bad); color: #fff; font-size: 15px; font-weight: 600; text-align: center; }
.p-menu-list .p-confirm-box button:hover { background: var(--p-bad); filter: brightness(1.08); }

/* ---- Pages: login, the list ---- */
.p-narrow { max-width: 26rem; margin: 0 auto; padding: clamp(3rem, 12vh, 7rem) 1.25rem; display: grid; gap: 1rem; }
.p-wide { max-width: 44rem; margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 5rem; display: grid; gap: 1.25rem; }
h1, h2 { font-family: var(--p-display); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2.3rem); }
h2 { font-size: 1.3rem; }
p { margin: 0; }
.muted { color: var(--p-muted); font-size: .9375rem; }
.p-form { display: grid; gap: .75rem; }
.p-form label { font-weight: 600; font-size: .875rem; }
.p-form input[type="email"], .p-form input[type="text"] { width: 100%; min-height: 44px; padding: .6em .8em; border: 1px solid var(--p-rule); border-radius: calc(var(--p-radius) * .8); background: var(--p-paper); font-size: max(16px, 1rem); }
.p-form input:focus { outline: none; border-color: var(--p-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-accent) 18%, transparent); }
.p-alert { padding: .8em 1em; border-left: 3px solid var(--p-bad); background: var(--p-paper); border-radius: 0 calc(var(--p-radius) * .6) calc(var(--p-radius) * .6) 0; font-size: .95rem; }
.p-ok { padding: .8em 1em; border-left: 3px solid var(--p-accent); background: var(--p-paper); border-radius: 0 calc(var(--p-radius) * .6) calc(var(--p-radius) * .6) 0; font-size: .95rem; }
.p-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.p-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: center; padding: 14px 16px; background: var(--p-paper); border: 1px solid var(--p-rule); border-radius: var(--p-radius); color: inherit; text-decoration: none; }
.p-item:hover { border-color: color-mix(in srgb, var(--p-ink) 30%, transparent); }
.p-item .t { grid-column: 1; grid-row: 1; font-family: var(--p-display); font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.p-item .m { grid-column: 1; grid-row: 2; font-size: .875rem; color: var(--p-muted); }
.p-item .s { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--p-tint); white-space: nowrap; }
.p-item .s.live { background: color-mix(in srgb, var(--p-accent) 16%, transparent); color: var(--p-accent); }
.p-empty { padding: 2rem 1.25rem; text-align: center; background: var(--p-paper); border: 1px dashed var(--p-rule); border-radius: var(--p-radius); display: grid; gap: 1rem; justify-items: center; }
.p-foot { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding-top: 1.5rem; border-top: 1px solid var(--p-rule); font-size: .875rem; color: var(--p-muted); }
.p-foot a, .p-foot button { color: inherit; background: none; border: 0; padding: 0; font-size: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }

/* ---- A site's sections, and the Agenda (docs/m7-panel.md) ---- */
.p-tabs { display: flex; gap: 6px; margin: -.25rem 0 0; }
.p-tabs a { padding: 8px 16px; border-radius: 999px; color: var(--p-muted); font-size: .9375rem; font-weight: 600; text-decoration: none; }
.p-tabs a:hover { background: var(--p-tint); color: var(--p-ink); }
.p-tabs a[aria-current] { background: var(--p-paper); color: var(--p-ink); box-shadow: inset 0 0 0 1px var(--p-rule); }
/* The Agenda on a wide screen: the hours and price on the left, the
   accounts and the switch beside them, one column below 1100px
   (docs/m7-panel.md, "Layout"). */
.p-cols, .p-col { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
@media (min-width: 1100px) {
  .p-wide-2 { max-width: 72rem; }
  .p-cols { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); align-items: start; }
}
.p-card { display: grid; gap: 1rem; padding: 1.25rem; background: var(--p-paper); border: 1px solid var(--p-rule); border-radius: var(--p-radius); }
@media (min-width: 760px) { .p-card { padding: 1.5rem 1.75rem; } }
.p-card form { margin: 0; }
.p-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.p-pill { font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--p-tint); white-space: nowrap; }
.p-pill.live { background: color-mix(in srgb, var(--p-accent) 16%, transparent); color: var(--p-accent); }
/* A field's value that came from somewhere else (the price, from her
   trial-page form, until the agenda is first saved). */
.p-note { margin: .35rem 0 0; font-size: .9375rem; font-weight: 600; color: var(--p-accent); }
/* "Tus cuentas" (docs/m7-panel.md, "M7b"). */
.p-acct { display: grid; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--p-rule); }
.p-acct h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.p-acct p { margin: 0; }
.p-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: .7rem; }
.p-warn { padding: .8em 1em; border-left: 3px solid #B26A00; background: color-mix(in srgb, #B26A00 8%, var(--p-paper)); border-radius: 0 calc(var(--p-radius) * .6) calc(var(--p-radius) * .6) 0; font-size: .95rem; }
.p-warn ul { margin: .4em 0 0; padding-left: 1.2em; }
.p-warn li { margin: .2em 0; }
.p-agenda { gap: 1.25rem; }
.p-agenda fieldset { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: .6rem; }
.p-agenda legend { padding: 0; margin: 0 0 .1rem; font-weight: 600; font-size: .875rem; }
.p-agenda label { display: block; margin: 0 0 .35rem; }
.p-agenda input[type="text"] { width: 100%; min-height: 44px; padding: .55em .8em; border: 1px solid var(--p-rule); border-radius: calc(var(--p-radius) * .8); background: var(--p-page); font-size: max(16px, 1rem); }
.p-agenda input[type="text"]:focus { outline: none; border-color: var(--p-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-accent) 18%, transparent); }
.p-agenda input::placeholder { color: color-mix(in srgb, var(--p-muted) 60%, transparent); }
.p-agenda .muted { margin-top: .3rem; font-size: .875rem; line-height: 1.45; }
.p-days .muted b { white-space: nowrap; }
.p-day { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: 10px; }
.p-day label { margin: 0; font-weight: 600; font-size: .9375rem; }
/* The week's hours as rows of blocks (hours.js); the text fields above are
   what shows without the script. */
[data-hours] [hidden] { display: none !important; }
.hw-day { display: grid; grid-template-columns: 8.25rem minmax(0, 1fr); gap: 4px 8px; align-items: start; padding: 12px 0; border-top: 1px solid var(--p-rule); }
.hw-day.hw-first { border-top: 0; padding-top: 4px; }
.hw-name { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 600; font-size: .9375rem; }
.hw-body { display: grid; gap: 6px; min-width: 0; }
.hw-off { margin: 0; min-height: 40px; display: flex; align-items: center; color: var(--p-muted); font-size: .9375rem; }
.hw-block { display: flex; align-items: center; gap: 6px; }
/* Our own chevron, not the browser's: theirs sits against the border and
   differs per browser. The time starts on the left, like any field. */
.p-agenda .hw-time { appearance: none; -webkit-appearance: none; width: 5.75rem; min-height: 40px; padding: 0 1.75rem 0 .7rem; border: 1px solid var(--p-rule); border-radius: calc(var(--p-radius) * .8); background: var(--p-page) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%234A4F66' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right .65rem center / 12px 8px; font-size: max(16px, 1rem); font-variant-numeric: tabular-nums; cursor: pointer; }
.hw-time:focus { outline: none; border-color: var(--p-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-accent) 18%, transparent); }
.hw-to { color: var(--p-muted); font-size: .9375rem; }
.hw-icon { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: none; color: var(--p-muted); }
.hw-icon:hover { background: var(--p-tint); color: var(--p-ink); }
.hw-err { margin: 2px 0 0; color: var(--p-bad); font-size: .875rem; line-height: 1.35; }
.hw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.hw-link { border: 0; background: none; padding: 6px 0; color: var(--p-accent); font-weight: 600; font-size: .875rem; }
.hw-link:hover { text-decoration: underline; }
.hw-copy { display: grid; gap: 10px; padding: 12px; border-radius: var(--p-radius); background: var(--p-tint); }
.hw-copy p { margin: 0; font-size: .875rem; }
.hw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hw-chip, .hw-btn { min-height: 36px; padding: 0 12px; border: 1px solid var(--p-rule); border-radius: 999px; background: var(--p-paper); font-weight: 600; font-size: .875rem; }
.hw-chip[aria-pressed="true"], .hw-primary { background: var(--p-accent); color: var(--p-on-accent); border-color: transparent; }
.hw-primary:disabled { opacity: .45; cursor: default; }
.hw-switch { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 36px; height: 22px; margin: 0; border: 1px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--p-ink) 22%, transparent); cursor: pointer; transition: background .15s; }
.hw-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--p-paper); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.hw-switch:checked { background: var(--p-accent); }
.hw-switch:checked::after { transform: translateX(14px); }
.hw-switch:focus-visible, .hw-icon:focus-visible, .hw-link:focus-visible, .hw-chip:focus-visible, .hw-btn:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 2px; }
/* Phones: the day's name on its own line, its blocks under it, lined up
   with the name; a day without hours keeps "No atendés" beside it. */
@media (max-width: 560px) {
  .hw-day { grid-template-columns: minmax(0, 1fr); }
  .hw-day:not(.is-off) .hw-body { padding-left: 46px; }
  .hw-day.is-off { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { .hw-switch, .hw-switch::after { transition: none; } }
/* High contrast drops backgrounds: draw the switch with system colors. */
@media (forced-colors: active) {
  .hw-switch { forced-color-adjust: none; background: Canvas; border-color: ButtonText; }
  .hw-switch::after { background: ButtonText; box-shadow: none; }
  .hw-switch:checked { background: Highlight; border-color: Highlight; }
  .hw-switch:checked::after { background: HighlightText; }
}
.p-pairs { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .p-pairs { grid-template-columns: 1fr 1fr; gap: 1.1rem 1.25rem; } }
.p-unit { display: flex; align-items: center; gap: 8px; }
.p-unit input[type="text"] { flex: 0 1 8.5rem; min-width: 0; }
.p-unit span { color: var(--p-muted); font-size: .9375rem; white-space: nowrap; }
.p-agenda label.p-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-weight: 400; font-size: .9375rem; line-height: 1.45; cursor: pointer; }
.p-check input { flex: 0 0 auto; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--p-accent); }
.p-choice { gap: .5rem; }
.opt { font-weight: 400; color: var(--p-muted); }
.p-save { display: grid; gap: .5rem; justify-items: start; }
/* Saved, the page opens here (#guardar): the button and what it did in
   view, below the sticky header, with the form just above. A focused field
   (a refused save's) keeps the same room. */
.p-save, .p-agenda input, .p-agenda fieldset { scroll-margin-top: 30vh; }
.p-save .p-alert, .p-save .p-ok, .p-save .p-warn { justify-self: stretch; }
/* A refused save marks its field: a red border, the reason under it. */
.p-err { margin: 4px 0 0; color: var(--p-bad); font-size: .875rem; font-weight: 600; line-height: 1.35; }
.p-form input[aria-invalid="true"] { border-color: var(--p-bad); box-shadow: 0 0 0 1px var(--p-bad); }
.p-form input[aria-invalid="true"]:focus { border-color: var(--p-bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-bad) 22%, transparent); }
.p-choice.is-bad legend { color: var(--p-bad); }
.p-day .p-err { grid-column: 2; margin: 0; }

/* ---- The editor page ---- */
.ed-page { max-width: 760px; margin: 0 auto; padding: 32px 20px calc(120px + var(--ed-kb)); }
@media (min-width: 760px) { .ed-page { padding: 64px 32px 160px; } }
.ed-title {
  display: block; width: 100%; margin: 0 0 .6em; padding: 0; border: 0; background: transparent; resize: none; overflow: hidden; field-sizing: content;
  font-family: var(--p-display); font-size: clamp(1.75em, 1.3em + 2.2vw, 2.6em); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; color: var(--p-ink); outline: none;
}
.ed-title::placeholder { color: color-mix(in srgb, var(--p-muted) 55%, transparent); }
.ed-recover { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 1.5em; padding: 12px 14px; background: var(--p-paper); border: 1px solid var(--p-rule); border-radius: var(--p-radius); font-size: 15px; }
.ed-recover span { flex: 1; min-width: 180px; }

/* The text: the article page's typography (plugs.css), in the panel's
   fonts and colors */
.ed { outline: none; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; -webkit-font-variant-ligatures: none; font-variant-ligatures: none; font-feature-settings: "liga" 0; position: relative; min-height: 40vh; }
.ed > :first-child { margin-top: 0; }
.ed p { margin: 0 0 1.15em; }
.ed h2, .ed h3 { font-family: var(--p-display); font-weight: 600; font-synthesis-weight: none; line-height: 1.25; color: var(--p-ink); text-wrap: balance; }
.ed h2 { margin: 2em 0 .55em; font-size: 1.45em; }
.ed h3 { margin: 1.7em 0 .45em; font-size: 1.18em; }
.ed ul, .ed ol { margin: 0 0 1.15em; padding: 0 0 0 1.4em; }
.ed li { margin: 0 0 .45em; padding-left: .2em; }
.ed li > p { margin: 0; }
.ed li::marker { color: var(--p-muted); }
.ed strong { font-weight: 700; }
.ed em { font-style: italic; }
.ed blockquote { margin: 1.75em 0; padding: .1em 0 .1em 1.1em; border-left: 3px solid var(--p-accent); font-family: var(--p-display); font-size: 1.15em; line-height: 1.5; }
.ed blockquote p { margin: 0; }
.ed a { color: var(--p-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.ed figure { margin: 2em 0; position: relative; cursor: pointer; }
.ed figure img { display: block; width: 100%; height: auto; border-radius: var(--p-radius); }
.ed figcaption { margin: .6em 0 0; font-size: .85em; line-height: 1.45; color: var(--p-muted); }
.ed figure.ProseMirror-selectednode img { outline: 3px solid var(--p-accent); outline-offset: 2px; }
.ed hr { width: 4em; height: 1px; margin: 2.4em auto; border: 0; background: var(--p-rule); }
.ed hr.ProseMirror-selectednode { outline: 2px solid var(--p-accent); outline-offset: 6px; }
.ed .ed-empty::before { content: attr(data-placeholder); position: absolute; color: color-mix(in srgb, var(--p-muted) 60%, transparent); pointer-events: none; }
.ed ::selection { background: color-mix(in srgb, var(--p-accent) 22%, transparent); }

/* ProseMirror's own stylesheet (prosemirror-view/style/prosemirror.css, trimmed) */
.ProseMirror-hideselection *::selection { background: transparent; }
.ProseMirror-hideselection *::-moz-selection { background: transparent; }
.ProseMirror-hideselection { caret-color: transparent; }
.ProseMirror [draggable][contenteditable=false] { user-select: text; }
.ProseMirror-selectednode { outline: 2px solid var(--p-accent); }
li.ProseMirror-selectednode { outline: none; }
li.ProseMirror-selectednode:after { content: ""; position: absolute; left: -32px; right: -2px; top: -2px; bottom: -2px; border: 2px solid var(--p-accent); pointer-events: none; }
img.ProseMirror-separator { display: inline !important; border: none !important; margin: 0 !important; }
.ProseMirror-gapcursor { display: none; pointer-events: none; position: absolute; }
.ProseMirror-gapcursor:after { content: ""; display: block; position: absolute; top: -2px; width: 20px; border-top: 1px solid var(--p-ink); animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; }
@keyframes ProseMirror-cursor-blink { to { visibility: hidden; } }
.ProseMirror-focused .ProseMirror-gapcursor { display: block; }

/* The editor's notices, and the list's heading */
.ed-alert { max-width: 760px; margin: 16px auto 0; }
.p-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---- The chrome: bubble, "+", dock ---- */
.tb { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 9px; border: 0; border-radius: 9px; background: transparent; color: var(--p-ink); font-family: var(--p-body); font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap; flex: 0 0 auto; }
.tb:hover { background: var(--p-tint); }
.tb.on { background: color-mix(in srgb, var(--p-accent) 16%, transparent); color: var(--p-accent); }
.tb:disabled { opacity: .35; }
.tb b { font-weight: 800; }
.tb i { font-style: italic; font-family: var(--p-display); }
.tb .big { font-family: var(--p-display); font-weight: 700; font-size: 18px; }
.tb .small { font-family: var(--p-display); font-weight: 700; font-size: 14px; }
.tb svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sep { width: 1px; height: 22px; margin: 0 4px; background: var(--p-rule); flex: 0 0 auto; }
.ed-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); overflow-x: auto; scrollbar-width: none;
  background: var(--p-paper); border-top: 1px solid var(--p-rule); box-shadow: 0 -6px 24px -12px color-mix(in srgb, var(--p-ink) 30%, transparent); transition: opacity .12s;
}
.ed-dock::-webkit-scrollbar { display: none; }
.ed-dock.hidden { opacity: 0; pointer-events: none; display: flex !important; }
@media (pointer: fine) { .ed-dock { display: none !important; } }
.ed-bubble {
  position: absolute; z-index: 40; display: flex; gap: 1px; padding: 4px; border-radius: 12px; background: var(--p-ink); color: var(--p-paper);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); transform: translate(-50%, -100%); margin-top: -10px; opacity: 0; pointer-events: none; transition: opacity .1s;
}
.ed-bubble.show { opacity: 1; pointer-events: auto; }
.ed-bubble .tb { color: var(--p-paper); height: 36px; min-width: 36px; }
.ed-bubble .tb:hover { background: color-mix(in srgb, var(--p-paper) 16%, transparent); }
.ed-bubble .tb.on { background: color-mix(in srgb, var(--p-paper) 24%, transparent); color: var(--p-paper); }
.ed-bubble .sep { background: color-mix(in srgb, var(--p-paper) 25%, transparent); }
.ed-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: var(--p-ink); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
@media (pointer: coarse) { .ed-bubble, .ed-plus, .ed-plus-menu { display: none !important; } }
.ed-plus { position: absolute; z-index: 25; width: 34px; height: 34px; border: 1px solid var(--p-rule); border-radius: 50%; background: var(--p-paper); color: var(--p-muted); display: none; align-items: center; justify-content: center; padding: 0; transition: transform .15s; }
.ed-plus svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ed-plus.show { display: flex; }
.ed-plus:hover { color: var(--p-ink); border-color: var(--p-ink); }
.ed-plus.open { transform: rotate(45deg); }
.ed-plus-menu { position: absolute; z-index: 26; display: none; gap: 2px; padding: 4px; border-radius: 12px; background: var(--p-paper); border: 1px solid var(--p-rule); box-shadow: 0 10px 30px -14px rgba(0,0,0,.35); }
.ed-plus-menu.show { display: flex; }

/* ---- Dialogs, the sheet, the toast ---- */
dialog.ed-dialog, dialog.ed-sheet { border: 0; padding: 0; background: transparent; color: var(--p-ink); max-width: none; max-height: none; }
dialog.ed-dialog::backdrop, dialog.ed-sheet::backdrop { background: color-mix(in srgb, var(--p-ink) 40%, transparent); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
dialog .box { width: min(100vw - 24px, 480px); margin: 0; padding: 20px 20px 16px; background: var(--p-paper); border-radius: var(--p-radius); box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); font-size: 16px; font-family: var(--p-body); }
dialog h2 { margin: 0 0 14px; font-size: 1.35em; }
dialog .on { margin: 0 0 .8em; color: var(--p-muted); font-size: .92em; }
dialog .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
dialog .row .left { margin-right: auto; }
dialog .pic img { display: block; width: 100%; height: auto; max-height: 220px; object-fit: cover; border-radius: 8px; margin: 0 0 1em; }
dialog .check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 1em; font-size: .95em; }
dialog .check input { margin: 5px 0 0; width: 18px; height: 18px; accent-color: var(--p-accent); }
dialog .err { margin: 0 0 .6em; color: var(--p-bad); font-size: .9em; }
dialog .note { margin: 0 0 1em; padding: .7em .95em; border-left: 3px solid var(--p-accent); background: var(--p-tint); border-radius: 0 calc(var(--p-radius) * .6) calc(var(--p-radius) * .6) 0; font-size: .92em; line-height: 1.5; }
dialog.ed-sheet { position: fixed; inset: auto 0 0 0; margin: 0 auto; width: min(100vw, 560px); }
dialog.ed-sheet .box { width: min(100vw, 560px); border-radius: var(--p-radius) var(--p-radius) 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); max-height: 92dvh; overflow: auto; }
@media (min-width: 760px) { dialog.ed-sheet { inset: 0; margin: auto; } dialog.ed-sheet .box { border-radius: var(--p-radius); } }
.field { display: block; margin: 0 0 1.25em; }
.field .lbl { display: block; margin: 0 0 .25em; font-size: .8em; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--p-muted); }
.field .hint { display: block; margin: .25em 0 0; font-size: .8em; color: var(--p-muted); }
.field textarea, .field input[type="text"], .field input[type="url"] {
  display: block; width: 100%; margin: 0; padding: .55em .7em; border: 1px solid var(--p-rule); border-radius: calc(var(--p-radius) * .7);
  background: color-mix(in srgb, var(--p-paper) 70%, var(--p-page)); font-size: max(16px, .95em); line-height: 1.45; resize: none; outline: none; field-sizing: content; min-height: 2.6lh;
}
.field input[type="text"], .field input[type="url"] { min-height: 0; }
.field textarea:focus, .field input:focus { border-color: var(--p-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-accent) 18%, transparent); }
.field .count { float: right; font-weight: 400; text-transform: none; letter-spacing: 0; }
.field .count.over { color: var(--p-bad); }
.addr { display: flex; align-items: center; border: 1px solid var(--p-rule); border-radius: calc(var(--p-radius) * .7); overflow: hidden; background: color-mix(in srgb, var(--p-paper) 70%, var(--p-page)); }
.addr span { padding: .55em 0 .55em .7em; color: var(--p-muted); white-space: nowrap; font-size: max(16px, .95em); }
.addr input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .55em .7em .55em 0; font-size: max(16px, .95em); outline: none; }
.card { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 1.2em; padding: 14px; border: 1px solid var(--p-rule); border-radius: calc(var(--p-radius) * .8); background: color-mix(in srgb, var(--p-paper) 60%, var(--p-page)); }
.card .img:empty { display: none; }
.card .img img { width: 88px; height: 60px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.card b { display: block; font-family: var(--p-display); font-size: 1.05em; line-height: 1.25; margin-bottom: .2em; }
.card span { display: block; font-size: .85em; color: var(--p-muted); line-height: 1.4; }
.card small { display: block; font-size: .78em; color: var(--p-accent); margin-top: .35em; word-break: break-all; }
.card-hint { margin: -.6em 0 1.2em; font-size: .8em; color: var(--p-muted); line-height: 1.4; }
.ed-toast { position: fixed; left: 50%; bottom: calc(24px + var(--ed-kb) + env(safe-area-inset-bottom)); z-index: 60; transform: translateX(-50%) translateY(20px); padding: 10px 16px; border-radius: 999px; background: var(--p-ink); color: var(--p-paper); font-size: 15px; opacity: 0; transition: all .2s; pointer-events: none; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
.ed-toast.show { opacity: 1; transform: translateX(-50%); }
.hint-kbd { margin: 2.5em 0 0; padding: 1em 0 0; border-top: 1px dashed var(--p-rule); font-size: .8em; color: var(--p-muted); line-height: 1.6; }
.hint-kbd code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--p-tint); padding: 1px 5px; border-radius: 4px; }
