/* The web pclient (2026-11-27). Plain CSS, light and dark. */
:root { --bg: #fbfaf7; --fg: #1d1d1b; --muted: #6b6a66; --line: #e3e0d8; --card: #ffffff; --acc: #2b5d8a; --acc-fg: #fff; --bad: #a3322a; --chip: #efece5; }
@media (prefers-color-scheme: dark) { :root { --bg: #161615; --fg: #ecebe7; --muted: #9c9a94; --line: #2d2c29; --card: #1f1e1c; --acc: #7fb0de; --acc-fg: #10202e; --bad: #e0796f; --chip: #2a2926; } }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--acc); }
button { font: inherit; color: inherit; background: var(--chip); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--acc); color: var(--acc-fg); border-color: var(--acc); padding: 8px 18px; margin-top: 8px; }
button.danger { color: var(--bad); }
button.small, .small { font-size: 13px; }
button:disabled { opacity: .6; cursor: default; }
input, select { font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; max-width: 640px; }
input[type=checkbox] { width: auto; }
.top { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 2; }
.brand { font-weight: 700; letter-spacing: .02em; }
.brand .sub { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav button { background: none; border-color: transparent; }
nav button.on { background: var(--chip); border-color: var(--line); }
#main { max-width: 900px; margin: 0 auto; padding: 8px 16px 48px; }
h1 { font-size: 24px; margin: 18px 0 8px; } h2 { font-size: 19px; margin: 24px 0 8px; } h3 { font-size: 16px; margin: 18px 0 6px; }
.muted { color: var(--muted); } .err { color: var(--bad); } .note { background: var(--chip); padding: 8px 12px; border-radius: 8px; }
.pad { padding: 16px; }
label { display: block; font-size: 14px; color: var(--muted); margin: 12px 0 4px; }
.row.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; } .row.check label { margin: 0; color: var(--fg); }
.code { font: 700 34px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .12em; margin: 6px 0 14px; }
pre.cmd, code { font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
pre.cmd { background: var(--chip); padding: 10px 12px; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.chips { display: flex; gap: 6px; margin-bottom: 8px; } .chip.on { background: var(--acc); color: var(--acc-fg); border-color: var(--acc); }
ul { padding: 0; list-style: none; }
.purses li { margin: 6px 0; }
button.purse { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 12px; width: 100%; text-align: left; background: var(--card); padding: 10px 12px; }
.purse .badge { grid-row: span 2; align-self: center; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 6px; background: var(--chip); min-width: 74px; text-align: center; }
.b-image { background: #e6d9f2 !important; color: #432a5c; } .b-rss { background: #fde3c8 !important; color: #6b3a0b; } .b-ics { background: #d4ecd9 !important; color: #1f4d2b; } .b-text { background: #d8e5f3 !important; color: #1f3b58; }
.purse .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .purse .path { color: var(--muted); margin-left: 8px; font-size: 14px; }
.purse .meta { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 12px; } .actions .helplink { margin: 0 0 0 auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
figure img { display: block; width: 100%; height: 180px; object-fit: contain; background: var(--chip); cursor: zoom-in; }
figcaption { padding: 6px 10px; font-size: 14px; }
.nopic { height: 180px; display: grid; place-items: center; color: var(--muted); font-size: 13px; padding: 8px; text-align: center; }
#viewer { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 10; cursor: zoom-out; }
#viewer[hidden] { display: none; } #viewer img { max-width: 96vw; max-height: 92vh; } #viewer .close { position: absolute; top: 10px; right: 14px; font-size: 26px; background: none; border: 0; color: #fff; }
.day { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.events li { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.events .when { color: var(--muted); font-variant-numeric: tabular-nums; } .notes p { margin: 4px 0 0; }
@media (max-width: 560px) { .events li { grid-template-columns: 1fr; gap: 2px; } }
.entries li { border-bottom: 1px solid var(--line); padding: 8px 0; }
button.entry { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: none; border: 0; padding: 4px 0; }
.summary { margin: 2px 0; color: var(--muted); }
.article { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px; margin: 6px 0; }
.reading article { max-width: 68ch; } .reading p, .article p { margin: 0 0 .8em; }
.llpop { margin-top: 18px; color: var(--muted); font-size: 14px; } .llpop code { color: var(--fg); background: var(--chip); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.devices li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.help { border-left: 3px solid transparent; padding-left: 12px; } .help.on { border-color: var(--acc); }
.helplink { font-size: 14px; margin-top: 16px; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 8px; max-width: 90vw; z-index: 20; }
#toast.bad { background: var(--bad); color: #fff; }

/* 2026-11-28, step 4: joining with an invite, and confirming the people you invited */
ol.words { columns: 3 10em; column-gap: 2em; padding-left: 2.2em; margin: 1em 0 1.4em; font: 1.05rem/1.9 ui-monospace, Menlo, Consolas, monospace; }
ol.words li { break-inside: avoid; }
dl.who { display: grid; grid-template-columns: max-content 1fr; gap: .3em 1.2em; margin: 1em 0; }
dl.who dt { font-weight: 600; }
dl.who dd { margin: 0; overflow-wrap: anywhere; }
.buttons { display: flex; gap: .8em; flex-wrap: wrap; }
/* 2026-11-28: "hidden" always wins (nav's display:flex was showing the menu before pairing and while waiting);
   long codes such as the plocker key wrap instead of running off a phone's screen */
[hidden] { display: none !important; }
code { overflow-wrap: anywhere; }
/* 2026-11-28: printing the recovery words prints only them */
@media print { header.top, #nav, .noprint, .helplink, #toast, .view > p:not(:first-of-type) { display: none !important; } ol.words { font-size: 14pt; } }
