/* Coeval web: its own design, in the forest icon's greens (the same scheme as Android: Material Color Utilities, hue 160). Mine on the left, World on the right, time down the
   middle; World in newspaper serif on deep blue. Light and dark follow the system unless chosen in Settings. */
:root{color-scheme:dark;--axis:#3d403c;--bg:#121412;--panel:#1b1c1b;--card:#1f201f;--raised:#292a29;--line:#343533;--text:#e3e2e0;--muted:#b7b9b5;--faint:#686b68;--accent:#f5673a;--brand:#9ad3ae;--grad-a:#195034;--grad-b:#4c8262;--world:#243a78;--world-line:#30489a;--world-text:#e6ebff;--world-muted:#b6c2ee;--paper:#2b261f;--paper-line:#3d3528;--paper-text:#efe6d6;--paper-muted:#c4b59c;--archive:#e0a458;--history:#b89cf0;--headlines:#85b7eb;--following:#d3d1c7;--daycount:#5ecaa6;--radius:14px;--bar-h:64px;
  --body:-apple-system,BlinkMacSystemFont,'SF Pro Text','Segoe UI Variable Text','Segoe UI','PingFang SC','PingFang TC','Hiragino Sans','Microsoft YaHei UI','Microsoft JhengHei UI',Roboto,'Noto Sans CJK SC',sans-serif;
  --serif:'New York','Iowan Old Style',Georgia,'Noto Serif','Songti SC','Noto Serif CJK SC','Source Han Serif SC',SimSun,serif}
:lang(zh-Hant){--serif:'New York','Iowan Old Style',Georgia,'Noto Serif','Songti TC','Noto Serif CJK TC','Source Han Serif TC',PMingLiU,serif}
:lang(ja){--serif:'New York','Iowan Old Style',Georgia,'Noto Serif','Hiragino Mincho ProN','Yu Mincho','Noto Serif CJK JP',serif}
@media(prefers-color-scheme:light){:root:not([data-theme="dark"]){color-scheme:light;--axis:#cfd1cd;--bg:#f5f3f1;--panel:#fff;--card:#fff;--raised:#fbf9f6;--line:#e3e2e0;--text:#1b1c1b;--muted:#5c5f5c;--faint:#9c9f9a;--accent:#e5532a;--brand:#33694a;--world:#2e4a8f;--world-line:#2a4383;--paper:#f7f1e6;--paper-line:#e8dcc6;--paper-text:#33291c;--paper-muted:#7a6a52;--archive:#9a6424;--history:#6b4aa6;--headlines:#185fa5;--following:#444441;--daycount:#07705a}}
:root[data-theme="light"]{color-scheme:light;--axis:#cfd1cd;--bg:#f5f3f1;--panel:#fff;--card:#fff;--raised:#fbf9f6;--line:#e3e2e0;--text:#1b1c1b;--muted:#5c5f5c;--faint:#9c9f9a;--accent:#e5532a;--brand:#33694a;--world:#2e4a8f;--world-line:#2a4383;--paper:#f7f1e6;--paper-line:#e8dcc6;--paper-text:#33291c;--paper-muted:#7a6a52;--archive:#9a6424;--history:#6b4aa6;--headlines:#185fa5;--following:#444441;--daycount:#07705a}
:root[data-theme="dark"]{color-scheme:dark}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.55 var(--body);-webkit-font-smoothing:antialiased;min-height:100vh}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:inherit}
[hidden]{display:none!important}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px}

/* MARK: Bar (AZ 2026-09-30: Mine | Both | World at the window's centre; everything else as small as it can be)
   Wide: the brand at the left, the view switch (with the apps' icons) at the exact centre of the window and the scales
   a size smaller just under it (AZ 2026-10-01), small icon buttons at the right (New keeps its label; sync shows its state by colour, with the words in its tooltip; the filters are one
   button with a menu). fitBar() folds New's label, then the brand's name, and gives up the exact centre only when a side
   still does not fit. Phones: the brand and the buttons on top, the switch and the scales below, folded away while
   scrolling down. */
.bar{position:sticky;top:0;z-index:10;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;column-gap:16px;row-gap:6px;padding:8px 24px;background:color-mix(in srgb,var(--bg) 84%,transparent);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid var(--line)}
.bar [hidden]{display:none!important}
.bar .brand{grid-column:1;grid-row:1/3;justify-self:start}
.bar .views{grid-column:2;grid-row:1}
.bar .scales{grid-column:2;grid-row:2;justify-self:center}
.bar .actions{grid-column:3;grid-row:1/3;justify-self:end;display:flex;align-items:center;gap:8px}
.bar .lang{grid-column:3;grid-row:1/3;justify-self:end}
.bar.uncentered{grid-template-columns:auto minmax(0,1fr) auto}.bar.uncentered .views{justify-self:center}
/* The brand fills the two-row bar's height on wide screens (AZ), and the phone's single top row. */
.brand{display:inline-flex;align-items:center;gap:12px;font-weight:700;font-size:26px;letter-spacing:-.01em;text-decoration:none;white-space:nowrap}
.brand img{width:46px;height:46px;border-radius:12px}
.bar.fold-brand .brand span{display:none}
.seg{display:flex;gap:2px;padding:3px;border:1px solid var(--line);border-radius:999px;background:var(--panel)}
.seg button{border:0;background:none;padding:5px 15px;border-radius:999px;color:var(--muted);white-space:nowrap}
.seg button[aria-selected="true"]{background:linear-gradient(135deg,var(--grad-a),var(--grad-b));color:#fff}
.bar .views button{display:inline-flex;align-items:center;gap:7px}.bar .views svg{display:block;flex-shrink:0}
.bar .scales{padding:2px}.bar .scales button{padding:2px 11px;font-size:12.5px}
/* The buttons match the larger brand on wide screens (AZ): 38 px; 32 px in the phone's top row. */
.bar .actions>*,.lang{height:38px;min-width:38px;border:1px solid var(--line);border-radius:11px;background:var(--panel);display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0;font-size:15px;color:var(--text)}
.lang{padding:0 12px}
.bar .actions svg{flex-shrink:0;display:block;width:19px;height:19px}
.bar .new{padding:0 15px 0 12px;white-space:nowrap;background:linear-gradient(135deg,var(--grad-a),var(--grad-b));border:0;color:#fff;font-weight:600}
.bar.fold-new .new{padding:0}.bar.fold-new .new span:last-child{display:none}
.bar.small-buttons .actions{gap:6px}.bar.small-buttons .actions>*{height:32px;min-width:32px;border-radius:9px}.bar.small-buttons .actions svg{width:17px;height:17px}
.go{position:relative;cursor:pointer}.go input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
/* Sync is the way into Settings › Sync: green when synced, grey while it syncs, red when it cannot reach the server.
   No spinning: under the bar's blur a turning icon repaints the whole bar every frame (scrolling p99 went 9 → 390 ms). */
.bar .sync{position:relative;color:var(--brand)}
.bar .sync .status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.bar .sync.busy{color:var(--muted)}
.bar .sync.error{color:#d93b30;border-color:color-mix(in srgb,#d93b30 45%,var(--line))}
.bar .filter{position:relative}
.bar .filter.on::after{content:'';position:absolute;top:4px;right:4px;width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--panel)}
.filter-pop{position:fixed;inset:auto;margin:0;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);box-shadow:0 12px 32px rgba(0,0,0,.2)}
.filters{display:flex;flex-direction:column;gap:8px;min-width:190px}
.filters select{font:inherit;font-size:14px;height:34px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--text)}
.filters select[hidden]{display:none}
@media(max-width:820px){
  .bar{grid-template-columns:auto minmax(0,1fr);row-gap:8px;padding:8px 16px 10px}
  .bar .brand{grid-column:1;grid-row:1;gap:10px;font-size:20px}
  .bar .brand img{width:34px;height:34px;border-radius:9px}
  .bar .actions{gap:6px}
  .bar .actions>*,.lang{height:32px;min-width:32px;border-radius:9px;gap:5px;font-size:14px}
  .bar .actions svg{width:17px;height:17px}
  .bar .new{padding:0 12px 0 10px}
  .bar .actions,.bar .lang{grid-column:2;grid-row:1}
  .bar .views button{gap:5px}
  .bar .views{grid-column:1/-1;grid-row:2;justify-self:center}
  .bar .scales{grid-column:1/-1;grid-row:3;justify-self:center}
  .bar .views,.bar .scales{max-height:60px;transition:max-height .25s ease,opacity .2s ease}
  .bar.collapsed{row-gap:0}
  .bar.collapsed .views,.bar.collapsed .scales{max-height:0;opacity:0;overflow:hidden;pointer-events:none;border-width:0;padding-block:0}
}
@media(max-width:560px){
  .seg button{padding:5px 11px;font-size:14px}.seg{padding:2px}
}
main{width:min(1180px,calc(100% - 32px));margin:0 auto;padding:20px 0 80px;transform-origin:50% 30%}

/* MARK: Pairing */
.pairing{max-width:560px;margin:60px auto;text-align:center}.pairing img{border-radius:22px}
.pairing h1{font-size:30px;letter-spacing:-.5px;margin:18px 0 6px}.pairing>p{color:var(--muted)}
.pairing ol{text-align:left;margin:28px auto;padding:20px 20px 20px 42px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);line-height:1.9}
.paste{display:flex;gap:8px}.paste input{flex:1;min-width:0;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.paste button,.compose .save,.detail-actions .primary{padding:9px 18px;border:0;border-radius:10px;background:linear-gradient(135deg,var(--grad-a),var(--grad-b));color:#fff;font-weight:600}
.error{color:var(--accent);margin:6px 0 0;font-size:14px}.fine{font-size:12.5px;color:var(--muted)}.pairing .fine{margin-top:26px}

/* MARK: Composer */
.compose{display:flex;flex-direction:column;gap:10px;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:14px;margin-bottom:24px;transition:border-color .15s}
.compose.drop{border-color:var(--brand);border-style:dashed}
.compose textarea{resize:vertical;min-height:90px;border:0;background:none;outline:none;font-size:16px;line-height:1.5}
.compose.inline textarea{resize:none;min-height:0;overflow:hidden}
.compose.inline:not(.open) .toolbar{display:none}
.compose .preview:empty{display:none}
.compose .preview{position:relative;align-self:flex-start;max-width:100%}
.compose .preview img{display:block;max-width:min(100%,420px);max-height:360px;border-radius:10px;object-fit:contain;background:var(--line)}
.compose .preview video{display:block;max-width:min(100%,480px);max-height:360px;border-radius:10px;background:#000}
.compose .preview audio{display:block;width:min(420px,80vw)}
.compose .preview .old{display:contents}
.compose .preview .remove{position:absolute;top:8px;right:8px;border:0;border-radius:8px;padding:3px 9px;font-size:12.5px;background:color-mix(in srgb,#000 55%,transparent);color:#fff}
.compose .place-input{padding:8px 11px;border:1px solid var(--line);border-radius:9px;background:var(--bg)}
.toolbar{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:center}
.toolbar .tools{display:flex;gap:6px}
.tool{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line);border-radius:9px;background:none;padding:5px 10px;font-size:13.5px;color:var(--muted)}
.tool:hover{color:var(--text)}.tool .glyph{font-size:14px}.tool .rec{color:#ff5a4f}.tool.on{border-color:#ff5a4f;color:#ff5a4f}
.compose .owner{display:flex;border:1px solid var(--line);border-radius:999px;overflow:hidden}.compose .owner button{border:0;background:none;padding:4px 13px;color:var(--muted);font-size:13.5px}
.compose .owner button[aria-pressed="true"]{background:var(--raised);color:var(--text);font-weight:600}
.compose select{padding:5px 8px;border:1px solid var(--line);border-radius:8px;background:var(--panel);font-size:13.5px}
.when{display:flex;gap:6px;align-items:center}
.time-chip{border:0;background:none;color:var(--muted);font-size:13px;padding:4px 2px;text-align:left}.time-chip:hover{color:var(--text)}
.when input{padding:4px 8px;border:1px solid var(--line);border-radius:8px;background:var(--bg);font-size:13.5px}
.submit{display:flex;gap:8px;margin-left:auto}
.compose .save:disabled{opacity:.45;cursor:default}
.compose .cancel{border:1px solid var(--line);border-radius:10px;background:none;padding:8px 14px}
#sheet .compose{border:0;padding:0;background:none;margin:0}
.workout-form{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px 16px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.workout-form .field{display:flex;flex-direction:column;gap:4px;font-size:12.5px;color:var(--muted)}
.workout-form .field>span:first-child{font-weight:600}
.workout-form .pair{display:flex;align-items:center;gap:6px;color:var(--text)}
.workout-form input,.workout-form select{width:100%;min-width:0;padding:6px 9px;border:1px solid var(--line);border-radius:8px;background:var(--panel);font-size:14px}
.workout-form .pair input{width:72px;flex:none}.workout-form .pair small{color:var(--muted);font-size:12.5px}
.workout-form .owner{align-self:flex-start}

/* MARK: Day */
.day{display:grid;grid-template-columns:minmax(0,1fr) 120px minmax(0,1fr);gap:0 18px;padding:6px 0}
.day.single{grid-template-columns:120px minmax(0,720px)}
.day>h2{grid-column:2;grid-row:1/span 99;position:sticky;top:calc(var(--bar-h) + 10px);align-self:start;margin:0;text-align:center;font-size:13px;font-weight:600;color:var(--muted);padding:8px 0}
.day.single>h2{grid-column:1;text-align:left}
.day>h2 b{display:block;font-size:22px;color:var(--text);letter-spacing:-.3px}
.col{display:flex;flex-direction:column;gap:10px;padding:8px 0;border-top:1px solid var(--line);min-width:0}
.day:not(.single) .col.mine{grid-column:1}.day:not(.single) .col.world{grid-column:3}
/* The time axis down the middle of Both, as in the apps and on the site: the day sections meet, so the line runs
   unbroken; the date sits on it. Narrow layouts stack the columns and have no middle. */
@media(min-width:821px){.day:not(.single){background:linear-gradient(var(--axis),var(--axis)) center/2px 100% no-repeat}.day:not(.single)>h2{background:var(--bg);border-radius:10px}}
.day.single .col{grid-column:2}
.sentinel{height:1px}
[data-date],[data-unit]{scroll-margin-top:calc(var(--bar-h) + 8px)}
.empty{text-align:center;color:var(--muted);padding:70px 0}.empty h2{color:var(--text);font-size:20px;margin:0 0 6px}

/* MARK: Scrubber */
.scrubber{position:fixed;right:max(4px,calc((100% - 1180px)/2 - 52px));top:calc(var(--bar-h) + 16px);bottom:28px;width:40px;z-index:6;touch-action:none;cursor:ns-resize;user-select:none;-webkit-user-select:none}
.scrubber::before{content:'';position:absolute;right:4px;top:0;bottom:0;width:2px;border-radius:1px;background:var(--line)}
.scrubber .mark{position:absolute;right:12px;transform:translateY(-50%);font-size:10.5px;font-variant-numeric:tabular-nums;color:var(--faint)}
.scrubber .thumb{position:absolute;right:1px;width:8px;height:30px;border-radius:4px;background:linear-gradient(180deg,var(--grad-b),var(--grad-a));transform:translateY(-50%);box-shadow:0 1px 4px rgb(0 0 0/.25)}
.scrubber.active .thumb{width:10px;right:0}
.scrub-bubble{position:fixed;right:max(52px,calc((100% - 1180px)/2 + 0px));transform:translateY(-50%);z-index:7;padding:6px 12px;border-radius:999px;background:var(--text);color:var(--bg);font-size:13px;font-weight:600;pointer-events:none;white-space:nowrap;box-shadow:0 6px 20px rgb(0 0 0/.25)}
@media(max-width:1280px){main[data-scale="day"]{padding-right:12px}.scrubber .mark{display:none}.scrubber{width:22px;right:0}.scrubber:not(.active) .thumb{opacity:.75}.scrub-bubble{right:30px}}

/* MARK: Cards */
.card{position:relative;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;cursor:pointer;transition:transform .12s ease,border-color .12s}
.card:hover{border-color:color-mix(in srgb,var(--brand) 45%,var(--line))}
.card .body{padding:11px 14px 13px}
.card .meta{display:flex;gap:8px;align-items:baseline;font-size:12px;color:var(--muted);flex-wrap:wrap}.card .kind{font-weight:700}
.card h3{margin:3px 0 0;font-size:16px;font-weight:600;line-height:1.42;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:8;-webkit-box-orient:vertical;overflow:hidden}
.card p{margin:6px 0 0;color:var(--muted);font-size:14px}
.card .summary{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.card .media{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:var(--line)}
.card .media.wide{aspect-ratio:16/9}.card .media.square{aspect-ratio:1}.card .media.portrait{aspect-ratio:4/5}
.card .media.missing{display:none}
.card .media.video{position:relative;background:linear-gradient(135deg,#17231d,#24382c);display:grid;place-items:center}
.play-badge{padding:6px 14px;border-radius:999px;background:color-mix(in srgb,#000 45%,transparent);color:#fff;font-size:13.5px;font-weight:600}
.card .source{display:inline-block;margin-top:8px;font-size:12.5px;color:var(--world-muted)}
.card.world{background:var(--world);border-color:var(--world-line);color:var(--world-text)}.card.world .meta,.card.world p{color:var(--world-muted)}
.card.world h3{font-family:var(--serif);font-size:18px;font-weight:700;line-height:1.35}
.card.world .summary{font-family:var(--serif);font-size:14.5px;line-height:1.55}
.card.world .kind{color:#9fb4ff}
.card.feed{border-style:dashed}
.card .actions{position:absolute;top:8px;right:8px;display:flex;gap:6px;opacity:0;transition:opacity .15s}
.card:hover .actions,.card:focus-within .actions{opacity:1}
.card .actions button{border:0;border-radius:8px;padding:3px 9px;font-size:12px;background:color-mix(in srgb,var(--bg) 72%,transparent);color:var(--text)}
.card.strip .body{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap;padding:9px 14px;font-size:13.5px;color:var(--muted)}.card.strip .time{margin-left:auto;font-size:12px}
.card .route{display:block;width:100%;height:auto;aspect-ratio:600/220;background:color-mix(in srgb,#62b41e 8%,var(--card));border-bottom:1px solid var(--line)}
.card p.workout,.detail-body .workout{color:#62b41e;font-weight:600}
.kind.workout{color:#62b41e}.kind.text{color:#6bb0ff}.kind.photo{color:#c39bff}.kind.video{color:#ff8a7a}.kind.audio{color:#ffc15a}.kind.location{color:#4fe3c4}.kind.music{color:#ff86c2}.kind.health{color:#ff6b8a}
@media(hover:none){.card .actions{opacity:1}}

/* MARK: Overviews */
.overview{display:flex;flex-direction:column}
.overview .group{position:sticky;top:var(--bar-h);z-index:2;margin:10px 0 0;padding:8px 0;font-size:15px;background:var(--bg);border-bottom:1px solid var(--line)}
.overview .row{display:grid;grid-template-columns:84px 14px minmax(0,1fr);gap:10px;align-items:center;width:100%;border:0;background:none;padding:0;text-align:left;color:inherit;font:inherit}
.overview .label{text-align:right;font-size:11px;color:var(--faint)}
.overview .row.thin{height:12px}.overview.month .row.thin{height:9px}
.overview .tick{width:6px;height:1px;background:var(--line);justify-self:center}
.overview .row.gap{padding:8px 0;font-size:12.5px;color:var(--faint)}
.overview .rail-dots{justify-self:center;width:3px;height:15px;background:radial-gradient(circle,var(--line) 1.5px,transparent 2px) 0 0/3px 5px repeat-y}
.overview .row.filled{align-items:start;padding:5px 0;border-radius:12px;cursor:pointer}
.overview .row.filled:hover .summary-box{border-color:color-mix(in srgb,var(--brand) 45%,var(--line))}
.overview .row.filled .label{padding-top:9px;color:var(--text);font-size:14px;display:flex;flex-direction:column}
.overview .row.filled .label small{font-size:11px;color:var(--muted)}
.overview .born{color:var(--accent)!important;font-weight:600}
.overview .row.birth.thin{height:auto;padding:8px 0}.overview .row.birth .label{color:var(--text);font-weight:600;font-size:14px}
.overview .rail{justify-self:center;margin-top:15px;width:9px;height:9px;border-radius:50%;background:var(--world)}
.rail.text{background:#6bb0ff}.rail.photo{background:#c39bff}.rail.video{background:#ff8a7a}.rail.audio{background:#ffc15a}.rail.location{background:#4fe3c4}.rail.music{background:#ff86c2}.rail.workout{background:#62b41e}
.cells.two{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.summary-box{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:9px 11px;display:flex;flex-direction:column;gap:6px;min-width:0}
.summary-box p{margin:0;font-size:13.5px}
.summary-box .line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.summary-box .workout{color:#62b41e;font-weight:600;font-size:12.5px}
.summary-box .kinds{display:flex;gap:4px;align-items:center;color:var(--muted);font-size:12px}
.summary-box .kinds span{margin-left:4px}
.dot{width:10px;height:10px;border-radius:50%;background:#6bb0ff}.dot.photo{background:#c39bff}.dot.video{background:#ff8a7a}.dot.audio{background:#ffc15a}.dot.location{background:#4fe3c4}.dot.music{background:#ff86c2}.dot.health{background:#ff6b8a}
.thumbs{display:flex;gap:4px;flex-wrap:wrap}.thumbs img{width:52px;height:52px;border-radius:8px;object-fit:cover;background:var(--line)}
.summary-box.world{background:color-mix(in srgb,var(--world) 16%,var(--panel));border-color:color-mix(in srgb,var(--world-line) 40%,var(--line))}
.summary-box .headline{font-family:var(--serif);font-weight:600;font-size:14px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding-left:12px;position:relative}
.summary-box .headline::before{content:'';position:absolute;left:0;top:.55em;width:5px;height:5px;border-radius:50%;background:var(--world-line)}
.summary-box .more{color:var(--muted);font-size:12px}
.life-end,.hint{text-align:center;color:var(--muted);font-size:13px;margin:6px 0 16px}

/* MARK: Sheet */
#sheet{width:min(680px,calc(100% - 24px));max-height:min(88vh,980px);padding:0;border:1px solid var(--line);border-radius:18px;background:var(--panel);color:var(--text);box-shadow:0 30px 80px rgb(0 0 0/.45);overflow:auto}
#sheet::backdrop{background:rgb(8 6 20/.55);backdrop-filter:blur(3px)}
.sheet-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:10px;padding:14px 18px;background:color-mix(in srgb,var(--panel) 92%,transparent);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.sheet-head h2{flex:1;margin:0;font-size:16px}
.sheet-head .close{border:0;background:var(--raised);width:30px;height:30px;border-radius:50%;color:var(--muted)}
.sheet-body{padding:18px}
.sheet-foot{position:sticky;bottom:0;padding:12px 18px;border-top:1px solid var(--line);background:color-mix(in srgb,var(--panel) 92%,transparent);backdrop-filter:blur(12px)}
.detail-body .meta{display:flex;gap:10px;font-size:13px;color:var(--muted);flex-wrap:wrap}.detail-body .meta .kind{font-weight:700}
.detail-body h2{margin:6px 0 8px;font-size:22px;line-height:1.35;white-space:pre-wrap;overflow-wrap:anywhere}
.detail-body.world h2{font-family:var(--serif);font-size:26px}
.detail-body .summary{font-size:16px;line-height:1.65;color:var(--text)}.detail-body.world .summary{font-family:var(--serif);font-size:17px}
.detail-body p{margin:8px 0}
.detail-media{margin:-18px -18px 16px;background:#000;display:flex;justify-content:center;min-height:60px}
.detail-media img{display:block;max-width:100%;max-height:70vh;object-fit:contain}
.detail-media video{display:block;width:100%;max-height:70vh}
.detail-media.audio{background:none;margin:0 0 14px}.detail-media audio{width:100%}
.detail-media .missing{color:var(--muted);padding:20px}
.route.big{display:block;width:100%;height:auto;border-radius:12px;background:color-mix(in srgb,#62b41e 8%,var(--card));margin-bottom:14px}
.sources{display:flex;flex-direction:column;gap:6px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.sources a,.sources span{font-size:14px}.sources .also{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:baseline}
.detail-actions{display:flex;gap:10px;justify-content:flex-end}
.detail-actions button{border:1px solid var(--line);border-radius:10px;background:none;padding:8px 16px}
.detail-actions .danger,.settings .danger{color:#ff5a4f}

/* MARK: Settings */
.settings{display:flex;flex-direction:column;gap:20px}
.settings .group h3{margin:0 0 6px 4px;font-size:12.5px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.4px}
.settings .rows{background:var(--bg);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.settings .row{display:flex;align-items:center;gap:12px;min-height:48px;padding:8px 14px;border:0;border-top:1px solid var(--line);background:none;width:100%;text-align:left;text-decoration:none;font:inherit;color:inherit}
.settings .row:first-child{border-top:0}
.settings .row .icon{width:22px;text-align:center;color:var(--brand);font-size:15px}
.settings .row .label{flex:1}
.settings .row .value{color:var(--muted);font-size:14px;text-align:right;max-width:55%}
.settings .row.link{color:var(--brand);cursor:pointer}.settings .row.link.danger{color:#ff5a4f}
.settings .row.text{margin:0;color:var(--text);font-size:14.5px}
.settings .row-note{margin:0;padding:0 14px 10px;color:var(--muted);font-size:12.5px}
.settings .footer{margin:6px 4px 0;color:var(--muted);font-size:12.5px;line-height:1.5}
/* Coeval Pro on the web: a plan per row (name, price), and the restore form under its row. */
.settings .row.plan{font-weight:600}.settings .row.plan .value{color:var(--text);font-weight:500}.settings .row.plan:disabled{opacity:.6}
.settings .restore-web{display:flex;flex-direction:column;gap:8px;padding:4px 14px 14px;border-top:1px solid var(--line)}
.settings .restore-web .row-note{padding:6px 0 0}
.settings .restore-web input{font:inherit;font-size:15px;padding:9px 11px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text)}
.settings .restore-web .primary{align-self:flex-start;padding:9px 18px;border:0;border-radius:10px;background:linear-gradient(135deg,var(--grad-a),var(--grad-b));color:#fff;font:inherit;font-weight:600}
.settings .restore-web[hidden]{display:none}
.settings select,.settings input[type=date]{padding:5px 8px;border:1px solid var(--line);border-radius:8px;background:var(--panel);font-size:14px}
.settings input[type=checkbox],.countdays input[type=checkbox]{appearance:none;width:44px;height:26px;border-radius:13px;background:var(--line);position:relative;cursor:pointer;transition:background .2s;flex:none}
.settings input[type=checkbox]::after,.countdays input[type=checkbox]::after{content:'';position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 1px 3px rgb(0 0 0/.3)}
.settings input[type=checkbox]:checked,.countdays input[type=checkbox]:checked{background:#34c759}.settings input[type=checkbox]:checked::after,.countdays input[type=checkbox]:checked::after{transform:translateX(18px)}
.settings input[type=checkbox]:disabled{opacity:.4;cursor:default}
.segmented{display:flex;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.segmented button{border:0;background:none;padding:4px 13px;font-size:13.5px}
.segmented button[aria-checked="true"]{background:var(--grad-a);color:#fff}
.segmented button:disabled{opacity:.35;cursor:default}
.settings .erase{border-top:1px solid var(--line);padding:4px 0 10px}
.settings .erase .row{border-top:0;min-height:40px}
.settings .erase-counts{margin:4px 14px 8px;color:#ff5a4f;font-weight:600;font-size:14px}
.settings .erase-confirm{display:flex;gap:8px;padding:6px 14px}
.settings .erase-confirm input{flex:1;min-width:0;padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:var(--panel)}
.settings .erase-go{border:0;border-radius:8px;padding:7px 16px;background:#ff3b30;color:#fff;font-weight:600}
.settings .erase-go:disabled{opacity:.4;cursor:default}
.settings .sign{text-align:center;color:var(--muted);font-size:12px;margin:0}

/* MARK: Narrow */
@media(max-width:820px){
  .day,.day.single{grid-template-columns:minmax(0,1fr)}
  .onthisday-card.both{width:100%}
  .day>h2,.day.single>h2{grid-column:1;grid-row:auto;position:static;text-align:left;display:flex;gap:8px;align-items:baseline;padding:10px 0 4px}
  .day>h2 b{display:inline;font-size:19px}
  .day .col,.day:not(.single) .col.mine,.day:not(.single) .col.world{grid-column:1}
  .day:not(.single) .col.world{border-top:0;padding-top:0}
  .day:not(.single) .col:empty{display:none}
  .overview .row{grid-template-columns:52px 12px minmax(0,1fr);gap:8px}
  .sheet-body{padding:16px}.detail-media{margin:-16px -16px 14px}
}
@media(max-width:560px){.cells.two{grid-template-columns:1fr}}
.sign{text-align:center;font-size:12px;color:var(--muted);padding:0 16px 32px}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.daycount-line{margin:8px 0 0;font-size:12.5px;color:var(--muted);font-variant-numeric:tabular-nums}.card.world .daycount-line{color:var(--world-muted)}
.daycount-line .anniversary,.countdays .anniversary{color:#f08a24;font-weight:600}
.countdays{display:flex;flex-direction:column;gap:4px;margin:14px 0;padding:12px 14px;border-radius:14px;background:var(--card-2,rgb(127 127 127/.08))}.countdays .row{cursor:pointer}
.countdays .words{display:flex;flex-direction:column;gap:4px;margin-top:6px}.countdays .words input{padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--raised);color:var(--text);font:inherit}
.countdays .row{display:flex;align-items:center;justify-content:space-between;gap:12px}.countdays strong{font-size:22px;font-variant-numeric:tabular-nums}
.card.world.ref{background:var(--paper);border-color:var(--paper-line);color:var(--paper-text)}.card.world.ref .meta,.card.world.ref p,.card.world.ref .kind,.card.world.ref .source,.card.world.ref .daycount-line{color:var(--paper-muted)}
.tag{display:inline-flex;align-items:center;gap:4px;padding:1px 8px 1px 6px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.02em;line-height:18px}
.tag svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
.tag.archive{color:var(--archive);background:color-mix(in srgb,var(--archive) 16%,transparent)}.tag.history{color:var(--history);background:color-mix(in srgb,var(--history) 16%,transparent)}
.tag.headlines{color:var(--headlines);background:color-mix(in srgb,var(--headlines) 14%,transparent)}.tag.following{color:var(--following);background:color-mix(in srgb,var(--following) 14%,transparent)}
.tag.daycount{color:var(--daycount);background:color-mix(in srgb,var(--daycount) 14%,transparent)}.tag.anniversary{color:#f08a24;background:color-mix(in srgb,#f08a24 14%,transparent)}
.meta .tag.end{margin-left:auto}
.card.world:not(.ref) .tag.headlines{color:#b5d4f4;background:rgba(181,212,244,.16)}.card.world:not(.ref) .tag.following{color:#e4e2da;background:rgba(228,226,218,.16)}.kind.track{text-transform:none;letter-spacing:0}h3.track{font-family:var(--sans,inherit)}
.summary-box .headline.archive::before{background:var(--archive)}.summary-box .headline.history::before{background:var(--history)}
.onthisday-card{display:flex;flex-direction:column;gap:6px;width:100%;margin:6px 0 14px;padding:14px 16px;border:1px solid var(--line);border-radius:var(--radius);background:var(--card);color:var(--text);text-align:left;font:inherit;cursor:pointer}
.onthisday-card.both{width:calc((100% - 156px) / 2);margin-left:auto}
.onthisday-card .otd-head{font-size:12px;font-weight:700;color:var(--muted)}.onthisday-card .otd-head b{color:#f08a24}
.otd-line{display:flex;flex-direction:column;gap:2px}.otd-line small{font-size:12px;color:var(--muted)}.otd-line strong{font-size:15px;font-weight:600;line-height:1.35}
.otd-line.world strong{font-family:var(--serif)}.onthisday-card .more{font-size:12.5px;color:var(--muted)}
.onthisday-page h3{margin:18px 0 8px;font-size:18px}.onthisday-page h3:first-child{margin-top:0}.onthisday-page .otd-year{margin:12px 0 6px;font-size:14px;font-weight:500;color:var(--muted)}.onthisday-page .otd-year b{color:var(--text);font-size:15px}
.onthisday-page .col{display:flex;flex-direction:column;gap:10px}.otd-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:start}
@media(max-width:560px){.otd-pair{grid-template-columns:1fr}}
.search-view .search-field{width:100%;margin:0 0 12px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--raised);color:var(--text);font:inherit;font-size:16px}
.search-results{display:flex;flex-direction:column;gap:10px}.search-results h3{margin:10px 0 0;font-size:16px}.search-results .empty{padding:24px 8px;text-align:center}
.search-conditions{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}.search-conditions span{flex:none;padding:4px 10px;border:1px solid var(--line);border-radius:999px;background:var(--raised);color:var(--muted);font-size:12.5px;white-space:nowrap}.search-conditions .ai{color:var(--brand)}.search-conditions .reading{border-style:dashed}
.search-results h4.search-world{margin:4px 0 0;font-size:14px;color:var(--headlines)}.search-results .empty p{margin:8px 0 0;color:var(--muted)}
.pairing .start-here{margin:18px 0 6px;text-align:center}.pairing .start-new{padding:11px 22px;border:0;border-radius:12px;background:linear-gradient(135deg,var(--grad-a),var(--grad-b));color:#fff;font:inherit;font-weight:600;font-size:16px;cursor:pointer}.pairing .start-new:disabled{opacity:.6}.pairing .or{margin:18px 0 4px;color:var(--muted)}
.pair-box{padding:4px 0 8px}.pair-code{width:220px;max-width:70%;margin:10px auto;padding:10px;background:#fff;border-radius:12px}.pair-code svg{display:block;width:100%;height:auto}.row-note.warn{color:var(--accent)}
/* Maps (maps.js): a still on cards, drawn once the page stops scrolling; a map to pan and zoom on the entry's page. */
.map-still{position:relative;display:block;width:100%;aspect-ratio:600/220;overflow:hidden;background:color-mix(in srgb,#62b41e 8%,var(--card));border-bottom:1px solid var(--line)}
.map-still.place-map{aspect-ratio:600/190;background:color-mix(in srgb,#2cb7a3 8%,var(--card))}
.map-still>svg,.map-still>img{position:absolute;inset:0;display:block;width:100%;height:100%;border:0}
.map-still>img{object-fit:cover}
.card .map-still .route{aspect-ratio:auto;border:0;background:none}
.place-tile .grid{stroke:color-mix(in srgb,#2cb7a3 18%,transparent);stroke-width:1}
.place-tile .pin{fill:#2cb7a3}
.place-tile .coords{fill:#2cb7a3;font:600 15px system-ui,sans-serif}
.map-live{width:100%;height:300px;border-radius:12px;overflow:hidden;margin-bottom:14px;background:color-mix(in srgb,#62b41e 8%,var(--card))}
/* Two classes: MapLibre marks the box .maplibregl-map, whose stylesheet sets position:relative. */
.map-renderer,.map-renderer.maplibregl-map{position:fixed;left:-10000px;top:0;pointer-events:none}
/* MARK: Layout (AZ 2026-09-30: planned for large screens, not patched view by view)
   One grammar everywhere: Mine | the time axis | World. Both uses all three columns up to 1240 px; Mine alone and World
   alone are one reading column (dates on the axis, cards beside it) centred at 860 px, so the page never leans left.
   Month, year and life follow the same columns as the day. Below 821 px everything stacks into one column. */
:root{--axis-col:120px;--gutter:40px}
main{width:min(1240px,calc(100% - 32px))}
main[data-view="mine"],main[data-view="world"]{width:min(860px,calc(100% - 32px))}
.cells>div{min-width:0}
@media(min-width:821px){
  .lead{display:grid;grid-template-columns:minmax(0,1fr) var(--axis-col) minmax(0,1fr);gap:0 var(--gutter);align-items:start;margin-bottom:22px}
  .lead>.compose{grid-column:1;margin:0}
  .lead>.onthisday-card{grid-column:3;width:100%;margin:0}
  main[data-view="mine"]>.compose,main[data-view="world"]>.compose,
  main[data-view="mine"]>.onthisday-card,main[data-view="world"]>.onthisday-card{margin-left:calc(var(--axis-col) + var(--gutter));width:calc(100% - var(--axis-col) - var(--gutter))}
  .day.single{grid-template-columns:var(--axis-col) minmax(0,1fr);background:linear-gradient(var(--axis),var(--axis)) calc(var(--axis-col) + var(--gutter) / 2 - 1px) 0/2px 100% no-repeat}
  .overview.both{background:linear-gradient(var(--axis),var(--axis)) center/2px 100% no-repeat}
  .overview.both .row{grid-template-columns:minmax(0,1fr) var(--axis-col) minmax(0,1fr);gap:0 var(--gutter)}
  .overview.both .row>.label{grid-column:2;grid-row:1;justify-self:center;align-items:center;text-align:center;background:var(--bg);padding:2px 8px;border-radius:8px;position:relative;z-index:1}
  .overview.both .row.filled>.label{padding-top:6px}
  .overview.both .row .cells.two{display:contents}
  .overview.both .row .cells.two>div:first-child{grid-column:1;grid-row:1}
  .overview.both .row .cells.two>div:last-child{grid-column:3;grid-row:1}
  .overview.both .row>.rail,.overview.both .row>.tick,.overview.both .row>.rail-dots{display:none}
  .overview.both .row.gap>span:last-child{grid-column:2;grid-row:2;justify-self:center;text-align:center;background:var(--bg);position:relative;z-index:1}
  .overview.both .row .born{grid-column:1;grid-row:1;justify-self:end}
  .overview.both .group{text-align:center}
}
@media(max-width:820px){
  .day,.day.single{grid-template-columns:minmax(0,1fr)}
  .day.single .col{grid-column:1}
  .lead{display:flex;flex-direction:column;gap:12px;margin-bottom:18px}
  .lead>.compose,.lead>.onthisday-card{margin:0;width:100%}
}
/* The year scrubber is a way to move, not a second timeline: it sits on the window's edge, shows only its thumb, and
   its track appears while you use it. */
.scrubber,.scrubber:not(.active){right:0;width:18px}
.scrubber::before{opacity:0;transition:opacity .2s}
.scrubber:hover::before,.scrubber.active::before{opacity:1}
.scrubber .mark{display:none}
.scrubber .thumb{right:5px;width:6px;height:34px}
.scrubber.active .thumb{right:4px;width:8px}
.scrub-bubble{right:28px}
/* Sheets: roomier on large screens; on phones they rise from the bottom edge to edge. */
#sheet{width:min(720px,calc(100% - 24px))}
@media(max-width:560px){#sheet{width:100%;max-width:100%;margin:auto 0 0;border-radius:18px 18px 0 0;border-bottom:0;max-height:92vh}}
/* The page is as wide as the view needs: three columns for Both, one reading column for Mine or World. */
:root{--page:1240px}
:root[data-view="mine"],:root[data-view="world"]{--page:860px}
main{width:min(var(--page),calc(100% - 32px))}
/* The dot beside each card on the time axis, as in the apps: the kind's glyph on its gradient. */
.entry{position:relative}
.rail-dot{position:absolute;top:11px;z-index:1;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;border:1.5px solid rgb(255 255 255/.9);box-shadow:0 1px 3px rgb(0 0 0/.18);background:linear-gradient(135deg,#6bb0ff,#3d6fe6)}
.rail-dot svg{width:12px;height:12px;fill:none;stroke:#fff;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.rail-dot.photo{background:linear-gradient(135deg,#c39bff,#7f52e8)}
.rail-dot.video{background:linear-gradient(135deg,#ff8a7a,#e8405c)}
.rail-dot.audio{background:linear-gradient(135deg,#ffc15a,#f2742c)}
.rail-dot.location{background:linear-gradient(135deg,#4fe3c4,#17a08e)}
.rail-dot.health{background:linear-gradient(135deg,#86db7a,#3fa457)}
.rail-dot.music{background:linear-gradient(135deg,#ff86c2,#d9448c)}
.rail-dot.workout{background:linear-gradient(135deg,#b4f051,#5daf1e)}
.rail-dot.deep{background:linear-gradient(135deg,#3f63b0,#1e3877)}
.rail-dot.deep.photo{background:linear-gradient(135deg,#6d52b3,#412d7c)}
.rail-dot.deep.video{background:linear-gradient(135deg,#b5434f,#7a2332)}
.rail-dot.deep.audio{background:linear-gradient(135deg,#bf6a2c,#824214)}
.rail-dot.deep.location{background:linear-gradient(135deg,#23877a,#10564d)}
.rail-dot.deep.music{background:linear-gradient(135deg,#a83a70,#702048)}
.rail-dot.deep.workout{background:linear-gradient(135deg,#4f8a1c,#2d5710)}
.rail-dot.public{background:linear-gradient(135deg,#2e427a,#16224a)}
.rail-dot.track{background:linear-gradient(135deg,#5f5e5a,#2c2c2a)}
@media(min-width:821px){
  .day.single .rail-dot{left:calc(var(--gutter) / -2 - 11px)}
  /* In Both the axis column carries the dates, so each side's dots sit in the gap between its cards and the dates. */
  .day:not(.single) .col.mine .rail-dot{right:calc(var(--gutter) / -2 - 11px)}
  .day:not(.single) .col.world .rail-dot{left:calc(var(--gutter) / -2 - 11px)}
  .day:not(.single)>h2{z-index:2}
}
@media(max-width:820px){
  .day .col{padding-left:32px;background:linear-gradient(var(--axis),var(--axis)) 10px 0/2px 100% no-repeat}
  .day .rail-dot{left:-32px}
}
/* The gap either side of the axis is 40 px, so each dot has room between the line's dates and its card. */
@media(min-width:821px){.day{column-gap:var(--gutter)}}
.rail-dot{--tint:#4d83ea}.rail-dot.photo{--tint:#9a72ea}.rail-dot.video{--tint:#f05b63}.rail-dot.audio{--tint:#f08a45}
.rail-dot.location{--tint:#2cb7a3}.rail-dot.health{--tint:#55b86a}.rail-dot.music{--tint:#e45a9d}.rail-dot.workout{--tint:#62b41e}
.rail-dot.public{--tint:#2e427a}.rail-dot.track{--tint:#5f5e5a}
/* MARK: Motion, the web's own (AZ 2026-09-30: the timeline only scrolled). Cards rise into place the first time they
   scroll into view; pointing at a card lifts it and lights its dot on the axis; the orange now dot breathes at the
   top of the axis; switching timelines cross-fades (View Transitions) and scales zoom (pinch or Ctrl + scroll).
   Only opacity and transform move, and nothing moves when the system asks for reduced motion. */
.days{position:relative}
.days.rise .entry:not(.seen):not(.shown){opacity:0;transform:translateY(14px)}
.days.rise .entry.seen{animation:rise .55s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i, 0) * 45ms)}
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@media(hover:hover){
  .entry .card{transition:transform .2s ease,box-shadow .2s ease,border-color .2s}
  .entry:hover .card{transform:translateY(-2px);box-shadow:0 14px 30px -20px rgb(0 0 0/.5)}
  .entry .rail-dot{transition:transform .2s ease,box-shadow .2s ease}
  .entry:hover .rail-dot{transform:scale(1.22);box-shadow:0 0 0 5px color-mix(in srgb,var(--tint) 24%,transparent)}
}
.now-mark{position:absolute;top:-10px;left:50%;width:12px;height:12px;margin-left:-6px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px var(--bg);z-index:3}
.now-mark::after{content:'';position:absolute;inset:0;border-radius:50%;background:var(--accent);animation:nowpulse 2.6s ease-out infinite}
@keyframes nowpulse{from{transform:scale(1);opacity:.5}to{transform:scale(3.2);opacity:0}}
@media(min-width:821px){:root[data-view="mine"] .now-mark,:root[data-view="world"] .now-mark{left:calc(var(--axis-col) + var(--gutter) / 2)}}
@media(max-width:820px){.now-mark{left:11px}}
::view-transition-old(root),::view-transition-new(root){animation-duration:.28s}
@media(prefers-reduced-motion:reduce){.days.rise .entry{opacity:1!important;transform:none!important;animation:none!important}.now-mark::after{animation:none}}
